emr_ohsp_interface 1.2.2 → 1.2.3

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: be2ba0df688b91d1575492fa6baaf5c9e89a80f6b364eb92e100268e717260fb
4
- data.tar.gz: 70ea97490458b7f611e558a59000dbf9c7987154cdadb581bf1f2935e7adf5c2
3
+ metadata.gz: 51e67ca380161c3475a914fdaffac759ec33a74e875610258ebe11232fabeb68
4
+ data.tar.gz: b64970d9939289e2a1f505cea79259d2ff0f1dc112727e7a9584f40345ace00b
5
5
  SHA512:
6
- metadata.gz: 963c904f3a7e1cdaa64ac8c9df78a3ff0746c272796871bfde4e525084d4698ceb1c9fc8c36b2fca009f0784f534da87fa24077c66f095d9662047c90ee3d07e
7
- data.tar.gz: 6d33652b469e327a19c3b3fa28ad7837598f62470d3baef1c6007d30574ad2fb25045a2cbba6e76980f97de726bbffd25d48307536070a870903942e410a4b1a
6
+ metadata.gz: 4f93b70ae454c88f5f553667469af7b8ef27b718787cdd2fdd2997539cbacdcc262ad87943b5ce10feb072f8ce14381dccc52bedd0cc4d1d4fdace4b119c9d15
7
+ data.tar.gz: 3d7df6cac86977741353a21ca19e507d7f93bd60228362cf08c700657fbaf49ed96c0f72791a2c195f93643149ed240d3771f114822d407ece87c0ac35a69d2a
@@ -467,7 +467,7 @@ module EmrOhspInterface
467
467
  data =Observation.where("obs_datetime BETWEEN ? AND ? AND c.voided = ? AND obs.concept_id IN (?) ",
468
468
  start_date.to_date.strftime('%Y-%m-%d 00:00:00'), end_date.to_date.strftime('%Y-%m-%d 23:59:59'),0, [6543, 6542]).\
469
469
  joins('INNER JOIN concept_name c ON c.concept_id = obs.value_coded
470
- INNER JOIN person p ON p.person_id = obs.person_id').\
470
+ INNER JOIN person p ON p.person_id = obs.person_id').group(["obs.person_id","c.name","DATE(obs_datetime)"]).\
471
471
  pluck("c.name, CASE WHEN (SELECT timestampdiff(year, birthdate, '#{end_date.to_date.strftime('%Y-%m-%d')}')) >= 5 THEN 'more_than_5'
472
472
  ELSE 'less_than_5' END AS age_group,p.person_id").group_by(&:shift)
473
473
 
@@ -478,7 +478,7 @@ module EmrOhspInterface
478
478
  else
479
479
  if key.eql?("Referals from other institutions")
480
480
  reg_data = reg_data.rows.group_by(&:shift)
481
- collection[key]["ids"]= reg_data['Referral'].flatten
481
+ collection[key]["ids"]= reg_data['Referral']&.flatten || []
482
482
  end
483
483
  end
484
484
  data.each do |phrase, counts|
@@ -1,3 +1,3 @@
1
1
  module EmrOhspInterface
2
- VERSION = '1.2.2'
2
+ VERSION = '1.2.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emr_ohsp_interface
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Manda, Petros Kayange, and Dominic Kasanga
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-25 00:00:00.000000000 Z
11
+ date: 2024-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0'
122
122
  requirements: []
123
- rubygems_version: 3.0.9
123
+ rubygems_version: 3.4.20
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: This in a gem that facilitates interfacing of EMR, One Health Surveillance