Class: HealthDataStandards::Import::CDA::ProcedureImporter

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

Instance Attribute Summary

Attributes inherited from SectionImporter

#check_for_usable, #code_xpath, #status_xpath

Instance Method Summary collapse

Methods inherited from SectionImporter

#create_entries

Methods included from LocatableImportUtils

#import_address, #import_telecom

Constructor Details

#initialize(entry_finder = EntryFinder.new("//cda:section[cda:templateId/@root!='2.16.840.1.113883.3.88.11.83.124']//cda:procedure")) ⇒ ProcedureImporter

scoped to not look in the plan of care section so planned procedures do not end up mixed with past procedures



8
9
10
11
12
13
# File 'lib/health-data-standards/import/cda/procedure_importer.rb', line 8

def initialize(entry_finder=EntryFinder.new("//cda:section[cda:templateId/@root!='2.16.840.1.113883.3.88.11.83.124']//cda:procedure"))
  super(entry_finder)
  @entry_class = Procedure
  @value_xpath = "./cda:value | ./cda:entryRelationship[@typeCode='REFR']/cda:observation/cda:value"
  @ordinality_xpath = "./cda:priorityCode"
end

Instance Method Details

#create_entry(entry_element, nrh = NarrativeReferenceHandler.new) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/health-data-standards/import/cda/procedure_importer.rb', line 15

def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
  procedure = super
  extract_ordinality(entry_element, procedure)
  extract_performer(entry_element, procedure)
  extract_anatomical_target(entry_element, procedure)
  extract_reason_or_negation(entry_element, procedure)
  extract_scalar(entry_element, procedure)
  procedure
end