Registration Service — AI Integration
Status: populated Owner: TBD Last updated: 2026-04-17 Companion: Service Template
1. AI Usage in This Service
Registration has limited, advisory-only AI integration. AI is used exclusively as a Tier A workflow (human-in-the-loop; no automated clinical decisions).
| AI Purpose | Prompt Template Name | Invocation Path | HITL Required | Moderation |
|---|---|---|---|---|
| Name normalization hint | registration.name-normalize.v1 | POST /v1/ai/registration/normalize-name via Kong → ai-gateway-service | Yes — staff accepts/rejects hint | Input/output screened by ai-gateway |
| Duplicate review narrative | registration.mpi-review-summary.v1 | Staff-triggered in UI during duplicate review | Yes — human merge decision required | Input/output screened by ai-gateway |
2. Hard Constraints
| Constraint | Rule |
|---|---|
| No auto-merge | AI must not automatically execute merge or unmerge operations. AI provides a summary/hint only. |
| No AI-generated identity records | Patient demographics are staff-entered or imported from authoritative sources. AI may suggest corrections as hints. |
| No direct LLM SDK calls | All AI calls route exclusively through ai-gateway-service via Kong /v1/ai/* |
| tenantId from JWT only | AI calls include tenantId extracted from JWT; never from request body |
| Draft ≠ authoritative | AI hints and summaries are never persisted as patient identity until staff explicitly confirms |
3. AIProvenance Touch Points
When an AI hint is accepted by staff, the mutation payload includes aiProvenanceRef: { templateName, requestId, acceptedBy } stored in patient_names.patronymic field (or a dedicated ai_provenance JSONB column in future iterations). This enables audit traceability.
4. Roadmap
Duplicate detection remains deterministic (probabilistic MPI rules + staff review). Future consideration: AI-assisted de-duplication confidence scoring as an additional signal — requires ethics and clinical safety review before enabling.