blocker phase 12

This commit is contained in:
hamid
2026-08-02 23:24:28 +03:30
parent 66a60ce874
commit 184b202f00
6 changed files with 74 additions and 62 deletions
+21 -1
View File
@@ -27,7 +27,7 @@ whatever order you prefer.
| 09 | [nurse-verification-badge](blocker-phases/09-nurse-verification-badge.md) | Verification badge doesn't reflect reality | pairs with 10 | ✅ Done |
| 10 | [search-dedup-and-trust](blocker-phases/10-search-dedup-and-trust.md) | Search isn't de-duplicated; trust info hardcoded | pairs with 09 | ✅ Done |
| 11 | [nurse-payouts](blocker-phases/11-nurse-payouts.md) | Nurse pay/payouts are fake, no "process" action | benefits from 01 | — |
| 12 | [patient-records](blocker-phases/12-patient-records.md) | Patient records & visit notes are fake demo data | needs a product decision first | |
| 12 | [patient-records](blocker-phases/12-patient-records.md) | Patient records & visit notes are fake demo data | needs a product decision first | 🟡 Partial (see follow-up below) |
| 13 | [booking-lifecycle](blocker-phases/13-booking-lifecycle.md) | Stuck bookings; "today's visits" unfiltered | pairs with 04 | — |
| 14 | [partner-center](blocker-phases/14-partner-center.md) | Partner/business-center accounts are fake | benefits from 01 | — |
| 15 | [debug-mode-production](blocker-phases/15-debug-mode-production.md) | Turn off dev mode on the live site (§B.2) | do last, deliberately | — |
@@ -65,6 +65,26 @@ whatever order you prefer.
decision (booking-lifecycle's "today's visits" fix), since both are the same missing
`Asia/Tehran`/UTC-boundary discipline.
- **Phase 12 closed everything except the medication/routine schema decision, which stays deliberately
unresolved.** Fixed: the silent data-wipe (`patients/[id]/record/page.tsx`'s `EditableTabs.save` now always
resends the full `medications`/`routine`/`tasks` triple, not just the tab being edited — the real
`UpsertCarePlanCommand` fully replaces all three from the request, no server-side merge); the
`RecordAccess.deniedReason` enum (client now matches the server's real `'not_authorized' | 'not_found'`,
was `'no_access' | 'not_found'`); and the visit-note `taskResults` mapper bug (`clientApi.ts` was hardcoding
`taskResults: []` on read and folding the checklist into free text on write, even though `CareRecordDto`
already serves a structured `TaskResults` array and `WriteCareRecordBody` already accepts one — both sides
now pass the array through directly). Also corrected the stale "no backend at all" comments in
`constants.ts`/`types.ts`/`clientApi.ts`/`mockApi.ts``PatientCareRecordsController` implements every
route this domain needs.
**Still open, on purpose:** the client's medication/routine shape (structured dose amount/unit, frequency
preset codes, a multi-select `timeOfDay`) doesn't match the server's (one free-text dose, one required
frequency string, no `timeOfDay` on either medications or routine items) — see phase 12's items #3/#4. Asked
which side should change; the answer was to leave both as they are for now and just keep this note so it
isn't lost. `USE_PATIENT_RECORDS_MOCK` therefore stays `true`, and the id-type mismatch (client `string` ids
vs. the wire's `long`, phase 12 item #2) is left unfixed too — it can't be finished without first knowing
the target field shape, since `getFamilyRecord`/`updateFamilyRecord` would need a real mapping function
between the two, not just an id conversion.
- **ZarinPal-callback translator, latent until a real gateway is switched on.** Phase 07 restored the
mock-gateway harness and pointed `MockPaymentProvider.InitPaymentAsync`'s `redirectUrl` at it (relative
URL, no more dead `mock-psp.local` host) — the card-payment dead end (blockers.md § "Payments") is closed