Skip to main content

07 — Epics and User Stories

Status: populated Last updated: 2026-04-18 Companion: 01 enterprise-architecture · 02 DDD contexts · 03 platform-services · 06 traceability-matrix · 11 risks-and-tradeoffs

1. Purpose

Platform-wide index of all epics, user stories, and cross-service journeys across the 27 Ghasi-eHealth services. Service-local backlogs live at services/<service>/EPICS.md and services/<service>/USER_STORIES.md. Cross-service journeys (below, §4) cut across multiple services and anchor end-to-end E2E coverage in 18 testing-strategy.

2. ID Prefix Registry

All epics, stories, and FR references use service-aligned prefixes (zero-padded: -01, -02 for epics; -001, -002 for stories). The prefix set is normative — agents generating or reviewing backlog content MUST use these exact prefixes.

#ServiceEpic prefixStory prefixFR prefixEvent domain
1identity-serviceIDENT-EPICIDENT-USFR-IDENTidentity
2tenant-serviceTENANT-EPICTENANT-USFR-TENANTtenant
3platform-admin-servicePLTADM-EPICPLTADM-USFR-PLTADMplatform_admin
4facility-serviceFAC-EPICFAC-USFR-FACfacility
5provider-directory-servicePROVDIR-EPICPROVDIR-USFR-PROVDIRprovider_directory
6registration-serviceREG-EPICREG-USFR-REGregistration
7scheduling-serviceSCHED-EPICSCHED-USFR-SCHEDscheduling
8patient-portal-servicePORTAL-EPICPORTAL-USFR-PORTALpatient_portal
9virtual-care-serviceVCARE-EPICVCARE-USFR-VCAREvirtual_care
10patient-chart-serviceCHART-EPICCHART-USFR-CHARTpatient_chart
11immunizations-serviceIMMUN-EPICIMMUN-USFR-IMMUNimmunizations
12care-plan-serviceCAREPL-EPICCAREPL-USFR-CAREPLcare_plan
13orders-serviceORDERS-EPICORDERS-USFR-ORDERSorders
14medication-serviceMED-EPICMED-USFR-MEDmedication
15ghasi-eprescribing-gateway-serviceEPRX-EPICEPRX-USFR-EPRXeprescribing
16laboratory-serviceLAB-EPICLAB-USFR-LABlaboratory
17radiology-serviceRAD-EPICRAD-USFR-RADradiology
18billing-serviceBILL-EPICBILL-USFR-BILLbilling
19claims-serviceCLAIMS-EPICCLAIMS-USFR-CLAIMSclaims
20communication-serviceCOMMS-EPICCOMMS-USFR-COMMScommunication
21interop-serviceINTEROP-EPICINTEROP-USFR-INTEROPinterop
22terminology-serviceTERM-EPICTERM-USFR-TERMterminology
23document-serviceDOC-EPICDOC-USFR-DOCdocument
24ai-gateway-serviceAIGW-EPICAIGW-USFR-AIGWai_gateway
25audit-serviceAUDIT-EPICAUDIT-USFR-AUDITaudit
26config-serviceCONFIG-EPICCONFIG-USFR-CONFIGconfig
27population-health-servicePOPHEALTH-EPICPOPHEALTH-USFR-POPHEALTHpopulation_health

3. Per-service backlog index

Counts below are minima; service docs are the source of truth. Legacy FR refs (e.g., FR-IAM-AUTH-001) are preserved in a "Legacy ref" column in each service's USER_STORIES.md and mapped to the new prefix.

ServiceEpicsStories (min.)Sources mergedEPICSUSER_STORIES
identity-service618iam, access-policy, licensing../services/identity-service/EPICS.md../services/identity-service/USER_STORIES.md
tenant-service410tenant../services/tenant-service/EPICS.md../services/tenant-service/USER_STORIES.md
platform-admin-service412platform-admin../services/platform-admin-service/EPICS.md../services/platform-admin-service/USER_STORIES.md
facility-service410facility-management, hierarchy../services/facility-service/EPICS.md../services/facility-service/USER_STORIES.md
provider-directory-service410provider-directory../services/provider-directory-service/EPICS.md../services/provider-directory-service/USER_STORIES.md
registration-service514registration../services/registration-service/EPICS.md../services/registration-service/USER_STORIES.md
scheduling-service516scheduling../services/scheduling-service/EPICS.md../services/scheduling-service/USER_STORIES.md
patient-portal-service514patient-portal../services/patient-portal-service/EPICS.md../services/patient-portal-service/USER_STORIES.md
virtual-care-service412virtual-care../services/virtual-care-service/EPICS.md../services/virtual-care-service/USER_STORIES.md
patient-chart-service724patient-chart, problem-list, allergies, vitals, clinical-notes../services/patient-chart-service/EPICS.md../services/patient-chart-service/USER_STORIES.md
immunizations-service410immunizations../services/immunizations-service/EPICS.md../services/immunizations-service/USER_STORIES.md
care-plan-service410care-plans../services/care-plan-service/EPICS.md../services/care-plan-service/USER_STORIES.md
orders-service618orders-cpoe, requisitions-referrals../services/orders-service/EPICS.md../services/orders-service/USER_STORIES.md
medication-service618medication-management, pharmacy../services/medication-service/EPICS.md../services/medication-service/USER_STORIES.md
ghasi-eprescribing-gateway-service514ghasi-e-prescribing-gateway../services/ghasi-eprescribing-gateway-service/EPICS.md../services/ghasi-eprescribing-gateway-service/USER_STORIES.md
laboratory-service618laboratory-lis, results../services/laboratory-service/EPICS.md../services/laboratory-service/USER_STORIES.md
radiology-service514radiology-pacs../services/radiology-service/EPICS.md../services/radiology-service/USER_STORIES.md
billing-service514billing../services/billing-service/EPICS.md../services/billing-service/USER_STORIES.md
claims-service412claims, insurance../services/claims-service/EPICS.md../services/claims-service/USER_STORIES.md
communication-service514messaging, digital-communication../services/communication-service/EPICS.md../services/communication-service/USER_STORIES.md
interop-service514fhir-gateway, hl7v2-interop../services/interop-service/EPICS.md../services/interop-service/USER_STORIES.md
terminology-service410terminology../services/terminology-service/EPICS.md../services/terminology-service/USER_STORIES.md
document-service410document-management../services/document-service/EPICS.md../services/document-service/USER_STORIES.md
ai-gateway-service514ai-orchestrator../services/ai-gateway-service/EPICS.md../services/ai-gateway-service/USER_STORIES.md
audit-service410audit../services/audit-service/EPICS.md../services/audit-service/USER_STORIES.md
config-service410config-resolver../services/config-service/EPICS.md../services/config-service/USER_STORIES.md
population-health-service514health-population../services/population-health-service/EPICS.md../services/population-health-service/USER_STORIES.md

4. Cross-service user journeys (J-01 … J-25)

Each journey is named J-NN, traces one actor through ≥ 3 services, and maps to an E2E gate in 18 testing-strategy. Starred (*) entries are nightly blocking E2E gates.

4.1 Journey catalogue

IDJourneyPrimary actorServices touchedAIOfflineE2E gate
J-01*Tenant onboarding → first facility liveTenant Admintenant · identity · platform-admin · facility · provider-directory · config · auditYes
J-02*New patient registration → first encounterRegistration Clerk → Clinicianregistration · patient-chart · scheduling · provider-directory · facility · auditoptional (duplicate suggest)Yes (desktop station)Yes
J-03*Clinician SSO sign-in → open chart → place orderClinicianidentity · patient-chart · orders · terminology · medication · auditYesYes
J-04*E-prescribing cross-facility fillPrescriber → Pharmacistorders · medication · eprescribing-gateway · interop · auditDDI checkNoYes
J-05*Lab order → specimen → result reviewClinician · Lab Tech · Clinicianorders · laboratory · interop · patient-chart · communication · auditpartial (lab)Yes
J-06*Radiology order → imaging study → reportClinician · Radiologistorders · radiology · interop · patient-chart · document · auditreport-drafting (AIGW)NoYes
J-07*Immunization campaign enrollment → dose → HMIS exportImmunization Nurse · Public Healthimmunizations · patient-chart · population-health · interop · auditYes (field clinics)Yes
J-08*Virtual visit → clinical note → billingPatient · Clinicianpatient-portal · virtual-care · communication · patient-chart · billing · claims · auditscribe draftYes
J-09Patient portal self-registration → link to chartPatient · Reg. Clerkpatient-portal · identity · registration · communication · auditidentity-matching hint
J-10*Patient books appointment via portalPatientpatient-portal · scheduling · provider-directory · communication · auditYes
J-11*Provider offline clinic → sync on reconnectProvider (mobile)patient-chart · registration · immunizations · orders · vitals · auditYes (Realm)Yes
J-12Lab result released to patient portalLab Tech → Patientlaboratory · patient-chart · patient-portal · communication · audit
J-13Care plan creation → task assignment → follow-upClinician · Patient · Care Coord.care-plan · patient-chart · communication · scheduling · auditplan suggestYes
J-14*Claim submission → remittance → reconciliationBilling Clerk · Payerbilling · claims · interop · auditcoding hintYes
J-15*HMIS indicator export (monthly MoPH)Population Health Analystpopulation-health · patient-chart · laboratory · immunizations · interop · auditYes
J-16*Consent change → downstream revocationPatient · all services reading PHIidentity · patient-portal · audit · + all PHI consumersYesYes
J-17*Break-glass access → audit reviewClinician (emergency) · Complianceidentity · patient-chart · auditYes (offline break-glass queue)Yes
J-18Medication reconciliation at admissionPharmacist · Clinicianmedication · patient-chart · eprescribing-gateway · orders · auditreconciliation assistYes
J-19*Multi-tenant cross-facility referralClinician A → Clinician Bprovider-directory · interop · patient-chart · orders · communication · auditYes
J-20Document upload → OCR → chart linkageReg. Clerkdocument · patient-chart · auditOCR + classification
J-21*DSAR — patient data exportPatient (DPO for minor)patient-portal · audit · + all PHI ownersYes
J-22Provider credentialing update → licensing gateCredentialing Officerprovider-directory · identity · facility · audit
J-23*Population outreach — screening reminder wavePublic Health Nursepopulation-health · communication · patient-portal · auditcohort segmentationYes
J-24Terminology update (ICD-11) platform rolloutTerminologist · all clinical servicesterminology · config · audit · + all clinical readers
J-25*Offline immunization field clinic → national registryNurse (mobile) · MoPHimmunizations · interop · population-health · auditYes (full offline)Yes

4.2 Cross-cutting invariants

  • Every journey logs end-to-end traces carrying trace_id, tenant_id, actor_id_hash, and correlation_id per 12 observability-telemetry.
  • Every journey respects WCAG 2.2 AA and LTR/RTL (Pashto, Dari, Arabic, English) per 08 design guidelines.
  • Every journey that writes PHI emits an audit.* event; loss of audit blocks the transaction.
  • Every offline journey must pass the sync conflict matrix per 16 offline-first.

4.3 Journey diagrams (anchors)

Detailed sequence + state diagrams live under docs/frontend/journeys/J-NN-<slug>.md. Each file MUST contain: actor list, preconditions, mermaid sequence, service call matrix, failure modes, E2E test IDs.

5. Epic synthesis rules

  1. Drive from FR not implementation — Epics reference FR IDs (see 06 traceability-matrix) and outcomes, not specific controllers.
  2. One aggregate rarely owns > 2 epics — If it does, split the aggregate.
  3. Legacy FR preservation — Merging multi-module services (e.g., identity-service consolidates iam + access-policy + licensing) preserves the legacy FR-IAM-* / FR-ACCESS-* / FR-LIC-* refs in a Legacy ref column, mapped to the new FR-IDENT-*.
  4. Slice labels — Each epic carries a slice label (S0 foundation, S1 clinical MVP, S2 add-ons, S3 national interop, S4 AI/analytics) for release planning.
  5. Story sizing — Fibonacci points (1/2/3/5/8/13). Stories > 13 pts split mandatory.

6. Backlog governance

ConcernRule
Prefix uniquenessEnforced by CI lint rule scanning services/**/EPICS.md and **/USER_STORIES.md.
Cross-service linkDependencies field declares {OTHER_PREFIX}-EPIC-NN / -US-NNN explicitly.
CoverageEvery epic lists ≥ 1 FR; every story lists ≥ 1 FR. CI fails on empty FR columns.
Traceability06 traceability-matrix links FR → Epic → Story → Test ID → PR.
Jira syncEach doc is Jira-ready CSV-importable; round-trip keeps IDs stable.

7. Open Questions

  • Whether population-health epics should split further into "chronic registries" vs "outbreak response" once the MoPH indicator set stabilises.
  • Journey numbering above 25 — reserve J-26..J-40 for virtual care secondary use cases and research consent flows as those emerge.