Skip to content

Commit d3666d3

Browse files
Merge 25.3 to develop
2 parents 8dccb1e + 9320929 commit d3666d3

5 files changed

Lines changed: 35 additions & 10 deletions

File tree

WNPRC_EHR/resources/queries/study/bloodDrawChanges.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
--this query is designed to return any dates when allowable blood draw volume changes
1717
--this includes dates of blood draws, plus the date those draws drop off
18-
PARAMETERS(DATE_INTERVAL INTEGER DEFAULT 30)
18+
PARAMETERS(DATE_INTERVAL INTEGER DEFAULT 31)
1919

2020
SELECT
2121
b2.id,

WNPRC_EHR/resources/queries/study/currentBloodDraws.query.xml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,20 @@
1616
</column>
1717
<column columnName="status">
1818
<columnTitle>Status</columnTitle>
19+
<conditionalFormats>
20+
<conditionalFormat>
21+
<filters>
22+
<filter operator="eq" value="Request: Pending"/>
23+
</filters>
24+
<backgroundColor>FFA500</backgroundColor>
25+
</conditionalFormat>
26+
<conditionalFormat>
27+
<filters>
28+
<filter operator="eq" value="Request: Approved"/>
29+
</filters>
30+
<backgroundColor>FBEC5D</backgroundColor>
31+
</conditionalFormat>
32+
</conditionalFormats>
1933
<fk>
2034
<fkDbSchema>core</fkDbSchema>
2135
<fkTable>qcstate</fkTable>
@@ -69,6 +83,7 @@
6983
</column>
7084
<column columnName="allowableBlood">
7185
<columnTitle>Volume Available Today (mL)</columnTitle>
86+
<url>/WNPRC/EHR/ehr-animalHistory.view#subjects:${Id}&amp;inputType:singleSubject&amp;showReport:1&amp;activeReport:BloodSummary</url>
7287
<description>This shows the amount of blood remaining today. It includes blood draws that happened 30 days in the past up to today.</description>
7388
<conditionalFormats>
7489
<conditionalFormat>
@@ -77,12 +92,18 @@
7792
</filters>
7893
<backgroundColor>FF0000</backgroundColor>
7994
</conditionalFormat>
95+
<conditionalFormat>
96+
<filters>
97+
<filter operator="gte" value="0"/>
98+
</filters>
99+
<backgroundColor>f3ee99</backgroundColor>
100+
</conditionalFormat>
80101
</conditionalFormats>
81102
</column>
82103
<column columnName="allowableBloodIncludingFutureDraws">
83-
<columnTitle>Volume Remaining After All Draws (mL)</columnTitle>
104+
<columnTitle>Volume Available Including Next 30 days (mL)</columnTitle>
84105
<url>/WNPRC/EHR/ehr-animalHistory.view#subjects:${Id}&amp;inputType:singleSubject&amp;showReport:1&amp;activeReport:BloodSummary</url>
85-
<description>This column shows the amount of blood remaining for the animal while considering future draws. It includes approved blood draws 30 days into the future and past blood draws 30 days in the past.</description>
106+
<description>This column shows the amount of blood remaining for future blood draws and also 30 days into the past.</description>
86107
</column>
87108
</columns>
88109
</table>

WNPRC_EHR/resources/queries/study/currentBloodDraws.sql

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,17 @@ SELECT
2727
t.mostRecentWeightDate,
2828
t.death,
2929
cast(round(t.allowableBlood,1) as numeric) as maxAllowableBlood,
30-
cast(t.bloodPrevious as double) as bloodPrevious,
31-
cast((t.allowableBlood - t.bloodPrevious) as double) as allowablePrevious,
30+
round(cast(t.bloodPrevious as double),1) as bloodPrevious,
31+
round(cast((t.allowableBlood - t.bloodPrevious) as double),1) as allowablePrevious,
3232

33-
cast(t.bloodFuture as double) as bloodFuture,
33+
round(cast(t.bloodFuture as double),1) as bloodFuture,
3434
cast((t.allowableBlood - t.bloodFuture) as double) as allowableFuture,
3535

3636
ROUND(CAST((t.allowableBlood - t.bloodPrevious) AS double),1) as allowableBlood,
37-
ROUND(CAST((t.allowableBlood - t.bloodPrevious - t.bloodFuture) AS double),1) as allowableBloodIncludingFutureDraws,
37+
CASE
38+
WHEN t.date < CURDATE() THEN NULL
39+
ELSE ROUND(CAST((t.allowableBlood - t.bloodFuture - t.bloodPrevious) AS double),1)
40+
END AS allowableBloodIncludingFutureDraws,
3841
t.minDate,
3942
t.maxDate
4043

WNPRC_EHR/resources/views/wnprcUnits.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,14 @@
158158
sections: [
159159
{header: 'Misc. Pages',
160160
items: [
161-
{name: 'Change WNPRC Password', url: 'https://www.mynetid.wisc.edu/recover/pwdreset'},
162161
{name: 'Employee List', url: '<%=contextPath%>' + '/WNPRC/EHR/query-executeQuery.view?schemaName=study&query.queryName=EmployeeList'},
163162
{name: 'View My Requirement Status', url: '<%=contextPath%>' + '/WNPRC/WNPRC_Units/Animal_Services/Compliance_Training/Public/EHR_ComplianceDB-My_Requirements.view'},
164163
{name: 'View/Download PDFs of Signs, Posters and Guides', url: '<%=contextPath%>' + '/WNPRC/WNPRC_Units/Animal_Services/Compliance_Training/Public/query-executeQuery.view?schemaName=lists&query.queryName=Signs'},
165164
{name: 'Download Paper Forms', url: '<%=contextPath%>' + '/WNPRC/WNPRC_Units/Animal_Services/Compliance_Training/Public/list-grid.view?listId=1399'},
166165
{name: 'PowerDMS', url: 'https://go.wisc.edu/mkg850'},
167-
{name: 'Sample Manager', url: ' https://ehr.primate.wisc.edu/samplemanager/SampleManager/app.view#/home'}
166+
{name: 'Sample Manager', url: ' https://ehr.primate.wisc.edu/samplemanager/SampleManager/app.view#/home'},
167+
{name: 'Emergency Contacts', url: 'https://go.wisc.edu/62ke03'},
168+
{name: 'Vet Emergency Contacts', url: 'https://go.wisc.edu/gdtw22'}
168169
]}
169170
]
170171
});

WNPRC_EHR/resources/web/wnprc_ehr/wnprcReports.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ EHR.reports.currentBloodDraws = function(panel, tab) {
669669
schemaName: 'study',
670670
queryName: 'currentBloodDraws',
671671
title: "Current Blood " + title,
672-
parameters: {'interval': '30'},
672+
parameters: {'DATE_INTERVAL': '31'},
673673
filters: filterArray.nonRemovable,
674674
removeableFilters: filterArray.removable
675675
});

0 commit comments

Comments
 (0)