malawi_hiv_program_reports 1.0.3 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf17f7c17c9197b1aab5936d0ab803ca2c5260898078907ca9a6b81f9b664faa
|
4
|
+
data.tar.gz: f43489a7292fbc4e1f76c05f75d5765d00430387bf8773da8fd571601927067c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 865b057424aa1fb3ad3d8b04797cece85c7d0e7965ee0cad112d6e97ba4d36215d8c581c8bfb13c95111cc6bbb8e8894358ca9b9df500d7deea426661dcb3534
|
7
|
+
data.tar.gz: ba0d487f35f1a9f75417f50803ef68a1bd2598a440c0ce95b1b547f01c0d843aacaa821f0090ec33d9f36672ee632b5104d4a0e3767e41468fdfe1d2e271c1c0
|
@@ -94,6 +94,10 @@ module MalawiHivProgramReports
|
|
94
94
|
AND patient_state.start_date < #{interval_manager(date:, value: 1, interval: 'DAY', operator: '+')}
|
95
95
|
AND patient_state.voided = 0 #{site_manager(operator: 'AND', column: 'patient_state.site_id', location: @location)}
|
96
96
|
WHERE patients.date_enrolled <= #{date} #{site_manager(operator: 'AND', column: 'patients.site_id', location: @location)}
|
97
|
+
AND patient_state.date_created = (SELECT MAX(date_created)
|
98
|
+
FROM patient_state ps#{' '}
|
99
|
+
WHERE ps.patient_program_id = patient_state.patient_program_id #{site_manager(operator: 'AND', column: 'ps.site_id', location: @location)}#{' '}
|
100
|
+
AND ps.state = patient_state.state AND ps.voided = 0)
|
97
101
|
GROUP BY patients.patient_id
|
98
102
|
SQL
|
99
103
|
end
|
@@ -882,7 +882,7 @@ module MalawiHivProgramReports
|
|
882
882
|
INNER JOIN temp_other_patient_types tmp ON tmp.patient_id = pp.patient_id #{site_manager(operator: 'AND', column: 'pp.site_id', location: @location)}
|
883
883
|
INNER JOIN obs o ON pp.patient_id = o.person_id AND o.concept_id = #{type_of_patient_concept} #{site_manager(operator: 'AND', column: 'o.site_id', location: @location)}
|
884
884
|
AND o.value_coded = #{new_patient_concept}
|
885
|
-
AND o.voided = 0 AND o.obs_datetime < DATE(#{end_date}) + INTERVAL 1 DAY
|
885
|
+
AND o.voided = 0 AND o.obs_datetime < DATE('#{end_date}') + INTERVAL 1 DAY
|
886
886
|
WHERE pp.program_id = 1 #{site_manager(operator: 'AND', column: 'pp.site_id', location: @location)}
|
887
887
|
GROUP BY pp.patient_id #{@adapter == 'mysql2' ? '' : ', pp.site_id'}
|
888
888
|
SQL
|