Skip to main content

Medication Service — AI Integration

Status: populated Owner: TBD Last updated: 2026-04-17 Companion: Service Template · ai-gateway-service

1. Policy

No direct vendor AI SDKs in medication-service. Every AI call is routed via ai-gateway-service (/api/v1/ai/*) per platform standard. No model keys in this service.

2. AI Use Cases (current + planned)

FeaturePurposePrompt templateModerationHITLPhase
sigParseAssistConvert free-text sig ("take 1 tab bid x7d") into structured dose/route/freqmedication.sig.parse.v1PHI redaction on inputRequired — prescriber confirms parsed structure before saveM2
medReconciliationSummarySummarize home-med vs facility-med diff for reconciliationmedication.reconciliation.summary.v1Moderation on output; no clinical recommendationsAdvisory only; prescriber signs offM3
allergyAlertExplainerExplain why a drug-allergy alert fired in plain language to patient-portal exportmedication.allergy.explain.v1Moderation; WHO/FDA factual grounding onlyRequired — clinician approves before patient-facing exportM3
refillReminderCopyDraft patient-friendly refill reminder textmedication.refill.copy.v1Moderation; locale-awareOptional — staff reviewM3
cdsPassthroughPassthrough to CDS Hooks / AI for optional enhanced checksmedication.cds.advisory.v1Full PHI isolation; no retentionBlocking alerts still rule-based; AI only advisoryM4

3. Safety Rules

  • AI cannot decide on clinical safety — blocking alerts remain deterministic (drug-drug, drug-allergy, dose-range rules).
  • AI output stored as DetectedIssue advisory-category, never as new blocking alert.
  • Every AI output linked to AIProvenance record (prompt id, model id, version hash, moderation verdict).
  • AI is off by default per tenant; opt-in via tenant config.

4. Audit

EventRetained
medication.ai.invocation.v17y — prompt hash, response hash, model, actor
medication.ai.moderation.blocked.v17y
medication.ai.hitl.decision.v17y

5. Open Questions

  • Should sigParseAssist be gated to specific prescriber roles or available to all? (Pending clinical governance.)
  • Vendor choice for structured-output model (OpenAI gpt-4o vs Azure OpenAI).