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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4759c82f676bcb96352e1244449b55ee7e69f1b3f9921c7d2af5575ac740e20f
4
- data.tar.gz: f64720e8f4c26663b2a532454112eef362783b2a64be5c0fda4dbabb6e5bcbe3
3
+ metadata.gz: 3b9b42c69084c04d467667d66060481ae92e81db155c9324f76b23b952314c9d
4
+ data.tar.gz: 45fc5ad4564fd35587d7b87a2fd0f578ddd8849b07a84e8818da7d2234ece38f
5
5
  SHA512:
6
- metadata.gz: ddfceb2f396292b11d4f9a74c98484fa8cbc93a3565518227e29d93d4c9ac6de8557c114c5dc26978f6e03f5c0eafd5630de1fbce46dd2635c68847873e8cb16
7
- data.tar.gz: adc5f560e7975ffc33539ec17b66123635e632330137877c05b364d9f00df916b478e1b25ea471cd5b30c948bddb6360d5a0b18edd328b22c09550433fff4cb9
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 "PV"
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
- render partial: "renalware/api/ukrdc/patients/lab_orders/lab_order",
11
- collection: patient.observation_requests,
12
- as: :request,
13
- locals: { builder: builder, patient: patient }
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
@@ -3,32 +3,20 @@ en:
3
3
  blood_pressure:
4
4
  systolic:
5
5
  # code: 76538-8
6
- code: bpsys
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: bpdia
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: weight
16
+ code: QBLG1
17
17
  description: Body weight Measured
18
18
  units: "Kg"
19
19
  height:
20
- code: height
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Renalware
4
- VERSION = "2.0.104"
4
+ VERSION = "2.0.105"
5
5
  end
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.104
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-06 00:00:00.000000000 Z
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