Class: HealthDataStandards::Import::GreenC32::ProcedureImporter

Inherits:
SectionImporter
  • Object
show all
Includes:
Singleton
Defined in:
lib/health-data-standards/import/green_c32/procedure_importer.rb

Instance Method Summary collapse

Methods inherited from SectionImporter

#extract_address, #extract_code, #extract_description, #extract_effective_time, #extract_entry, #extract_facility, #extract_free_text, #extract_interval, #extract_name, #extract_organization, #extract_quantity, #extract_status, #extract_telecom, #extract_time, #extract_value, #generic_import

Constructor Details

#initializeProcedureImporter

Returns a new instance of ProcedureImporter.



8
9
10
# File 'lib/health-data-standards/import/green_c32/procedure_importer.rb', line 8

def initialize
  super
end

Instance Method Details

#import(procedure_xml) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/health-data-standards/import/green_c32/procedure_importer.rb', line 12

def import(procedure_xml)
  procedure_xml.root.add_namespace_definition('gc32', "urn:hl7-org:greencda:c32")
  
  procedure_element = procedure_xml.xpath("./gc32:procedure")
  
  procedure = Procedure.new
  
  extract_entry(procedure_element, procedure)
  extract_code(procedure_element, procedure, xpath="./gc32:site", attribute=:site)
  procedure
end