Skip to content

Commit

Permalink
Merge pull request #478 from njorocs/multi-contact-listing
Browse files Browse the repository at this point in the history
Fixed error handling contacts listed more than once.now fetching uniq…
  • Loading branch information
patryllus authored Aug 22, 2024
2 parents 27b6666 + d7d28b3 commit cb0a677
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion omod/src/main/resources/sql/DML.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5002,7 +5002,7 @@ CREATE PROCEDURE sp_populate_etl_patient_contact()
on pa.person_attribute_type_id = t.person_attribute_type_id and
t.uuid = '7c94bd35-fba7-4ef7-96f5-29c89a318fcf') pt on e.patient_id = pt.person_id
where e.voided = 0
group by patient_contact, relationship_type, patient_related_to;
group by patient_contact;

update kenyaemr_etl.etl_patient_contact c
join
Expand Down
2 changes: 1 addition & 1 deletion omod/src/main/resources/sql/Scheduled_Updates.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5199,7 +5199,7 @@ from encounter e
on pa.person_attribute_type_id = t.person_attribute_type_id and
t.uuid = '7c94bd35-fba7-4ef7-96f5-29c89a318fcf') pt on e.patient_id = pt.person_id
where e.voided = 0
group by patient_contact, relationship_type, patient_related_to
group by patient_contact
ON DUPLICATE KEY UPDATE
start_date=start_date,
end_date=end_date,
Expand Down
2 changes: 1 addition & 1 deletion omod/src/main/resources/sql/dwapi/DML.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4766,7 +4766,7 @@ CREATE PROCEDURE sp_populate_dwapi_patient_contact()
on pa.person_attribute_type_id = t.person_attribute_type_id and
t.uuid = '7c94bd35-fba7-4ef7-96f5-29c89a318fcf') pt on e.patient_id = pt.person_id
where e.voided = 0
group by patient_contact, relationship_type, patient_related_to;
group by patient_contact;

update dwapi_etl.etl_patient_contact c
join
Expand Down

0 comments on commit cb0a677

Please sign in to comment.