Module: HealthDataStandards::Export::Helper::Cat1ViewHelper
- Includes:
- ScoopedViewHelper
- Defined in:
- lib/health-data-standards/export/helper/cat1_view_helper.rb
Constant Summary
ScoopedViewHelper::VS_MAP
Instance Method Summary
collapse
#entries_for_data_criteria, #entry_matches_criteria, #handle_clinical_trial_participant, #handle_patient_expired, #handle_payer_information, #unique_data_criteria, #value_set_map
Instance Method Details
#negation_indicator(entry) ⇒ Object
28
29
30
31
32
33
34
|
# File 'lib/health-data-standards/export/helper/cat1_view_helper.rb', line 28
def negation_indicator(entry)
if entry.negation_ind
'negationInd="true"'
else
''
end
end
|
#render_data_criteria(dc_oid, vs_oid, entries) ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/health-data-standards/export/helper/cat1_view_helper.rb', line 7
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
|
#render_patient_data(patient, measures) ⇒ Object
19
20
21
22
23
24
25
26
|
# File 'lib/health-data-standards/export/helper/cat1_view_helper.rb', line 19
def render_patient_data(patient, measures)
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
|