Skip to content

Architecture / Decision records / ADR-HIS-091

ADR-HIS-091 The ADT transactions in adm-patient-administration: the encounter port, the bed occupancy ledger ahead of beds.v1, closure inputs as a port, and one delivery tracker fed by the Domain 1 topics

Status Accepted
Decided 2026-11-29 by session RC-3-S06
Record Drafted 2026-11-29; approved 2026-11-30 by the Enterprise Architecture Board
Where the rule lives services/adm-patient-administration: mod-adm-005 (ADT), mod-adm-006 (bed occupancy), mod-adm-004/api (EncounterRecords, AdtReversals, Registries)

Context

RC-3-S06 builds MOD-ADM-005: admission, leave, return, discharge and closure (FR-ADM-ADT-001, ADT-003), and the publication, acknowledgement tracking and reconciliation of every Domain 1 event (FR-ADM-ADT-002). It serves adt.v1 of RC-3-S02 (ADR-HIS-083). Each ADT transaction must change the encounter, its state history, the bed, the responsibility period and the events in one database transaction (PR-ADT-001-1, PR-ADT-003-1, INT-ADM-006). The modules of the unit keep enforced boundaries, so one module uses another only through its api package (architecture 5.2). Four things had no home yet: - the encounter and its governed state model belong to MOD-ADM-004, but the ADT transactions are MOD-ADM-005's; - bed state belongs to MOD-ADM-006, whose card (RC-3-S07) comes after this one; - the closure criteria are fed by events of Domains 3, 5 and 6, none of which has a contract yet; - the reconciliation worklist must know what was published and what each required consumer did with it.

Decision

  1. MOD-ADM-004 offers the encounter to MOD-ADM-005 through mod004.api.EncounterRecords. MOD-ADM-005 holds the ADT rules. MOD-ADM-004 keeps:
  2. the encounter row and its version;
  3. the append-only history (DE-ADM-009);
  4. the effective-time rules of FR-ADM-ENC-002 part 6.6, with the supervisor's backdate;
  5. the audited refusal with a TransitionRejection code;
  6. the opening of a linked encounter (DEC-ADM-008).

Every method runs in the caller's transaction, under the encounter's row lock. The inpatient context of encounters.v1 1.2 (responsibility, admission request, leave, pending discharge, discharge destination, closure) is one inpatient document on the encounter row (migration V3), written only with a change of the encounter. The responsibility periods themselves (DE-ADM-012) are MOD-ADM-005's table. 2. The reversals of admit and discharge are a port the other way, mod004.api.AdtReversals, which MOD-ADM-005 implements. correctEncounter stays MOD-ADM-004's: the supervisor privilege, If-Match, the reason, the history entry that names the one it reverses, and EncounterCorrected. MOD-ADM-005 ends or re-establishes the bed and the responsibility in the same transaction. What follows EncounterCorrected in the encounter's sequence (ResponsibilityChanged) is published after it. 3. MOD-ADM-006 starts as the bed occupancy ledger, mod006.api.BedOccupancy, ahead of beds.v1. - It holds DE-ADM-013 (state, occupant, reservation), its append-only history, DE-ADM-014 reservations with one active per bed and per encounter, BedStateChanged and BedReserved on his.adm.bed.v1, and the adm.bed.change audit. - A bed is entered the first time a transaction names it, after the D10 registry confirms an active bed-position of the facility. - Every change takes the bed's row lock in the caller's transaction. Of two admissions into one bed exactly one wins, and occupancy is never set apart from an ADT or transfer transaction (contract point 6 of RC-3-S07). - A reservation made for an admission request tells the request through mod006.api.ReservationListener, which MOD-ADM-005 implements, so Bed allocated and back to Accepted follow the reservation. - RC-3-S07 adds beds.v1 to this module: the bed board, turnover and cleaning tasks, isolation, eligible-bed search, expiry and invalidation. 4. The closure inputs of D01-ADM 8.5 are a port, mod005.api.ClosureInputs. - The criteria are configured per class (outpatient, emergency, inpatient), with their DEC-ADM-009 category and waivability. Death documentation is added for a death disposition. They are stand-ins of the D10 configuration in Closure, like the payer fields of ADR-HIS-075. - Criteria Domain 1 records itself are set at discharge: disposition, discharge order (also by the discharge decision), bed released, pending results to the attending practitioner. Triage comes from QueueStateChanged. - Everything else is unmet until a subscription reports it through the port (PR-ADT-003-2). The subscriptions are added with the Domain 3, 5 and 6 contracts. - The encounter closes by itself when every criterion is met. A waiver is a policy action per category (waive-documentation, waive-clinical, waive-financial), so the decision point grants it to the Head of HIM, the medical director and the revenue cycle manager respectively. 5. One delivery tracker, fed by the Domain 1 topics and by Domain 2. - The tracker learns what was published by consuming the eight Domain 1 topics, so events of adm-identity and adm-scheduling-flow are tracked too, by event identifier, once. - Each required consumer of a topic is configuration (his.adm.delivery.required-consumers, consumer, owning domain and whether clinical, as D02 registers them). Its CFG-ADM-012 due time starts at publication. - A consumer that D02 reports and the configuration does not list is tracked from its first status. - Overdue acknowledgements are opened by a scan. Rejections, reported gaps and dead letters (EVT-ISE-002) open an item at once. - A status for an event not yet read is kept and applied when the event arrives. - Only the D02 service identities of his.adm.delivery.reporters may report; any other caller is 403 (adm.service.denied). 6. The ADT transactions are policy actions of their own on adm.Encounter: admit, leave, return, decide-discharge (given the attending practitioner, so that the decision point can limit it to the responsible clinician), discharge, close, extend-bed-hold (the bed manager, CFG-ADM-026) and the three waivers. Further actions are on the resource types adm.AdmissionRequest (create, accept, cancel, view, query), adm.EncounterClosure, adm.EventDelivery (report, view) and adm.ReconciliationItem (query, resolve).

Consequences

  • RC-3-S07 builds beds.v1 on BedOccupancy and extends the ledger; RC-3-S08 builds the transfer on the same ports (EncounterRecords, BedOccupancy, the responsibility periods of MOD-ADM-005).
  • A later card adds the subscriptions to the Domain 3, 5 and 6 closure events (and the downstream activity of RC-2-S04) and reports them through ClosureInputs and DownstreamActivity.
  • The D10 starter policy must grant the actions of point 6 before ADM goes live (RC-1-S16, as RC-2-S10 did for RC-2), and the D02 registry must supply the required consumers of point 5 (RC-3-S16).
  • An admission reversed as entered in error leaves its bed to Cleaning whether or not the patient was ever placed: Domain 1 cannot tell, and a cleaned bed is the safe side.