Class: HealthDataStandards::Import::CDA::EncounterImporter
- Inherits:
-
SectionImporter
- Object
- SectionImporter
- HealthDataStandards::Import::CDA::EncounterImporter
- Defined in:
- lib/health-data-standards/import/cda/encounter_importer.rb
Overview
TODO Extract Discharge Disposition
Direct Known Subclasses
HealthDataStandards::Import::CCDA::EncounterImporter, HealthDataStandards::Import::Cat1::EncounterOrderImporter, HealthDataStandards::Import::Cat1::EncounterPerformedImporter
Instance Attribute Summary
Attributes inherited from SectionImporter
#check_for_usable, #code_xpath, #status_xpath
Instance Method Summary collapse
- #create_entry(entry_element, nrh = NarrativeReferenceHandler.new) ⇒ Object
-
#initialize(entry_finder = EntryFinder.new("//cda:section[cda:templateId/@root='2.16.840.1.113883.3.88.11.83.127']/cda:entry/cda:encounter")) ⇒ EncounterImporter
constructor
A new instance of EncounterImporter.
Methods inherited from SectionImporter
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.127']/cda:entry/cda:encounter")) ⇒ EncounterImporter
Returns a new instance of EncounterImporter.
7 8 9 10 11 |
# File 'lib/health-data-standards/import/cda/encounter_importer.rb', line 7 def initialize(entry_finder=EntryFinder.new("//cda:section[cda:templateId/@root='2.16.840.1.113883.3.88.11.83.127']/cda:entry/cda:encounter")) super(entry_finder) @reason_xpath = "./cda:entryRelationship[@typeCode='RSON']/cda:act" @entry_class = Encounter end |
Instance Method Details
#create_entry(entry_element, nrh = NarrativeReferenceHandler.new) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/health-data-standards/import/cda/encounter_importer.rb', line 13 def create_entry(entry_element, nrh = NarrativeReferenceHandler.new) encounter = super extract_performer(entry_element, encounter) extract_facility(entry_element, encounter) extract_reason(entry_element, encounter, nrh) extract_negation(entry_element, encounter) extract_admission(entry_element, encounter) extract_discharge_disposition(entry_element, encounter) extract_transfers(entry_element, encounter) encounter end |