renalware-core 2.0.118 → 2.0.119

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: 362a3539cb21366fb7702b1e0e6131abbe433e9e6212898ad9a599c80ed67ba7
4
- data.tar.gz: eb33cd22ab7bbda713cfefe9d9cf007eb79bff1ed3dcac72b7a7edb09781a85f
3
+ metadata.gz: 6b20fd2784102f2bc228e130563e12f6cdd028c8236aac107f1379a7ffb87264
4
+ data.tar.gz: c6ed21e356671d93abd5f85f385a0d455ed0b9b88b9af2c94aa2cd8321585808
5
5
  SHA512:
6
- metadata.gz: e502880f5d989ea8741e218033bf9f5235ffd9be6ce2c05229f8da46f06c2f509f254014dfc0363b637b5c6a6fc5e46532af3e2c922bc4e373a352602ca5f115
7
- data.tar.gz: 120370c1f5c9fb3ece4f87f30cae88a33f07d4c2de6077de0a4c5a7adff832b4df862bdefd08459d579ff00c2ffb3d736fa81cd15c7160cee3bde5de6869bc0f
6
+ metadata.gz: c2999fd94caa5f2f4194c4b90e674b03df5f0f650c1bcf0bcf0d04fa762aa959db98d254d33b65339c2e0bc60bde53d268cafc30000abe8cad744a63e4f0b6ff
7
+ data.tar.gz: 6bf213076af4c9481f54f8678aa256260814b2a43a68ad29aa0f97b24f7f3f2bc7f2fbf6c29a671c85ff9b2cb8173b201bf28a9fc2e548081a2538658df838ef
@@ -124,7 +124,6 @@ module Renalware
124
124
 
125
125
  class PatientIdentification < SimpleDelegator
126
126
  alias_attribute :external_id, :patient_id
127
- alias_attribute :sex, :admin_sex
128
127
  alias_attribute :dob, :patient_dob
129
128
  alias_attribute :born_on, :patient_dob
130
129
  alias_attribute :died_at, :death_date
@@ -157,6 +156,15 @@ module Renalware
157
156
  super.split("^")
158
157
  end
159
158
 
159
+ # Try to read sex_admin, but be aware it raises an error if it is not in F|M|O|U|A|N|C
160
+ # in which case append the actual value so we know what is causing the failure.
161
+ def sex
162
+ self[8] = self[8]&.upcase # Sex eg F should always be uppercase so no harm in doing this
163
+ admin_sex
164
+ rescue HL7::InvalidDataError => e
165
+ raise e, "#{e} value is '#{self[8]}'", e.backtrace
166
+ end
167
+
160
168
  private
161
169
 
162
170
  def patient_name
@@ -21,7 +21,7 @@ module Renalware
21
21
  # when :discharge_patient then make_discharge_patient(message)
22
22
  # when :cancel_discharge then make_cancel_discharge(message)
23
23
  # when :add_consultant then make_add_consultant(message)
24
- else :no_matching_command
24
+ else noop
25
25
  end
26
26
  end
27
27
 
@@ -49,6 +49,10 @@ module Renalware
49
49
  Commands::AddOrUpdatePatient.new(message)
50
50
  end
51
51
 
52
+ def noop
53
+ NullObject.instance
54
+ end
55
+
52
56
  # def make_merge_patient(message)
53
57
  # Commands::MergePatient.new(message,
54
58
  # major_patient_finder: make_patient_finder_with_add_if_missing,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Renalware
4
- VERSION = "2.0.118"
4
+ VERSION = "2.0.119"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: renalware-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.118
4
+ version: 2.0.119
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airslie
@@ -878,20 +878,6 @@ dependencies:
878
878
  - - "~>"
879
879
  - !ruby/object:Gem::Version
880
880
  version: 1.0.5
881
- - !ruby/object:Gem::Dependency
882
- name: webpacker
883
- requirement: !ruby/object:Gem::Requirement
884
- requirements:
885
- - - "~>"
886
- - !ruby/object:Gem::Version
887
- version: '4.0'
888
- type: :runtime
889
- prerelease: false
890
- version_requirements: !ruby/object:Gem::Requirement
891
- requirements:
892
- - - "~>"
893
- - !ruby/object:Gem::Version
894
- version: '4.0'
895
881
  - !ruby/object:Gem::Dependency
896
882
  name: whenever
897
883
  requirement: !ruby/object:Gem::Requirement