templates/cat3/_measure_data.cat3.erb in health-data-standards-3.4.5 vs templates/cat3/_measure_data.cat3.erb in health-data-standards-3.4.6

- old
+ new

@@ -54,12 +54,20 @@ codeSystem="2.16.840.1.113883.5.84" codeSystemName="ObservationMethod"/> </observation> </entryRelationship> <% if population.type == 'MSRPOPL' -%> - <%== render :partial => 'continuous_variable_value', :locals => {:population => strat} %> - <% end -%> + <% + #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 -%> <reference typeCode="REFR"> <externalObservation classCode="OBS" moodCode="EVN"> <id root="<%= strat.id %>"/> </externalObservation> </reference> @@ -114,10 +122,11 @@ :supplemental_data_value_code_system => '2.16.840.1.113883.3.221.5', :count => count} %> <% end -%> <% end -%> <% end -%> <% if population.type == 'MSRPOPL' -%> - <%== render :partial => 'continuous_variable_value', :locals => {:population => aggregate_count.populations.find{|p| p.type == "OBSERV"}}%> + <% observ = aggregate_count.populations.find{|p| p.type == "OBSERV"} %> + <%== render :partial => 'continuous_variable_value', :locals => {:id => observ.id, :value=>observ.value}%> <% end -%> <reference typeCode="REFR"> <externalObservation classCode="OBS" moodCode="EVN"> <id root="<%= population.id %>"/> </externalObservation> \ No newline at end of file