Virtual Care Service — AI Integration
Status: populated Owner: TBD Last updated: 2026-04-18 Companion: Service Template · 03 platform-services
1. Active AI Calls
| # | Purpose | AI Gateway endpoint | Prompt template | Moderation | HITL required | Phase |
|---|---|---|---|---|---|---|
| 1 | Speech-to-text (STT) transcription of session audio | POST /api/v1/ai/audio/transcriptions via ai-gateway-service | N/A — raw audio stream | Input: audio validation; Output: PHI screen | Yes — clinician reviews before chart entry | Phase 2 |
| 2 | Visit summary draft from session transcript | POST /api/v1/ai/completions via ai-gateway-service | vcare-session-summary-v1 | Input: PII screen; Output: clinical safety screen | Yes — mandatory clinician accept before chart finalization | Phase 2 |
2. STT Flow
3. Visit Summary Draft Flow
4. Moderation and Safety
| Gate | Where applied |
|---|---|
| Audio size limit | Input: max 30 MB per chunk |
| PHI in logs | Audio and transcript content must never appear in log lines |
| Clinical safety screen | ai-gateway applies content classifier to reject output with unsafe clinical recommendations |
| HITL mandatory | AI draft is never auto-pushed to chart; AcceptAiSummaryUseCase requires explicit accepted: true from authenticated clinician |
| Refused completions | If ai-gateway returns refusal, clinician is informed; falls back to manual documentation |
5. AI Provenance
Accepted AI-generated notes written to patient-chart-service include:
aiGenerated: trueaiModel: "<model-id from ai-gateway response>"aiAcceptedBy: "<clinicianUserId>"aiAcceptedAt: "<ISO timestamp>"
These fields are stored in the clinical note metadata and are visible in the audit trail.
6. Offline Behavior
When ai-gateway-service is unreachable (offline or degraded):
- STT and summary features are unavailable; clinician is notified via UI.
- Session can still proceed and end normally.
- Manual documentation fallback is always available.
- No AI features degrade silently; all failures surface explicit user-facing messages.