public class NihInteractionServiceProxy extends java.lang.Object implements InteractionService
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
URL_BASE |
static java.lang.String |
URL_INTERACTION_DRUG_TEMPLATE |
static java.lang.String |
URL_INTERACTION_LIST_TEMPLATE |
| Constructor and Description |
|---|
NihInteractionServiceProxy() |
| Modifier and Type | Method and Description |
|---|---|
InteractionDrugResponse |
findDrugInteractions(java.lang.String rxcui)
Get the drug interactions for a specified drug.
|
InteractionListResponse |
findInteractionsFromList(java.util.List<java.lang.String> rxcuis)
Find the interactions between a list of drugs.
|
protected <T> T |
getResponseFromNihServer(java.lang.Class<T> classType,
java.lang.String template,
java.lang.String[] parameters) |
protected <T> T |
getResponseFromNihServer(java.net.URL url,
java.lang.Class<T> classType) |
public static final java.lang.String URL_BASE
public static final java.lang.String URL_INTERACTION_LIST_TEMPLATE
public static final java.lang.String URL_INTERACTION_DRUG_TEMPLATE
public InteractionListResponse findInteractionsFromList(java.util.List<java.lang.String> rxcuis) throws java.io.IOException
InteractionServicefindInteractionsFromList in interface InteractionServicerxcuis - the list of RxNorm drugs, specified by the RxNorm identifiers. The identifiers can represent
ingredients (e.g. simvastatin), brand names (e.g. Tylenol) or branded or clinical drugs (e.g.
Morphine 50 mg oral tablet). A maximum of 50 identifiers is allowed.java.io.IOExceptionpublic InteractionDrugResponse findDrugInteractions(java.lang.String rxcui) throws java.io.IOException
InteractionServicefindDrugInteractions in interface InteractionServicerxcui - the RxNorm identifier of the drug.java.io.IOExceptionprotected <T> T getResponseFromNihServer(java.lang.Class<T> classType,
java.lang.String template,
java.lang.String[] parameters)
throws java.io.IOException
java.io.IOExceptionprotected <T> T getResponseFromNihServer(java.net.URL url,
java.lang.Class<T> classType)
throws java.io.IOException
java.io.IOException