Sha256: 1a040f34e3c6a463af7b1f434ae77a217a2bb47cdcd4488f6393155f7c3adbfa
Contents?: true
Size: 1.05 KB
Versions: 40
Compression:
Stored size: 1.05 KB
Contents
module HealthDataStandards module Import module GreenC32 class ConditionImporter < SectionImporter include Singleton def initialize super end def import(condition_xml) condition_xml.root.add_namespace_definition('gc32', "urn:hl7-org:greencda:c32") condition_element = condition_xml.xpath("./gc32:condition") condition = Condition.new extract_entry(condition_element, condition) extract_cause_of_death(condition_element, condition) extract_type(condition_element, condition) condition end private def extract_type(condition_xml, condition) type = condition_xml.xpath("./gc32:type").first condition.type = extract_node_text(type) end def extract_cause_of_death(condition_xml, condition) condition.cause_of_death = extract_node_attribute(condition_xml, "causeOfDeath") end end end end end
Version data entries
40 entries across 40 versions & 1 rubygems