malawi_hiv_program_reports 1.0.6 → 1.0.8

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: e6d7725bbae83b356b36e8124d6e938b16bf43ca789948da6d9a89964b97f2d8
4
- data.tar.gz: 9cd388fee4284e632399135f1dfcd7810ffe9b6c6bc8158ff70f6b3ed8431702
3
+ metadata.gz: b208d1cfb9b841533cb422c55be10119e1fbac4884b5ba86934c76080cff7053
4
+ data.tar.gz: 8d03344e5ff345f9a183a84bcd303375234d3a7c2a39c3562f0d3b57ef28cd25
5
5
  SHA512:
6
- metadata.gz: fcb5645fe7df71c690e0d1c4548c4ccb7dc9c261ff8fea52bc19a134354ffc0b4faa9032ab56c55597b50ab3790b45205773a1df52f41d216d55473aa55f7f8d
7
- data.tar.gz: f66a1b98edfe2fc4ecdf4594d91a9f9a1a6bfd6c279536f9cc2f74e7c9bb4f75571d6abfbdcd718cdcb9569139beb940ef81b949996cf760ebfee8f6f5cbbba8
6
+ metadata.gz: 20ff92a2f61133722d2815a84dd95320c9689696daf569d2007d3d4411e4ebc624d06f70bef48dab466f2dd3ed17618f3f0eb5f23a839090d03407dd84183d22
7
+ data.tar.gz: ebd07c5962a6e3cd19d17eae483a32cecc4bbee991281632f7e3eeef200a3550e9ad88e6f2a618c2b13216a091a5403b383a67b8730619f24db4c6c8d802a9f7
@@ -95,9 +95,9 @@ module MalawiHivProgramReports
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
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)
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 AND ps.start_date <= #{date})
101
101
  GROUP BY patients.patient_id
102
102
  SQL
103
103
  end
@@ -715,6 +715,7 @@ module MalawiHivProgramReports
715
715
  }
716
716
  (SELECT value_coded FROM obs
717
717
  WHERE concept_id = 7563 AND person_id = patient_program.patient_id AND voided = 0 #{site_manager(operator: 'AND', column: 'obs.site_id', location: @location)}
718
+ AND obs_datetime <= DATE(#{end_date}) + INTERVAL 1 DAY
718
719
  ORDER BY obs_datetime DESC, date_created DESC LIMIT 1) as reason_for_starting_art,
719
720
  pa.value AS occupation
720
721
  FROM patient_program
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MalawiHivProgramReports
4
- VERSION = '1.0.6'
4
+ VERSION = '1.0.8'
5
5
  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.0.6
4
+ version: 1.0.8
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-03-18 00:00:00.000000000 Z
11
+ date: 2024-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails