malawi_hiv_program_reports 1.1.18 → 1.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59ce2b645e8862156cd2dfe62c5085eb8f92b940f3abb591d4ed90affc349a72
|
4
|
+
data.tar.gz: 2b4a8ba3fd2ee2e82ae0e645b6b52f8951bb04e2bc9f418faed1ff4052f14acf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 645f9cbfdbeaf74c6b2da6035a3d336408d7e28663171557ecc2e68c7d53489d218408dd76980d870ef0d74dbc1238a57d388d194ac3195e3fe0953420e97d6e
|
7
|
+
data.tar.gz: f6b5ad1078a1a8c3c68faee0d74c71502dce1099797140ab72ca171d92e8bf585b00b750758c3dead290927266c5c90aa8b912e57786d04db53418c4c15e8a67
|
@@ -118,10 +118,8 @@ module MalawiHivProgramReports
|
|
118
118
|
end
|
119
119
|
|
120
120
|
def build_cohort_tables
|
121
|
-
return unless rebuild_outcome || @occupation.present?
|
122
|
-
|
123
121
|
MalawiHivProgramReports::Moh::CumulativeCohort.new(
|
124
|
-
start_date
|
122
|
+
start_date: (end_date - 2.months).beginning_of_month,
|
125
123
|
end_date:,
|
126
124
|
locations: [@location.to_s],
|
127
125
|
rebuild: rebuild_outcome
|
@@ -166,6 +164,8 @@ module MalawiHivProgramReports
|
|
166
164
|
cn.name AS tb_status,
|
167
165
|
GROUP_CONCAT(DISTINCT vcn.name) AS screening_methods
|
168
166
|
FROM cdr_temp_cohort_members #{current_partition} tesd
|
167
|
+
INNER JOIN cdr_temp_patient_outcomes #{current_partition} tpo ON tpo.patient_id = tesd.patient_id
|
168
|
+
AND tpo.cum_outcome = 'On antiretrovirals'
|
169
169
|
INNER JOIN obs #{current_partition} o ON o.person_id = tesd.patient_id
|
170
170
|
AND o.voided = 0 AND o.concept_id = #{tb_status}
|
171
171
|
AND o.obs_datetime BETWEEN '#{start_date}' AND '#{end_date}'
|
@@ -176,6 +176,11 @@ module MalawiHivProgramReports
|
|
176
176
|
AND acurr.obs_datetime > o.obs_datetime
|
177
177
|
AND acurr.obs_datetime BETWEEN '#{start_date}' AND '#{end_date}'
|
178
178
|
AND acurr.value_coded IN (#{tb_status_results})
|
179
|
+
INNER JOIN obs #{current_partition} patient_present ON patient_present.person_id = o.person_id
|
180
|
+
AND patient_present.concept_id = #{ConceptName.find_by_name('Patient present').concept_id}
|
181
|
+
AND patient_present.value_coded = #{ConceptName.find_by_name('Yes').concept_id}
|
182
|
+
AND patient_present.voided = 0
|
183
|
+
AND patient_present.obs_datetime BETWEEN '#{start_date}' AND '#{end_date}'
|
179
184
|
LEFT JOIN obs #{current_partition} screen_method ON screen_method.concept_id = #{tb_screening_method}
|
180
185
|
AND screen_method.voided = 0
|
181
186
|
AND screen_method.person_id = o.person_id
|
@@ -335,9 +340,15 @@ module MalawiHivProgramReports
|
|
335
340
|
end
|
336
341
|
|
337
342
|
def process_method(methods:, **kwargs)
|
338
|
-
indicator =
|
339
|
-
|
340
|
-
|
343
|
+
indicator = nil
|
344
|
+
|
345
|
+
if methods.include?('mwrd')
|
346
|
+
indicator = :mwrd_screen
|
347
|
+
elsif methods.include?('cxr')
|
348
|
+
indicator = :cxr_screen
|
349
|
+
else
|
350
|
+
indicator = :symptom_screen_alone
|
351
|
+
end
|
341
352
|
|
342
353
|
process_aggreggation_rows(kwargs[:age_group], kwargs[:gender], indicator, kwargs[:patient_id], kwargs[:maternal_status])
|
343
354
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: malawi_hiv_program_reports
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roy Chanunkha
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|