Patient canvas → PatientsV2 mapping · status · 2026-06-01

What shipped, and what's left.

The new patient canvas now saves where the old platform did. Phase 1 (frontend) is merged to develop via PR #506. What remains is OCR pre-fill, two backend gaps, a geocode cleanup, and one real end-to-end test.

Shipped · merged to develop

Done

Saving a patient in the canvas now lands these in the same PatientsV2 columns the old platform used.

Diagnosesall rows persist (first → MainDiagnosis, rest comma-joined → SecondaryDiagnosis); ICD-10 display-only, as the old platform did.
Addresssaves from discrete fields + Mapbox context; brittle regex removed; never posts empty city/state (verify-before-seed lives on develop via #504).
MedicationsRoute / Qty / Dose form / Start / End captured and sent; dose form split from strength; OCR dose form seeded.
Patient circleNPI + Specialty saved; care-team pre-fill; POA flag from extracted boolean; relationship mapped from role (Pharmacy no longer mislabeled Physician).
MRNdead 404 route removed; MR persists via the clinical-snapshot path.
Insuranceorphaned writer deleted; canvas reads Stedi (GlobalPatientInsurance) only.
ADL / Vitals / IADLremoved from the canvas entirely.
Attachmentsuploaded face sheet saved as a patient Document (FaceSheet) on save.
Date guarda partial / invalid med date now drops instead of 400-ing and aborting the whole medications save.
Skip warningsphone-less care-team / non-POA contacts now surface an operator warning instead of vanishing silently.
PR #506 merged 2026-06-01 (merge 39ca2c89) · crm 359 tests / lint / typecheck green · round-1 bot findings + Greptile outside-diff F1/F2 closed

What remains

Grouped by track. Effort: S small · M medium · L large.

ItemEffortWhy it matters
Verification - do first
Live platform.allcare.ai round-tripMEverything is unit-green, but no real patient has saved through the stack yet. Save one with 3+ diagnoses, a no-comma address, meds with route/qty, a care-team member, and a face-sheet attachment, and confirm each lands. Biggest standing risk before production use.
Phase 2 - extractor (ai-concierge-v2)
Med Route / Qty / Dose-form OCR pre-fillMThe canvas now captures and saves these, but the extractor does not pack them, so they do not pre-fill from a face sheet. The operator types them today.
Room OCR pre-fillSThe save path already lands Room correctly; the extractor never emits a Room field, so it never pre-fills. Add Room → personal_info to the section map.
Phase 3 - backend (PatientsV2)
Med admin-hour schedule + RefillDateLA routine med's time-of-day schedule is stored as free text, so meds never enter the time-based med-pass / eMAR; RefillDate has no DTO field. Add a schedules field + RefillDate to the DTO/handler and expand into PatientMedicationSchedule / AdminHour rows. Confirm the old platform's shape via the live capture first.
Email-only POA persistenceSAn email-only POA is now warned about (not silently dropped), but still is not saved. Relax the CreateContact validator to allow a phone-less POA so the consent contact actually persists.
Frontend follow-ups
Geocode v5 → v6 consolidationMSave-time geocode uses Mapbox v5; seed-time verification (#504, on develop) uses v6. Dedup to one version. (Greptile outside-diff F3, deferred.)
place_of_service_id saved nowhereSThe operator picks a place of service, but it routes to local-only and is saved nowhere, with no warning. Wire it to the facility-placement save, or at minimum warn.
Face-sheet idempotency keyed by patientSThe "already uploaded" ledger is keyed by artifact id only. Save Patient A, switch to B with the same sheet loaded, and B's save skips re-attaching it. Key the ledger by patient + artifact (or clear it on patient switch).
The honest gap

Nothing has saved a real patient yet.

All of the above is green at the unit / lint / typecheck level and merged to develop. None of it has been exercised against the running stack. The mapping hops only a live capture can confirm: whether the old platform built real medication-schedule rows (vs free-text frequency), and which insurance table it treated as authoritative. A single live round-trip closes the verification gap and informs the Phase 3 schedule work.