The eRx Service is currently in beta.
Medication Search
Medication search allows you to search by name. Searching for medications is essential for recording patient medication history so that the eRx service can protect patients from drug interactions. In this guide, we'll cover the basic functionality of medication search as well as a recommended approach for how and when to use medication search in your EHR.
Access Policy
To search for medications, your user needs to have the following access policy:
{
"rule": [
{
"action": "eRx:SearchMedication",
"resource": "eRx:Medication",
},
],
}
Code Examples
Here is an example of how to search for medications.
import Oystehr from '@oystehr/sdk';
const osytehr = new Oystehr({
accessToken: "<your_access_token>",
});
const { medications } = await oystehr.erx.searchMedications({
name: 'lisinopril',
});
Example 200 response:
[
{
"id": 5285,
"routedDoseFormDrugId": 5517,
"name": "Lisinopril-hydroCHLOROthiazide Oral Tablet",
"rxcui": 197886,
"ndc": "76282044790",
"strength": "20-12.5 MG",
"isObsolete": false
},
]
Using Medication Search with the eRx Service
To receive medication interaction alerts for a patient's medication history, you'll need to have explicitly synced that medication for a given patient. So, the expected workflow for adding to the patient's medication history looks like this:
- Search for a medication
- From the search results, choose the identifier of the correct medication
- Create a MedicationStatement (opens in a new tab) FHIR resource for this patient. For a code sample of how to create this resource, see the patient sync documentation.
- Sync the patient
Once these steps are completed, the ePrescribing interface will flag drug interactions and you'll be able to check for interactions explicitly using the interactions endpoints in the eRx Service (opens in a new tab).