Skip to content
Open
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
4 changes: 2 additions & 2 deletions nirc_ehr/resources/queries/study/orchardData.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ SELECT
pa.protocol.title as protocol,
InitCap(pa.protocol.InvestigatorId.LastName) || ', ' || InitCap(pa.protocol.InvestigatorId.FirstName) as PI,
InitCap(pa.protocol.AuthorId.LastName) || ', ' || InitCap(pa.protocol.AuthorId.FirstName) as Vet,
h.cage.cage as cage,
dlh.cage.cage as cage,
d.calculated_status as alive
FROM demographics d
LEFT JOIN housing h ON d.Id = h.Id
LEFT JOIN demographicsLastHousing dlh ON d.Id = dlh.Id
LEFT JOIN protocolAssignment pa ON d.Id = pa.Id AND pa.endDate is null