From 6dfc22ba7eacaa1af8d7570d063ddd2e0c272373 Mon Sep 17 00:00:00 2001 From: Marty Pradere Date: Wed, 7 Oct 2026 16:56:08 -0600 Subject: [PATCH 1/5] Add Experimental/Colony protocol type lookup to NBRI protocols --- nbri_ehr/resources/data/protocol_type.tsv | 7 ++----- nbri_ehr/resources/queries/ehr/protocol.query.xml | 8 ++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) 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 + + From ce06846dd1b6191fcbc9d2823c5d91fe1d126a99 Mon Sep 17 00:00:00 2001 From: Marty Pradere Date: Wed, 7 Oct 2026 16:59:24 -0600 Subject: [PATCH 2/5] Add NBRI cageclass lookup and update cage types --- nbri_ehr/resources/data/cage_type.tsv | 20 +++++++++++-------- nbri_ehr/resources/data/cageclass.tsv | 8 ++++++++ nbri_ehr/resources/data/editable_lookups.tsv | 1 + nbri_ehr/resources/data/lookupsManifest.tsv | 1 + .../resources/data/lookupsManifestTest.tsv | 1 + 5 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 nbri_ehr/resources/data/cageclass.tsv 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..0695995 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 diff --git a/nbri_ehr/resources/data/lookupsManifest.tsv b/nbri_ehr/resources/data/lookupsManifest.tsv index c7a4b33..57795ea 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 diff --git a/nbri_ehr/resources/data/lookupsManifestTest.tsv b/nbri_ehr/resources/data/lookupsManifestTest.tsv index db03e65..db098f2 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 From 634e6e8f0e017e3facca4a045545e23a201fc504 Mon Sep 17 00:00:00 2001 From: Marty Pradere Date: Wed, 7 Oct 2026 17:00:08 -0600 Subject: [PATCH 3/5] Show room instead of building in NBRI demographics default view --- nbri_ehr/resources/queries/study/demographics/.qview.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ - + From 4603c2a73e24dcc6915cd490f17ff1f195334286 Mon Sep 17 00:00:00 2001 From: Marty Pradere Date: Wed, 7 Oct 2026 17:05:05 -0600 Subject: [PATCH 4/5] Add per diem lookup for NBRI cages --- nbri_ehr/resources/data/editable_lookups.tsv | 1 + nbri_ehr/resources/data/lookup_sets.tsv | 1 + nbri_ehr/resources/data/lookupsManifest.tsv | 1 + nbri_ehr/resources/data/lookupsManifestTest.tsv | 1 + nbri_ehr/resources/data/per_diem.tsv | 7 +++++++ nbri_ehr/resources/queries/ehr_lookups/cage.query.xml | 6 ++++++ 6 files changed, 17 insertions(+) create mode 100644 nbri_ehr/resources/data/per_diem.tsv diff --git a/nbri_ehr/resources/data/editable_lookups.tsv b/nbri_ehr/resources/data/editable_lookups.tsv index 0695995..30bf551 100644 --- a/nbri_ehr/resources/data/editable_lookups.tsv +++ b/nbri_ehr/resources/data/editable_lookups.tsv @@ -101,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 57795ea..601ed1e 100644 --- a/nbri_ehr/resources/data/lookupsManifest.tsv +++ b/nbri_ehr/resources/data/lookupsManifest.tsv @@ -83,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 db098f2..4c01e4a 100644 --- a/nbri_ehr/resources/data/lookupsManifestTest.tsv +++ b/nbri_ehr/resources/data/lookupsManifestTest.tsv @@ -84,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/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 + From 93274e62a661d01e1b61f0f2803665d6e805f708 Mon Sep 17 00:00:00 2001 From: Marty Pradere Date: Wed, 7 Oct 2026 20:48:53 -0600 Subject: [PATCH 5/5] Override NBRI cage class query to drop The Guide filter --- .../study/demographicsCageClass.query.xml | 24 +++++++++++++++++++ .../queries/study/demographicsCageClass.sql | 23 ++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 nbri_ehr/resources/queries/study/demographicsCageClass.query.xml create mode 100644 nbri_ehr/resources/queries/study/demographicsCageClass.sql 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'