Class: HealthDataStandards::Import::GreenC32::MedicalEquipmentImporter
- Inherits:
-
SectionImporter
- Object
- SectionImporter
- HealthDataStandards::Import::GreenC32::MedicalEquipmentImporter
- Includes:
- Singleton
- Defined in:
- lib/health-data-standards/import/green_c32/medical_equipment_importer.rb
Instance Method Summary collapse
- #import(me_xml) ⇒ Object
-
#initialize ⇒ MedicalEquipmentImporter
constructor
A new instance of MedicalEquipmentImporter.
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
Constructor Details
#initialize ⇒ MedicalEquipmentImporter
Returns a new instance of MedicalEquipmentImporter.
7 8 9 10 |
# File 'lib/health-data-standards/import/green_c32/medical_equipment_importer.rb', line 7 def initialize super @value = "./gc32:quantity" end |
Instance Method Details
#import(me_xml) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/health-data-standards/import/green_c32/medical_equipment_importer.rb', line 12 def import(me_xml) me_xml.root.add_namespace_definition('gc32', "urn:hl7-org:greencda:c32") me_element = me_xml.at_xpath("./gc32:medicalEquipment") me = MedicalEquipment.new extract_entry(me_element, me) me.manufacturer = extract_node_text(me_element.at_xpath("./gc32:manufacturer")).try(:strip) me end |