Skip to content

Commit 37b8bbf

Browse files
authored
Added protocol check for number of animals assigned (#420)
1 parent b8014c9 commit 37b8bbf

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

snprc_ehr/resources/queries/ehr/ProtocolLookup.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ SELECT p.protocol AS Iacuc,
77
p.enddate AS EndDate,
88
p.maxAnimals AS MaxAnimals
99
FROM ehr.protocol AS p
10+
INNER JOIN snprc_ehr.IacucAssignmentStats as ia on p.protocol = ia.WorkingIacuc
11+
WHERE ia.NumAnimalsAssigned < ia.NumAnimalsAllowed
12+
AND ia.StartDate = p.approve

0 commit comments

Comments
 (0)