Sha256: 8498a93dceb1764888321a668f847f10c7646b4e8598e11fe830df99e1081f52
Contents?: true
Size: 1.14 KB
Versions: 6
Compression:
Stored size: 1.14 KB
Contents
module HealthDataStandards module Import module CDA class ResultImporter < SectionImporter def initialize(entry_finder=EntryFinder.new("//cda:observation[cda:templateId/@root='2.16.840.1.113883.3.88.11.83.15.1'] | //cda:observation[cda:templateId/@root='2.16.840.1.113883.3.88.11.83.15']")) super(entry_finder) @entry_class = LabResult end def create_entry(entry_element, nrh = NarrativeReferenceHandler.new) result = super extract_value(entry_element, result) extract_interpretation(entry_element, result) extract_negation(entry_element, result) result end private def extract_interpretation(parent_element, result) interpretation_element = parent_element.at_xpath("./cda:interpretationCode") if interpretation_element code = interpretation_element['code'] code_system = CodeSystemHelper.code_system_for(interpretation_element['codeSystem']) result.interpretation = {'code' => code, 'codeSystem' => code_system} end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems