Share java nro up đệ,

vuanh169

New member
Java nro, java ** #Java #NRO #nroup #Javatutorial #javaprogramming **

## java nro lên

Java Nro UP là một thư viện Java cung cấp API dễ sử dụng để tương tác với [Cơ quan đăng ký quốc gia về thuốc không kê đơn] (https://nro.fda.gov/).Thư viện có thể được sử dụng để tìm kiếm thuốc theo tên, thành phần hoặc nhà sản xuất và để lấy thông tin về các loại thuốc như chỉ định, tác dụng phụ và cảnh báo của chúng.

### Cài đặt Java NRO lên

Để cài đặt Java NRO UP, bạn có thể sử dụng lệnh maven sau:

`` `
<phụ thuộc>
<ProupId> gov.fda.nro </groupID>
<Partifactid> nro-up </artifactid>
<phiên bản> 1.0.0 </phiên bản>
</phụ thuộc>
`` `

### sử dụng java nro lên

Để sử dụng Java NRO UP, bạn có thể tạo một đối tượng `nroupclient` mới và sau đó sử dụng các phương thức của đối tượng để tương tác với NRO.Ví dụ, các mã sau đây tìm kiếm các loại thuốc có chứa thành phần "acetaminophen":

`` `
NroupClient Client = new nRoupClient ();
Danh sách <press> thuốc = client.SearchByeRedient ("acetaminophen");
`` `

Biến `thuốc 'hiện sẽ chứa một danh sách tất cả các loại thuốc có chứa thành phần" acetaminophen ".Sau đó, bạn có thể lặp lại qua danh sách các loại thuốc và in ra thông tin của họ.

### Ví dụ

Mã sau đây cho thấy một ví dụ về cách sử dụng Java NRO để tìm kiếm thuốc theo tên:

`` `
Nhập GOV.FDA.NRO.NroupClient;
Nhập GOV.FDA.NRO.Model.Drug;

lớp công khai nroupExample {

công khai void void main (String [] args) {
// Tạo một đối tượng nroupclient mới.
NroupClient Client = new nRoupClient ();

// Tìm kiếm các loại thuốc có chứa thành phần "acetaminophen".
Danh sách <press> thuốc = client.SearchByeRedient ("acetaminophen");

// In ra thông tin cho mỗi loại thuốc.
for (thuốc thuốc: thuốc) {
System.out.println ("thuốc:" + thuốc.getName ());
System.out.println ("Thành phần:" + thuốc.getingRedents ());
System.out.println ("Chỉ định:" + thuốc.
System.out.println ("Tác dụng phụ:" + thuốc.getsideffects ());
System.out.println ("Cảnh báo:" + thuốc.getWarnings ());
}
}
}
`` `

### Tài nguyên

* [Tài liệu Java Nro Up] (https://nro.fda.gov/developers/nro-up-library)
* [Đăng ký quốc gia về thuốc không kê đơn] (https://nro.fda.gov/)
=======================================
Java nro, Java **#Java #NRO #nroup #Javatutorial #javaprogramming**

## Java NRO UP

Java NRO UP is a Java library that provides an easy-to-use API for interacting with the [National Registry of Over-the-Counter Drugs](https://nro.fda.gov/). The library can be used to search for drugs by name, ingredient, or manufacturer, and to retrieve information about drugs such as their indications, side effects, and warnings.

### Installing Java NRO UP

To install Java NRO UP, you can use the following Maven command:

```
<dependency>
<groupId>gov.fda.nro</groupId>
<artifactId>nro-up</artifactId>
<version>1.0.0</version>
</dependency>
```

### Using Java NRO UP

To use Java NRO UP, you can create a new `NroUpClient` object and then use the object's methods to interact with the NRO. For example, the following code searches for drugs that contain the ingredient "acetaminophen":

```
NroUpClient client = new NroUpClient();
List<Drug> drugs = client.searchByIngredient("acetaminophen");
```

The `drugs` variable will now contain a list of all drugs that contain the ingredient "acetaminophen". You can then iterate through the list of drugs and print out their information.

### Example

The following code shows an example of how to use Java NRO UP to search for drugs by name:

```
import gov.fda.nro.NroUpClient;
import gov.fda.nro.model.Drug;

public class NroUpExample {

public static void main(String[] args) {
// Create a new NroUpClient object.
NroUpClient client = new NroUpClient();

// Search for drugs that contain the ingredient "acetaminophen".
List<Drug> drugs = client.searchByIngredient("acetaminophen");

// Print out the information for each drug.
for (Drug drug : drugs) {
System.out.println("Drug: " + drug.getName());
System.out.println("Ingredients: " + drug.getIngredients());
System.out.println("Indications: " + drug.getIndications());
System.out.println("Side effects: " + drug.getSideEffects());
System.out.println("Warnings: " + drug.getWarnings());
}
}
}
```

### Resources

* [Java NRO UP Documentation](https://nro.fda.gov/developers/nro-up-library)
* [National Registry of Over-the-Counter Drugs](https://nro.fda.gov/)
 
Join Telegram ToolsKiemTrieuDoGroup
Back
Top