Architecture / Decision records / ADR-HIS-122
ADR-HIS-122 Unidentified patients, newborns and identity reconciliation in adm-patient-administration: the placeholder sequence, the newborn field set, routing to the steward, and records that follow a merge by link¶
| Status | Accepted |
| Decided | 2026-12-02 by session RC-4-S03 |
| Record | Drafted 2026-12-02; awaiting approval by the Enterprise Architecture Board |
| Where the rule lives | services/adm-patient-administration/mod-adm-002 (SpecialIdentities, Placeholders, Names, FieldSets, Demographics, migration V2__special_identity_cases.sql), mod-adm-004 (Encounters, MergeLinks, EncounterPatients); the unit's README |
Context¶
FR-ADM-REG-004 covers unidentified patients, aliases, newborns, legal name changes and identity reconciliation. Its contract is registration.v1 1.2 (ADR-HIS-118; contract points of RC-4-S03 in contracts/adm/README.md). It is the control of the safety-critical function "Unidentified and newborn registration" (D01-ADM 11.1): records attached to the wrong identity, siblings confused. Building it in a unit that does not own the person (adm-identity does) leaves these questions open:
- The placeholder name must be unique among concurrent arrivals (AC-02), and the contract asks for the sequence "in the same transaction as the registration". But the person must be created in adm-identity, carrying the name, before the registration can be saved, and that call cannot sit inside a local transaction.
- Which fields a newborn registration must capture, and which it may defer. CFG-ADM-004 has field sets for planned, planned-inpatient and emergency registrations, none for a birth.
- What counts as "outstanding" when the only name is a placeholder and the date of birth an estimate.
- Whether a newborn's or unidentified patient's registration waits on consent (DEC-ADM-013) as a planned registration does.
- When the
completepath of a reconciliation must go to the steward instead of applying the real demographics. The contract names asameorunsureanswer and a review-band candidate. - How the unidentified patient's encounter "is linked to" the existing person after the steward's merge (AC-03), when the encounter is held by MOD-ADM-004 under the temporary person.
- What a legal name change keeps, and how aliases sit beside the legal name in the attribute groups of DE-ADM-006.
Decision¶
- The placeholder number is reserved by Idempotency-Key in its own short transaction, before adm-identity is called.
Placeholders.takeincrements a counter per facility and registration day (placeholder_sequence, an upsert returning the new value) and records the name against the facility and the request's key (placeholder_name, unique on both). A retry with the same key gets the same name back, and a concurrent request with the same key rolls back and reads the one that won. The registration then commits in its own transaction aftercreatePersonandassignFacilityIdentifier. Two arrivals never share a name. A request that fails for good leaves a gap in the day's numbers, which is harmless: the name only has to be unique and meaningless. Holding a transaction open across the call to adm-identity was rejected, because a slow index would hold the counter's row lock and stall every other arrival at the facility. This is the one place where the build departs from the wording of the contract point ("same transaction"); its purpose, no two patients sharing a placeholder, is kept. - A newborn has a field set of its own,
newborn, selected by the encounter typenewborn-care. Sex and date of birth are mandatory, since the birth gives both. The name, the mother's name (it comes from the mother link), the address, contact details, citizenship and the responsible person can be deferred. The emergency field set was rejected: it defers the date of birth, which a birth always has. Registration governance owns CFG-ADM-004 and may change the set; it lives inFieldSets, the stand-in until IF-ESS-012. - A placeholder is not a name, and an estimate is not a date of birth. When the only names are of use
temp,demographics.namesstays outstanding. AbirthDatemarked estimated leavesdemographics.birthDateoutstanding. Both registrations therefore stayincomplete, on the incomplete-registrations worklist, until the real values are recorded (FR-ADM-FLW-003 part 6.2). The rule holds whichever operation saves the registration. completeRegistration refusescompletion: completewhile the name is only a placeholder or the date of birth an estimate, naming both fields. A partial completion keeps them outstanding. A placeholder and an estimate still count as present for the mandatory check of an incomplete save, as the emergency field set's "or an estimated one" allows. The outstanding list also names every deferrable field still missing, not only the mandatory ones, so the worklist shows what remains. - The consent gate applies at completion, not at these registrations. registerUnidentifiedPatient and registerNewborn never wait on the consent service (AC-01; BR-ADM-007 exception). They save the registration
incomplete, and completeRegistration enforces DEC-ADM-013 as for any other registration. - A complete reconciliation goes to the steward whenever the match is not plainly "different". That is when a prompt is answered
sameorunsure, when a candidate is in any band other thannon-match(review or high-confidence), or when a candidate carries a high-risk flag, even if the user answereddifferent. Each routed candidate becomes a work item in adm-identity (merge-requestforsame, elseduplicate-candidate). The real demographics are held on the reconciliation record for the steward, and nothing is applied. This is stricter than the contract's "review band": a high-confidence candidate answereddifferentby an emergency clerk is exactly the misattribution the control guards against, and only the steward settles it (PR-REG-004-2). - The encounter follows the merge by link, not by moving records. MOD-ADM-004 already keeps the merge links of the person index from PatientMerged and PatientUnmerged (RC-3-S07). readEncounter answers a merged identity's encounter with the survivor as
patientand the temporary identity asresolvedFromPatient, and asks the decision point about the survivor. listEncounters by patient includes the encounters of every identity merged into it, recursively. The stored row keeps the temporary person, so an unmerge (PR-MPI-005-3) needs no reverse move, and the temporary identifiers stay resolvable (PR-REG-004-3). The registration of a merged identity takes the identity statusmergedfrom PatientMerged (subscriptionregistration-merges), and an identified oneactive. The worklist of unidentified patients (listRegistrationsidentityStatus=unidentified) then shows only those still to be identified. A newborn's mother's encounter is checked to be hers through the portmod002.api.EncounterLookup, which MOD-ADM-004 implements, so the module boundary of ADR-HIS-057 holds. - A legal name change keeps the former name in the same version. A change of the official name, unless it is marked a correction, needs
provenance.evidenceReferenceand a reason (part 7; DE-ADM-006 gains the columnevidence_reference). The previous official name is added to the alias group with useold, its period ending one millisecond before the start of the effective date inhis.adm.time-zone, so search still finds it while the new legal name is shown first (AC-05). A correction of an erroneous name (part 6.6) is not a legal name change: the erroneous version stays in the history only. Aliases are only ever added to the alias group, or their validity changed, by use and text. They never replace the legal name or each other, and a placeholder that ends at identification is kept there too. - The decision point is told the record is Sensitive. registerUnidentifiedPatient and reconcileIdentity carry the label
unidentified-patient, and registerNewborn carriesmother-infant-link, in the policy check'sattributes.labels(D01-ADM 9.3).create-mother-unknownis a separate check onadm.Registration, and reconcileIdentity is checked as CREATE onadm.IdentityReconciliation. Every refusal is audited.
Consequences¶
- adm-identity must serve patient-identity.v1 1.3 before RC-4-S06. Until then these three operations cannot complete against the real index. The unit is tested against
FakePersonIndexand the 1.3 stub (consumer contract test). - D10 must register the label codes
unidentified-patientandmother-infant-linkas well as the resource type, action and code lists the contract points list. Until it does, the decision point cannot act on them. - A gap in the placeholder numbers of a day is expected and needs no explanation in an audit.
- Registration governance reviews the newborn field set, the outstanding rules of point 3 and the routing of point 5 on the merged work, and may change them.