Skip to content

Update the birth, arrival, death, and pregnancy data entry forms - #35

Open
labkey-martyp wants to merge 6 commits into
release26.7-SNAPSHOTfrom
26.7_fb_birth_arrival_death_forms
Open

Update the birth, arrival, death, and pregnancy data entry forms#35
labkey-martyp wants to merge 6 commits into
release26.7-SNAPSHOTfrom
26.7_fb_birth_arrival_death_forms

Conversation

@labkey-martyp

Copy link
Copy Markdown
Contributor

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.

Related Pull Requests

None.

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.

Generation lives on demographics beside the social code: arrivals start at 0, and births take the dam's generation plus one, falling back to 1 when she has none. The new column has to be imported into an existing study before the forms will accept it, and the birth test now sets a location, which became required in the previous commit.
Death types that are no longer valid for new entry stay in the lookup as disabled so the historical rows that use them still resolve. Removing disposition from the deaths form and dataset leaves death_reason unused, so it is deregistered too.
Delivery mode reuses the pregnancy dataset's unused type column and the delivery_mode lookup that study.birth already points at.
Comment thread nbri_ehr/resources/web/nbri_ehr/model/sources/Arrival.js Outdated
The arrival trigger required a generation on every upsert and never propagated a corrected one to demographics; both now follow the scoping and the update clause the neighboring fields already use.

Also coerces the value before comparing it, names the real cause when a birth has no dam at all, reports a missing generation column directly, and gives each birth test row its own cage.
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.

2 participants