his_emr_api_lab 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/services/lab/lims/migrator.rb +4 -2
- data/app/services/lab/lims/order_dto.rb +4 -2
- data/lib/lab/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2de242e5fc5982f097e27abb3b4c85ac45b3eb8296ba53bf285ebe8a3422d486
|
4
|
+
data.tar.gz: '064059e7286ba44485e1707c2be889126776e15125732859bc41c682d4784002'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2bff8f28b0319d9cb19120704738a5cad5820cc8036abb083666d40d3b5f07d1c9d460b9c5b93bc5c7fe5cf393ac091196d0042bbf50730ad812dc1cad0979e
|
7
|
+
data.tar.gz: 8c1b11e868f38fcd9c61d275b2bd74783dd698eaaea2ee88d2819b76c944c36972856090a239f7087b3c96a65de7104fd65347ce7128f3c76d799768dbd80253
|
@@ -142,9 +142,10 @@ module Lab
|
|
142
142
|
MIGRATION_REJECTIONS_CSV_PATH = LIMS_LOG_PATH.join('migration-rejections.csv')
|
143
143
|
|
144
144
|
def self.export_rejections(rejections)
|
145
|
-
headers = ['Accession number', 'NHID', 'First name', 'Last name', 'Reason']
|
145
|
+
headers = ['doc_id', 'Accession number', 'NHID', 'First name', 'Last name', 'Reason']
|
146
146
|
rows = (rejections || []).map do |rejection|
|
147
147
|
[
|
148
|
+
rejection.order[:_id],
|
148
149
|
rejection.order[:tracking_number],
|
149
150
|
rejection.order[:patient][:id],
|
150
151
|
rejection.order[:patient][:first_name],
|
@@ -159,9 +160,10 @@ module Lab
|
|
159
160
|
MIGRATION_FAILURES_CSV_PATH = LIMS_LOG_PATH.join('migration-failures.csv')
|
160
161
|
|
161
162
|
def self.export_failures
|
162
|
-
headers = ['Accession number', 'NHID', 'Reason', 'Difference']
|
163
|
+
headers = ['doc_id', 'Accession number', 'NHID', 'Reason', 'Difference']
|
163
164
|
rows = Lab::LimsFailedImport.all.map do |failure|
|
164
165
|
[
|
166
|
+
failure.lims_id,
|
165
167
|
failure.tracking_number,
|
166
168
|
failure.patient_nhid,
|
167
169
|
failure.reason,
|
@@ -30,9 +30,9 @@ module Lab
|
|
30
30
|
|
31
31
|
# Translates a LIMS specimen name to an OpenMRS concept_id
|
32
32
|
def specimen_type_id
|
33
|
-
lims_specimen_name = self['sample_type']
|
33
|
+
lims_specimen_name = self['sample_type']&.strip&.downcase
|
34
34
|
|
35
|
-
if %w[specimen_not_collected not_assigned].include?(lims_specimen_name)
|
35
|
+
if %w[specimen_not_collected not_assigned not_specified].include?(lims_specimen_name)
|
36
36
|
return ConceptName.select(:concept_id).find_by_name!('Unknown').concept_id
|
37
37
|
end
|
38
38
|
|
@@ -53,6 +53,8 @@ module Lab
|
|
53
53
|
|
54
54
|
# Extract requesting clinician name from LIMS
|
55
55
|
def requesting_clinician
|
56
|
+
return 'Unknown' unless self['who_order_test']
|
57
|
+
|
56
58
|
# TODO: Extend requesting clinician to an obs tree having extra parameters
|
57
59
|
# like phone number and ID to closely match the lims user.
|
58
60
|
first_name = self['who_order_test']['first_name'] || ''
|
data/lib/lab/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: his_emr_api_lab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elizabeth Glaser Pediatric Foundation Malawi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: couchrest
|