From c8093178e4289009496bd73e5091464e86bebf51 Mon Sep 17 00:00:00 2001 From: njorocs Date: Fri, 5 Jul 2024 08:44:16 +0300 Subject: [PATCH] Bug fix in visit type for clinical encounter. Obs data not fetching --- omod/src/main/resources/sql/DML.sql | 2 +- omod/src/main/resources/sql/Scheduled_Updates.sql | 2 +- omod/src/main/resources/sql/dwapi/DML.sql | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/omod/src/main/resources/sql/DML.sql b/omod/src/main/resources/sql/DML.sql index 1f399061..e2e9c589 100644 --- a/omod/src/main/resources/sql/DML.sql +++ b/omod/src/main/resources/sql/DML.sql @@ -7974,7 +7974,7 @@ BEGIN inner join person p on p.person_id=e.patient_id and p.voided=0 inner join form f on f.form_id = e.form_id and f.uuid = 'e958f902-64df-4819-afd4-7fb061f59308' left outer join obs o on o.encounter_id = e.encounter_id and o.concept_id in - (164174,160632,165104,1651,1640,162477,1655,1000075,1896,1272,162724,160433) + (164174,160632,165104,1651,1640,162477,1655,1000075,1896,1272,162724,160433,164181) and o.voided=0 where e.voided=0 group by e.patient_id,date(e.encounter_datetime); diff --git a/omod/src/main/resources/sql/Scheduled_Updates.sql b/omod/src/main/resources/sql/Scheduled_Updates.sql index 6a88eae0..f94a8e2b 100644 --- a/omod/src/main/resources/sql/Scheduled_Updates.sql +++ b/omod/src/main/resources/sql/Scheduled_Updates.sql @@ -8923,7 +8923,7 @@ from encounter e inner join person p on p.person_id=e.patient_id and p.voided=0 inner join form f on f.form_id = e.form_id and f.uuid = 'e958f902-64df-4819-afd4-7fb061f59308' left outer join obs o on o.encounter_id = e.encounter_id and o.concept_id in - (164174,160632,165104,1651,1640,162477,1655,1000075,1896,1272,162724,160433) + (164174,160632,165104,1651,1640,162477,1655,1000075,1896,1272,162724,160433,164181) and o.voided=0 where e.voided=0 and e.date_created >= last_update_time diff --git a/omod/src/main/resources/sql/dwapi/DML.sql b/omod/src/main/resources/sql/dwapi/DML.sql index 6d772a8a..870c6bf8 100644 --- a/omod/src/main/resources/sql/dwapi/DML.sql +++ b/omod/src/main/resources/sql/dwapi/DML.sql @@ -7708,7 +7708,7 @@ from encounter e inner join person p on p.person_id=e.patient_id and p.voided=0 inner join form f on f.form_id = e.form_id and f.uuid = 'e958f902-64df-4819-afd4-7fb061f59308' left outer join obs o on o.encounter_id = e.encounter_id and o.concept_id in - (164174,160632,165104,1651,1640,162477,1655,1000075,1896,1272,162724,160433) + (164174,160632,165104,1651,1640,162477,1655,1000075,1896,1272,162724,160433,164181) and o.voided=0 where e.voided=0 group by e.patient_id,date(e.encounter_datetime);