From 2a6bce12f32fcdeb07b8c148b9fa3d6394023959 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Tue, 23 Dec 2025 08:42:36 -0800 Subject: [PATCH 1/3] Modified Parentage report on both the Clinical Snapshot, and Parentage tab --- onprc_ehr/resources/queries/study/parentageSummary.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onprc_ehr/resources/queries/study/parentageSummary.sql b/onprc_ehr/resources/queries/study/parentageSummary.sql index d410bee51..4b31a779d 100644 --- a/onprc_ehr/resources/queries/study/parentageSummary.sql +++ b/onprc_ehr/resources/queries/study/parentageSummary.sql @@ -34,7 +34,7 @@ SELECT FROM study.birth b WHERE b.dam is not null and b.qcstate.publicdata = true -And 'dam' not in (select k.relationship from study.parentage k where k.Id = b.Id and k.enddate is null) +And b.dam not in (select k.parent from study.parentage k where k.Id = b.Id and k.enddate is null and k.relationship = 'Dam' and k.method = 'Observed') UNION SELECT @@ -46,4 +46,4 @@ SELECT FROM study.birth a WHERE a.sire is not null and a.qcstate.publicdata = true - And 'sire' not in (select k.relationship from study.parentage k where k.Id = a.Id and k.enddate is null) \ No newline at end of file + And a.sire not in (select k.parent from study.parentage k where k.Id = a.Id and k.enddate is null and k.relationship = 'Sire' and k.method = 'Observed') \ No newline at end of file From 5b3c1c0a3438fe1ddee4c9f3c4f90e2db73da815 Mon Sep 17 00:00:00 2001 From: ohsudev Date: Fri, 9 Jan 2026 19:09:11 -0800 Subject: [PATCH 2/3] Modified Parentage reporting on the Clinical Snapshot reports. --- onprc_ehr/resources/queries/study/parentageSummary.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/onprc_ehr/resources/queries/study/parentageSummary.sql b/onprc_ehr/resources/queries/study/parentageSummary.sql index 4b31a779d..47807f9f2 100644 --- a/onprc_ehr/resources/queries/study/parentageSummary.sql +++ b/onprc_ehr/resources/queries/study/parentageSummary.sql @@ -34,7 +34,7 @@ SELECT FROM study.birth b WHERE b.dam is not null and b.qcstate.publicdata = true -And b.dam not in (select k.parent from study.parentage k where k.Id = b.Id and k.enddate is null and k.relationship = 'Dam' and k.method = 'Observed') + UNION SELECT @@ -46,4 +46,3 @@ SELECT FROM study.birth a WHERE a.sire is not null and a.qcstate.publicdata = true - And a.sire not in (select k.parent from study.parentage k where k.Id = a.Id and k.enddate is null and k.relationship = 'Sire' and k.method = 'Observed') \ No newline at end of file From b03c7b74e5442accbfd409f97a78e6d691c2cea9 Mon Sep 17 00:00:00 2001 From: ohsudev Date: Mon, 12 Jan 2026 10:36:46 -0800 Subject: [PATCH 3/3] Modified Parentage reporting process. --- onprc_ehr/resources/queries/study/parentageSummary.sql | 3 --- 1 file changed, 3 deletions(-) diff --git a/onprc_ehr/resources/queries/study/parentageSummary.sql b/onprc_ehr/resources/queries/study/parentageSummary.sql index 47807f9f2..404799898 100644 --- a/onprc_ehr/resources/queries/study/parentageSummary.sql +++ b/onprc_ehr/resources/queries/study/parentageSummary.sql @@ -15,7 +15,6 @@ */ SELECT p.Id, - p.date, p.parent, p.relationship, p.method @@ -27,7 +26,6 @@ UNION SELECT b.Id, - b.date, b.dam, 'Dam' as relationship, 'Observed' as method @@ -39,7 +37,6 @@ UNION SELECT a.Id, - a.date, a.sire, 'Sire' as relationship, 'Observed' as method