his_emr_api_lab 2.3.0 → 2.3.1
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 +4 -4
- data/app/controllers/lab/orders_controller.rb +1 -1
- data/app/services/lab/orders_search_service.rb +8 -1
- 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: debfc9969148ec9c83430294499e332086ab828e9df994c1b5985ba816185ea0
|
|
4
|
+
data.tar.gz: '00199f3e5dba8bca20f639ffa2438349f534048bb8d154c0428c86e24b838530'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 858b1ec59b6462198a17ef52dd545146509c1369e0d9fcd80d2919b4704568d95476e231209d29a47276507cbac4623deeb2414665ac6253727c22164c1863b2
|
|
7
|
+
data.tar.gz: '039b886ed7cf128f7cc244a51ed598c6830fb86151b71cc9b1a4a97185acdae099d826a9d77cf91e2a281f510793fab6c457e1699189290123000867901e0e74'
|
|
@@ -5,7 +5,7 @@ module Lab
|
|
|
5
5
|
module OrdersSearchService
|
|
6
6
|
class << self
|
|
7
7
|
def find_orders(filters)
|
|
8
|
-
extra_filters = pop_filters(filters, :date, :end_date, :status)
|
|
8
|
+
extra_filters = pop_filters(filters, :date, :end_date, :status, :visit_id)
|
|
9
9
|
|
|
10
10
|
uuid = filters.delete(:patient)
|
|
11
11
|
patient = Patient.find(uuid) if uuid
|
|
@@ -19,6 +19,7 @@ module Lab
|
|
|
19
19
|
|
|
20
20
|
orders = filter_orders_by_status(orders: orders, status: extra_filters[:status])
|
|
21
21
|
orders = filter_orders_by_date(orders: orders, date: extra_filters[:date], end_date: extra_filters[:end_date])
|
|
22
|
+
orders = filter_orders_by_visit_id(orders: orders, visit_id: extra_filters[:visit_id])
|
|
22
23
|
|
|
23
24
|
orders.map { |order| Lab::LabOrderSerializer.serialize_order(order) }
|
|
24
25
|
end
|
|
@@ -54,6 +55,12 @@ module Lab
|
|
|
54
55
|
end
|
|
55
56
|
end
|
|
56
57
|
|
|
58
|
+
def filter_orders_by_visit_id(orders:, visit_id: nil)
|
|
59
|
+
return orders unless visit_id.present?
|
|
60
|
+
|
|
61
|
+
orders.joins(:encounter).where(encounter: { visit_id: visit_id })
|
|
62
|
+
end
|
|
63
|
+
|
|
57
64
|
def unknown_concept_id
|
|
58
65
|
ConceptName.find_by_name!('Unknown').concept_id
|
|
59
66
|
end
|
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.3.
|
|
4
|
+
version: 2.3.1
|
|
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-03-
|
|
11
|
+
date: 2026-03-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: couchrest
|