Skip to main content

Orders Service — Epics

Service: orders-service Epic prefix: ORDERS-EPIC Last updated: 2026-04-18

Epics

ORDERS-EPIC-01 — CPOE Foundation: Order Entry, CDS, and Lifecycle

FieldValue
Issue typeEpic
SummaryCPOE: order creation, CDS checks, lifecycle management
StatusTo Do
PriorityMust
Labelsservice:orders, domain:clinical, slice:S1
Componentsorders-service, cds-engine, terminology-service
Fix versionM1
FR referencesFR-ORDERS-001, FR-ORDERS-002, FR-ORDERS-003, FR-ORDERS-004, FR-ORDERS-005
Legacy FR refsFR-CPOE-001, FR-CPOE-002, FR-CPOE-003
DependenciesORDERS-EPIC-02, cross-service: REG-EPIC-01, TERM-EPIC-01
Rollup statusNot started

Business outcome: Clinicians can enter all clinical order types electronically with mandatory CDS safety checks, replacing paper-based or disconnected ordering workflows.

Description: Provide the core CPOE engine covering all 8 order types (medication, laboratory, radiology, procedure, referral, nursing, diet, activity). Orders must pass CDS gates for allergy conflicts, drug-drug interactions, duplicate orders, and dosing range validation before activation. The order state machine tracks each order from draft through to completion or cancellation with full audit trail.

Stories: ORDERS-US-001, ORDERS-US-002, ORDERS-US-003, ORDERS-US-004, ORDERS-US-005


ORDERS-EPIC-02 — Medication Order Safety: Allergy and Interaction CDS

FieldValue
Issue typeEpic
SummaryMedication order safety: allergy and drug-interaction CDS gates
StatusTo Do
PriorityMust
Labelsservice:orders, domain:clinical, slice:S1, type:patient-safety
Componentsorders-service, cds-engine, medication-service
Fix versionM1
FR referencesFR-ORDERS-006, FR-ORDERS-007, FR-ORDERS-008
Legacy FR refsFR-CPOE-004, FR-CPOE-005
DependenciesORDERS-EPIC-01, cross-service: MED-EPIC-01, REG-EPIC-02
Rollup statusNot started

Business outcome: Medication orders cannot be activated with unacknowledged allergy conflicts or contraindicated drug combinations, reducing medication adverse events.

Description: The CDS guard enforces allergy checks (confirmed allergy → hard-stop; intolerance → warning), drug-drug interaction checks (contraindicated → hard-stop; monitored → warning), dosing range validation (above max → hard-stop; above recommended → warning), and duplicate order detection (identical active order within 24 h → warning). Any hard-stop prevents activation until an ADMIN escalation overrides with a documented clinical reason. CDS degraded mode behaviour (when the CDS engine is unavailable) must be documented and tested.

Stories: ORDERS-US-006, ORDERS-US-007, ORDERS-US-008


ORDERS-EPIC-03 — Order Routing to Downstream Services

FieldValue
Issue typeEpic
SummaryRoute activated orders to lab, radiology, and pharmacy via NATS events
StatusTo Do
PriorityMust
Labelsservice:orders, domain:clinical, slice:S1
Componentsorders-service, laboratory-service, radiology-service, medication-service, NATS
Fix versionM1
FR referencesFR-ORDERS-009, FR-ORDERS-010, FR-ORDERS-011
Legacy FR refsFR-CPOE-006, FR-REQ-001, FR-REQ-002
DependenciesORDERS-EPIC-01, cross-service: LAB-EPIC-01, RAD-EPIC-01, MED-EPIC-01
Rollup statusNot started

Business outcome: Activated orders automatically appear in the correct downstream worklist (lab, radiology, pharmacy) without manual re-entry, eliminating transcription errors.

Description: When an order is activated, the outbox pattern publishes clinical.orders.order.activated.v1 to NATS JetStream on the clinical.orders.{patientId} subject. Downstream consumers (laboratory-service, radiology-service, medication-service/pharmacy) subscribe to this stream and route the order to their respective worklists. The routing decision is type-based: laboratory → laboratory-service, radiology → radiology-service, medication → medication-service.

Stories: ORDERS-US-009, ORDERS-US-010


ORDERS-EPIC-04 — Referral Management

FieldValue
Issue typeEpic
SummaryReferral order creation, tracking, and scheduling coordination
StatusTo Do
PriorityMust
Labelsservice:orders, domain:clinical, slice:S1
Componentsorders-service, scheduling-service, communication-service
Fix versionM1
FR referencesFR-ORDERS-020, FR-ORDERS-021, FR-ORDERS-022
Legacy FR refsFR-REF-001, FR-REF-002, FR-REF-003
DependenciesORDERS-EPIC-01, cross-service: SCHED-EPIC-01, COMMS-EPIC-01
Rollup statusNot started

Business outcome: Clinicians can create and track referrals to internal and external providers with automatic notification to scheduling teams and patients, removing paper-based referral workflows.

Description: Referral orders (order type = referral) capture referral details including receiving facility, specialty, urgency, and clinical summary. On activation, clinical.orders.referral.created.v1 is published to NATS and consumed by scheduling-service (to propose appointment) and communication-service (to notify patient). Referral tracking status (pending_scheduling, scheduled, attended, declined) is updated via inbound events. Overdue referrals (> 72 h pending scheduling) trigger the OrdersReferralOverdue alert.

Stories: ORDERS-US-011, ORDERS-US-012


ORDERS-EPIC-05 — Order Set Templates and Batch Ordering

FieldValue
Issue typeEpic
SummaryOrder set templates — authoring, management, and instantiation
StatusTo Do
PriorityShould
Labelsservice:orders, domain:clinical, slice:S1
Componentsorders-service
Fix versionM2
FR referencesFR-ORDERS-030, FR-ORDERS-031, FR-ORDERS-032
Legacy FR refsFR-CPOE-010, FR-CPOE-011
DependenciesORDERS-EPIC-01
Rollup statusNot started

Business outcome: Clinicians can instantiate a multi-order protocol with a single action, reducing ordering time for common clinical protocols (e.g., AMI bundle, pre-op bloods, discharge medications).

Description: OrderSet aggregates are named templates containing 1–N order parameter entries. Clinicians and admins author templates at the tenant level; platform-global (system-provided) templates are read-only. Instantiation creates one draft Order per template entry in a single API call, runs CDS checks for each, and returns the batch result including any CDS alerts and any failed template entries. Partial failure (some orders created, some failed) is surfaced explicitly in the response.

Stories: ORDERS-US-013, ORDERS-US-014


ORDERS-EPIC-06 — FHIR R4 Order Surface

FieldValue
Issue typeEpic
SummaryFHIR R4 ServiceRequest / MedicationRequest / NutritionOrder read surface
StatusTo Do
PriorityShould
Labelsservice:orders, domain:interop, slice:S1
Componentsorders-service, interop-service
Fix versionM2
FR referencesFR-ORDERS-040, FR-ORDERS-041
Legacy FR refsFR-CPOE-020
DependenciesORDERS-EPIC-01, cross-service: INTEROP-EPIC-01
Rollup statusNot started

Business outcome: External FHIR clients (national HMIS, partner EMRs) can query patient orders as FHIR resources without platform-specific APIs.

Description: The orders-service exposes an internal FHIR read/search surface for ServiceRequest, MedicationRequest, and NutritionOrder. interop-service proxies external FHIR calls to this surface. FHIR resources are mapped from the internal Order aggregate on read (no dual-write). CapabilityStatement declares these resource types. FHIR profile conformance is validated against US Core 6.1 profiles for ServiceRequest.

Stories: ORDERS-US-015, ORDERS-US-016


ORDERS-EPIC-07 — Legacy CPOE and Requisitions Migration

FieldValue
Issue typeEpic
SummaryMigrate legacy CPOE orders and requisitions to unified orders-service
StatusTo Do
PriorityMust
Labelsservice:orders, domain:migration, slice:S0
Componentsorders-service, interop-service
Fix versionM1
FR referencesFR-ORDERS-050, FR-ORDERS-051
Legacy FR refsFR-CPOE-030, FR-REQ-010, FR-REF-010
DependenciesORDERS-EPIC-01, ORDERS-EPIC-03
Rollup statusNot started

Business outcome: All historical order data from legacy CPOE and requisitions-referrals modules is accessible in the new unified orders-service with zero data loss.

Description: Per ADR-0046, the orders-cpoe and requisitions-referrals modules are consolidated. Migration scripts translate legacy schemas to the unified orders schema, preserving order status, encounter links, and clinical detail. FHIR ID remapping ensures external references remain valid for 90 days post-cutover via interop-service redirect table. Clinical team validates 10% sample of migrated active orders before go-live.

Stories: ORDERS-US-017, ORDERS-US-018