diff --git a/nbri_ehr/resources/data/cage_type.tsv b/nbri_ehr/resources/data/cage_type.tsv index aaf6fb6..af4958e 100644 --- a/nbri_ehr/resources/data/cage_type.tsv +++ b/nbri_ehr/resources/data/cage_type.tsv @@ -1,8 +1,12 @@ -cagetype height sqft cageslots verticalSlots supportsTunnel -Double - 1 40 7 2 1 false -Double - 2 40 6 2 1 false -Quad - A 50 8 4 1 false -Quad - B 50 9 4 1 false -Quad - C 50 10 4 1 false -Tunnel - I 30 12 2 1 true -Tunnel - II 30 11 2 1 true \ No newline at end of file +cagetype length width height sqft cageslots description +3M (modified quad) 54 9 1 Right side vertical access; 3 floor surfaces; height 27/54 +4 (female) 24 27 32 4.5 1 +4M (modified female 4-pack) 64 13.5 1 Right side vertical access; 3 floor surfaces; height 32/64 +4M (modified female 6-pack #1) 64 18 1 Right & left vertical access; 4 floor surfaces; height 32/64 +4M (modified female 6-pack #2) 64 22.5 1 Right side vertical access; 5 floor surfaces; height 32/64 +6 (male) 34 27 32 6.4 1 +6M (modified male 4-pack) 64 19.2 1 Right side vertical access; 3 floor surfaces; height 32/64 +8 44 27 32 8.3 1 +8T 44 27 36 8.3 1 +Incubator 12 12 12 1 1 +Quad 18 24 27 3 1 diff --git a/nbri_ehr/resources/data/cageclass.tsv b/nbri_ehr/resources/data/cageclass.tsv new file mode 100644 index 0000000..b63ba4d --- /dev/null +++ b/nbri_ehr/resources/data/cageclass.tsv @@ -0,0 +1,8 @@ +requirementset low high sqft +AAALAC Guide 0 0.99 2.1 +AWA 0.99 1.5 3 +AWA, AAALAC Guide 1.5 3 3 +AWA, AAALAC Guide 3 10 4.3 +AWA, AAALAC Guide 10 15 6 +AWA, AAALAC Guide 15 20 8 +AAALAC Guide 20 25 10 diff --git a/nbri_ehr/resources/data/editable_lookups.tsv b/nbri_ehr/resources/data/editable_lookups.tsv index 0d76eba..30bf551 100644 --- a/nbri_ehr/resources/data/editable_lookups.tsv +++ b/nbri_ehr/resources/data/editable_lookups.tsv @@ -27,6 +27,7 @@ ehr_lookups breeding_type Colony Management Breeding Type Breeding group assignm ehr_lookups buildings Housing Buildings Buildings within an area. ehr_lookups cage Housing Cages Cage locations within a room. ehr_lookups cage_type Colony Management Cage Type Used in cage details. +ehr_lookups cageclass Housing Cage Class Cage size requirements by weight. Used in cage size calculations. ehr_lookups calculated_status_codes Colony Management Calculated Status Animal status values. ehr_lookups capillary_refill_time Clinical Capillary Refill Times Used clinical observations. ehr_lookups card_format Colony Management Card Format @@ -100,6 +101,7 @@ ehr_lookups pairing_goal Behavior Pairing Goal Used in pairing dataset. ehr_lookups pairing_reason Behavior Introduction Reason Used in pairing dataset. ehr_lookups pairing_observation Behavior Interaction Summary Used in pairing dataset. ehr_lookups pairing_separation_reason Colony Management Pairing Status Change Reason Pairing Status Change Reason Fixed Values. +ehr_lookups per_diem Housing Per Diem Per diem housing categories for cages. ehr_lookups preferences Behavior Preferences Behavior observation fixed values. ehr_lookups pregnancy_result Colony Management Pregancy Result ehr_lookups procedure_category Clinical Procedure Category Used in procedures to group procedures. diff --git a/nbri_ehr/resources/data/lookup_sets.tsv b/nbri_ehr/resources/data/lookup_sets.tsv index c265799..1ec5754 100644 --- a/nbri_ehr/resources/data/lookup_sets.tsv +++ b/nbri_ehr/resources/data/lookup_sets.tsv @@ -82,6 +82,7 @@ pairing_formation_types Pairing Formation Type value pairing_reason Introduction Reason value pairing_observation Interaction Summary value pairing_separation_reason Pairing Status Change Reason value value +per_diem Per Diem value title preferences Preferences value pregnancy_result Pregnancy Results value procedure_category Category of procedures value diff --git a/nbri_ehr/resources/data/lookupsManifest.tsv b/nbri_ehr/resources/data/lookupsManifest.tsv index c7a4b33..601ed1e 100644 --- a/nbri_ehr/resources/data/lookupsManifest.tsv +++ b/nbri_ehr/resources/data/lookupsManifest.tsv @@ -23,6 +23,7 @@ blood_sample_type blood_tube_volumes breeding_type cage_type +cageclass calculated_status_codes capillary_refill_time card_format @@ -82,6 +83,7 @@ pairing_goal pairing_reason pairing_observation pairing_separation_reason +per_diem preferences pregnancy_result procedure_category diff --git a/nbri_ehr/resources/data/lookupsManifestTest.tsv b/nbri_ehr/resources/data/lookupsManifestTest.tsv index db03e65..4c01e4a 100644 --- a/nbri_ehr/resources/data/lookupsManifestTest.tsv +++ b/nbri_ehr/resources/data/lookupsManifestTest.tsv @@ -23,6 +23,7 @@ blood_sample_type blood_tube_volumes breeding_type cage_type +cageclass calculated_status_codes capillary_refill_time card_format @@ -83,6 +84,7 @@ pairing_goal pairing_reason pairing_observation pairing_separation_reason +per_diem preferences pregnancy_result procedure_category diff --git a/nbri_ehr/resources/data/per_diem.tsv b/nbri_ehr/resources/data/per_diem.tsv new file mode 100644 index 0000000..6f738dd --- /dev/null +++ b/nbri_ehr/resources/data/per_diem.tsv @@ -0,0 +1,7 @@ +value title +C Corn Cribs +F Field Cages +H Hospital +I Infectious +N Nursery +R Regular Indoor diff --git a/nbri_ehr/resources/data/protocol_type.tsv b/nbri_ehr/resources/data/protocol_type.tsv index 2b0eb13..9522f84 100644 --- a/nbri_ehr/resources/data/protocol_type.tsv +++ b/nbri_ehr/resources/data/protocol_type.tsv @@ -1,6 +1,3 @@ value title -0 Template -1 Original -2 Amendment -3 Renewal -4 Renewal/Amendment \ No newline at end of file +E Experimental +C Colony \ No newline at end of file diff --git a/nbri_ehr/resources/queries/ehr/protocol.query.xml b/nbri_ehr/resources/queries/ehr/protocol.query.xml index 995a4ea..7933ea6 100644 --- a/nbri_ehr/resources/queries/ehr/protocol.query.xml +++ b/nbri_ehr/resources/queries/ehr/protocol.query.xml @@ -29,6 +29,14 @@ Approval Date + + + ehr_lookups + protocol_type + value + title + + diff --git a/nbri_ehr/resources/queries/ehr_lookups/cage.query.xml b/nbri_ehr/resources/queries/ehr_lookups/cage.query.xml index 88ddffe..e9214fb 100644 --- a/nbri_ehr/resources/queries/ehr_lookups/cage.query.xml +++ b/nbri_ehr/resources/queries/ehr_lookups/cage.query.xml @@ -35,6 +35,12 @@ Per Diem + + ehr_lookups + per_diem + value + title + diff --git a/nbri_ehr/resources/queries/study/demographics/.qview.xml b/nbri_ehr/resources/queries/study/demographics/.qview.xml index 1fcb392..b5630a1 100644 --- a/nbri_ehr/resources/queries/study/demographics/.qview.xml +++ b/nbri_ehr/resources/queries/study/demographics/.qview.xml @@ -4,7 +4,7 @@ - + diff --git a/nbri_ehr/resources/queries/study/demographicsCageClass.query.xml b/nbri_ehr/resources/queries/study/demographicsCageClass.query.xml new file mode 100644 index 0000000..71f3ee7 --- /dev/null +++ b/nbri_ehr/resources/queries/study/demographicsCageClass.query.xml @@ -0,0 +1,24 @@ + + + + + + + true + true + + + Required Sq Ft + + + Required Height + + + true + + + Location +
+
+
+
diff --git a/nbri_ehr/resources/queries/study/demographicsCageClass.sql b/nbri_ehr/resources/queries/study/demographicsCageClass.sql new file mode 100644 index 0000000..cab9304 --- /dev/null +++ b/nbri_ehr/resources/queries/study/demographicsCageClass.sql @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2026 LabKey Corporation + * + * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 + */ +SELECT + +d.id, +d.id.MostRecentWeight.MostRecentWeight as MostRecentWeight, + +c.sqft as ReqSqFt, + +c.height as ReqHeight + +from study.demographics d + +-- No requirementset filter: NBRI's sets split the weight range between them rather than overlap, so each weight matches one row. +LEFT JOIN ehr_lookups.cageclass c + +ON (c.low < d.id.MostRecentWeight.MostRecentWeight AND d.id.MostRecentWeight.MostRecentWeight <= c.high) + +WHERE +d.calculated_status = 'Alive'