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
2 changes: 1 addition & 1 deletion onprc_ehr/resources/queries/ehr_lookups/cageReview.sql
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ SELECT
CASE
WHEN hf.Id is not null AND c1.height >= pc.cage_type.height THEN 'ERROR: According to the monkeys weight-- it needs a height step taller than required.'
WHEN hf.Id is not null AND c1.height < pc.cage_type.height THEN 'NOTE: According to the monkeys weight-- it needs a height step taller than required.'
WHEN (pc.cage_type.height < c1.height AND f.heightExemption IS NULL) THEN ('ERROR: Insufficient height, ' || h.id ||' needs at least: ' || cast(c1.height AS varchar(50)))
WHEN (pc.cage_type.height < c1.height AND (f.heightExemption IS NULL AND wf.weightExemption iS NULL ) )THEN ('ERROR: Insufficient height, ' || h.id ||' needs at least: ' || cast(c1.height AS varchar(50)))
WHEN (pc.cage_type.height < c1.height AND f.heightExemption IS NOT NULL) THEN cast(('NOTE: Height Exemption: ' || h.Id) as varchar(500))
ELSE null
END as heightStatus,
Expand Down