Skip to main content

Virtual Care Service — Epics

Service: virtual-care-service Epic prefix: VCARE-EPIC Last updated: 2026-04-18

Epics

VCARE-EPIC-01 — Session Lifecycle Management

FieldValue
Issue typeEpic
SummaryFull virtual session lifecycle: create, waiting room, admit, end, cancel
StatusTo Do
PriorityMust
Labelsservice:virtual-care, domain:virtual_care, slice:S1
Componentssession-lifecycle, waiting-room
Fix versionM1
FR referencesFR-VCARE-001 – FR-VCARE-011
Legacy FR refsFR-VC-001–007, FR-VC-008–011 (TELEMED-VC)
Dependenciesscheduling-service (appointment events), identity-service
Rollup statusNot started

Business outcome: Clinicians can create, manage, and end telehealth sessions with a reliable waiting-room-to-active flow, with automatic session creation from scheduled virtual appointments.

Description: Implement the complete session lifecycle FSM (scheduled → waiting → active → ended / cancelled / failed), session CRUD APIs, waiting room with HMAC join tokens, participant admit/remove, and event-driven auto-creation from scheduling.appointment.scheduled.v1. Enforce the invariant that no session row is created if the video room provisioning fails. Idempotent end/cancel operations.

Stories: VCARE-US-001, VCARE-US-002, VCARE-US-003, VCARE-US-004


FieldValue
Issue typeEpic
SummaryTelehealth consent + recording consent enforcement before session activation
StatusTo Do
PriorityMust
Labelsservice:virtual-care, domain:virtual_care, slice:S1
Componentsconsent-gate, compliance
Fix versionM1
FR referencesFR-VCARE-020 – FR-VCARE-022
Legacy FR refsFR-VC-020–022 (TELEMED-VC)
Dependenciesaccess-policy service (consent check port)
Rollup statusNot started

Business outcome: The platform can demonstrate patient consent for every telehealth session and recording, satisfying Afghan telemedicine regulatory requirements and HIPAA-analogue compliance.

Description: Enforce telehealth consent check (via access-policy service) before any session is created. Enforce separate recording consent before recordingEnabled is set. Both gates are fail-closed: if the consent service is unreachable, session creation is blocked. Every consent gate block is audited. Consent records are owned by access-policy service; virtual-care-service queries at session-create time.

Stories: VCARE-US-005, VCARE-US-006


VCARE-EPIC-03 — Video Backend Integration and Bandwidth Fallback

FieldValue
Issue typeEpic
SummaryJitsi Meet integration, provider-agnostic adapter, bandwidth fallback chain
StatusTo Do
PriorityMust
Labelsservice:virtual-care, domain:virtual_care, slice:S1
Componentsjitsi-adapter, video-provider, bandwidth-fallback
Fix versionM1
FR referencesFR-VCARE-030 – FR-VCARE-036
Legacy FR refsFR-VC-008–011, FR-VC-023–024 (TELEMED-VC)
DependenciesJitsi Meet self-hosted, communication-service
Rollup statusNot started

Business outcome: Virtual care sessions work reliably in low-connectivity Afghan environments through automatic degradation from video to audio-only to async messaging, ensuring no patient is silently dropped.

Description: Implement the Jitsi Meet adapter (room provisioning, JWT branding, health check), provider-agnostic VideoProviderPort interface (supporting Mediasoup, Zoom, Webex, Teams adapters), configurable bandwidth fallback thresholds, grace reconnect window (default 60s), and InitiateFallbackUseCase (video → async messaging thread via communication-service). Backend health is checked before every session creation.

Stories: VCARE-US-007, VCARE-US-008


VCARE-EPIC-04 — FHIR Encounter Integration and Billing Events

FieldValue
Issue typeEpic
SummaryFHIR Encounter creation on session end and billing event emission
StatusTo Do
PriorityMust
Labelsservice:virtual-care, domain:virtual_care, slice:S1
Componentsfhir-integration, billing-events
Fix versionM1
FR referencesFR-VCARE-040 – FR-VCARE-042
Legacy FR refsFR-VC-031 (TELEMED-VC)
Dependenciespatient-chart-service (via FHIR Gateway), billing-service
Rollup statusNot started

Business outcome: Every completed telehealth session creates a FHIR-compliant Encounter record in the patient's chart and triggers billing, maintaining complete clinical and financial records without manual steps.

Description: When a session ends, EndSessionUseCase calls FHIR Gateway to create an Encounter resource with class=VR (virtual), linked to the Appointment (if any), with actualStart, actualEnd, and participant references. The encounterId is stored on the session row. On FHIR Gateway unavailability, a retry job reconciles within 5 minutes. After Encounter creation succeeds, virtual_care.billing.session_chargeable.v1 is emitted.

Stories: VCARE-US-009


VCARE-EPIC-05 — Tenant Configuration and Branding

FieldValue
Issue typeEpic
SummaryPer-tenant virtual care config: backend selection, Jitsi branding, recording, limits
StatusTo Do
PriorityMust
Labelsservice:virtual-care, domain:virtual_care, slice:S1
Componentstenant-config
Fix versionM1
FR referencesFR-VCARE-050 – FR-VCARE-054
Legacy FR refsFR-VC-018–019, FR-VC-035–036 (TELEMED-VC)
DependenciesKMS (credential storage)
Rollup statusNot started

Business outcome: Each tenant can configure their telehealth environment with their own branding, video backend, recording policy, and participant limits without requiring platform team intervention.

Description: Implement TenantVirtualCareConfig CRUD, credential encryption (KMS), branding validation (HTTPS allowlist for logo URL, CSS hex color), connection test endpoint, and recording policy configuration. Credential fields (jitsiJwtSecret, zoomApiKey, etc.) are encrypted at rest via KMS and never returned in GET responses. VIRTUAL_CARE.config.updated.v1 event published on config change (field names only, no credentials).

Stories: VCARE-US-010


VCARE-EPIC-06 — AI-Assisted Documentation (STT + Summary)

FieldValue
Issue typeEpic
SummaryAI speech-to-text transcription and visit summary drafts with mandatory HITL gate
StatusTo Do
PriorityShould
Labelsservice:virtual-care, domain:virtual_care, slice:S2
Componentsai-integration, clinical-documentation
Fix versionM2
FR referencesFR-VCARE-060 – FR-VCARE-062
Legacy FR refsFR-VC-029–030 (TELEMED-VC)
Dependenciesai-gateway-service, patient-chart-service
Rollup statusNot started

Business outcome: Clinicians can generate visit documentation drafts from session audio without manual transcription, while maintaining full control over what enters the patient chart.

Description: Implement STT integration (audio chunk → ai-gateway-service → streaming transcript), visit summary draft generation from transcript (vcare-session-summary-v1 template), HITL AcceptAiSummaryUseCase (mandatory explicit accepted: true from authenticated clinician before chart push), AI provenance metadata in accepted notes, and graceful degradation when ai-gateway is offline.

Stories: VCARE-US-011, VCARE-US-012


VCARE-EPIC-07 — Async Visits (Store-and-Forward)

FieldValue
Issue typeEpic
SummaryStore-and-forward async telehealth for offline Afghanistan context
StatusTo Do
PriorityShould
Labelsservice:virtual-care, domain:virtual_care, slice:S2
Componentsasync-visits, offline-support
Fix versionM2
FR referencesFR-VCARE-070 – FR-VCARE-072
Legacy FR refs— (synthesized)
Dependenciescommunication-service, patient-chart-service
Rollup statusNot started

Business outcome: Patients and clinicians in low-connectivity Afghan districts can exchange clinical information asynchronously, ensuring care continuity when real-time video is not possible.

Description: Implement async visit creation (offline-authored draft), submission API with clientMutationId idempotency for offline retry safety, provider review workflow, and Encounter creation on response. Content may include text and image attachments. Submission is safe to retry (duplicate clientMutationId returns original record). Provider response triggers patient-chart-service Encounter creation.

Stories: VCARE-US-013