Implementation plan / Session plan / Handover RC-1-S21
Handover RC-1-S21 Screens: ADM screens¶
Card: RC-1-S21. Issue: cema-care/his#35. Branch: session/RC-1-S21. Slice: RC-1. Decision record: ADR-HIS-069.
What was built and where¶
Two screen folders in the ADM workspace, and nothing else in web/:
| Folder | Screen | Shell workspace | Context | Calls |
|---|---|---|---|---|
web/domains/adm/UI-ADM-001/ |
UI-ADM-001 Patient search and registration workspace | W09 Front desk | none: it opens with no patient and shows the zone once one is opened |
searchPersons, readPerson, runDuplicateCheck, registerPatient, completeRegistration, listEncounters, createEncounter (contracts/adm); expandValueSet of kemendagri-area (contracts/ess) |
web/domains/adm/UI-ADM-002/ |
UI-ADM-002 Identity stewardship workqueue and record comparison | W13 Health information | item |
listTasks?queueId=adm.identity-stewardship, claimTask (contracts/ess); readIdentityMatch, readPerson, listEncounters (contracts/adm) |
UI-ADM-001 follows the contract points of contracts/adm/README.md ("RC-1-S21"):
- Search panel.
- Search by qualified identifier (NIK, or the facility's No. RM, each sent with system, value and type), or by full name, date of birth and sex.
- "Create new person" is enabled only after a search that met CFG-ADM-003: NIK, or name, date of birth and sex.
- A date of birth in the future is refused before the search.
- Candidate rows show the same attributes for every person and nothing else: name, No. RM at this facility, date of birth with age, band in the glossary's words, identity status, facilities. No address, phone or sensitive label.
- Search outcomes.
- Empty: "No patient found. Check the details or create a new person."
- More matches than can be listed (
refine-search): an info notice. - Index outage: "Patient index unavailable. Use emergency registration.", with the temporary-identity action shown disabled and its reason.
- Duplicate prompt panel.
- "Create new person" runs
runDuplicateCheck. Every prompt needs "Same person", "Different person" (with a reason) or "Not sure" before saving. - "Same person" continues the registration for that person, with
personId(Q2 of RC-1-S03). - When the details used for matching change after the check, saving runs the check again first, and stops if a new prompt needs an answer.
- A
400on/duplicateCheckfrom the unit also runs the check again. - Outcome
pendingsays the person is registered with "Duplicate check pending". - Registration form.
- The Indonesia profile field set of FR-ADM-REG-001 part 7 for planned registration, with "Required" shown before entry.
- The village is chosen from the D10 Kemendagri area value set. District, regency or city and province follow from the code prefix.
- The responsible person is required for an inpatient admission and for a patient under 18.
- Identity verification: method, and the document for "Document checked". It sets the CFG-ADM-007 verification level of the provenance.
- Consent lines and coverage are drawn but informative (see "Differences").
- Saving.
- "Save as incomplete" sends
completion: incompleteand shows "Registration incomplete · [n] fields outstanding", with the outstanding fields listed. - "Complete registration", and
completeRegistrationwithIf-Matchfor an incomplete one. - While the person has an unresolved high-risk ambiguity, completion is disabled with the FR-ADM-REG-003 message, and the temporary-identity path is shown.
- Patient context zone. The design system's
PatientContextZone, counter variant, as soon as a person is opened: name, No. RM, date of birth with age, sex, identity status ("Identity under review" for the ambiguity flag), encounter line. A merged record shows the surviving record with the merge notice. - Encounter panel.
- Before "Create encounter": an open encounter of the same class at this facility, inline in amber.
- After: the CIN, and the unit's
warnings. - An identical registration refused on
/separateVisitReasonis offered as "Create separate visit" with a reason and a new idempotency key (CUX-37). - Interruption and duplicates.
- A draft per user and facility, autosaved every 10 seconds and on leaving the view, and restored with "Draft restored from hh:mm". "Discard draft" is in the action bar.
- Every command carries an idempotency key. A lost response shows "Checking whether this was saved" and sends the same key again. With no answer at all, the screen offers only "Check again whether it was saved".
UI-ADM-002:
- Work list.
- The D10 tasks of the stewardship queue, oldest due first: item type, age, priority, "High risk · [reason]" (from each item's stored match), facility, assignee.
- "Overdue · [duration]" in amber past the task's due time (CFG-ADM-006).
- "As at hh:mm" in the header and in the status line.
- Empty state: "No identity items waiting for review".
- Claim from the row (
claimTaskwithIf-Matchand an idempotency key). Assign is shown disabled with its reason. - No patient data in a row.
- Comparison.
- The "Comparing 2 records" zone with both names and No. RM and no flags.
- Each column headed by name, No. RM, date of birth with age.
- Attribute rows with the agreement of each comparison, in text and symbol, with its weight.
- Score, band, thresholds, method and rule, configuration version, route reason and the clerk's answer, high-risk reasons and exclusion flags.
- Records.
- Per record: identifiers (the enterprise identifier is never shown; masked NIK shown as masked) and encounters at this facility, with open encounters highlighted.
- A record merged while open shows "This record was merged into [name, No. RM]" and closes the item. A record not found says so and keeps the other.
- Resolution. The three decisions are shown disabled with the reason. The merge summary says when a second person is needed and "Can be reversed by the Head of HIM". Unmerge is not shown.
Shared by both, per ADR-HIS-069:
api/http.ts: gateway paths/<domain>/v1/…, the IF-ISE-001 headers, idempotency, the lost-response check, and the mapping to the Shell 13 states. It is identical in both folders.- Form and layout controls the design system lacks (
ui.tsx). stubs.test.tsxandcheck-against-stubs.shin each folder.
ADR-HIS-069 and its row in the decision record index (71 records). The record was first numbered 065; RC-1-S17 took that number on main, and 068 was taken next, so it is 069.
Checks and their result¶
Node.js is not installed on this server. The Node.js checks ran in the node:22-bookworm image with pnpm 10.34.9 through corepack.
| Check | Command | Result |
|---|---|---|
| Type check | pnpm build in web/domains/adm |
passed |
| Component and accessibility tests | pnpm test in web/domains/adm |
46 passed, 3 skipped (the stub tests, which need the stubs) |
| The pipeline's web job | web/shell/scripts/ci.sh web/domains/adm, web/shell/scripts/ci.sh web/shell |
passed: shell bundle with both screens, shared versions, screen discovery |
| Against the contract stubs | web/domains/adm/UI-ADM-001/check-against-stubs.sh, web/domains/adm/UI-ADM-002/check-against-stubs.sh |
passed: 2 and 1 tests, no violation recorded by the ADM or ESS stub |
| Static analysis | platform/delivery-pipeline/bin/static-analysis web/domains/adm/UI-ADM-001 web/domains/adm/UI-ADM-002 |
no blocking finding |
| Secret scan | platform/delivery-pipeline/bin/secret-scan code origin/main HEAD |
no secret |
| Dependency scan | platform/delivery-pipeline/bin/dependency-scan web/domains/adm (and web/shell) |
passed: 0 blocking; the 2 tinypool findings under the approved exceptions from #125 (expire 2026-12-24) |
| Documentation links and site | python3 docs/implementation_plan/tools/check_links.py; mkdocs build |
0 broken links, 0 duplicate anchors; the site builds (its warnings are about earlier files) |
"Ends when", line by line:
- Each screen meets its brief and the clinical UX safety rules: the tables below. What the contract does not offer yet is shown disabled with its reason (see "Differences").
- Component and accessibility checks pass: pnpm test; every screen state test that renders a full view runs expectNoAxeViolations.
- The screen works against the stubs of the contracts: check-against-stubs.sh in each folder.
- The change touches only the folders of its screens: git diff --name-only origin/main lists only web/domains/adm/UI-ADM-001/, web/domains/adm/UI-ADM-002/, this handover, ADR-HIS-069 and the decision record index.
Requirements, test scenarios and tests¶
Tests are in UI-ADM-001/RegistrationWorkspace.test.tsx, UI-ADM-002/StewardshipView.test.tsx and the two stubs.test.tsx; each describe names its requirement and scenario.
| Requirement | Scenario | What the screen does | Tests |
|---|---|---|---|
| FR-ADM-MPI-001 | TEST-ADM-001 | Qualified-identifier and demographic search; minimum attributes per row; empty, refine, outage states; create-new enablement (CFG-ADM-003) | "UI-ADM-001 search panel and candidate list" (5); stub test 1 |
| FR-ADM-MPI-002 | TEST-ADM-002 | Duplicate check on creation; pending outcome; the evidence of a stored match |
"UI-ADM-001 duplicate prompt"; "UI-ADM-002 record comparison" (8); UI-ADM-002 stub test |
| FR-ADM-MPI-003 | TEST-ADM-003 | Prompted candidates; the stewardship queue with high-risk column and overdue | "UI-ADM-001 duplicate prompt"; "UI-ADM-002 stewardship work list" (6) |
| FR-ADM-REG-001 | TEST-ADM-006 | Field set with Required before entry; save as incomplete with outstanding fields; responsible person rule; encounter type | "UI-ADM-001 registration form" (9); stub tests 1 and 2 |
| FR-ADM-REG-003 | TEST-ADM-008 | Prompt mandatory; "Same person" path; a high-risk ambiguity blocks completion on an existing record (part 5); after "Not sure" on a high-risk candidate the registration and encounter complete on the provisional new person (PR-REG-003-5, GAP-ADM-012); the zone shows "Identity under review" from identityUnderReview (contract 1.1) after "Same person" and after "Not sure", high-risk or not (PR-REG-003-4, GAP-ADM-011, GAP-ADM-012 (1)); verification recorded |
"UI-ADM-001 duplicate prompt" (8); stub test 2 |
| FR-ADM-XRF-001 | TEST-ADM-010 | The No. RM assigned by the registration, in the zone and the state label | "UI-ADM-001 registration form": "saves as incomplete …" |
| FR-ADM-ENC-001 | TEST-ADM-012 | Encounter with idempotency key; CIN shown; open-encounter warning before creation; unit warnings; separate visit | "UI-ADM-001 encounter creation panel" (4); stub test 1 |
| FR-ADM-MPI-004 (claim only) | Claim from the row | "claims an item from the row …"; UI-ADM-002 stub test | |
| NFR-ADM-008 | WCAG 2.2 AA rules with axe-core on each screen state; every control labelled; keyboard operable through React Aria; status never by colour alone | expectNoAxeViolations in both test files |
Safety rules with a test of their own: CUX-03 (comparison zone), CUX-04 and CUX-47 (no patient data in work list rows), CUX-30, CUX-32 and CUX-39 (drafts), CUX-35 and CUX-36 (idempotency and the lost response), CUX-37 (separate visit), CUX-48 (counter zone, candidate rows), CUX-53 (freshness), CUX-67 (access cannot be checked), DEC-ADM-002 (the enterprise identifier is never displayed).
Differences from the brief, the contract or the design¶
Each item below is shown on screen, disabled, with its reason, until its contract or component exists:
- Merge, "Different persons", "Not enough information – defer", unmerge, attribution of post-merge records, merge history (UI-ADM-002). They are FR-ADM-MPI-004 and 005, in RC-3, with no contract in version 1 (RC-1-S03). The resolution bar is drawn with its summary, and disabled. Unmerge is not shown to anyone.
- Assign (UI-ADM-002).
reassignTaskexists, but nothing in the slice lists the stewards to assign to. - Demographic reconciliation items in the same queue are listed but cannot be opened: no RC-1 contract decides them.
- Consent lines (UI-ADM-001). The two lines of CFG-ADM-025 are shown, with "Record consent" disabled. UI-ESS-006 and the consent status come in RC-2. The screen does not say "Not recorded", because it cannot read the status.
- Coverage shows "Not verified" and says payer references are not captured in this version. Payer and consent references at registration are RC-2 (Q4 of RC-1-S03).
- Temporary identity and emergency registration are FR-ADM-REG-004 (RC-4). The action is shown disabled where the brief offers it.
- Print identification outputs: no print service in the slice.
- Downtime read-only state ("Open downtime lists"): the shell has no read-only signal for a screen yet.
Other differences:
- Patient context zone drawn by the screen. The SDK cannot be told which patient a screen opened. UI-ADM-001 draws the design system's
PatientContextZoneat the top of its content, and UI-ADM-002 draws the comparison state. The window title does not carry the patient (CUX-03) until the shell offersopenPatient(ADR-HIS-069). - Drafts in memory. Drafts live in the window's memory per user and facility. They survive leaving the view, not closing the window. They are not listed in a "pending work" list (CUX-31): there is no drafts service yet.
- Code lists the screen sends. The values are written in the screen until D10 serves them:
urn:his:adm:encounter-type:outpatient-visit,inpatient-admission,emergency-visit,day-care, each with an HL7 ActCode classAMB,IMP,EMER,SS;urn:his:adm:verification-method:document-checked,satusehat-lookup,known-patient;urn:his:adm:identity-document:KTP,KK,birth-certificate,PASSPORT,KITAS;urn:his:ess:relationship:spouse,parent,child,sibling,other;- sex
female,male,unknown.
RC-1-S03 lists them as D10 registrations still to be made. Only outpatient-visit, document-checked, KTP and spouse appear in the contract's examples. The others are this screen's proposal, for the owner of the code lists to confirm or replace.
- Words not in the glossary, used where it has none:
- "Registration complete · No. RM [n]" for a completed registration;
- "Found by identifier" for a candidate found by identifier, which has no band;
- "Agrees", "Partly agrees", "Disagrees" and "Not compared" for the agreement indicators.
The glossary owner may want to set them (CUX-18). - English only. The design-system components speak both languages; this screen's own text is English, like the shell's.
The tinypool finding¶
The session first stopped here, blocked (comment on #35): the dependency scan of web/domains/adm and web/shell stopped on CRITICAL CVE-2026-104848 and CVE-2026-104849 in tinypool 1.1.1, which comes through Vitest 3.2.7 in the lockfiles on main. Pull request #125 then added time-bound exceptions, approved for the Security Engineer, to every web package, expiring 2026-12-24. This branch takes them from main unchanged; it writes no exception.
Questions for a person¶
None about behaviour. The specification and the contract points settled every behaviour the screens show. Q2 and Q3 of RC-1-S03 (what "same" and "unsure" do to the person) are decided by the unit; the screen sends the clerk's answer only.
Follow-ups outside the card¶
- Shell SDK (
web/shell): a service client,openPatient, and a draft service with pending work, as ADR-HIS-069 sets out. The twoapi/http.tscopies,IdentityZone.tsxanddraft.tsthen move there. - Design system (
web/design-system): SelectField,RadioGroupField,Notice,SectionandUnavailableActionfrom the screens'ui.tsx;- the comparison state of the patient context zone (
ComparisonZone.tsx); - partial dates of birth in
PatientContextZone, whoseformatCalendarDatethrows onYYYY-MM; CSS.escapein the workspace test setup, which React Aria'sSelectneeds in jsdom. The screens'test-support.tsadds it today.- Web packages, before 2026-12-24: upgrade Vitest so
tinypoolis 2.1.2 or later in all twelve web packages, and remove the exceptions of #125. - Gateway (RC-1-S12's unit): a distinct problem code for "Authorization service unavailable", so screens need not read the detail (ADR-HIS-069 point 3).
- ADM contract (
contracts/adm):CandidatePersoncarriesambiguityFlagbut notidentityUnderReview, so a candidate row shows "Identity under review" only for a high-risk item. The zone shows it for any open item once the person is opened (model.ts,candidateStatusLabel). Adding the field toCandidatePerson, backward compatible, would let the row match. - D10 registrations: the code lists above, and the value set
kemendagri-areain the terminology service. The ESS stub serves only itsfornasexample, so the village search answers "not found" against the stub. - RC-3 (FR-ADM-MPI-004, 005): the resolution bar, merge panel with the second person (CUX-64) and the sign step (PH-03), unmerge for the Head of HIM, merge history and attribution. All go into
UI-ADM-002/Comparison.tsx, where the disabled bar is. - RC-2: consent lines with UI-ESS-006, and payer references in the coverage section.
- RC-4: the temporary-identity path from the outage and ambiguity notices of UI-ADM-001.
- RC-1-S26 (integrate): run both
check-against-stubs.shbeside the slice scenario, or against the built units.