[bot] Fast-forward for 26.9.0 - #49
Merged
Merged
Conversation
## Rationale Make the birth and arrival forms record a complete animal, and give the housing hierarchy and the assignment lists one place to be maintained. An animal could be entered with no protocol, project or group assignment, because each of those lived in a separate section of the form that was easy to leave empty, and two births could claim the same conception when they were entered together. Separately, the housing location tables and the investigator, project and protocol lists each carried their own data entry form, and most of the hierarchy could only be deleted rather than retired. ## Changes - Enter an animal's opening protocol, project and group assignment on its birth or arrival row, where each is required, rather than in separate sections that could be left empty. - Pick the conception a birth came from by clicking it on the row, and refuse a second birth against a conception that already has one, including a birth entered on the same form. - Maintain the housing location hierarchy and the investigator, project and protocol lists through Manage Lookup Tables instead of a data entry form for each, and allow buildings, floors and cages to be retired rather than only deleted. - Drop the ways of adding a row that the birth and conception forms should not offer, and show the protocol rather than its display name on the animal snapshot. - Correct two species entries and load the source facility list.
) ## Rationale Two independent fixes, to observation entry and to cagemate matching. The Observations form let a user pick any observation type but stored every entry as Clinical, so behavior observations recorded there were filed as clinical and dropped out of the behavior views; the form cannot know the right value up front because it depends on which type the user picks for each row, so the type is now derived on save from that type's category. The behavior forms had the same mismatch from the other direction: their Daily Observations shortcut bypassed the type-filtered picker and wrote clinical-category observations labeled as behavior. Separately, the cagemates query treated a housing row with no cage as though it were a location, so every animal whose location had not resolved was reported as a cagemate of every other. Rows already saved with a mismatched observation type need a one-time data fix; this change only affects new entries. ## Changes - The Observations form no longer defaults an observation's type. The trigger script derives it from the selected observation type's category, while every other form continues to set the type explicitly, including scheduled entries that inherit it from their order. - The Daily Observations shortcut is now opt-in per form section rather than always present, so it appears only on the clinical forms. - Cagemate matching now keys off active housing rows with a known cage.
…ropdown (#33) ## Rationale This branch corrects three defects in the death and birth/arrival entry forms: the death notification never fired for a death entered alongside its necropsy, birth and arrival events were stored at midnight regardless of the time entered, and reopening the Submit For Review window rendered a second Assign To dropdown. The notification and the procedure-order update were gated on the record landing on 'Request: Pending', which only happens by way of 'Submit Death'. A death entered together with its necropsy goes straight to 'Review Required' or 'Completed' and so notified nobody. This widens the trigger to any first save that leaves draft, which means an API or bulk load inserting deaths already at 'Completed' will now send one notification per animal. ## Related Pull Requests - Notify and complete procedure orders on the first save that leaves draft, rather than only when the record lands on 'Request: Pending'. - Ignore deletes in the death trigger, which previously read a deleted row as a draft leaving draft. - Keep the time of day on birth and arrival events and on the assignment, protocol assignment, housing, and group membership records derived from them. - Show that time of day on the birth, arrival, death, necropsy and derived-record dates, which the study framework otherwise renders as date-only, so the entry forms offer a time editor. - Give the Assign To combo a window-scoped identity and discard the Submit For Review window on cancel.
## Rationale Adds a Pregnant field to the animal snapshot so staff can see at a glance whether a female is carrying an open conception, without opening the conception records to check. A conception is open until a birth or a pregnancy outcome claims it, which no existing column expressed, so the field is backed by a new derived flag on the conception record. That flag is also useful on its own and is surfaced on the conceptions-by-dam report. ## Changes - Conception records carry a derived active flag marking the ones no birth or pregnancy outcome has claimed, and it appears on the conceptions-by-dam report alongside the outcome. - The snapshot and Animal Details panels show a Pregnant field listing each open conception as a link to its record, or "No" when there are none. - The dam's cached demographics are refreshed whenever a conception is entered, re-pointed or removed, and whenever a birth closes or reopens one. Previously only a pregnancy outcome refreshed her, so the field could show a stale value indefinitely. - The outcome report no longer counts birth or pregnancy records whose status is explicitly non-public. - Removed the Prev Id field from the snapshot panel. - Test coverage for the field and the flag across the birth, conception and pregnancy flows.
## Rationale Bring the birth, arrival, death, and pregnancy entry forms in line with the data that is actually captured for new animals and pregnancy outcomes. Four gaps drove the work: animals were being created with neither a location nor a generation, the death type list still offered values that are no longer valid for new entry alongside a disposition field that is not used, and pregnancy outcomes recorded no delivery mode and could be saved without a link back to a conception. ## Changes - Require the initial location on the birth and arrival forms. - Record a generation on demographics for animals entered through those forms: arrivals start at zero and births derive theirs from the dam. - Disable the death types that are no longer valid for new entry, leaving them in the lookup so historical rows still resolve. - Drop the disposition field from the deaths form and dataset, and deregister the death reason lookup that it left unused. - Add a delivery mode to pregnancy outcomes and require a conception Id. - Extend the module's Selenium coverage for the new required fields and the generation behavior. - Note for deployment: the new generation column ships with the reference study, so an existing study needs it imported before the forms will accept it.
## Rationale The Rearrival form collects fields that do not apply to a returning animal and omits the ones that do, and a completed rearrival leaves the animal in a departed state. It asks for an acquisition type and a CITES number, though an animal that is coming back was already acquired, and it does not ask which project, protocol, group or location the animal returns to. This reverses the decision in #28 to leave rearrivals out of those assignment fields: a departure closes an animal's project, protocol, group and housing records, so a returning animal has none of them left to keep and each has to be opened again, along with putting the animal back to Alive. ## Related Pull Requests - LabKey/ehrModules#1200 — needed alongside this change, since entering a death for an animal that has arrived more than once fails without it. ## Changes - Replace acquisition type and CITES on the Rearrival form with project, protocol, group and location, each required, as they are on the Arrival form. - Open the project assignment, protocol assignment, group membership and housing records for a rearrival, matching what an arrival already does. - Return a rearrived animal to Alive once the rearrival is completed.
## Rationale Housing history and the animal snapshot panel were displaying only the bare cage, losing the room that qualifies it, so two animals in identically-named cages in different rooms were indistinguishable. This also provisions a morning health flag on rooms so the rooms included in morning health checks can be maintained as lookup data, and drops the requirement that a housing reason be supplied. ## Related Pull Requests None. ## Changes - The housing history data source and the snapshot panel now read the room-qualified location key directly rather than traversing to the cage lookup. - Added a morning health flag to the rooms lookup table. - Made the reason field optional on housing records. - Added a test that houses an animal and verifies the snapshot reports the full location.
#42) ## Rationale Moves conception records out of the nbri_ehr schema into a study dataset keyed on the dam and the conception date, and adds an elapsed day count so how far along a pregnancy is can be seen wherever a conception appears. As a dataset the records pick up the EHR framework's participant handling, QC state workflow and audit behaviour, all of which the hard table had been reproducing by hand — a whole trigger script existed only to announce the modified dam, because the table had no Id column to announce her from. It also leaves the nbri_ehr schema with no tables, though its custom queries stay. Two consequences are worth knowing when reviewing: existing conception rows are not migrated, and the conception Id uniqueness the database used to enforce is now enforced by the trigger script. The upgrade script drops the old table but does not reload the folder, so an existing container needs a study reload before the dataset exists and the conception form and its queries resolve. ## Related Pull Requests None. ## Changes - Conception records moved to a study dataset filed against the dam, with the conception date as the record date; the old table is dropped without migrating its rows. - Data entry, the animal snapshot, the dam report, and the birth and pregnancy outcome triggers all read the dataset instead of the schema table. - The hand-maintained QC state metadata and the dam-announcing trigger are gone, replaced by what the dataset provides natively. - Conception Id uniqueness is now enforced by the trigger script rather than a database constraint. - Each conception carries a calculated count of days elapsed since the conception date, shown on the dam report and beside the conception Id in the animal snapshot's Pregnant field. - The snapshot reads that count from the cached demographics record, so it can trail the report by up to a day.
## Rationale Makes the full protocol and project record visible where people actually work with it, in the ehr default views and in the Assignment data entry form. Each default view showed only a handful of the table's columns — four on project, eleven on protocol — so most of the record was reachable only through Customize Grid. On the Assignment form a row identified its protocol and project by id alone, with no way to see the protocol's description, the project's account, or which investigator owns a protocol. ## Changes - Both default views now list the columns that make up the working record, and the column metadata no longer marks those columns hidden. The free-text investigator fields that predate the investigator lookup stay hidden and out of the views. - Both default views are now overridable, so a container can save its own default view over the module's. - The Protocol Assignment grid gains a read-only column showing the selected protocol's description. - The Project Assignment grid gains a read-only column showing the selected project's account. - Every protocol dropdown — assignment, arrival and birth — now identifies a protocol by its display name and its investigator, and the assignment column is wider to suit. - The Selenium suite covers the new columns and the dropdown text, and its protocol fixtures carry descriptions and point at real investigator records.
…est validation waits (#43) ## Rationale Corrects the group assignment trigger configuration, restores the project, protocol and investigator admin forms that were lost when those lists moved to Manage Lookup Tables, and makes the module's test validation waits reliable. The trigger problem reached beyond this module: the option is held in a single server-wide map, so whichever EHR module started last decided which datasets close on new entry for every container. The branch also retires lookups and a death type that are no longer used, and adds a Groups report to the animal page. ## Related Pull Requests None. ## Changes - Set the datasets closed on new entry per request from this module's own trigger script instead of registering them server-wide. - Re-register the project, protocol and investigator data entry form types so those lists are editable from both the forms and Manage Lookup Tables. - Add a Groups report to the animal page, and stop forcing the group membership start date to midnight. - Retire 14 unused lookups and the redundant Cull death type. - Re-validate the form before failing when a validation message does not clear, and remove the duplicate conception test's unpassable error wait.
DariaBod
approved these changes
Sep 16, 2026
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.
Generated automatically.
Approve all matching PRs simultaneously.
Approval will trigger automatic merge.
View all PRs: https://internal.labkey.com/Scrumtime/Backlog/harvest-gitOpenPullRequests.view?branch=26.9_ff_bot_26.9.0