<commit_before><component>
  <!--Diagnostic Results-->
  <section>
    <templateId root="2.16.840.1.113883.172.16.58.3.122" assigningAuthorityName="HITSP/C83"/>
    <templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.28" assigningAuthorityName="IHE PCC"/>
    <!--Diagnostic Results section template-->
    <code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Results"/>
    <title>Diagnostic Results</title>
    <%== render :partial => 'narrative_block', :locals => {:entries => entries, :section => 'results'} %>
    <entry typeCode="DRIV">
      <organizer classCode="BATTERY" moodCode="EVN">
        <templateId root="2.16.840.1.113883.10.20.1.32"/>
        <!--Result organizer template -->
        <id root="<%= UUID.generate %>"/>
        <code nullFlavor="NA"/>
        <statusCode code="completed"/>
        <effectiveTime value="<%= Time.now.utc.to_formatted_s(:number) %>"/>
          <component>
            <procedure classCode="PROC" moodCode="EVN">
              <templateId root="2.16.840.1.113883.172.16.58.3.17" assigningAuthorityName="HITSP C83"/>
              <templateId root="2.16.840.1.113883.10.20.1.29" assigningAuthorityName="CCD"/>
              <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19" assigningAuthorityName="IHE PCC"/>
              <id root="<%= UUID.generate %>"/>
              <code nullFlavor="UNK">
                <originalText><reference value="Unknown"/></originalText>
              </code>
              <text>
                <reference value="Unknown"/>
              </text>
              <statusCode code="completed"/>
              <effectiveTime nullFlavor="UNK"/>
            </procedure>
          </component>
        <% entries.each_with_index do |entry, i| -%>
        <component>
          <observation classCode="OBS" moodCode="EVN">
            <templateId root="2.16.840.1.113883.3.88.11.83.15.1" assigningAuthorityName="HITSP C83"/>
            <templateId root="2.16.840.1.113883.10.20.1.31" assigningAuthorityName="CCD"/>
            <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13" assigningAuthorityName="IHE PCC"/>
            <!-- Result observation template -->
            <id root="<%= UUID.generate %>"/>
            <%== code_display(entry, :preferred_code_sets => ['LOINC', 'SNOMED-CT']) %>
            <text>
              <reference value="#results-desc-<%= i %>"/>
            </text>
            <statusCode code="completed"/>
            <effectiveTime value="<%= Time.at(entry.time).utc.to_formatted_s(:number) %>"/>
            <% if entry.value -%>
            <value xsi:type="PQ" value="<%= entry.value["scalar"] %>" <% if entry.value["units"]-%>unit="<%= entry.value["units"] %>"<% end -%>/>
            <% else -%>
            <value xsi:type="PQ" nullFlavor="UNK"/>
            <% end -%>
          </observation>
        </component>
        <% end -%>
      </organizer>
    </entry>
  </section>
</component><commit_msg>Should be using a String instead of a Symbol to pass the options to code_display<commit_after><component>
  <!--Diagnostic Results-->
  <section>
    <templateId root="2.16.840.1.113883.3.88.11.83.122" assigningAuthorityName="HITSP/C83"/>
    <templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.28" assigningAuthorityName="IHE PCC"/>
    <!--Diagnostic Results section template-->
    <code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Results"/>
    <title>Diagnostic Results</title>
    <%== render :partial => 'narrative_block', :locals => {:entries => entries, :section => 'results'} %>
    <entry typeCode="DRIV">
      <organizer classCode="BATTERY" moodCode="EVN">
        <templateId root="2.16.840.1.113883.10.20.1.32"/>
        <!--Result organizer template -->
        <id root="<%= UUID.generate %>"/>
        <code nullFlavor="NA"/>
        <statusCode code="completed"/>
        <effectiveTime value="<%= Time.now.utc.to_formatted_s(:number) %>"/>
          <component>
            <procedure classCode="PROC" moodCode="EVN">
              <templateId root="2.16.840.1.113883.3.88.11.83.17" assigningAuthorityName="HITSP C83"/>
              <templateId root="2.16.840.1.113883.10.20.1.29" assigningAuthorityName="CCD"/>
              <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19" assigningAuthorityName="IHE PCC"/>
              <id root="<%= UUID.generate %>"/>
              <code nullFlavor="UNK">
                <originalText><reference value="Unknown"/></originalText>
              </code>
              <text>
                <reference value="Unknown"/>
              </text>
              <statusCode code="completed"/>
              <effectiveTime nullFlavor="UNK"/>
            </procedure>
          </component>
        <% entries.each_with_index do |entry, i| -%>
        <component>
          <observation classCode="OBS" moodCode="EVN">
            <templateId root="2.16.840.1.113883.3.88.11.83.15.1" assigningAuthorityName="HITSP C83"/>
            <templateId root="2.16.840.1.113883.10.20.1.31" assigningAuthorityName="CCD"/>
            <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13" assigningAuthorityName="IHE PCC"/>
            <!-- Result observation template -->
            <id root="<%= UUID.generate %>"/>
            <%== code_display(entry, 'preferred_code_sets' => ['LOINC', 'SNOMED-CT']) %>
            <text>
              <reference value="#results-desc-<%= i %>"/>
            </text>
            <statusCode code="completed"/>
            <effectiveTime value="<%= Time.at(entry.time).utc.to_formatted_s(:number) %>"/>
            <% if entry.value -%>
            <value xsi:type="PQ" value="<%= entry.value["scalar"] %>" <% if entry.value["units"]-%>unit="<%= entry.value["units"] %>"<% end -%>/>
            <% else -%>
            <value xsi:type="PQ" nullFlavor="UNK"/>
            <% end -%>
          </observation>
        </component>
        <% end -%>
      </organizer>
    </entry>
  </section>
</component>
{'fraction_non_alphanumeric': 0.1919852448021462, 'fraction_numerical': 0.07042253521126761, 'mean_word_length': 2.250681198910082, 'pattern_counts': {'":': 0, '<': 147, '<?xml version=': 0, '>': 157, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 24, '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': '6481641', 'n_tokens_mistral': 2199, 'n_tokens_neox': 1948, 'n_words': 301}