diff --git a/lib/fhir_models/bootstrap/json.rb b/lib/fhir_models/bootstrap/json.rb index 5a07654e..d156b26a 100644 --- a/lib/fhir_models/bootstrap/json.rb +++ b/lib/fhir_models/bootstrap/json.rb @@ -18,7 +18,7 @@ def self.from_json(json, namespace = FHIR) klass = namespace.const_get(resource_type) resource = klass.new(hash) rescue => ex - FHIR.logger.error("Failed to deserialize JSON:\n#{ex.backtrace}") + FHIR.logger.debug("Failed to deserialize JSON:\n#{ex.backtrace}") FHIR.logger.debug("JSON:\n#{json}") resource = nil end diff --git a/lib/fhir_models/bootstrap/model.rb b/lib/fhir_models/bootstrap/model.rb index f69bf31e..ac6ac6c1 100644 --- a/lib/fhir_models/bootstrap/model.rb +++ b/lib/fhir_models/bootstrap/model.rb @@ -283,7 +283,7 @@ def primitive?(datatype, value) def check_binding_uri(uri, value) valid = false # Strip off the |4.0.0 or |4.0.1 or |2014-03-26 or similar from the ends of URLs - uri&.gsub!(/\|[A-Za-z0-9\.\-]*/, '') + uri = uri&.gsub(/\|[A-Za-z0-9\.\-]*/, '') valueset = fhir_definitions.get_codes(uri) if uri == 'http://hl7.org/fhir/ValueSet/mimetypes' || uri == 'http://www.rfc-editor.org/bcp/bcp13.txt' diff --git a/lib/fhir_models/bootstrap/xml.rb b/lib/fhir_models/bootstrap/xml.rb index 4c53289a..0237ed53 100644 --- a/lib/fhir_models/bootstrap/xml.rb +++ b/lib/fhir_models/bootstrap/xml.rb @@ -135,7 +135,7 @@ def self.from_xml(xml, namespace = FHIR) hash = xml_node_to_hash(doc.root, namespace, klass) resource = klass.new(hash) rescue => ex - FHIR.logger.error("Failed to deserialize XML:\n#{ex.backtrace}") + FHIR.logger.debug("Failed to deserialize XML:\n#{ex.backtrace}") FHIR.logger.debug("XML:\n#{xml}") resource = nil end diff --git a/lib/fhir_models/fhirpath/evaluate.rb b/lib/fhir_models/fhirpath/evaluate.rb index 1cc05d82..5263c863 100644 --- a/lib/fhir_models/fhirpath/evaluate.rb +++ b/lib/fhir_models/fhirpath/evaluate.rb @@ -19,8 +19,8 @@ def self.get(key, hash) return 'http://unitsofmeasure.org' if key == '%ucum' return 'http://snomed.info/sct' if key == '%sct' return 'http://loinc.org' if key == '%loinc' - return key.gsub!(/\A\'|\'\Z/, '') if key.start_with?("'") && key.end_with?("'") - key.gsub!(/\A"|"\Z/, '') # remove quotes around path if they exist + return key.gsub(/\A\'|\'\Z/, '') if key.start_with?("'") && key.end_with?("'") + key = key.gsub(/\A"|"\Z/, '') # remove quotes around path if they exist if hash.is_a?(Array) response = [] hash.each do |e|