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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 51e67ca380161c3475a914fdaffac759ec33a74e875610258ebe11232fabeb68
|
|
4
|
+
data.tar.gz: b64970d9939289e2a1f505cea79259d2ff0f1dc112727e7a9584f40345ace00b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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']
|
|
481
|
+
collection[key]["ids"]= reg_data['Referral']&.flatten || []
|
|
482
482
|
end
|
|
483
483
|
end
|
|
484
484
|
data.each do |phrase, counts|
|
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.
|
|
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:
|
|
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.
|
|
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
|