Class: HealthDataStandards::Import::GreenC32::AllergyImporter
- Inherits:
-
SectionImporter
- Object
- SectionImporter
- HealthDataStandards::Import::GreenC32::AllergyImporter
- Includes:
- Singleton
- Defined in:
- lib/health-data-standards/import/green_c32/allergy_importer.rb
Instance Method Summary collapse
Methods inherited from SectionImporter
#extract_address, #extract_code, #extract_description, #extract_effective_time, #extract_entry, #extract_facility, #extract_interval, #extract_name, #extract_organization, #extract_quantity, #extract_status, #extract_telecom, #extract_time, #extract_value, #generic_import, #initialize
Constructor Details
This class inherits a constructor from HealthDataStandards::Import::GreenC32::SectionImporter
Instance Method Details
#import(allergy_xml) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/health-data-standards/import/green_c32/allergy_importer.rb', line 7 def import(allergy_xml) allergy_xml.root.add_namespace_definition('gc32', "urn:hl7-org:greencda:c32") allergy_element = allergy_xml.xpath("./gc32:allergy") allergy = Allergy.new extract_entry(allergy_element, allergy) extract_code(allergy_element, allergy, "./gc32:type", :type) extract_code(allergy_element, allergy, "./gc32:reaction", :reaction) extract_code(allergy_element, allergy, "./gc32:severity", :severity) allergy end |