Oystehr
eRx
Drug Interactions
🚧

The eRx Service is currently in beta.

Drug Interactions

The eRx Service provides drug interaction checks to help ensure patient safety by identifying potential interactions between prescribed medications and patient allergies. Checks are performed against allergies and medication history that have been synced with the eRx Service. Prospective "precheck" interactions can also be performed for a given medication.

This page describes how to use the eRx Service directly to perform drug interaction checks. Interaction checks are also performed as part of the ePrescribing workflow on DoseSpot.

Access Policy

To perform drug interaction checks, your user needs to have the following minimum access policy:

{
  "rule": [
    {
      "action": "eRx:Check",
      "resource": "eRx:Interaction",
      "effect": "Allow"
    },
  ]
}

Sync Patient Data

Prior to using drug interaction checks, you must first sync patient data with the eRx Service. This ensures that the patient's correct allergies and medication history are available for interaction checking.

Check Patient Record for DDI and DAI

Once patient data has been synced, you can check the patient's record for drug-drug interactions (DDI) and drug-allergy interactions (DAI). Here is an example of how to perform a check:

ddi-dai.ts
import Oystehr from '@oystehr/sdk';
import { Patient } from 'fhir/r4b';
 
const patientId = '<your_fhir_patient_id>';
 
const oystehr = new Oystehr({ accessToken: '<your_access_token>' });
await oystehr.erx.syncPatient({ patientId });
const dai = await oystehr.erx.checkAllergyInteractions({ patientId });
const ddi = await oystehr.erx.checkMedicationInteractions({ patientId });

Check Prospective Medication for DDI and DAI

Before dispensing or administering a medication, you can check for potential drug-drug interactions (DDI) and drug-allergy interactions (DAI) by providing the medication's Medi-Span Drug ID. You can find the Medi-Span Drug ID for a particular medication using Medication Search. Here is an example of how to perform a check once you have the Medi-Span Drug ID:

interactions.ts
import Oystehr from '@oystehr/sdk';
import { Patient } from 'fhir/r4b';
 
const patientId = '<your_fhir_patient_id>';
const drugId = '<medispan_drug_id>'; // get this from Medication Search
 
const oystehr = new Oystehr({ accessToken: '<your_access_token>' });
await oystehr.erx.syncPatient({ patientId });
const { allergies, medications } = await oystehr.erx.checkPrecheckInteractions({ patientId, drugId });