Test branch zella - #123
Draft
skeating wants to merge 72 commits into
Draft
Conversation
This reverts commit 567f6d9.
Adds functionality to extract and utilize the admission type information from the PV1 segment of HL7 messages. This includes defining a getter method and adding a unit test to verify the correct extraction of the admission type value..
…atd message factory
Throw when labs have no control id
…age" This reverts commit 3d7d5aa.
…as most of the logic is already there
… test_branch_zella
…to test_branch_zella
The ADT-triggered fallback that inserts a planned_movement row on a real subspeciality change previously only fired for the custom Z99 message, so admissions (A01) and demographics updates (A08/A28/A31) either showed the correct subspeciality hours late or, for A&E admissions, never at all (see #166). AdmitPatient and UpdatePatientInfo now implement HospitalService and feed the same fallback, deduplicated against the last known value per encounter. Also fixes two bugs the new tests surfaced: PV1Wrap.getHospitalService() had no guard for a missing PV1 segment (A08 can legitimately omit one), and UpdatePatientInfo never creates its own HospitalVisit so the fallback needs an explicit lookup for an existing visit. Bumps emap-star's pinned Lombok version, which was incompatible with JDK 21. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ADT^A11 (CancelAdmitPatient) previously had zero effect on planned_movement, so a hospital-service-fallback edit created by a now-cancelled admission was left stale in the table. On A11, find the most recent planned_movement row for that visit+location and, only if it's an EDIT/HOSPITAL_SERVICE_CHANGE row, mark it cancelled - mirroring the existing CancelPendingTransfer/CancelPendingDischarge pattern of marking rather than deleting. Rows from a real pending transfer/ discharge request are left untouched, since they may still represent a valid plan regardless of this one ADT message. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…SFER rows PendingTransfer always labels its planned_movement row TRANSFER (PendingType.ADMIT is unused), so a confirmed admission was left showing as TRANSFER forever, and admissions with no preceding pending transfer (e.g. direct A&E) never got a row at all despite carrying the correct hospital service on arrival. AdmitPatient no longer shares the diff-based hospital-service fallback with UpdatePatientInfo. It now always inserts (or idempotently reuses) its own ADMISSION row via the new PendingAdtController.processAdmission, linking to whatever it fulfils via matchedMovementId without ever modifying that row. processAdmissionCancellation is updated to match: A11 now cancels the ADMISSION row it created rather than an EDIT/HOSPITAL_SERVICE_CHANGE row. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Extend planned_movement hospital service fallback to ADT^A01 and ADT^A08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.