Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
@@ -0,0 +1,9 @@
<query xmlns="http://labkey.org/data/xml/query">
<metadata>
<tables xmlns="http://labkey.org/data/xml">
<table tableName="IPCSchedulerData" tableDbType="NOT_IN_DB">
<tableTitle>IPC Scheduler Data</tableTitle>
</table>
</tables>
</metadata>
</query>
18 changes: 18 additions & 0 deletions extscheduler/resources/queries/extscheduler/IPCSchedulerData.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
Created by: Kolli on 4/7/2025
This query filters all the IPC events
*/
SELECT
e.resourceid,
e.startdate,
e.enddate,
e.name,
--e.userid,
e.alias,
e.quantity,
e.comments,
r.color,
r.room,
r.bldg
FROM Events e, Resources r
Where r.id = e.resourceid and e.container = '1B228A13-F54C-103D-93DF-BD9E1F3EF027' --Show only IPC events
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<query xmlns="http://labkey.org/data/xml/query">
<metadata>
<tables xmlns="http://labkey.org/data/xml">
<table tableName="PMICScheduler" tableDbType="NOT_IN_DB">
<tableTitle>PMIC Scheduler Data</tableTitle>
</table>
</tables>
</metadata>
</query>
18 changes: 18 additions & 0 deletions extscheduler/resources/queries/extscheduler/PMICScheduler.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
Created by: Kolli on 10/24/2019
This query filters all the PMIC events
*/
SELECT
e.resourceid,
e.startdate,
e.enddate,
e.name,
--e.userid,
e.alias,
e.quantity,
e.comments,
r.color,
r.room,
r.bldg
FROM Events e, Resources r
Where r.id = e.resourceid and e.container = '783D2EA5-C6AC-1036-A33C-BD25D0574070' --Show only PMIC events
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<query xmlns="http://labkey.org/data/xml/query">
<metadata>
<tables xmlns="http://labkey.org/data/xml">
<table tableName="PMIC_Scheduler_Daily" tableDbType="NOT_IN_DB">
<tableTitle>Today's PMIC scheduled events</tableTitle>
</table>
</tables>
</metadata>
</query>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<query xmlns="http://labkey.org/data/xml/query">
<metadata>
<tables xmlns="http://labkey.org/data/xml">
<table tableName="PMIC_Scheduler_Weekly" tableDbType="NOT_IN_DB">
<tableTitle>Weekly PMIC scheduled events</tableTitle>
</table>
</tables>
</metadata>
</query>
9 changes: 9 additions & 0 deletions onprc_ehr/resources/queries/onprc_ehr/ActiveAreas.query.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<query xmlns="http://labkey.org/data/xml/query">
<metadata>
<tables xmlns="http://labkey.org/data/xml">
<table tableName="ActiveAreas" tableDbType="NOT_IN_DB">
<tableTitle>Active Areas</tableTitle>
</table>
</tables>
</metadata>
</query>
7 changes: 7 additions & 0 deletions onprc_ehr/resources/queries/onprc_ehr/ActiveAreas.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
Created by Kolli
Show active animal areas
*/
SELECT area
From ehr_lookups.areas
Where datedisabled is null
9 changes: 9 additions & 0 deletions onprc_ehr/resources/queries/onprc_ehr/ActiveRooms.query.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<query xmlns="http://labkey.org/data/xml/query">
<metadata>
<tables xmlns="http://labkey.org/data/xml">
<table tableName="ActiveRooms" tableDbType="NOT_IN_DB">
<tableTitle>Active Rooms</tableTitle>
</table>
</tables>
</metadata>
</query>
7 changes: 7 additions & 0 deletions onprc_ehr/resources/queries/onprc_ehr/ActiveRooms.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
Created by Kolli
Show active animal locations
*/
SELECT room
From ehr_lookups.rooms
Where datedisabled is null
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<query xmlns="http://labkey.org/data/xml/query">
<metadata>
<tables xmlns="http://labkey.org/data/xml">
<table tableName="weightManagementMMAData" tableDbType="NOT_IN_DB">
<tableTitle>Active and released animals from weight management regimen</tableTitle>
</table>
</tables>
</metadata>
</query>
21 changes: 21 additions & 0 deletions onprc_ehr/resources/queries/study/weightManagementMMAData.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
Created by Kollil
Animals that were in the weight management regimen. Data showing both weight BEGIN and RELEASE snomed codes
*/
SELECT s.Id,
s.date,
s.set_number,
s.code,
s.qualifier
FROM ehr.snomed_tags s
where s.code like 'P-YY961' -- Begin active weight management regimen

Union

SELECT s.Id,
s.date,
s.set_number,
s.code,
s.qualifier
FROM ehr.snomed_tags s
where s.code like 'P-YY960' -- Release from active weight management regimen
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<query xmlns="http://labkey.org/data/xml/query">
<metadata>
<tables xmlns="http://labkey.org/data/xml">
<table tableName="weightManagementMMA_Registered" tableDbType="NOT_IN_DB">
<tableTitle>Active animals in weight management regimen</tableTitle>
</table>
</tables>
</metadata>
</query>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
Created by Kollil
Animals started weight management regimen MMA, but not released
*/
SELECT w.Id,
Max(w.date) as CurrentCode,
w.code
FROM study.weightManagementMMAData w
where w.code = 'P-YY961'
group by w.id,w.code
Loading