renalware-core 2.0.104 → 2.0.105
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/renalware/api/ukrdc/patients/_hd_session_observations.xml.builder +1 -1
- data/app/views/renalware/api/ukrdc/patients/_lab_orders.xml.builder +38 -4
- data/app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder.dead +42 -0
- data/app/views/renalware/api/ukrdc/patients/lab_orders/{_result_item.xml.builder → _result_item.xml.builder.dead} +0 -0
- data/config/locales/loinc_codes.yml +4 -16
- data/db/migrate/20190909084425_add_columns_to_support_data_migration.rb +15 -0
- data/lib/renalware/version.rb +1 -1
- metadata +5 -4
- data/app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder +0 -48
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b9b42c69084c04d467667d66060481ae92e81db155c9324f76b23b952314c9d
|
4
|
+
data.tar.gz: 45fc5ad4564fd35587d7b87a2fd0f578ddd8849b07a84e8818da7d2234ece38f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dda5b2284b0a3fc51cd33c5df151d1949f4ac40671ef086b55fc25672259ea52f280dd59fcca51aa213b98df726306ed0fbde98560797014f2f3ca5215a82b61
|
7
|
+
data.tar.gz: e093eb880bb2c8b5e0c36ead99dac1736a33bdc6fa9e0e26098317714fdd55d18abf3bc25e8eb5d91c1a8879327a6b1ccb05cd32e4bfece83c8d0c1fb904c9aa
|
@@ -21,7 +21,7 @@ observation_times = {
|
|
21
21
|
xml.Observation do
|
22
22
|
xml.ObservationTime observation_times[pre_post].iso8601
|
23
23
|
xml.ObservationCode do
|
24
|
-
xml.CodingStandard "
|
24
|
+
xml.CodingStandard "UKRR"
|
25
25
|
xml.Code I18n.t("loinc.#{i18n_key}.code")
|
26
26
|
xml.Description I18n.t("loinc.#{i18n_key}.description")
|
27
27
|
end
|
@@ -7,8 +7,42 @@ xml.LabOrders(
|
|
7
7
|
start: patient.changes_since.to_date.iso8601,
|
8
8
|
stop: patient.changes_up_until.to_date.iso8601
|
9
9
|
) do
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
patient.observation_requests.each do |request|
|
11
|
+
xml.LabOrder do
|
12
|
+
xml.PlacerId request.placer_id
|
13
|
+
xml.OrderCategory do
|
14
|
+
xml.Code request.description.code
|
15
|
+
end
|
16
|
+
xml.SpecimenCollectedTime request.requested_at&.iso8601
|
17
|
+
xml.SpecimenSource request.description.bottle_type
|
18
|
+
xml.ResultItems do
|
19
|
+
request.observations.each do |observation|
|
20
|
+
observation = Renalware::Pathology::ObservationPresenter.new(observation)
|
21
|
+
observation = Renalware::UKRDC::PathologyObservationPresenter.new(observation)
|
22
|
+
|
23
|
+
xml.ResultItem do
|
24
|
+
xml.EnteredOn observation.updated_at&.iso8601
|
25
|
+
xml.PrePost observation.pre_post(patient_is_on_hd: patient.current_modality_hd?)
|
26
|
+
xml.ServiceId do
|
27
|
+
xml.CodingStandard observation.coding_standard
|
28
|
+
xml.Code observation.code
|
29
|
+
xml.Description observation.description_name
|
30
|
+
end
|
31
|
+
|
32
|
+
# If the rrr_type of the observation_descriptions is interpretation (ie an interpretted result
|
33
|
+
# like POS NEG)
|
34
|
+
if observation.rr_type_interpretation?
|
35
|
+
xml.InterpretationCodes observation.interpretation_code
|
36
|
+
else
|
37
|
+
xml.ResultValue observation.result
|
38
|
+
xml.ResultValueUnits observation.measurement_unit_name
|
39
|
+
end
|
40
|
+
|
41
|
+
xml.ObservationTime observation.observed_at&.iso8601
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
xml.EnteredOn request.requested_at.iso8601
|
46
|
+
end
|
47
|
+
end
|
14
48
|
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# See HL7 spec http://pacs.hk/Doc/HL7/Hl7V231.pdf
|
4
|
+
|
5
|
+
xml = builder
|
6
|
+
|
7
|
+
xml.LabOrder do
|
8
|
+
xml.PlacerId request.placer_id
|
9
|
+
xml.OrderCategory do
|
10
|
+
xml.Code request.description.code
|
11
|
+
end
|
12
|
+
xml.SpecimenCollectedTime request.requested_at&.iso8601
|
13
|
+
xml.SpecimenSource request.description.bottle_type
|
14
|
+
xml.ResultItems do
|
15
|
+
request.observations.each do |observation|
|
16
|
+
observation = Renalware::Pathology::ObservationPresenter.new(observation)
|
17
|
+
observation = Renalware::UKRDC::PathologyObservationPresenter.new(observation)
|
18
|
+
|
19
|
+
xml.ResultItem do
|
20
|
+
xml.EnteredOn observation.updated_at&.iso8601
|
21
|
+
xml.PrePost observation.pre_post(patient_is_on_hd: patient.current_modality_hd?)
|
22
|
+
xml.ServiceId do
|
23
|
+
xml.CodingStandard observation.coding_standard
|
24
|
+
xml.Code observation.code
|
25
|
+
xml.Description observation.description_name
|
26
|
+
end
|
27
|
+
|
28
|
+
# If the rrr_type of the observation_descriptions is interpretation (ie an interpretted result
|
29
|
+
# like POS NEG)
|
30
|
+
if observation.rr_type_interpretation?
|
31
|
+
xml.InterpretationCodes observation.interpretation_code
|
32
|
+
else
|
33
|
+
xml.ResultValue observation.result
|
34
|
+
xml.ResultValueUnits observation.measurement_unit_name
|
35
|
+
end
|
36
|
+
|
37
|
+
xml.ObservationTime observation.observed_at&.iso8601
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
xml.EnteredOn request.requested_at.iso8601
|
42
|
+
end
|
File without changes
|
@@ -3,32 +3,20 @@ en:
|
|
3
3
|
blood_pressure:
|
4
4
|
systolic:
|
5
5
|
# code: 76538-8
|
6
|
-
code:
|
6
|
+
code: QBLG3
|
7
7
|
description: Blood pressure device Cuff pressure.systolic
|
8
8
|
units: "mmHg"
|
9
9
|
diastolic:
|
10
10
|
# code: 76539-6
|
11
|
-
code:
|
11
|
+
code: QBLG4
|
12
12
|
description: Blood pressure device Cuff pressure.diastolic
|
13
13
|
units: "mmHg"
|
14
14
|
weight:
|
15
15
|
# code: 3141-9
|
16
|
-
code:
|
16
|
+
code: QBLG1
|
17
17
|
description: Body weight Measured
|
18
18
|
units: "Kg"
|
19
19
|
height:
|
20
|
-
code:
|
20
|
+
code: QBLGB
|
21
21
|
description: Height Measured
|
22
22
|
units: "cm"
|
23
|
-
temperature:
|
24
|
-
code: temperature
|
25
|
-
description: Temperature
|
26
|
-
units: "C"
|
27
|
-
bm_stix:
|
28
|
-
code: bm_stix
|
29
|
-
description: bm_stix
|
30
|
-
units: "?"
|
31
|
-
respiratory_rate:
|
32
|
-
code: respiratory_rate
|
33
|
-
description: respiratory_rate
|
34
|
-
units: "?"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class AddColumnsToSupportDataMigration < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
within_renalware_schema do
|
4
|
+
add_column :admission_admissions, :feed_id, :string, index: true
|
5
|
+
add_column :clinic_appointments, :feed_id, :string, index: true
|
6
|
+
add_reference(
|
7
|
+
:clinic_appointments,
|
8
|
+
:consultant,
|
9
|
+
index: true,
|
10
|
+
foreign_key: { to_table: :renal_consultants }
|
11
|
+
)
|
12
|
+
add_column :clinic_appointments, :clinic_description, :text
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/renalware/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: renalware-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.105
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airslie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_type
|
@@ -2163,8 +2163,8 @@ files:
|
|
2163
2163
|
- app/views/renalware/api/ukrdc/patients/_surveys.xml.builder
|
2164
2164
|
- app/views/renalware/api/ukrdc/patients/_treatments.xml.builder
|
2165
2165
|
- app/views/renalware/api/ukrdc/patients/diagnoses/_cause_of_death.xml.builder
|
2166
|
-
- app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder
|
2167
|
-
- app/views/renalware/api/ukrdc/patients/lab_orders/_result_item.xml.builder
|
2166
|
+
- app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder.dead
|
2167
|
+
- app/views/renalware/api/ukrdc/patients/lab_orders/_result_item.xml.builder.dead
|
2168
2168
|
- app/views/renalware/api/ukrdc/patients/observations/_blood_pressure.xml.builder
|
2169
2169
|
- app/views/renalware/api/ukrdc/patients/observations/_standing_blood_pressure.xml.builder
|
2170
2170
|
- app/views/renalware/api/ukrdc/patients/observations/_weight.xml.builder
|
@@ -3547,6 +3547,7 @@ files:
|
|
3547
3547
|
- db/migrate/20190823051014_add_hidden_colum_to_event_types.rb
|
3548
3548
|
- db/migrate/20190823105642_add_asked_for_write_access_to_users.rb
|
3549
3549
|
- db/migrate/20190830082736_add_pd_regime_columns_for_blt.rb
|
3550
|
+
- db/migrate/20190909084425_add_columns_to_support_data_migration.rb
|
3550
3551
|
- db/seeds.rb
|
3551
3552
|
- db/seeds/default/accesses/access_pd_catheter_insertion_techniques.csv
|
3552
3553
|
- db/seeds/default/accesses/access_pd_catheter_insertion_techniques.rb
|
@@ -1,48 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# See HL7 spec http://pacs.hk/Doc/HL7/Hl7V231.pdf
|
4
|
-
|
5
|
-
xml = builder
|
6
|
-
|
7
|
-
xml.LabOrder do
|
8
|
-
# xml.ReceivingLocation do
|
9
|
-
# xml.Code ""
|
10
|
-
# xml.Description # request.pathology_lab.name
|
11
|
-
# end
|
12
|
-
xml.PlacerId request.placer_id
|
13
|
-
# xml.FillerId "??ORC:3 Labs Order Id"
|
14
|
-
# xml.OrderedBy do
|
15
|
-
# xml.Code "unknown"
|
16
|
-
# xml.Description request.requestor_name
|
17
|
-
# end
|
18
|
-
# xml.OrderItem do
|
19
|
-
# xml.comment! "Code TODO: LOIN code for request E.g. MB from 'OBR|1|^PCS|09B0099478^LA|FBC^FULL BLOOD COUNT^MB|..'"
|
20
|
-
# xml.Code
|
21
|
-
# end
|
22
|
-
xml.OrderCategory do
|
23
|
-
xml.Code request.description.code
|
24
|
-
# xml.CodingStandard "LOCAL"
|
25
|
-
# xml.Description "Standard Renal Tests"
|
26
|
-
end
|
27
|
-
xml.SpecimenCollectedTime request.requested_at&.iso8601
|
28
|
-
# xml.SpecimenReceivedTime "TODO"
|
29
|
-
xml.SpecimenSource request.description.bottle_type
|
30
|
-
# xml.Duration "OBR:27.3 but no available in the example messages I have"
|
31
|
-
|
32
|
-
xml.ResultItems do
|
33
|
-
render partial: "renalware/api/ukrdc/patients/lab_orders/result_item",
|
34
|
-
collection: request.observations,
|
35
|
-
as: :observation,
|
36
|
-
locals: { builder: builder, patient: patient }
|
37
|
-
end
|
38
|
-
|
39
|
-
# xml.PatientClass do
|
40
|
-
# xml.CodingStandard "HL7_0004"
|
41
|
-
# xml.Code "e.g. I for Inpatient"
|
42
|
-
# xml.Description "e.g. Inpatient"
|
43
|
-
# end
|
44
|
-
xml.EnteredOn request.requested_at.iso8601
|
45
|
-
# xml.EnteredAt do
|
46
|
-
# xml.code "location code here"
|
47
|
-
# end
|
48
|
-
end
|