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
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | CPOE: order creation, CDS checks, lifecycle management |
| Status | To Do |
| Priority | Must |
| Labels | service:orders, domain:clinical, slice:S1 |
| Components | orders-service, cds-engine, terminology-service |
| Fix version | M1 |
| FR references | FR-ORDERS-001, FR-ORDERS-002, FR-ORDERS-003, FR-ORDERS-004, FR-ORDERS-005 |
| Legacy FR refs | FR-CPOE-001, FR-CPOE-002, FR-CPOE-003 |
| Dependencies | ORDERS-EPIC-02, cross-service: REG-EPIC-01, TERM-EPIC-01 |
| Rollup status | Not 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
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | Medication order safety: allergy and drug-interaction CDS gates |
| Status | To Do |
| Priority | Must |
| Labels | service:orders, domain:clinical, slice:S1, type:patient-safety |
| Components | orders-service, cds-engine, medication-service |
| Fix version | M1 |
| FR references | FR-ORDERS-006, FR-ORDERS-007, FR-ORDERS-008 |
| Legacy FR refs | FR-CPOE-004, FR-CPOE-005 |
| Dependencies | ORDERS-EPIC-01, cross-service: MED-EPIC-01, REG-EPIC-02 |
| Rollup status | Not 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
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | Route activated orders to lab, radiology, and pharmacy via NATS events |
| Status | To Do |
| Priority | Must |
| Labels | service:orders, domain:clinical, slice:S1 |
| Components | orders-service, laboratory-service, radiology-service, medication-service, NATS |
| Fix version | M1 |
| FR references | FR-ORDERS-009, FR-ORDERS-010, FR-ORDERS-011 |
| Legacy FR refs | FR-CPOE-006, FR-REQ-001, FR-REQ-002 |
| Dependencies | ORDERS-EPIC-01, cross-service: LAB-EPIC-01, RAD-EPIC-01, MED-EPIC-01 |
| Rollup status | Not 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
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | Referral order creation, tracking, and scheduling coordination |
| Status | To Do |
| Priority | Must |
| Labels | service:orders, domain:clinical, slice:S1 |
| Components | orders-service, scheduling-service, communication-service |
| Fix version | M1 |
| FR references | FR-ORDERS-020, FR-ORDERS-021, FR-ORDERS-022 |
| Legacy FR refs | FR-REF-001, FR-REF-002, FR-REF-003 |
| Dependencies | ORDERS-EPIC-01, cross-service: SCHED-EPIC-01, COMMS-EPIC-01 |
| Rollup status | Not 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
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | Order set templates — authoring, management, and instantiation |
| Status | To Do |
| Priority | Should |
| Labels | service:orders, domain:clinical, slice:S1 |
| Components | orders-service |
| Fix version | M2 |
| FR references | FR-ORDERS-030, FR-ORDERS-031, FR-ORDERS-032 |
| Legacy FR refs | FR-CPOE-010, FR-CPOE-011 |
| Dependencies | ORDERS-EPIC-01 |
| Rollup status | Not 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
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | FHIR R4 ServiceRequest / MedicationRequest / NutritionOrder read surface |
| Status | To Do |
| Priority | Should |
| Labels | service:orders, domain:interop, slice:S1 |
| Components | orders-service, interop-service |
| Fix version | M2 |
| FR references | FR-ORDERS-040, FR-ORDERS-041 |
| Legacy FR refs | FR-CPOE-020 |
| Dependencies | ORDERS-EPIC-01, cross-service: INTEROP-EPIC-01 |
| Rollup status | Not 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
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | Migrate legacy CPOE orders and requisitions to unified orders-service |
| Status | To Do |
| Priority | Must |
| Labels | service:orders, domain:migration, slice:S0 |
| Components | orders-service, interop-service |
| Fix version | M1 |
| FR references | FR-ORDERS-050, FR-ORDERS-051 |
| Legacy FR refs | FR-CPOE-030, FR-REQ-010, FR-REF-010 |
| Dependencies | ORDERS-EPIC-01, ORDERS-EPIC-03 |
| Rollup status | Not 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