Skip to content

Commit db57c78

Browse files
committed
Modified Parentage program so that the dam and sire information overrides information from birth records.
1 parent 65340ad commit db57c78

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

onprc_ehr/resources/queries/study/parentageSummary.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ SELECT
3434

3535
FROM study.birth b
3636
WHERE b.dam is not null and b.qcstate.publicdata = true
37-
And b.dam not in (select k.parent from study.parentage k where k.Id = b.Id and k.relationship = 'dam' and k.enddate is null)
37+
And 'dam' not in (select k.relationship from study.parentage k where k.Id = b.Id and k.enddate is null)
3838
UNION
3939

4040
SELECT
@@ -46,4 +46,4 @@ SELECT
4646

4747
FROM study.birth a
4848
WHERE a.sire is not null and a.qcstate.publicdata = true
49-
And a.sire not in (select k.parent from study.parentage k where k.Id = a.Id and k.relationship = 'sire'and k.enddate is null)
49+
And 'sire' not in (select k.relationship from study.parentage k where k.Id = a.Id and k.enddate is null)

0 commit comments

Comments
 (0)