Skip to content

Commit da8d64b

Browse files
Merge 23.3 to 23.7
2 parents 065177a + d91de89 commit da8d64b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

onprc_ehr/resources/queries/study/pregnancyGestation.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ INNER JOIN ehr_lookups.species p on (m.Id.DataSet.demographics.species = p.commo
2626
And m.date in (select max(s.date) AS d from study.pregnancyConfirmation s where s.id = m.id)
2727
And m.Id.DataSet.demographics.calculated_status.code = 'Alive'
2828
And p.Gestation is not null
29-
And m.outcome.birthDate is null
29+
And m.outcome.birthDate is null And (Select count(*) from ehr.snomed_tags stg where stg.code.code = 'F-30980' And stg.id = m.id
30+
And stg.date >= m.date ) = 0
3031
And m.gestation_days is not null

0 commit comments

Comments
 (0)