Skip to main content
Inferred status follows FHIR’s MedicationRequest.status vocabulary. Five possible values, each with deterministic triggers.

The table

StatusTriggered byBase confidence
activerecent_dispense (within 90d) OR active_order (MedicationRequest status=active, within 180d) OR self_reported_active0.75 – 0.95 depending on signals
completedcourse_completed — explicit completed status OR effectivePeriod.end in the past0.85 – 0.95
stoppedorder_stoppedMedicationRequest.status = stopped0.85
cancelledorder_cancelledMedicationRequest.status = cancelled0.85
unknownNo classifiable signal, or all data is >365 days stale0.30 – 0.50

Precedence (when multiple rules fire)

active > completed > prescription_expired > stopped > cancelled > unknown
If both active_order and order_stopped fire on resources that resolve to the same medication (via RxNorm grouping), active wins — the current state trumps historical state.

Confidence adjustments

Base confidence values are modified by:
  • Corroboration — multiple active-leaning signals firing for the same medication (e.g., active_order + recent_dispense) can push confidence to ~0.95.
  • Missing date — −0.20 penalty
  • Missing RxNorm code — −0.05 penalty
  • Staleness decay — continuous curve past 90 days. A 6-month-old signal is worth more than a 2-year-old one.

Filtering by status

Pass statuses in the request body to filter the response post-inference:
{
  "resources": [ ... ],
  "statuses": ["active"]
}
The engine still runs on all resources; the filter only trims the output list. Good for “show me just active meds” without re-invoking.

Special cases

If a MedicationStatement has reported=true (patient-reported, not clinician-recorded), the self_reported_active rule fires with a lower base confidence. Clinician-recorded statements carry more weight.
Grouping still works on normalized display names, but confidence takes a −0.05 penalty since we can’t confirm we’re looking at the right drug across sources.
If a MedicationRequest is status=active but authored >365 days ago and no MedicationDispense exists, prescription_expired fires and status becomes completed. The order was never actually used.