his_emr_api_lab 2.0.8.streaming → 2.0.9.pre.mahis
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: 65e9ed1156a73efca62f9b4ca4319bbed2eb25d2fd44b49fad197f6d0d3be6e0
|
|
4
|
+
data.tar.gz: 7c806a28a1cf5c6df075c2de90868f0c01b41a26daf57560280945427fe2f4e4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 60e4421f8c222c7689879625d07fc9f42924fb695a4236f8386c43ca79b6b6d9547a9cef5b9304dbd9c6c33e5f3b37077d7f33c773d5fe393cd321f86695f64e
|
|
7
|
+
data.tar.gz: 67c1125b6a3cd723da9649dc257edab4b0b83f2d916075baa54385adf5c4d78cdd862842f0fbeca16875e9b9a775178e9b0c57dcefd62ad818db3e4308057d67
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Lab
|
|
4
|
+
##
|
|
5
|
+
# Push an order to LIMS.
|
|
6
|
+
class ProcessLabResultJob < ApplicationJob
|
|
7
|
+
queue_as :default
|
|
8
|
+
def perform(results_obs_id, serializer, result_enter_by)
|
|
9
|
+
results_obs = Lab::LabResult.find(results_obs_id)
|
|
10
|
+
Lab::ResultsService.process_result_completion(results_obs, serializer, result_enter_by)
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -8,6 +8,13 @@ module Lab
|
|
|
8
8
|
result.children.map do |measure|
|
|
9
9
|
value, value_type = read_value(measure)
|
|
10
10
|
concept_name = ConceptName.find_by_concept_id(measure.concept_id)
|
|
11
|
+
|
|
12
|
+
program_id = ""
|
|
13
|
+
if measure.obs_id.present?
|
|
14
|
+
obs = Observation.find(measure.obs_id)
|
|
15
|
+
encounter = Encounter.find(obs.encounter_id)
|
|
16
|
+
program_id = encounter.program_id
|
|
17
|
+
end
|
|
11
18
|
|
|
12
19
|
{
|
|
13
20
|
id: measure.obs_id,
|
|
@@ -18,7 +25,8 @@ module Lab
|
|
|
18
25
|
date: measure.obs_datetime,
|
|
19
26
|
value:,
|
|
20
27
|
value_type:,
|
|
21
|
-
value_modifier: measure.value_modifier
|
|
28
|
+
value_modifier: measure.value_modifier,
|
|
29
|
+
program_id: program_id
|
|
22
30
|
}
|
|
23
31
|
end
|
|
24
32
|
end
|
|
@@ -4,7 +4,7 @@ module Lab
|
|
|
4
4
|
# This class is used to encode and decode the JWT token
|
|
5
5
|
module JsonWebTokenService
|
|
6
6
|
class << self
|
|
7
|
-
SECRET_KEY = Rails.application.
|
|
7
|
+
SECRET_KEY = Rails.application.secrets.secret_key_base.to_s
|
|
8
8
|
|
|
9
9
|
def encode(payload, request_ip, exp = 18.hours.from_now)
|
|
10
10
|
payload[:exp] = exp.to_i
|
|
@@ -32,12 +32,18 @@ module Lab
|
|
|
32
32
|
|
|
33
33
|
serializer = Lab::ResultSerializer.serialize(results_obs)
|
|
34
34
|
end
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
|
|
36
|
+
ProcessLabResultJob.perform_later(results_obs.id, serializer, result_enter_by)
|
|
37
|
+
|
|
37
38
|
Rails.logger.info("Lab::ResultsService: Result created for test #{test_id} #{serializer}")
|
|
38
39
|
serializer
|
|
39
40
|
end
|
|
40
41
|
|
|
42
|
+
def process_result_completion(results_obs, serializer, result_enter_by)
|
|
43
|
+
process_acknowledgement(results_obs, result_enter_by)
|
|
44
|
+
precess_notification_message(results_obs, serializer, result_enter_by)
|
|
45
|
+
end
|
|
46
|
+
|
|
41
47
|
private
|
|
42
48
|
|
|
43
49
|
def precess_notification_message(result, values, result_enter_by)
|
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: 2.0.
|
|
4
|
+
version: 2.0.9.pre.mahis
|
|
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:
|
|
11
|
+
date: 2026-02-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: couchrest
|
|
@@ -44,14 +44,14 @@ dependencies:
|
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version:
|
|
47
|
+
version: 7.0.6
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version:
|
|
54
|
+
version: 7.0.6
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: socket.io-client-simple
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -243,6 +243,7 @@ files:
|
|
|
243
243
|
- app/controllers/lab/tests_controller.rb
|
|
244
244
|
- app/controllers/lab/users_controller.rb
|
|
245
245
|
- app/jobs/lab/application_job.rb
|
|
246
|
+
- app/jobs/lab/process_lab_result_job.rb
|
|
246
247
|
- app/jobs/lab/push_order_job.rb
|
|
247
248
|
- app/jobs/lab/update_patient_orders_job.rb
|
|
248
249
|
- app/jobs/lab/void_order_job.rb
|