his_emr_api_lab 2.1.6 → 2.1.7.pre.alpha

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: 48598b7d2b93b3982c4a54761943f715383ee5a99a9416364890eddafe8e49d4
4
- data.tar.gz: da0908670af042eabb120bd72cbfa0eda0cfdbd1c824e2e4fd262ef0aa82b8bd
3
+ metadata.gz: 8f9b24a7f0fab2de0e47f886cd6debbdfa4b8e8ee07abd2e2d9403c45ff9343b
4
+ data.tar.gz: e57bc3a15d6ae8ff85bff447c0e7e95a3d6ce35c1d9b99d1a237dc22e2c717aa
5
5
  SHA512:
6
- metadata.gz: 04af0a0acc805f447d316cd2d38bca66a6c1f1a88e12b8fae474b62e60e46b1fe9e655f19ba1ecd026a057f78332ce408f38ca048612a395c7e5300c67d80822
7
- data.tar.gz: 54f8bb2b761df7a2da6bac7b85fb4b241c8284edcd9219acd969ac182cb5cc7e48fe23326c28a64421731bdaceadb19243b8fef085fa8b271e2343c60a901393
6
+ metadata.gz: 41a0a57a88d0d6b2a4826ada390a62f244118f024a5d49b9e9dfa17940165cb4a450076fa209c413d6f06d209050b89a3ee25ec513e4706400380f10d1bcbd8b
7
+ data.tar.gz: b0894a58a2fdd2467d5f1ffe9f36d041cc9b00680369453d6dd2f0f2016743336d9466eea954fbab15c4f74b9f0e208031772bd84854a1e5780b634f433bee9f
@@ -34,10 +34,11 @@ module Lab
34
34
 
35
35
  unless specimen_type
36
36
  return ActiveRecord::Base.connection.select_all <<~SQL
37
- SELECT ca.concept_id, ca.value_reference as name, ca2.value_reference as nlims_code
37
+ SELECT ca.concept_id, ca.value_reference as name, ca2.value_reference as nlims_code, c.uuid
38
38
  FROM concept_attribute ca
39
39
  INNER JOIN concept_attribute ca2 ON ca.concept_id = ca2.concept_id
40
40
  AND ca2.attribute_type_id = #{ConceptAttributeType.nlims_code.concept_attribute_type_id}
41
+ INNER JOIN concept c ON c.concept_id = ca.concept_id
41
42
  WHERE ca.attribute_type_id = #{ConceptAttributeType.test_catalogue_name.concept_attribute_type_id}
42
43
  AND ca.concept_id IN (#{test_types.select(:concept_id).to_sql})
43
44
  GROUP BY ca.concept_id
@@ -56,10 +57,11 @@ module Lab
56
57
  )
57
58
 
58
59
  return ActiveRecord::Base.connection.select_all <<~SQL
59
- SELECT ca.concept_id, ca.value_reference as name, ca2.value_reference as nlims_code
60
+ SELECT ca.concept_id, ca.value_reference as name, ca2.value_reference as nlims_code, c.uuid
60
61
  FROM concept_attribute ca
61
62
  INNER JOIN concept_attribute ca2 ON ca.concept_id = ca2.concept_id
62
63
  AND ca2.attribute_type_id = #{ConceptAttributeType.nlims_code.concept_attribute_type_id}
64
+ INNER JOIN concept c ON c.concept_id = ca.concept_id
63
65
  WHERE ca.attribute_type_id = #{ConceptAttributeType.test_catalogue_name.concept_attribute_type_id}
64
66
  AND ca.concept_id IN (#{concept_set.select(:concept_set).to_sql})
65
67
  GROUP BY ca.concept_id
@@ -72,10 +74,11 @@ module Lab
72
74
 
73
75
  unless test_type
74
76
  return ActiveRecord::Base.connection.select_all <<~SQL
75
- SELECT ca.concept_id, ca.value_reference as name, ca2.value_reference as nlims_code
77
+ SELECT ca.concept_id, ca.value_reference as name, ca2.value_reference as nlims_code, c.uuid
76
78
  FROM concept_attribute ca
77
79
  INNER JOIN concept_attribute ca2 ON ca.concept_id = ca2.concept_id
78
80
  AND ca2.attribute_type_id = #{ConceptAttributeType.nlims_code.concept_attribute_type_id}
81
+ INNER JOIN concept c ON c.concept_id = ca.concept_id
79
82
  WHERE ca.attribute_type_id = #{ConceptAttributeType.test_catalogue_name.concept_attribute_type_id}
80
83
  AND ca.concept_id IN (#{specimen_types.select(:concept_id).to_sql})
81
84
  GROUP BY ca.concept_id
@@ -94,10 +97,11 @@ module Lab
94
97
  )
95
98
 
96
99
  return ActiveRecord::Base.connection.select_all <<~SQL
97
- SELECT ca.concept_id, ca.value_reference as name, ca2.value_reference as nlims_code
100
+ SELECT ca.concept_id, ca.value_reference as name, ca2.value_reference as nlims_code, c.uuid
98
101
  FROM concept_attribute ca
99
102
  INNER JOIN concept_attribute ca2 ON ca.concept_id = ca2.concept_id
100
103
  AND ca2.attribute_type_id = #{ConceptAttributeType.nlims_code.concept_attribute_type_id}
104
+ INNER JOIN concept c ON c.concept_id = ca.concept_id
101
105
  WHERE ca.attribute_type_id = #{ConceptAttributeType.test_catalogue_name.concept_attribute_type_id}
102
106
  AND ca.concept_id IN (#{concept_set.pluck(:concept_id).push(0).join(',')})
103
107
  GROUP BY ca.concept_id
@@ -114,15 +118,16 @@ module Lab
114
118
  measures = ConceptSet.find_members_by_name(Lab::Metadata::TEST_RESULT_INDICATOR_CONCEPT_NAME)
115
119
  .select(:concept_id)
116
120
 
117
- sets = ConceptSet.where(concept_set: measures, concept_id: test)
121
+ sets = ConceptSet.where(concept_set: test, concept_id: measures)
118
122
 
119
123
  return ActiveRecord::Base.connection.select_all <<~SQL
120
- SELECT ca.concept_id, ca.value_reference as name, ca2.value_reference as nlims_code
124
+ SELECT ca.concept_id, ca.value_reference as name, ca2.value_reference as nlims_code, c.uuid
121
125
  FROM concept_attribute ca
122
126
  INNER JOIN concept_attribute ca2 ON ca.concept_id = ca2.concept_id
123
127
  AND ca2.attribute_type_id = #{ConceptAttributeType.nlims_code.concept_attribute_type_id}
128
+ INNER JOIN concept c ON c.concept_id = ca.concept_id
124
129
  WHERE ca.attribute_type_id = #{ConceptAttributeType.test_catalogue_name.concept_attribute_type_id}
125
- AND ca.concept_id IN (#{sets.pluck(:concept_set).push(0).join(',')})
130
+ AND ca.concept_id IN (#{sets.pluck(:concept_id).push(0).join(',')})
126
131
  GROUP BY ca.concept_id
127
132
  SQL
128
133
  end
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.6'
4
+ VERSION = '2.1.7-alpha'
5
5
  end
metadata CHANGED
@@ -1,13 +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.1.6
4
+ version: 2.1.7.pre.alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elizabeth Glaser Pediatric Foundation Malawi
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 2026-02-10 00:00:00.000000000 Z
11
+ date: 2026-02-19 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: couchrest
@@ -328,6 +329,7 @@ licenses:
328
329
  metadata:
329
330
  source_code_uri: https://github.com/EGPAFMalawiHIS/his_emr_api_lab
330
331
  rubygems_mfa_required: 'true'
332
+ post_install_message:
331
333
  rdoc_options: []
332
334
  require_paths:
333
335
  - lib
@@ -338,11 +340,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
338
340
  version: '0'
339
341
  required_rubygems_version: !ruby/object:Gem::Requirement
340
342
  requirements:
341
- - - ">="
343
+ - - ">"
342
344
  - !ruby/object:Gem::Version
343
- version: '0'
345
+ version: 1.3.1
344
346
  requirements: []
345
- rubygems_version: 3.6.3
347
+ rubygems_version: 3.4.1
348
+ signing_key:
346
349
  specification_version: 4
347
350
  summary: Lab extension for the HIS-EMR-API
348
351
  test_files: []