Skip to content

Commit 35601bb

Browse files
Merge 25.11 to 26.2
2 parents 945af44 + a886812 commit 35601bb

29 files changed

Lines changed: 462 additions & 62 deletions

nirc_ehr/resources/data/editable_lookups.tsv

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ ehr_lookups mens_score Clinical Menses Types Clinical observation fixed values.
7373
ehr_lookups mucous_membranes Clinical Mucous Membranes Used in clinical observations.
7474
ehr_lookups musculoskeletal_observations Clinical Musculoskeletal Observations Used in clinical observations.
7575
ehr_lookups necropsy_disposition_codes Colony Management Necropsy Disposition Codes
76-
ehr_lookups necropsy_exam_reason Colony Management Necropsy Exam Reason
77-
ehr_lookups necropsy_organ_appearance Colony Management Necropsy Organ Appearance
76+
ehr_lookups necropsy_organ_appearance Colony Management Necropsy Organ Appearance
7877
ehr_lookups necropsy_organ_systems Colony Management Necropsy Organ Systems
7978
ehr_lookups necropsy_physical_condition Colony Management Necropsy Physical Condition
8079
ehr_lookups necropsy_specimen_condition Colony Management Necropsy Specimen Condition

nirc_ehr/resources/data/lookup_sets.tsv

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ mens_score Menses value
6161
mucous_membranes Mucous Membranes value
6262
musculoskeletal_observations Musculoskeletal Observations value
6363
necropsy_disposition_codes Tissue Disposition Codes value title
64-
necropsy_exam_reason Necropsy Reason value title
6564
necropsy_organ_appearance Appearance value title
6665
necropsy_organ_systems Organ Systems value title
6766
necropsy_physical_condition Physical Condition value title

nirc_ehr/resources/data/lookupsManifest.tsv

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ mens_score
6868
mucous_membranes
6969
musculoskeletal_observations
7070
necropsy_disposition_codes
71-
necropsy_exam_reason
7271
necropsy_organ_appearance
7372
necropsy_organ_systems
7473
necropsy_physical_condition

nirc_ehr/resources/data/lookupsManifestTest.tsv

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ mens_score
6767
mucous_membranes
6868
musculoskeletal_observations
6969
necropsy_disposition_codes
70-
necropsy_exam_reason
7170
necropsy_organ_appearance
7271
necropsy_organ_systems
7372
necropsy_physical_condition

nirc_ehr/resources/queries/study/cases.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ EHR.Server.TriggerManager.registerHandlerForQuery(EHR.Server.TriggerManager.Even
3333
error = true;
3434
}
3535

36-
if (!helper.isValidateOnly() && row.caseid && row.enddate && (row.enddate != oldRow.enddate)) {
36+
if (!helper.isValidateOnly() && row.caseid && row.enddate && oldRow && (row.enddate != oldRow.enddate)) {
3737
triggerHelper.closeDailyClinicalObs(row.caseid, row.enddate);
3838
}
3939

@@ -57,7 +57,7 @@ EHR.Server.TriggerManager.registerHandlerForQuery(EHR.Server.TriggerManager.Even
5757
if (oldQc.Label != 'In Progress') {
5858
EHR.Server.Utils.addError(errors, null, 'Cannot save a draft copy of a case already opened or in review.', 'ERROR');
5959
}
60-
} else if (row.category == 'Clinical' && (qc.Label == 'Completed' || qc.Label == 'Review Required') && row.caseid && row.Id && row.performedby && row.taskid) {
60+
} else if (row.category == 'Clinical' && (qc.Label == 'Completed' || qc.Label == 'Review Required') && row.caseid && row.Id && row.performedby && row.taskid && !row.enddate) {
6161
var ordersInTransaction = helper.getProperty('ordersInTransaction');
6262
var oit = [];
6363
if (ordersInTransaction && ordersInTransaction.length) {

nirc_ehr/resources/queries/study/deaths.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,21 @@ function onUpsert(helper, scriptErrors, row, oldRow) {
122122
console.log(row.id + " is not a valid animal id");
123123
}
124124
}
125+
126+
if(row.QCStateLabel && EHR.Server.Security.getQCStateByLabel(row.QCStateLabel).PublicData) {
127+
var qcstate = helper.getJavaHelper().getQCStateForLabel(row.QCStateLabel).getRowId();
128+
129+
//add/update weight record
130+
var weightRecord = {
131+
Id: row.Id,
132+
date: row.date,
133+
weight: row.deathWeight,
134+
taskid: row.taskid,
135+
qcstate: qcstate,
136+
performedby: row.performedby
137+
};
138+
triggerHelper.upsertWeightRecord(weightRecord);
139+
}
125140
}
126141
}
127142
}

nirc_ehr/resources/queries/study/deaths.query.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<column columnName="date">
88
<columnTitle>Death Date</columnTitle>
99
</column>
10-
<column columnName="disposition"/>
1110
<column columnName="reason">
1211
<columnTitle>Disposition</columnTitle>
1312
<fk>
@@ -17,6 +16,9 @@
1716
<fkDisplayColumnName>title</fkDisplayColumnName>
1817
</fk>
1918
</column>
19+
<column columnName="deathWeight">
20+
<columnTitle>Death Weight (kg)</columnTitle>
21+
</column>
2022
<column columnName="remark" />
2123
<column columnName="performedby" />
2224
<column columnName="description">

nirc_ehr/resources/queries/study/deaths/.qview.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<column name="Id/Demographics/species"/>
88
<column name="date"/>
99
<column name="reason"/>
10+
<column name="deathWeight"/>
1011
<column name="remark"/>
1112
<column name="performedBy"/>
1213
</columns>

nirc_ehr/resources/queries/study/drug/.qview.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
<column name="Id/curLocation/cage/room/floor/building"/>
99
<column name="Id/curLocation/cage"/>
1010
<column name="date"/>
11-
<column name="enddate"/>
1211
<column name="code"/>
13-
<column name="frequency"/>
1412
<column name="route"/>
1513
<column name="volume"/>
1614
<column name="vol_units"/>
@@ -22,7 +20,7 @@
2220
<column name="dosage_units"/>
2321
<column name="orderedby"/>
2422
<column name="performedBy"/>
25-
<column name="description"/>
23+
<column name="category"/>
2624
<column name="remark"/>
2725
</columns>
2826
</customView>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<customView xmlns="http://labkey.org/data/xml/queryCustomView" canOverride="true">
2+
<sorts>
3+
<sort column="date" descending="true"/>
4+
</sorts>
5+
<columns>
6+
<column name="Id"/>
7+
<column name="Id/Demographics/species"/>
8+
<column name="Id/curLocation/cage/room/floor/building"/>
9+
<column name="Id/curLocation/cage"/>
10+
<column name="date"/>
11+
<column name="code"/>
12+
<column name="route"/>
13+
<column name="volume"/>
14+
<column name="vol_units"/>
15+
<column name="amount"/>
16+
<column name="amount_units"/>
17+
<column name="concentration"/>
18+
<column name="conc_units"/>
19+
<column name="dosage"/>
20+
<column name="dosage_units"/>
21+
<column name="orderedby"/>
22+
<column name="performedBy"/>
23+
<column name="remark"/>
24+
</columns>
25+
<filters>
26+
<filter column="category" operator="eq" value="Behavior"/>
27+
</filters>
28+
</customView>

0 commit comments

Comments
 (0)