Skip to content

Implementation plan / Session plan / Handover RC-1-S28-F1

Handover RC-1-S28-F1 Fix: identity status after "unsure"

Card: RC-1-S28-F1. Issue: cema-care/his#206. Branch: session/RC-1-S28-F1. Slice: RC-1. Owner of the work: RC-1-S08. Comes after the gate RC-1-S28.

Issue #206 holds the gate's evidence: run 20261127T123911Z-1164, where RC-1-E2E-002 got Received: "provisional" and expected "active". Issue #40 holds a person's decision of 25 Nov 2026 that this gap goes to RC-1-S08 as a fix. No other answer from a person was needed. The rule is settled in the specification: GAP-ADM-012 was closed on 25 Nov 2026, and it is rule PR-REG-003-5 of FR-ADM-REG-003.

What was built and where

Everything is in services/adm-identity/mod-adm-001:

  • PersonCommands.create now sets the identity status of a new person from the pairs the clerk answered (statusAfterCheck):
  • "unsure" on a pair with a high-risk reason under CFG-ADM-005: provisional. As before, the router sets the ambiguity flag and its reasons on both persons;
  • "unsure" on any other pair: active, with the review item for the pair as before;
  • the duplicate check could not run (FR-ADM-MPI-002 part 10): provisional with the check pending, unchanged.

The status is decided inside the creation transaction, from the run taken under the blocking-key locks. That is the same run whose pairs are stored and routed, so the status and the stored high-risk reasons cannot disagree. - The setting his.adm.registration.identity-status-after-unsure is removed. RC-1-S08 added it to carry the answer to RC-1-S03 Q3, with the default provisional for every pair. GAP-ADM-012 is that answer, and it depends on the pair, so a single setting can no longer express it. Keeping the setting would let a deployment make a high-risk person active, against the rule. No deployment, stack file or test set it except UnsureConfiguredTest, which is removed. - Tests: - ReviewRoundOneTest.unsureCreatesProvisional becomes unsureNotHighRiskCreatesActive. It checks the person is active, with no ambiguity flag, and that the match has no high-risk reason and its review task; - the new UnsureHighRiskTest.unsureHighRiskCreatesProvisional uses twins answered "unsure". It checks a provisional person, the ambiguity flag and reasons on both records, the existing candidate still active, and no merge. - services/adm-identity/README.md: the setting's row is removed, and a paragraph states the status rule.

No contract, API field, event, migration or dependency changed. The lockfiles are unchanged.

Checks and their result

The integration environment ran only as HIS_SESSION=RC-1-S28-F1 (his-rc-1-s28-f1).

Check Command Result
The new tests fail before the repair ./gradlew :mod-adm-001:test --tests '*UnsureHighRiskTest' --tests '*ReviewRoundOneTest.unsureNotHighRiskCreatesActive' with PersonCommands.java as on main, light profile unsureNotHighRiskCreatesActive failed (expected: "active"), the same failure the gate saw. unsureHighRiskCreatesProvisional passed: before the repair every person after "unsure" was provisional. It guards the other half of the rule, so the repair cannot make every person active
The unit's build and every test, after the repair ./gradlew cleanTest build --no-build-cache in services/adm-identity, light profile passed: 135 tests, 0 failed, 1 skipped (the Kafka adapter test, full profile only). This includes PatientIdentityContractTest (his-contract verify of every operation and validate-event) and every test of RC-1-S08
The failed gate line: the slice scenario HIS_SESSION=RC-1-S28-F1 e2e/harness/scenario run e2e/scenarios/RC-1, full profile See below. RC-1-E2E-002 passes (run 20261129T051152Z-f003). The cases that fail in these runs fail on the host's load, not on this change
Documentation links python3 docs/implementation_plan/tools/check_links.py 0 broken links, 0 duplicate anchors
Documentation site .venv/bin/mkdocs build Builds. Its two warnings are existing links in RC-1-S11's and RC-1-S12's handovers

The scenario runs. The host had a load average of 12 to 22 on 4 cores, with another session's full stack running beside this one. Five runs, all HIS_SESSION=RC-1-S28-F1, full profile:

Run Cases Result
20261129T043125Z-c51a (all) none Stopped before any case: the ESS stub started before contracts/common's pnpm install finished. This is #216 (RC-1-S28-F10), as in the gate's first run
20261129T044024Z-2c6b (all) 12 5 passed. RC-1-E2E-011 (failure injection) left the stack not ready, and the cases after it failed on 503s. adm-identity's log shows the kit's policy decision client timing out (about 250 ms) and denying, so the units refuse safely
20261129T050522Z-fdcc (--grep RC-1-E2E-00) none Provisioning timed out: MOD-ESS-001 did not provision e2e.registrar.a within 60 s
20261129T051152Z-f003 (--fresh --grep RC-1-E2E-00) 001 to 008 7 of 8 passed, RC-1-E2E-002 among them: its check that the new person is active after "unsure" on a pair that is not high-risk now holds. RC-1-E2E-006 failed on one 503 from adm-patient-administration, whose policy decision call timed out (correlation 870c4cdb-…). That unit is not changed here
20261129T052354Z-ec46 (--grep RC-1-E2E-006) none Provisioning timed out, as above
20261129T052934Z-1513 (--fresh --grep RC-1-E2E-006) 006 Failed: the screen's "Registration complete" did not appear within 20 s. At that moment adm-identity's policy decision call timed out and was denied. RC-1-E2E-006 registers a patient with no candidate, so the code changed here does not run in it

RC-1-E2E-006 passed in the gate's run. Its failures here come from the decision point's time budget under this host's load, which the gate report already notes as a non-functional shortfall. The non-functional cases 010 to 013 are not on this card's gate line. The next gate round runs every case again on a quieter host.

What the gate line now shows

The gate line is criterion 1 (ACC-002) and criterion 5 (ACC-004) of slice gate RC-1: the scenario passes end to end, and the identity safety scenarios pass (RC-1-E2E-002). RC-1-E2E-002's check that the new person is active after "unsure" on a pair that is not high-risk now passes against the built adm-identity (run above). The high-risk half of PR-REG-003-5 is covered in the unit by UnsureHighRiskTest. The next gate round, RC-1-S28-G2, confirms the line in its own run.

Requirements and test scenarios of the card

Requirement, rule Test Scenario
FR-ADM-REG-003 PR-REG-003-5, GAP-ADM-012 (1): "unsure" on a pair that is not high-risk, so the new person is active with a review item ReviewRoundOneTest.unsureNotHighRiskCreatesActive; end to end RC-1-E2E-002 TEST-ADM-003
FR-ADM-REG-003 PR-REG-003-5, GAP-ADM-012 (2): "unsure" on a high-risk pair (CFG-ADM-005), so the new person is provisional with the ambiguity flag set, and a review item UnsureHighRiskTest.unsureHighRiskCreatesProvisional TEST-ADM-003
FR-ADM-MPI-002 part 10: the check cannot run, so the person is provisional with the check pending (unchanged) MatchRoutingTest.engineFailure

Safety. This changes a control of the safety-critical function "Patient search and selection" (D01-ADM 11.1). The control is now as specified: a person is provisional with the ambiguity flag only for a high-risk pair, and active otherwise. Its verification passes, and the high-risk case has a test of its own. Nothing is linked or merged, and the review item and the steward's queue are unchanged. The change brings the code to the specification, and no control is weakened. The hazard log is the clinical safety register outside the repository, so registration governance and the clinical safety officer confirm on the merged work that its entry for identity status after "unsure" matches GAP-ADM-012 ("Needs a person").

Differences from the specification or the contract

  • "Shows 'Identity under review'" (PR-REG-003-5 case 1) is not part of this fix. That status is identityUnderReview on the person, in patient-identity.v1 1.1. Serving 1.1 is the next fix on this unit, RC-1-S28-F2. The active person already has its open review item, which F2's flag reads.
  • More than one prompted candidate. The person is provisional if any pair answered "unsure" is high-risk. GAP-ADM-012 (2) then applies to that pair, and the ambiguity flag is set.
  • None otherwise.

Questions for a person

None blocks this session. - Registration governance and the clinical safety officer: confirm the hazard log entry for the identity status after "unsure" against GAP-ADM-012, on the merged change (above).

Follow-ups outside the card

  • ADR-HIS-053, "Creation": it still names the removed setting and the provisional default until RC-1-S03 Q3 is answered. GAP-ADM-012 answered Q3, and this session's code follows it. Hand-written records are not this card's to edit. The next session that records a decision on adm-identity can amend the line, or a pull request of its own can.
  • e2e/scenarios/RC-1/rc-1.scenario.ts, RC-1-E2E-002 (the integrate session's folder): the soft check and its comment ("adm-identity still makes it provisional, issue #40") can become a hard check with the comment removed. The scenario has no high-risk "unsure" case. One with twins would cover GAP-ADM-012 (2) end to end.
  • RC-1-S09's handover lists this repair as its follow-up: it is done.
  • Design system: none.