Class: HealthDataStandards::Import::CDA::CommunicationImporter

Inherits:
SectionImporter
  • Object
show all
Defined in:
lib/health-data-standards/import/cda/communication_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:entry/cda:act[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.2'] | ./cda:entry/cda:act[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.3'] | ./cda:entry/cda:act[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.4']")) ⇒ CommunicationImporter

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/communication_importer.rb', line 8

def initialize(entry_finder=EntryFinder.new("./cda:entry/cda:act[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.2'] | ./cda:entry/cda:act[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.3'] | ./cda:entry/cda:act[cda:templateId/@root = '2.16.840.1.113883.10.20.24.3.4']"))
  super(entry_finder)
  @entry_class = Communication
  @template_xpath = "./cda:templateId/@root"
  @reference_xpath = "./sdtc:inFulfillmentOf1"
end

Instance Method Details

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



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

def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
  communication = super
  # communication.direction is deprecated as of QDM 5.4
  communication.direction = find_communication_direction(entry_element)
  extract_reason_or_negation(entry_element, communication)
  extract_references(entry_element, communication)
  communication
end