Virtual Care Service — Epics
Service: virtual-care-service Epic prefix: VCARE-EPIC Last updated: 2026-04-18
Epics
VCARE-EPIC-01 — Session Lifecycle Management
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | Full virtual session lifecycle: create, waiting room, admit, end, cancel |
| Status | To Do |
| Priority | Must |
| Labels | service:virtual-care, domain:virtual_care, slice:S1 |
| Components | session-lifecycle, waiting-room |
| Fix version | M1 |
| FR references | FR-VCARE-001 – FR-VCARE-011 |
| Legacy FR refs | FR-VC-001–007, FR-VC-008–011 (TELEMED-VC) |
| Dependencies | scheduling-service (appointment events), identity-service |
| Rollup status | Not 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
VCARE-EPIC-02 — Consent Gates and Compliance
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | Telehealth consent + recording consent enforcement before session activation |
| Status | To Do |
| Priority | Must |
| Labels | service:virtual-care, domain:virtual_care, slice:S1 |
| Components | consent-gate, compliance |
| Fix version | M1 |
| FR references | FR-VCARE-020 – FR-VCARE-022 |
| Legacy FR refs | FR-VC-020–022 (TELEMED-VC) |
| Dependencies | access-policy service (consent check port) |
| Rollup status | Not 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
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | Jitsi Meet integration, provider-agnostic adapter, bandwidth fallback chain |
| Status | To Do |
| Priority | Must |
| Labels | service:virtual-care, domain:virtual_care, slice:S1 |
| Components | jitsi-adapter, video-provider, bandwidth-fallback |
| Fix version | M1 |
| FR references | FR-VCARE-030 – FR-VCARE-036 |
| Legacy FR refs | FR-VC-008–011, FR-VC-023–024 (TELEMED-VC) |
| Dependencies | Jitsi Meet self-hosted, communication-service |
| Rollup status | Not 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
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | FHIR Encounter creation on session end and billing event emission |
| Status | To Do |
| Priority | Must |
| Labels | service:virtual-care, domain:virtual_care, slice:S1 |
| Components | fhir-integration, billing-events |
| Fix version | M1 |
| FR references | FR-VCARE-040 – FR-VCARE-042 |
| Legacy FR refs | FR-VC-031 (TELEMED-VC) |
| Dependencies | patient-chart-service (via FHIR Gateway), billing-service |
| Rollup status | Not 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
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | Per-tenant virtual care config: backend selection, Jitsi branding, recording, limits |
| Status | To Do |
| Priority | Must |
| Labels | service:virtual-care, domain:virtual_care, slice:S1 |
| Components | tenant-config |
| Fix version | M1 |
| FR references | FR-VCARE-050 – FR-VCARE-054 |
| Legacy FR refs | FR-VC-018–019, FR-VC-035–036 (TELEMED-VC) |
| Dependencies | KMS (credential storage) |
| Rollup status | Not 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)
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | AI speech-to-text transcription and visit summary drafts with mandatory HITL gate |
| Status | To Do |
| Priority | Should |
| Labels | service:virtual-care, domain:virtual_care, slice:S2 |
| Components | ai-integration, clinical-documentation |
| Fix version | M2 |
| FR references | FR-VCARE-060 – FR-VCARE-062 |
| Legacy FR refs | FR-VC-029–030 (TELEMED-VC) |
| Dependencies | ai-gateway-service, patient-chart-service |
| Rollup status | Not 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)
| Field | Value |
|---|---|
| Issue type | Epic |
| Summary | Store-and-forward async telehealth for offline Afghanistan context |
| Status | To Do |
| Priority | Should |
| Labels | service:virtual-care, domain:virtual_care, slice:S2 |
| Components | async-visits, offline-support |
| Fix version | M2 |
| FR references | FR-VCARE-070 – FR-VCARE-072 |
| Legacy FR refs | — (synthesized) |
| Dependencies | communication-service, patient-chart-service |
| Rollup status | Not 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