Sha256: f4462bb0b1207ab3eaf3afe46cc27b1f9b31d13622e98363bb9a2a263e5e8763
Contents?: true
Size: 1.63 KB
Versions: 2
Compression:
Stored size: 1.63 KB
Contents
module HealthDataStandards module Export module Helper module Cat1ViewHelper include HealthDataStandards::Export::Helper::ScoopedViewHelper def render_data_criteria(dc_oid, vs_oid, entries) html_array = entries.map do |entry| bundle_id = entry.record ? entry.record["bundle_id"] : nil vs_map = (value_set_map(bundle_id) || {})[vs_oid] binding.pry if vs_map.nil? || vs_map.empty? render(:partial => HealthDataStandards::Export::QRDA::EntryTemplateResolver.partial_for(dc_oid, vs_oid), :locals => {:entry => entry, :value_set_oid => vs_oid, :value_set_map => vs_map}) end html_array.join("\n") end def render_patient_data(patient, measures) HealthDataStandards.logger.warn("Generating CAT I for #{patient.first} #{patient.last}") udcs = unique_data_criteria(measures) data_criteria_html = udcs.map do |udc| entries = entries_for_data_criteria(udc['data_criteria'], patient) render_data_criteria(udc['data_criteria_oid'], udc['value_set_oid'], entries) end data_criteria_html.compact.join("\n") end def negation_indicator(entry) if entry.negation_ind 'negationInd="true"' else '' end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
health-data-standards-3.2.7 | lib/health-data-standards/export/helper/cat1_view_helper.rb |
health-data-standards-3.2.6 | lib/health-data-standards/export/helper/cat1_view_helper.rb |