his_emr_api_lab 2.1.3 → 2.1.4

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: c71682551eb38f2c025993390d6d32f064be0fd35da372dede313882f12c6ad8
4
- data.tar.gz: f59352b4aceb5d7cf891cb094ef9b213f7e191d453936ca97396101d789e3846
3
+ metadata.gz: 2086e2372ae3182efa9a1eb56d5dfe0845f770800f25891dec98af02530d7953
4
+ data.tar.gz: cebae46dd81f29f128b6904ccaa7dbefc780b0dfcc57d9f2e1f3087f86cfc830
5
5
  SHA512:
6
- metadata.gz: 2db7d3ee59f9cd0e94c2eccc5f7a4514d9c25479e6e31dcce709aa3005934b6c3a2b794fa8e297e86a792f9c311a12628bd1c117d8202aafe49da6c72606643a
7
- data.tar.gz: 025253b76aa0cb65c237e03aecbcf7010a9a847b7c249d46af7c51330fdbf6ef03b6ee82051aa12271984511091a6d639e46b61c9ca51a3714f1b30b806ba623
6
+ metadata.gz: 6381879cefbb24c3226d2a68f458e26cea19bcf3db7f4b50fb97a14afc7b94958f2e76178d8f1fa0f4abd6ff976ddaa0ca5ce3f26fb309414117f0b82c872389
7
+ data.tar.gz: b6bede3239bb94db739c4ea1f7cf817a4eb217b9c5ba77bb9b3678dcb1b3edba44f41f71c8e0db00d9f1d333458a49376d8bb57a631473ed35ef4d3641293399
@@ -9,7 +9,7 @@ module Lab
9
9
  FROM concept_set cs
10
10
  INNER JOIN concept_name cn ON cn.concept_id = cs.concept_id
11
11
  INNER JOIN concept_attribute ca ON ca.value_reference = #{ActiveRecord::Base.connection.quote(nlims_code)}
12
- AND ca.attribute_type_id = 20
12
+ AND ca.attribute_type_id = #{ConceptAttributeType.nlims_code.concept_attribute_type_id}
13
13
  WHERE cs.concept_id IN (SELECT concept_set.concept_id
14
14
  FROM concept_set
15
15
  WHERE concept_set.concept_set IN (SELECT concept_name.concept_id
@@ -22,8 +22,8 @@ module Lab
22
22
  FROM concept_name
23
23
  WHERE concept_name.voided = 0
24
24
  AND concept_name.name = 'Test type')
25
- AND concept_set.concept_id = ca.concept_id
26
25
  )
26
+ AND cs.concept_set = ca.concept_id
27
27
  GROUP BY cn.concept_id
28
28
  SQL
29
29
  end
@@ -144,10 +144,9 @@ module Lab
144
144
  end
145
145
 
146
146
  def format_test_status_trail(order)
147
- tests = order.voided ? order.tests : Lab::LabOrderSerializer.voided_tests(order)
148
-
147
+ tests = order.voided.zero? ? order.tests : Lab::LabOrderSerializer.voided_tests(order)
149
148
  tests.each_with_object({}) do |test, trail|
150
- test_name = format_test_name(ConceptName.find_by_concept_id!(test.value_coded).name)
149
+ test_name = format_test_name(::Concept.find(test.value_coded).test_catalogue_name)
151
150
 
152
151
  current_test_trail = trail[test_name] = {}
153
152
 
@@ -209,11 +208,7 @@ module Lab
209
208
  end
210
209
 
211
210
  def format_test_name(test_name)
212
- return 'Viral Load' if test_name.casecmp?('HIV Viral load')
213
-
214
- return 'TB' if test_name.casecmp?('TB Program')
215
-
216
- test_name.titleize
211
+ return test_name
217
212
  end
218
213
 
219
214
  def format_sample_priority(priority)
data/lib/lab/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lab
4
- VERSION = '2.1.3'
4
+ VERSION = '2.1.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: his_emr_api_lab
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elizabeth Glaser Pediatric Foundation Malawi