<% population.stratifications.each do |strat| -%> Stratum <% if population.type == 'MSRPOPL' -%> <% #need to lookup the observation population entry and then find the stratification entry for it observ = aggregate_count.populations.find{|p| p.type == "OBSERV"} obs_strat = observ.stratifications.find{|s| s.id == strat.id} if obs_strat %> <%== render :partial => 'continuous_variable_value', :locals => {:id => observ.id, :value=>obs_strat.value } %> <% end end -%> <% end -%> <% if population.supplemental_data.present? -%> <% sex_supplimental_data = population.supplemental_data["SEX"] if sex_supplimental_data.present? sex_supplimental_data.each do |sex, count| -%> <%== render :partial => 'supplemental_data', :locals => {:template_name => 'Sex Supplemental Data', :template_id => '2.16.840.1.113883.10.20.27.3.6', :supplemental_data_code => '184100006', :supplemental_data_code_system => '2.16.840.1.113883.6.96', :supplemental_data_value_code => sex, :supplemental_data_value_code_system => '2.16.840.1.113883.5.1', :count => count} %> <% end -%> <% end -%> <% ethnicity_supplimental_data = population.supplemental_data["ETHNICITY"] if ethnicity_supplimental_data.present? ethnicity_supplimental_data.each do |ethnicity, count| -%> <%== render :partial => 'supplemental_data', :locals => {:template_name => 'Ethnicity Supplemental Data', :template_id => '2.16.840.1.113883.10.20.27.3.7', :supplemental_data_code => '364699009', :supplemental_data_code_system => '2.16.840.1.113883.6.96', :supplemental_data_value_code => ethnicity, :supplemental_data_value_code_system => '2.16.840.1.113883.6.238', :count => count} %> <% end -%> <% end -%> <% race_supplimental_data = population.supplemental_data["RACE"] if race_supplimental_data.present? race_supplimental_data.each do |race, count| -%> <%== render :partial => 'supplemental_data', :locals => {:template_name => 'Race Supplemental Data', :template_id => '2.16.840.1.113883.10.20.27.3.8', :supplemental_data_code => '103579009', :supplemental_data_code_system => '2.16.840.1.113883.6.96', :supplemental_data_value_code => race, :supplemental_data_value_code_system => '2.16.840.1.113883.6.238', :count => count} %> <% end -%> <% end -%> <% payer_supplimental_data = population.supplemental_data["PAYER"] if payer_supplimental_data.present? payer_supplimental_data.each do |payer, count| -%> <%== render :partial => 'supplemental_data', :locals => {:template_name => 'Payer Supplemental Data', :template_id => '2.16.840.1.113883.10.20.27.3.9', :supplemental_data_code => '48768-6', :supplemental_data_code_system => '2.16.840.1.113883.6.1', :supplemental_data_value_code => payer, :supplemental_data_value_code_system => '2.16.840.1.113883.3.221.5', :count => count} %> <% end -%> <% end -%> <% end -%> <% if population.type == 'MSRPOPL' -%> <% observ = aggregate_count.populations.find{|p| p.type == "OBSERV"} %> <%== render :partial => 'continuous_variable_value', :locals => {:id => observ.id, :value=>observ.value}%> <% end -%>