Skip to main content

Drug-Drug Interaction (DDI)

How it works

On every MedicationRequest write to HAPI FHIR, JamGuard.DrugDrugInteractionRule fires:

  1. Fetch golden ID — extract Patient.link[refer] from the patient resource
  2. Fetch all active medicationsGET /fhir/MedicationRequest?patient=GOLDEN-{id}&status=active
  3. Extract RxNorm CUIs — via JamTS or stored on the MedicationRequest
  4. Query NLM RxNorm API:
GET https://rxnav.nlm.nih.gov/REST/interaction/list?rxcuis=855288+1191
  1. Evaluate severity:
SeverityJamGuard action
MAJORBlock write + alert prescriber immediately
MODERATEWrite proceeds + warning card to portal
MINORLogged only, no alert

Overriding a MAJOR DDI

The prescriber can acknowledge and override a MAJOR DDI via the admin API:

POST /api/ddi/override
{
"transactionId": "BR03-26060612-042",
"prescriberId": "Practitioner/pr-perera-001",
"reason": "Clinical risk accepted — patient monitored for bleeding"
}

The override is logged as an AuditEvent with the prescriber, reason, and timestamp.

Why cross-branch matters

Without JamGuard, a clinician at Branch 03 has no visibility of Aspirin prescribed at Branch 07. The local HAPI query would return zero active medications for MRN-9901-BR03 — because the Aspirin is stored under MRN-20891-BR07. JamGuard queries by golden ID, which spans all branches.