June 25, 2026: More accurate discharge detection for hospital transfers
Transitions of Care that involve a transfer between encounters now close on the correct discharge, instead of remaining open.
To mark a Transition of Care as complete (set EpisodeOfCare.period.end and status: finished), Zus requires a confirmed discharge signal — a dischargeDisposition value or an ADT discharge message (A03). Previously that signal was only honored on the latest encounter in the episode. When the discharge signal actually lived on an earlier inpatient encounter — for example, an ED visit followed by an inpatient stay whose discharge closes the episode — the episode was never finished. The result was a Transition of Care that stayed active with no discharge date, even though the patient had been discharged.
Zus now also checks the earliest qualifying inpatient encounter: if it carries a discharge signal and ends after the latest encounter began, its end is used as the episode's period.end. This resolves episodes that previously stayed open, and produces the correct discharge date and ordering when encounters span a transfer. No changes are required on the customer side — the corrected period.end and status are reflected automatically in the EpisodeOfCare resource and ZusHook payloads.
