malawi_hiv_program_reports 1.1.3 → 1.1.4
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: f074dc44fc448956bea3c452a3b95a930b01d71357826666e5e0820dfc5340df
|
4
|
+
data.tar.gz: 675f722dbc8c93e3bfdd0cde1e160801f0bd55c9159703eadd49d8963adbd730
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '095bfc87622d4516d50dea06daac994c9528fa8a182e9d2afee41aecbbd05bc63c9dafbdfc44006028c7e9469456e9d5c9d4a09e6fd1eaf494679d28c7ac9f6e'
|
7
|
+
data.tar.gz: 867e696edf6d2fd7318c3227ad82e262e0b1b275323b5f151f587e138cf1e80eec59fe0c612032ecfcb009d07bca5df1040a72d82aa3c6af9be7f9302bb83998
|
@@ -124,14 +124,15 @@ module MalawiHivProgramReports
|
|
124
124
|
ActiveRecord::Base.connection.select_all <<~SQL
|
125
125
|
SELECT o.person_id, o.value_coded
|
126
126
|
FROM obs #{current_partition} o
|
127
|
-
LEFT JOIN obs #{current_partition} a ON a.
|
127
|
+
LEFT JOIN obs #{current_partition} a ON a.person_id = o.person_id AND a.obs_datetime > o.obs_datetime AND a.concept_id IN (#{pregnant_concepts.to_sql}) AND a.voided = 0
|
128
128
|
AND a.obs_datetime >= DATE(#{ActiveRecord::Base.connection.quote(start_date)}) AND a.obs_datetime < DATE(#{ActiveRecord::Base.connection.quote(end_date)}) + INTERVAL 1 DAY
|
129
129
|
WHERE a.obs_id is null
|
130
|
-
|
130
|
+
AND o.obs_datetime >= DATE(#{ActiveRecord::Base.connection.quote(start_date)})
|
131
|
+
AND o.obs_datetime < DATE(#{ActiveRecord::Base.connection.quote(end_date)}) + INTERVAL 1 DAY
|
131
132
|
AND o.voided = 0
|
132
133
|
AND o.concept_id in (#{pregnant_concepts.to_sql})
|
133
|
-
AND o.value_coded IN (#{yes_concepts.join(',')})
|
134
134
|
AND o.person_id IN (#{patient_list.join(',')})
|
135
|
+
AND o.value_coded IN (#{yes_concepts.join(',')})
|
135
136
|
GROUP BY o.person_id
|
136
137
|
SQL
|
137
138
|
end
|
@@ -140,14 +141,15 @@ module MalawiHivProgramReports
|
|
140
141
|
ActiveRecord::Base.connection.select_all <<~SQL
|
141
142
|
SELECT o.person_id, o.value_coded
|
142
143
|
FROM obs #{current_partition} o
|
143
|
-
LEFT JOIN obs #{current_partition} a ON a.
|
144
|
+
LEFT JOIN obs #{current_partition} a ON a.person_id = o.person_id AND a.obs_datetime > o.obs_datetime AND a.concept_id IN (#{breast_feeding_concepts.to_sql}) AND a.voided = 0
|
144
145
|
AND a.obs_datetime >= DATE(#{ActiveRecord::Base.connection.quote(start_date)}) AND a.obs_datetime < DATE(#{ActiveRecord::Base.connection.quote(end_date)}) + INTERVAL 1 DAY
|
145
146
|
WHERE a.obs_id is null
|
146
|
-
|
147
|
+
AND o.obs_datetime >= DATE(#{ActiveRecord::Base.connection.quote(start_date)})
|
148
|
+
AND o.obs_datetime < DATE(#{ActiveRecord::Base.connection.quote(end_date)}) + INTERVAL 1 DAY
|
147
149
|
AND o.voided = 0
|
148
150
|
AND o.concept_id IN (#{breast_feeding_concepts.to_sql})
|
149
|
-
AND o.value_coded IN (#{yes_concepts.join(',')})
|
150
151
|
AND o.person_id IN (#{patient_list.join(',')})
|
152
|
+
AND o.value_coded IN (#{yes_concepts.join(',')})
|
151
153
|
GROUP BY o.person_id
|
152
154
|
SQL
|
153
155
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roy Chanunkha
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|