<commit_before><entry>
  <observation classCode="OBS" moodCode="EVN" <%== negation_indicator(entry) %>>
    <!-- Consolidation Assessment Scale Observation templateId -->
    <templateId root="2.16.840.1.113883.10.20.22.4.69"/>
    <!-- Risk Category Assessment -->
    <templateId root="2.16.840.1.113883.10.20.24.3.69"/>
    <id root="1.3.6.1.4.1.115" extension="<%= entry.id %>"/>
    <%== code_display(entry, 'value_set_map' => value_set_map,'preferred_code_sets' => ['LOINC', 'SNOMED-CT'], 'extra_content' => "sdtc:valueSet=\"#{value_set_oid}\"") %>
    <statusCode code="completed"/>

    <effectiveTime>
      <low <%= value_or_null_flavor(entry.start_time) %>/>
      <high <%= value_or_null_flavor(entry.end_time) %>/>
    </effectiveTime>

    <% ev = entry.values.first
       if ev.present? 
        if ev.respond_to?(:scalar) 
          if is_num?(ev.scalar) -%>
    <value xsi:type="INT" value="<%= ev.scalar %>"/>
         <% else -%>
    <value xsi:type="ST"><%= ev.scalar%></value>
         <% end %>  
       <% else %>
       <%== code_display(entry, 'tag_name'=>'value', 'value_set_map' => value_set_map,'preferred_code_sets' => ['LOINC', 'SNOMED-CT'],'extra_content' =>'xsi:type="CD"') %>
       <% end %>  
    <% else -%>
    <value  xsi:type="CD" nullFlavor="UNK"/>
    <% end -%>
    <%== render(:partial => 'reason', :locals => {:entry => entry, :reason_oids=>field_oids["REASON"]}) %>
  </observation>
</entry><commit_msg>fixing bug in Risk assesment template where it did not use the result_value partail and was incorrectly generating value elements<commit_after><% vals = entry.values || [nil]
   vals.each do |value| %>
<entry>
  <observation classCode="OBS" moodCode="EVN" <%== negation_indicator(entry) %>>
    <!-- Consolidation Assessment Scale Observation templateId -->
    <templateId root="2.16.840.1.113883.10.20.22.4.69"/>
    <!-- Risk Category Assessment -->
    <templateId root="2.16.840.1.113883.10.20.24.3.69"/>
    <id root="1.3.6.1.4.1.115" extension="<%= entry.id %>"/>
    <%== code_display(entry, 'value_set_map' => value_set_map,'preferred_code_sets' => ['LOINC', 'SNOMED-CT'], 'extra_content' => "sdtc:valueSet=\"#{value_set_oid}\"") %>
    <statusCode code="completed"/>

    <effectiveTime>
      <low <%= value_or_null_flavor(entry.start_time) %>/>
      <high <%= value_or_null_flavor(entry.end_time) %>/>
    </effectiveTime>
    <%== render(:partial => 'result_value', :locals => {:values => [value], :result_oids=>result_oids} ) %>
    <%== render(:partial => 'reason', :locals => {:entry => entry, :reason_oids=>field_oids["REASON"]}) %>
  </observation>
</entry>
<% end %>
{'fraction_non_alphanumeric': 0.21631878557874762, 'fraction_numerical': 0.040227703984819736, 'mean_word_length': 3.7753623188405796, 'pattern_counts': {'":': 0, '<': 60, '<?xml version=': 0, '>': 82, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2400429', 'n_tokens_mistral': 1048, 'n_tokens_neox': 942, 'n_words': 151}