malawi_hiv_program_reports 1.0.4 → 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: 983a5f42853899df0a2bda901e81fd8f2295eeac7bcf166bd8a6eeaceb79ad5e
4
- data.tar.gz: 55628f6d08dc32cfd83d1f143fc63271d7946193b6d71b3c5258af32d4e9d7dd
3
+ metadata.gz: bf17f7c17c9197b1aab5936d0ab803ca2c5260898078907ca9a6b81f9b664faa
4
+ data.tar.gz: f43489a7292fbc4e1f76c05f75d5765d00430387bf8773da8fd571601927067c
5
5
  SHA512:
6
- metadata.gz: c29ba90dced14c1b93b02dc67d9d592713749f8107c1aed265a70437081040b69044a149828c6c8843ffe3c0183d2ca88df59718d7f7f91ca755c539f71dbfe2
7
- data.tar.gz: 74da135406319339851244013d6b192d60b5e0c93386dd0f9003bbd0e36044b43b1357c575195117c56c5ec17eaa4ad9713e9f33f92c0db5d1c8acfd6cb3f7d5
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MalawiHivProgramReports
4
- VERSION = '1.0.4'
4
+ VERSION = '1.0.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: malawi_hiv_program_reports
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roy Chanunkha