<commit_before>  <div>
    <h2>Measure Calculations</h2>
    <% {  continuous_measures => RecordsHelper::CV_POPULATION_KEYS,
          proportion_measures => RecordsHelper::PROPORTION_POPULATION_KEYS
        }.each do |measures, pop_keys| %>
      <% if measures.length.positive? %>
        <% next if (patient.measure_relevance_hash.keys & measures.map { |m| m.id.to_s }).empty? %>
        <table class="table table-condensed">
          <thead>
            <tr>
              <td></td>
              <% pop_keys.each do |population| %>
                <th scope="col" class="text-center"><%= population_label(@task.bundle, population) %></th>
              <% end %>
            </tr>
          </thead>
          <tbody>
            <% result_values = get_result_values_for_patient(@individual_results, patient.id, pop_keys, 'measure_id') %>
            <% measures.each do |m| %>
              <% m.population_sets_and_stratifications_for_measure.each do |population_set_hash| %>
                <% result_key = "#{m.id}|#{population_set_hash[:population_set_id]}" %>
                <% next unless result_values[result_key] && result_values[result_key]['IPP'] > 0 %>
                <tr>
                  <th class="abbreviated" scope="row">
                    <%= measure_display_name(m, population_set_hash) %>
                  </th>
                  <% result_values[result_key]&.each do |population, value| %><commit_msg>need to use key_for_population_set<commit_after>  <div>
    <h2>Measure Calculations</h2>
    <% {  continuous_measures => RecordsHelper::CV_POPULATION_KEYS,
          proportion_measures => RecordsHelper::PROPORTION_POPULATION_KEYS
        }.each do |measures, pop_keys| %>
      <% if measures.length.positive? %>
        <% next if (patient.measure_relevance_hash.keys & measures.map { |m| m.id.to_s }).empty? %>
        <table class="table table-condensed">
          <thead>
            <tr>
              <td></td>
              <% pop_keys.each do |population| %>
                <th scope="col" class="text-center"><%= population_label(@task.bundle, population) %></th>
              <% end %>
            </tr>
          </thead>
          <tbody>
            <% result_values = get_result_values_for_patient(@individual_results, patient.id, pop_keys, 'measure_id') %>
            <% measures.each do |m| %>
              <% m.population_sets_and_stratifications_for_measure.each do |population_set_hash| %>
                <% result_key = "#{m.id}|#{m.key_for_population_set(population_set_hash)}" %>
                <% next unless result_values[result_key] && result_values[result_key]['IPP'] > 0 %>
                <tr>
                  <th class="abbreviated" scope="row">
                    <%= measure_display_name(m, population_set_hash) %>
                  </th>
                  <% result_values[result_key]&.each do |population, value| %>
{'fraction_non_alphanumeric': 0.14093264248704662, 'fraction_numerical': 0.002072538860103627, 'mean_word_length': 2.2142064372918977, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '6001686', 'n_tokens_mistral': 942, 'n_tokens_neox': 841, 'n_words': 141}