Skip to main content

Facility Service — Epics

Service: facility-service Epic prefix: FAC-EPIC Last updated: 2026-04-17

Epics

FAC-EPIC-01 — Hierarchy graph & profiles

FieldValue
Issue typeEpic
SummaryDAG hierarchy graph + pluggable HierarchyProfile
StatusTo Do
PriorityMust
Labelsservice:facility-service, domain:facility, slice:S0
Componentshierarchy, profile
Fix versionM0
FR referencesFR-FAC-HIER-001..010
Legacy FR refsFR-HIER-NODE-001..006, FR-HIER-EDGE-001..005, FR-HIER-PROF-001..004, FR-HIER-TRV-001..006
DependenciesTENANT-EPIC-01, IDENT-EPIC-01
Rollup statusNot started

Business outcome: Unlocks licensing, access-policy, scheduling, and every clinical service — all of which must scope data to a node context.

Description: Deliver the DAG model for HierarchyNode + HierarchyEdge + HierarchyProfile with cycle detection, profile-driven validation, subtree / ancestor traversal, and Redis-cached context lookup meeting p99 ≤ 20ms for the hot path. Five seeded platform profiles (AFG_MOPH, UAE_DOH, PRIVATE_HOSPITAL, CLINIC_SIMPLE, TELEMEDICINE).

Stories: FAC-US-001, FAC-US-002, FAC-US-003, FAC-US-004, FAC-US-005, FAC-US-006, FAC-US-007


FAC-EPIC-02 — Location operations & hours

FieldValue
Issue typeEpic
SummaryLocation CRUD, hours, time zone, locale anchored to node
StatusTo Do
PriorityMust
Labelsservice:facility-service, domain:facility, slice:S0
Componentslocation
Fix versionM0
FR referencesFR-FAC-LOC-001..008
Legacy FR refsFR-FAC-001, FR-FAC-002, FR-FAC-007, FR-FAC-008
DependenciesFAC-EPIC-01
Rollup statusNot started

Business outcome: Enables scheduling, registration, and billing to route patients correctly and present localized time/hours.

Description: CRUD for Locations anchored to exactly one HierarchyNode (no orphans). Operational hours, time-zone, locale, capacity. Deactivation policy with occupied-bed safeguard (BR-FAC-002). FHIR Location projection.

Stories: FAC-US-008, FAC-US-009, FAC-US-010, FAC-US-011


FAC-EPIC-03 — Bed lifecycle & safety

FieldValue
Issue typeEpic
SummaryBed aggregate with safe state machine and single-patient invariant
StatusTo Do
PriorityMust
Labelsservice:facility-service, domain:facility, slice:S1, safety
Componentsbed
Fix versionM1
FR referencesFR-FAC-BED-001..006
Legacy FR refsFR-FAC-003, FR-FAC-006, BR-FAC-001, BR-FAC-002
DependenciesFAC-EPIC-02
Rollup statusNot started

Business outcome: Prevents wrong-bed assignments and enables inpatient flow.

Description: Bed aggregate with AVAILABLE → RESERVED → OCCUPIED → CLEANING → AVAILABLE lifecycle; single-active-encounter invariant; housekeeping sub-state; high-volume facility.bed.status_changed.v1 event.

Stories: FAC-US-012, FAC-US-013, FAC-US-014


FAC-EPIC-04 — Resource catalog & scheduling handoff

FieldValue
Issue typeEpic
SummaryRooms, equipment, and other resources available to scheduling
StatusTo Do
PriorityShould
Labelsservice:facility-service, domain:facility, slice:S1
Componentsresource-catalog
Fix versionM1
FR referencesFR-FAC-RES-001..003
Legacy FR refsFR-FAC-004
DependenciesFAC-EPIC-02, SCHED-EPIC-02
Rollup statusNot started

Business outcome: Enables multi-resource appointment booking (provider + room + equipment).

Description: ResourceCatalogItem CRUD with tenant-wide or location-scoped resources; status lifecycle; events consumed by scheduling-service to build slots.

Stories: FAC-US-015, FAC-US-016


FAC-EPIC-05 — Provider memberships & context cache

FieldValue
Issue typeEpic
SummaryProvider↔Node memberships and low-latency context lookup
StatusTo Do
PriorityMust
Labelsservice:facility-service, domain:facility, slice:S1
Componentsmembership, cache
Fix versionM1
FR referencesFR-FAC-MBR-001..004, FR-FAC-CTX-001..002
Legacy FR refsFR-HIER-MBR-001..004
DependenciesFAC-EPIC-01, PROVDIR-EPIC-01
Rollup statusNot started

Business outcome: Access-policy and every clinical service scope correctly.

Description: ProviderNodeMembership with effective-from/to, at-most-one-primary rule. Redis-cached context lookup p99 ≤ 20ms; event-driven invalidation within 30s.

Stories: FAC-US-017, FAC-US-018, FAC-US-019


FAC-EPIC-06 — FHIR & HMIS interop

FieldValue
Issue typeEpic
SummaryFHIR Organization/Location/HealthcareService projection
StatusTo Do
PriorityMust
Labelsservice:facility-service, domain:interop, slice:S2
Componentsfhir
Fix versionM2
FR referencesFR-FAC-FHIR-001..004
Legacy FR refs(SPEC §6, §10)
DependenciesFAC-EPIC-02, INTEROP-EPIC-01
Rollup statusNot started

Business outcome: External HMIS/EHR partners can discover facilities and services.

Description: FHIR R4 projection of internal hierarchy; HL7v2 PV1 alignment; HMIS dimensions export.

Stories: FAC-US-020, FAC-US-021


FAC-EPIC-07 — Import/export & multi-site onboarding

FieldValue
Issue typeEpic
SummarySnapshot-based facility definition import/export
StatusTo Do
PriorityShould
Labelsservice:facility-service, domain:facility, slice:S4
Componentsimport-export
Fix versionM3
FR referencesFR-FAC-IO-001..003
Legacy FR refsFR-FAC-005
DependenciesFAC-EPIC-02, FAC-EPIC-05
Rollup statusNot started

Business outcome: Fast onboarding for new tenants migrating from legacy systems.

Description: Bulk JSON import with mandatory dry-run, transactional apply, rollback on failure; full snapshot export for DR and audit.

Stories: FAC-US-022, FAC-US-023


FAC-EPIC-08 — Reliability & quality controls

FieldValue
Issue typeEpic
SummarySLIs, SLOs, chaos tests, coverage gate
StatusTo Do
PriorityMust
Labelsservice:facility-service, domain:ops, slice:S0
Componentsobservability
Fix versionM1
FR referencesNFR-FAC-001..005
Legacy FR refsNFR-FAC-001, NFR-HIER-001..005
DependenciesFAC-EPIC-01..07
Rollup statusNot started

Business outcome: Platform-wide trust in facility-service as the hot path.

Description: Dashboards, alerts, tracing, outbox SLO, p99 guarantee, chaos drills.

Stories: FAC-US-024, FAC-US-025, FAC-US-026