Medication Service — Epics
Service: medication-service Epic prefix: MED-EPIC Last updated: 2026-04-17
Epics
MED-EPIC-01 — Longitudinal medication list and prescribing
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | Medication list, prescribing draft/sign/update, discontinue, hold, resume |
| Status | To Do |
| Priority | Must |
| Labels | service:medication-service, domain:medication, slice:S1 |
| Components | prescription, med-list, api |
| Fix version | M1 |
| FR references | FR-MED-001..003, FR-MED-010..012 |
| Legacy FR refs | FR-MEDS-001..003, FR-MEDS-010..012, BR-MEDS-001 |
| Dependencies | ORDERS-EPIC-01, CHART-EPIC-01, TERM-EPIC-01 |
| Rollup status | Partial |
Business outcome: Clinicians can safely prescribe and maintain a single source-of-truth medication list for every patient. Foundation for every other medication workflow.
Description: Deliver the core prescription aggregate and medication list APIs. Status vocabulary aligns with FHIR MedicationRequest.status. Supports structured sig (dose/route/frequency/duration), free-text instructions, substitution flags (DAW), renewals and refills. Uses terminology-service for codes.
Stories: MED-US-001, MED-US-002, MED-US-003, MED-US-004
MED-EPIC-02 — Medication safety checks and alert overrides
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | Allergy, drug-drug, drug-condition, duplicate checks with override workflow |
| Status | To Do |
| Priority | Must |
| Labels | service:medication-service, domain:safety, slice:S1 |
| Components | safety-check, drug-kb, override |
| Fix version | M1 |
| FR references | FR-MED-030..032 |
| Legacy FR refs | FR-MEDS-030..032, BR-MEDS-001 |
| Dependencies | CHART-EPIC-03 (allergies), TERM-EPIC-02 |
| Rollup status | Partial |
Business outcome: Prevent adverse drug events. Ensure every signing prescriber is presented with safety-relevant alerts and records overrides with reason + KB snapshot for auditable governance.
Description: Integrate configurable drug knowledge base behind DrugKnowledgeBase port. Blocking alerts block sign unless override with ≥10-char reason and drugKbVersion captured. Overrides emitted as DetectedIssue + dedicated event.
Stories: MED-US-010, MED-US-011, MED-US-012
MED-EPIC-03 — Reconciliation sessions and MAR
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | Reconciliation at transitions of care and medication administration record |
| Status | To Do |
| Priority | Must |
| Labels | service:medication-service, domain:reconciliation, slice:S1 |
| Components | reconciliation, mar |
| Fix version | M1-M2 |
| FR references | FR-MED-020..021, FR-MED-022 |
| Legacy FR refs | FR-MEDS-020..021 |
| Dependencies | MED-EPIC-01, REG-EPIC-01 (encounter) |
| Rollup status | Partial |
Business outcome: Consistent medication list across transitions (admission, transfer, discharge); nurses have a reliable MAR to chart administration events.
Description: Side-by-side comparison of home vs facility meds. Per-line continue/discontinue/modify decisions. MAR events (given / held / refused / not-available) with corrections as linked entries.
Stories: MED-US-020, MED-US-021, MED-US-022
MED-EPIC-04 — Pharmacy fulfillment queue and dispensing
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | Ingest gateway MRs, dispense with inventory decrement, partial/return |
| Status | To Do |
| Priority | Must |
| Labels | service:medication-service, domain:pharmacy, slice:S2 |
| Components | fulfillment, dispense, inventory |
| Fix version | M2 |
| FR references | FR-MED-040, FR-MED-060..066 |
| Legacy FR refs | FR-PHARM-009, FR-PHARM-040..046, BR-PHARM-004 |
| Dependencies | EPRX-EPIC-01 (gateway MR), BILL-EPIC-02 |
| Rollup status | Partial |
Business outcome: Pharmacies can fulfill prescriptions reliably — ingest gateway-routed MRs, atomic dispense with inventory, partial/return workflows.
Description: Consume eprescribing.medication_request.created.v1; maintain fulfillment projection keyed by gateway_medication_request_fhir_id. Dispense performs atomic inventory decrement + writes MedicationDispense. Posts dispense back to gateway. Emits billing event.
Stories: MED-US-030, MED-US-031, MED-US-032, MED-US-033
MED-EPIC-05 — Inventory, recalls, and expiry management
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | Drug inventory per node, reorder/expiry alerts, recall management |
| Status | To Do |
| Priority | Must |
| Labels | service:medication-service, domain:inventory, slice:S2 |
| Components | inventory, recall, reorder |
| Fix version | M2 |
| FR references | FR-MED-070..076 |
| Legacy FR refs | FR-PHARM-050..056, BR-PHARM-009 |
| Dependencies | MED-EPIC-04 |
| Rollup status | Partial |
Business outcome: Pharmacies avoid stock-outs, expired/recalled dispense, and comply with supply-chain traceability.
Description: Stock item tracking by lot + expiry + supplier. Reorder alerts below configurable point. Expiry horizon alerts. Recall marking blocks dispense. Supports SupplyDelivery FHIR for external exchange.
Stories: MED-US-040, MED-US-041, MED-US-042
MED-EPIC-06 — Controlled-substance controls (prescribe + dispense)
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | Step-up MFA, counter-sign at dispense, enhanced audit, disclosure accounting |
| Status | To Do |
| Priority | Must |
| Labels | service:medication-service, domain:controlled-substance, slice:S3 |
| Components | controlled-substance, audit, identity-step-up |
| Fix version | M3 |
| FR references | FR-MED-050..051, FR-MED-090..093 |
| Legacy FR refs | FR-PHARM-033..034, FR-PHARM-072, BR-PHARM-005 |
| Dependencies | IDENT-EPIC-04 (MFA step-up), AUDIT-EPIC-01 |
| Rollup status | Not started |
Business outcome: Regulatory compliance for Schedule II–V. Auditable chain-of-custody for prescribe and dispense of controlled substances.
Description: Enforce step-up MFA for prescribe. Counter-sign (actor ≠ dispenser) at dispense. Disclosure-accounting report. 10-year retention. MoPH export format support.
Stories: MED-US-050, MED-US-051, MED-US-052
MED-EPIC-07 — Standalone offline-capable pharmacy portal
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | Pharmacy portal UI with 4h+ offline dispensing and label printing |
| Status | To Do |
| Priority | Should |
| Labels | service:medication-service, type:ui, slice:S3 |
| Components | portal, offline, labels |
| Fix version | M3 |
| FR references | FR-MED-080..084 |
| Legacy FR refs | FR-PHARM-060..064, NFR-PHARM-005 |
| Dependencies | MED-EPIC-04, IDENT-EPIC-02 (device binding) |
| Rollup status | Not started |
Business outcome: Pharmacies operate through intermittent connectivity without blocking care; labels printed locally.
Description: Separate Next.js shell. Offline queue up to 4h. Device-bound encryption for cached PHI. RTL/LTR support. Label printing (prescription + dispense).
Stories: MED-US-060, MED-US-061, MED-US-062
MED-EPIC-08 — External adapters (NCPDP SCRIPT, HL7 v2)
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | Optional NCPDP SCRIPT and HL7 v2 adapters for legacy interop |
| Status | To Do |
| Priority | Could |
| Labels | service:medication-service, domain:interop, slice:S4 |
| Components | ncpdp, hl7v2 |
| Fix version | M4 |
| FR references | FR-MED-041, FR-MED-042 |
| Legacy FR refs | FR-PHARM-010, BR-PHARM-010 |
| Dependencies | INTEROP-EPIC-02 |
| Rollup status | Not started |
Business outcome: Enable integration with legacy pharmacy networks in markets where NCPDP SCRIPT / HL7 v2 is required.
Description: Adapter-pattern integrations. NCPDP NewRx, RxChangeRequest, CancelRx. HL7 v2 RDE^O11 / RDS^O13 via hl7v2-interop. Retry + DLQ; prescriber notification on final failure.
Stories: MED-US-070, MED-US-071