Skip to content

Add birth, arrival and conception lookups and relax entry validation - #6

Open
labkey-martyp wants to merge 10 commits into
release26.7-SNAPSHOTfrom
26.7_fb_birth_arrival_updates
Open

Add birth, arrival and conception lookups and relax entry validation#6
labkey-martyp wants to merge 10 commits into
release26.7-SNAPSHOTfrom
26.7_fb_birth_arrival_updates

Conversation

@labkey-martyp

@labkey-martyp labkey-martyp commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Rationale

Adds the fields and lookup codes needed to bulk load historical birth, arrival and conception records into the NBRI EHR. The legacy source system keys its source, species and pregnancy-outcome lookups by short alpha codes rather than the numeric placeholders the module was seeded with, so those lookups have to be recoded before incoming values will resolve. The historical records also predate several of the required-field rules on the current entry forms.

Related Pull Requests

None.

Changes

  • Add birth condition, delivery mode and breeding type to the birth record, and an estimated-date flag to conception.

  • Recode the source, species and pregnancy outcome lookups to the alpha codes used by the source system, and point the arrival and departure lookups at them.

  • Surface the task and status columns on the conception grid, with the standard status highlighting, and report a conception's offspring alongside its outcome.

  • Add a Start with Conception action to the birth form that seeds a new birth record from an existing conception, inferring the newborn's species from the dam.

  • Move project and protocol entry on the arrival and birth forms into dedicated assignment sections, which relaxes animal Id validation for animals that have no demographics record yet.

  • Relax required-field validation on the arrival and birth entry forms so historical records can be loaded. These rules are left in place as commented-out code so they can be restored once the loads are done.

  • The conception estimated-date flag is added to the in-flight 26.7 schema script rather than a new one, so servers that already ran it need a bootstrap.

Adds birth condition, delivery mode and conception breeding type, recodes the source and pregnancy result lookups to alpha codes with the arrival and departure foreign keys following, and relaxes required-field validation on the arrival and birth entry forms for bulk data loads.
Project and protocol are now entered through the Project Assignment and Protocol Assignment sections rather than as fields on the birth and arrival forms, and demographics source is read from the arrival record instead of its own demographics column.

Species and gender reference data is replaced with the codes NBRI uses, and group status and status code lookups are registered.
Breeding type describes the birth rather than the conception, so the column moves from the conception table to the birth dataset and entry form. The lookup also gains a project breeding value and switches the not-assigned code from 0 to O.
Offspring are aggregated per conception so multiple births for one conception don't duplicate rows.
The Births section gains a Start with Conception button that adds a row carrying the conception's Id, dam, sire and the dam's species. Its columns are also reordered, with Id, birth date, conception Id, species and sex now required.
testBirthForm now starts its record from the conception window and checks the copied values, column order, required conception Id and breeding type. testConceptionForm covers the Estimated flag and that breeding type moved to the birth form. Also corrects test data that no longer matched its lookup: the species code and the source facility name.
The protocol combo rendered blank items because ehr.protocol's title column is not returned by the activeProtocols query, so its display column has to be named explicitly. ehr.project's investigatorId had no lookup at all, which broke the EHR project field's query for the investigator's last name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant