Skip to content

Commit

Permalink
Modified pregnancy date confirmtion on the Snapshot reports to not al…
Browse files Browse the repository at this point in the history
…ow displaying of pregnancy date when pregnancy was aborted.
  • Loading branch information
Ohsudev committed Jan 17, 2024
1 parent 5a8236d commit 13e880b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion onprc_ehr/resources/queries/study/pregnancyGestation.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ INNER JOIN ehr_lookups.species p on (m.Id.DataSet.demographics.species = p.commo
And m.date in (select max(s.date) AS d from study.pregnancyConfirmation s where s.id = m.id)
And m.Id.DataSet.demographics.calculated_status.code = 'Alive'
And p.Gestation is not null
And m.outcome.birthDate is null
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
And stg.date >= m.date ) = 0
And m.gestation_days is not null

0 comments on commit 13e880b

Please sign in to comment.