his_emr_api_lab 2.3.4 → 2.3.5

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: cf823a7706db9f2444ed694c9f58ea1c1851c9cf00de058bb6c980434e57b27a
4
- data.tar.gz: 55ac7590a6cc36249ef8322b254844f3ada7ca891b45d00c3512ccfa2eee8ddc
3
+ metadata.gz: dc965d603f0266ab7897325bdf7342208fb136527c39b2b6d267269b79c2670c
4
+ data.tar.gz: 67b239f498c628d805d336df0b1ce1aa906969638046453640b57278dbdc3d1a
5
5
  SHA512:
6
- metadata.gz: 1b3efe1cf4d98acb7dd218866c331d384a7f4c0855fe2ad4475edc88e3c89799d74d479c4ca8159707eeb433a1cf985a8b98f847f2d3a6a66330af88b675343b
7
- data.tar.gz: 51d757cdbaff73aa883332f8a0a17cc71cc117fd7812192b9c60b11506b16c8f4ba30c7a1850ee5bc49a56c531e93f912eca963519ee4251ad0edbb225ce716a
6
+ metadata.gz: 1944e524aab65fa92c218339dd61e1edfd741b38c0525b8c89092d493dd77bfc1f450f5bbe51dca6b9896db402f32f7d38a2e0c90ba59eac04e257a82bbb5375
7
+ data.tar.gz: 33b215daa16a744b72ff9999ec71fcfbc211c21fad7cad8f73d540ec8eb9cf16183bdd1a4f90ee6a901847a89f0cba0f4d4326bb28383515105f2662805f232a
@@ -117,8 +117,13 @@ module Lab
117
117
  # From the members above, filter out only those concepts that are result indicators
118
118
  measures = ConceptSet.find_members_by_name(Lab::Metadata::TEST_RESULT_INDICATOR_CONCEPT_NAME)
119
119
  .select(:concept_id)
120
+ # Get specimen types to exclude from results
121
+ specimen_types = ConceptSet.find_members_by_name(Lab::Metadata::SPECIMEN_TYPE_CONCEPT_NAME)
122
+ .select(:concept_id)
120
123
 
124
+ # Find concepts that are linked to the test type AND are measures (but NOT specimens)
121
125
  sets = ConceptSet.where(concept_set: test, concept_id: measures)
126
+ .where.not(concept_id: specimen_types)
122
127
 
123
128
  return ActiveRecord::Base.connection.select_all <<~SQL
124
129
  SELECT ca.concept_id, ca.value_reference as name, ca2.value_reference as nlims_code, c.uuid
@@ -82,6 +82,9 @@ module Lab
82
82
  unescaped_name = CGI.unescapeHTML(name)
83
83
  attribute_type_id = ConceptAttributeType.test_catalogue_name.concept_attribute_type_id
84
84
 
85
+ attribute = ConceptAttribute.where('attribute_type_id = ? AND value_reference = ?', attribute_type_id, unescaped_name).first
86
+ return attribute.concept if attribute
87
+
85
88
  ConceptName.joins('INNER JOIN concept_attribute ON concept_attribute.concept_id = concept_name.concept_id')
86
89
  .where('concept_attribute.attribute_type_id = ? AND concept_attribute.value_reference = ? AND concept_name.name = ?',
87
90
  attribute_type_id, unescaped_name, unescaped_name)
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.3.4'
4
+ VERSION = '2.3.5'
5
5
  end
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.3.4
4
+ version: 2.3.5
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: 2026-05-29 00:00:00.000000000 Z
11
+ date: 2026-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: couchrest