Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
a2e796a
Adding PMIC project files. (#122)
kollil Mar 31, 2021
aa54527
Disallow null Id values in onprc_ehr.AvailableBloodVolume, give it a …
josheckels Apr 1, 2021
b988ff1
ETL job time changed (#138)
kollil Apr 5, 2021
beff13c
Added changes to PMIC project (#135)
kollil Apr 7, 2021
c2ed328
A new notes alert added to Behavior alerts (#139)
kollil Apr 12, 2021
165a8ba
Restored the option button menu that allows users to print a report t…
Ohsudev Apr 13, 2021
9e21a5e
Color coding the cells in query.xml (#140)
kollil Apr 15, 2021
4b735a5
Add PMIC and IPC datasets to study archive to fix query validation (#…
labkey-jeckels Apr 19, 2021
ae151a6
Added the Procedure category into Procedure selection drop down listi…
Ohsudev Apr 21, 2021
2345c6f
20.11 fb sla and pmic (#149)
kollil Apr 29, 2021
bef6ed6
Fixed the SLA the usage math in the usage query (#151)
kollil May 4, 2021
9207bbe
Updated the weekly query to start from next day (#154)
kollil May 7, 2021
b0260e8
PMIC service req form flow changes. (#157)
kollil May 17, 2021
4125073
Update of Rate Sheet XML for Year 62 forward (#158)
jonesgaohsu May 20, 2021
b4bd2bb
Modified program to allow reporting to conform into Jarrett's require…
Ohsudev May 26, 2021
f309cb5
Restored the Weights by Monkey Id from the Printable reports that was…
Ohsudev Jun 4, 2021
2c49ab8
Add missing tables to make SchemaXMLTestCase happy again (#176)
labkey-jeckels Jun 5, 2021
092fab6
Merge 20.11 to 21.3
labkey-tchad Jun 7, 2021
58fd914
Merge 21.3.6 to 21.6
labkey-tchad Jun 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SELECT
WHEN (e.isActive = false) THEN NULL --dont bother to include if the employee is not active
WHEN (rn.requirementname IS NULL) THEN NULL
WHEN (ee.RequirementName IS NOT NULL) THEN NULL -----Added 12-17-2020
WHEN (T1.MostRecentDate IS NULL) THEN NULL
WHEN (T1.MostRecentDate IS NULL) THEN 0 ---Modified: 5-18-2021 restore original
WHEN(rn.ExpirePeriod = 0 OR rn.ExpirePeriod IS NULL) THEN NULL
ELSE (rn.expirePeriod - (age_in_months(T1.MostRecentDate, curdate())))
END AS double)
Expand Down
3 changes: 1 addition & 2 deletions extscheduler/module.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Name: extscheduler
ModuleClass: org.labkey.extscheduler.ExtSchedulerModule
ModuleDependencies: LDK
SupportedDatabases: mssql
RequiredServerVersion: 15.2
ManageVersion: false
ManageVersion: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
Created by: Kolli on 10/24/2019
This query filters all the PMIC daily events
*/
SELECT
r.resourceid,
e.startdate,
e.enddate,
e.name,
e.alias,
e.quantity,
e.comments,
r.color,
r.room,
r.bldg,
e.created,
e.createdby,
e.modifiedby,
e.modified
FROM Events e, PMIC_getFolderInfo r
Where r.id = e.resourceid
And CAST(e.startDate AS DATE) = curdate() --Show only PMIC events
Order by e.startDate
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
Created by: Kolli on 11/14/2019
Weekly report: This query filters all the PMIC events from today to the next 7 days
Change by Kolli, 5/5/21: This query filters all the PMIC events from next day to the next 7 days.
The Daily events will cover the current day events, no need to duplicate same day events again in the weekly report.
*/
SELECT
r.resourceid,
e.startdate,
e.enddate,
e.name,
e.alias,
e.quantity,
e.comments,
r.color,
r.room,
r.bldg,
e.created,
e.createdby,
e.modifiedby,
e.modified
FROM Events e, PMIC_getFolderInfo r
Where r.id = e.resourceid
--And CAST(e.startDate AS DATE) BETWEEN curdate() and TIMESTAMPADD('SQL_TSI_DAY', 7, curdate())
And CAST(e.startDate AS DATE) BETWEEN TIMESTAMPADD('SQL_TSI_DAY', 1, curdate()) and TIMESTAMPADD('SQL_TSI_DAY', 7, curdate())
Order by e.startdate



12 changes: 12 additions & 0 deletions extscheduler/resources/queries/extscheduler/PMIC_getFolderInfo.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
SELECT
r.Id,
r.name as resourceid,
r.color,
r.room,
r.bldg,
r.Container,
c.name as FolderName
FROM Resources r, core.Containers c
Where c.EntityId = r.container
And c.name like 'PMIC Scheduler'

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE extscheduler.Resources ADD Instance varchar(50);
1 change: 1 addition & 0 deletions extscheduler/resources/schemas/extscheduler.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<column columnName="Color" />
<column columnName="Room" />
<column columnName="Bldg" />
<column columnName="Instance" />

<column columnName="Container">
<isHidden>true</isHidden>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public String getName()
@Override
public @Nullable Double getSchemaVersion()
{
return 20.937;
return 21.002;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,39 @@
<formatString>$#,##0.00</formatString>
</column>


<column columnName="year1">
<columnTitle>YR62: 5/1/21 to 4/30/22</columnTitle>
<columnTitle>YR63: 5/1/22 to 4/30/23</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year2">
<columnTitle>YR63: 5/1/22 to 4/30/23</columnTitle>
<columnTitle>YR64: 5/1/23 to 4/30/24</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year3">
<columnTitle>YR64: 5/1/23 to 4/30/24</columnTitle>
<columnTitle>YR65: 5/1/24 to 4/30/25</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year4">
<columnTitle>YR65: 5/1/24 to 4/30/25</columnTitle>
<columnTitle>YR66: 5/1/25 to 4/30/26</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year5">
<columnTitle>YR66: 5/1/25 to 4/30/26</columnTitle>
<columnTitle>YR67: 5/1/26 to 4/30/27</columnTitle>
<formatString>$#,##0.00</formatString>
</column>

<column columnName="year6">
<columnTitle>YR67: 5/1/26 to 4/30/27</columnTitle>
<columnTitle>YR68: 5/1/27 to 4/30/28</columnTitle>
<formatString>$#,##0.00</formatString>
</column>

<column columnName="year7">
<columnTitle>YR68: 5/1/27 to 4/30/28</columnTitle>
<columnTitle>YR69: 5/1/28 to 4/30/29</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year8">
<columnTitle>YR69: 5/1/28 to 4/30/29</columnTitle>
<columnTitle>YR70: 5/1/29 to 4/30/30</columnTitle>
<formatString>$#,##0.00</formatString>
</column>

Expand All @@ -59,4 +60,4 @@
</table>
</tables>
</metadata>
</query>
</query>
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,43 @@
<formatString>$#,##0.00</formatString>
</column>


<column columnName="year1">
<columnTitle>YR62: 5/1/21 to 4/30/22</columnTitle>
<columnTitle>YR63: 5/1/22 to 4/30/23</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year2">
<columnTitle>YR63: 5/1/22 to 4/30/23</columnTitle>
<columnTitle>YR64: 5/1/23 to 4/30/24</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year3">
<columnTitle>YR64: 5/1/23 to 4/30/24</columnTitle>
<columnTitle>YR65: 5/1/24 to 4/30/25</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year4">
<columnTitle>YR65: 5/1/24 to 4/30/25</columnTitle>
<columnTitle>YR66: 5/1/25 to 4/30/26</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year5">
<columnTitle>YR66: 5/1/25 to 4/30/26</columnTitle>
<columnTitle>YR67: 5/1/26 to 4/30/27</columnTitle>
<formatString>$#,##0.00</formatString>
</column>

<column columnName="year6">
<columnTitle>YR67: 5/1/26 to 4/30/27</columnTitle>
<columnTitle>YR68: 5/1/27 to 4/30/28</columnTitle>
<formatString>$#,##0.00</formatString>
</column>

<column columnName="year7">
<columnTitle>YR68: 5/1/27 to 4/30/28</columnTitle>
<columnTitle>YR69: 5/1/28 to 4/30/29</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year8">
<columnTitle>YR69: 5/1/28 to 4/30/29</columnTitle>
<columnTitle>YR70: 5/1/29 to 4/30/30</columnTitle>
<formatString>$#,##0.00</formatString>
</column>



<column columnName="PostedDate">
<columnTitle>Posted Date</columnTitle>
<formatString>MM/dd/yyyy</formatString>
Expand All @@ -59,4 +59,4 @@
</table>
</tables>
</metadata>
</query>
</query>
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,37 @@
<!--</column>-->

<column columnName="year1">
<columnTitle>YR62: 5/1/21 to 4/30/22</columnTitle>
<columnTitle>YR63: 5/1/22 to 4/30/23</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year2">
<columnTitle>YR63: 5/1/22 to 4/30/23</columnTitle>
<columnTitle>YR64: 5/1/23 to 4/30/24</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year3">
<columnTitle>YR64: 5/1/23 to 4/30/24</columnTitle>
<columnTitle>YR65: 5/1/24 to 4/30/25</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year4">
<columnTitle>YR65: 5/1/24 to 4/30/25</columnTitle>
<columnTitle>YR66: 5/1/25 to 4/30/26</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year5">
<columnTitle>YR66: 5/1/25 to 4/30/26</columnTitle>
<columnTitle>YR67: 5/1/26 to 4/30/27</columnTitle>
<formatString>$#,##0.00</formatString>
</column>

<column columnName="year6">
<columnTitle>YR67: 5/1/26 to 4/30/27</columnTitle>
<columnTitle>YR68: 5/1/27 to 4/30/28</columnTitle>
<formatString>$#,##0.00</formatString>
</column>

<column columnName="year7">
<columnTitle>YR68: 5/1/27 to 4/30/28</columnTitle>
<columnTitle>YR69: 5/1/28 to 4/30/29</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year8">
<columnTitle>YR69: 5/1/28 to 4/30/29</columnTitle>
<columnTitle>YR70: 5/1/29 to 4/30/30</columnTitle>
<formatString>$#,##0.00</formatString>
</column>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,43 @@
<formatString>$#,##0.00</formatString>
</column>


<column columnName="year1">
<columnTitle>YR62: 5/1/21 to 4/30/22</columnTitle>
<columnTitle>YR63: 5/1/22 to 4/30/23</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year2">
<columnTitle>YR63: 5/1/22 to 4/30/23</columnTitle>
<columnTitle>YR64: 5/1/23 to 4/30/24</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year3">
<columnTitle>YR64: 5/1/23 to 4/30/24</columnTitle>
<columnTitle>YR65: 5/1/24 to 4/30/25</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year4">
<columnTitle>YR65: 5/1/24 to 4/30/25</columnTitle>
<columnTitle>YR66: 5/1/25 to 4/30/26</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year5">
<columnTitle>YR66: 5/1/25 to 4/30/26</columnTitle>
<columnTitle>YR67: 5/1/26 to 4/30/27</columnTitle>
<formatString>$#,##0.00</formatString>
</column>

<column columnName="year6">
<columnTitle>YR67: 5/1/26 to 4/30/27</columnTitle>
<columnTitle>YR68: 5/1/27 to 4/30/28</columnTitle>
<formatString>$#,##0.00</formatString>
</column>

<column columnName="year7">
<columnTitle>YR68: 5/1/27 to 4/30/28</columnTitle>
<columnTitle>YR69: 5/1/28 to 4/30/29</columnTitle>
<formatString>$#,##0.00</formatString>
</column>
<column columnName="year8">
<columnTitle>YR69: 5/1/28 to 4/30/29</columnTitle>
<columnTitle>YR70: 5/1/29 to 4/30/30</columnTitle>
<formatString>$#,##0.00</formatString>
</column>



<column columnName="PostedDate">
<columnTitle>Posted Date</columnTitle>
<formatString>MM/dd/yyyy</formatString>
Expand All @@ -59,4 +59,4 @@
</table>
</tables>
</metadata>
</query>
</query>
27 changes: 27 additions & 0 deletions onprc_ehr/resources/etls/HousingTransferAlert_Process.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--Room utilization numbers procedure runs daily at 4pm -->
<!--Added By Kollil, 3/29/2021 -->


<etl xmlns="http://labkey.org/etl/xml">

<name>HousingTransfers</name>

<description>Executes stored procedure to populate the NHP room utilization numbers into a temp table.</description>

<transforms>

<transform id="NHPRoomsUsage" type="StoredProcedure">
<description>Runs a stored procedure to get the room utilization numbers</description>
<procedure schemaName="ONPRC_EHR" procedureName="NHPRoomsUsage">
</procedure>
</transform>

</transforms>
<schedule>
<!--4:30pm-->
<cron expression="0 30 16 * * ?"/>
</schedule>


</etl>
22 changes: 21 additions & 1 deletion onprc_ehr/resources/queries/ehr/protocol_counts.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,24 @@ function onUpsert(helper, scriptErrors, row, oldRow){
if (row && row.project){
EHR.Server.Utils.addError(scriptErrors, 'project', 'You should probably leave this field blank. Animal counts are usually associated with the IACUC itself. The project field was left in place to support IRIS data, but should not be used unless there is a good reason to do so.', 'INFO');
}
}
}
//Validate dates. Kollil, 1/19/2021
EHR.Server.TriggerManager.registerHandlerForQuery(EHR.Server.TriggerManager.Events.BEFORE_UPSERT, 'ehr', 'protocol_counts', function(helper, scriptErrors, row, oldRow)
{
var start = row.start;
var end = row.enddate;
//console.log ("In 11");

// Check if startdate and enddate are not empty
if ((start == null && end == null) || (start == null && end != null) || (start != null && end == null)) {
EHR.Server.Utils.addError(scriptErrors, 'start', 'Must enter Start and End dates', 'ERROR');
}

//enddate: verify enddate not prior to startdate
if (start != null && end != null) {
if (start.getTime() > end.getTime()) {
EHR.Server.Utils.addError(scriptErrors, 'enddate', 'End date must be after Start date', 'ERROR');
}
}

});
Loading