From 0e591b2c27794d629197608d8ba8968eef789596 Mon Sep 17 00:00:00 2001 From: Lakshmi Kolli <69940873+kollil@users.noreply.github.com> Date: Thu, 21 Apr 2022 09:08:02 -0700 Subject: [PATCH 1/4] ehrsla template created --- sla/resources/schemas/ehrSLA.xml | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sla/resources/schemas/ehrSLA.xml diff --git a/sla/resources/schemas/ehrSLA.xml b/sla/resources/schemas/ehrSLA.xml new file mode 100644 index 000000000..13aa5cfb6 --- /dev/null +++ b/sla/resources/schemas/ehrSLA.xml @@ -0,0 +1,39 @@ + + + allowableAnimals + allowableAnimals_BreedingGroups + PIandProtocols + allowableSLA + ProtocolProjectsUsage + ProtocolProjectsAndBreedingInfo + + + + + + allowableAnimals +
+ + + allowableAnimals_BreedingGroups +
+ + + PIandProtocols +
+ + + allowableSLA +
+ + + ProtocolProjectsUsage +
+ + + ProtocolProjectsAndBreedingInfo +
+ +
+
+
\ No newline at end of file From ee935a5c83e24f8c9b9c2a31dc89e85186104ee1 Mon Sep 17 00:00:00 2001 From: Lakshmi Kolli <69940873+kollil@users.noreply.github.com> Date: Tue, 24 May 2022 14:20:12 -0700 Subject: [PATCH 2/4] Fixed the query with correct linked schema --- sla/resources/queries/sla/allowableSLA.sql | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sla/resources/queries/sla/allowableSLA.sql b/sla/resources/queries/sla/allowableSLA.sql index 123fdf2ed..3b835f09d 100644 --- a/sla/resources/queries/sla/allowableSLA.sql +++ b/sla/resources/queries/sla/allowableSLA.sql @@ -9,10 +9,11 @@ SELECT a.protocol, a.allowed, a.startdate, a.enddate -FROM ehrSLA.allowableAnimals a, - onprc_ehrSLA.eIACUC_PRIME_VIEW_PROTOCOLS c +FROM sla.allowableAnimals a, + onprc_ehr.eIACUC_PRIME_VIEW_PROTOCOLS c Where c.Protocol_State = 'Approved' - And (c.protocol_Id = a.protocol.displayname OR c.protocol_Id like '%' + a.protocol.displayname) +-- And (c.protocol_Id = a.protocol.displayname OR c.protocol_Id like '%' + a.protocol.displayname) + And (c.protocol_Id = a.protocol OR c.protocol_Id like '%' + a.protocol) And curdate() between a.startdate And a.endDate -- --Created ny kollil on 10/18/21 to dispaly the allowable SLAs with eIACUCNum but no breeding info. From ef42d9fd3626eb43c09c7d35814eacbe29bfce54 Mon Sep 17 00:00:00 2001 From: Lakshmi Kolli <69940873+kollil@users.noreply.github.com> Date: Tue, 24 May 2022 14:33:14 -0700 Subject: [PATCH 3/4] Fixed the query with correct linked schema, take #2 --- sla/resources/queries/sla/allowableSLA.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sla/resources/queries/sla/allowableSLA.sql b/sla/resources/queries/sla/allowableSLA.sql index 3b835f09d..a143558f1 100644 --- a/sla/resources/queries/sla/allowableSLA.sql +++ b/sla/resources/queries/sla/allowableSLA.sql @@ -1,5 +1,6 @@ --Changed by Kolli - 4/20/22 --Added Linked schema template references +--Removed linked schema 5/24/2022 SELECT a.protocol, c.protocol_id as eIACUC_protocol_name, a.species, @@ -12,8 +13,8 @@ SELECT a.protocol, FROM sla.allowableAnimals a, onprc_ehr.eIACUC_PRIME_VIEW_PROTOCOLS c Where c.Protocol_State = 'Approved' --- And (c.protocol_Id = a.protocol.displayname OR c.protocol_Id like '%' + a.protocol.displayname) - And (c.protocol_Id = a.protocol OR c.protocol_Id like '%' + a.protocol) + And (c.protocol_Id = a.protocol.displayname OR c.protocol_Id like '%' + a.protocol.displayname) + -- And (c.protocol_Id = a.protocol OR c.protocol_Id like '%' + a.protocol) And curdate() between a.startdate And a.endDate -- --Created ny kollil on 10/18/21 to dispaly the allowable SLAs with eIACUCNum but no breeding info. From f164bb254f313197666b9abc4137b054ca555a0b Mon Sep 17 00:00:00 2001 From: Lakshmi Kolli <69940873+kollil@users.noreply.github.com> Date: Wed, 25 May 2022 15:40:40 -0700 Subject: [PATCH 4/4] Deleting the ehrSLA.xml file as it was created wrongly --- sla/resources/schemas/ehrSLA.xml | 39 -------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 sla/resources/schemas/ehrSLA.xml diff --git a/sla/resources/schemas/ehrSLA.xml b/sla/resources/schemas/ehrSLA.xml deleted file mode 100644 index 13aa5cfb6..000000000 --- a/sla/resources/schemas/ehrSLA.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - allowableAnimals - allowableAnimals_BreedingGroups - PIandProtocols - allowableSLA - ProtocolProjectsUsage - ProtocolProjectsAndBreedingInfo - - - - - - allowableAnimals -
- - - allowableAnimals_BreedingGroups -
- - - PIandProtocols -
- - - allowableSLA -
- - - ProtocolProjectsUsage -
- - - ProtocolProjectsAndBreedingInfo -
- -
-
-
\ No newline at end of file