<commit_before><%# @show_bat is needed to show the bat band column %>

<% bat = @bat %>
<% medical_problem = medical_problem_for_bat %>

<tr>
    <% if @show_bat %>
    <td><%= link_to bat.band, :controller => 'bats', :action => 'show', :id => bat %></td>
    <% end %>
    
    <td>
      <%= link_to medical_problem.title, :controller => 'medical_problems', :action => 'show', :id => medical_problem %>
    </td>
    <td>
      <%= link_to medical_problem.user.initials, :controller => 'users', :action => 'show', :id => medical_problem.user %>
    </td>

    <td>
      <%=h nice_date medical_problem.date_opened %>
    </td>
    

    <% if medical_problem.date_closed == nil %>
      <% if @list_all %>
        <td>
          <%=h nice_date medical_problem.date_closed %>
        </td>
      <% end %>
      <td>
        <%= link_to 'Edit', :controller => 'medical_problems', :action => 'edit', :id => medical_problem %>
      </td>
      <td>
        <%= link_to 'Close', :controller => 'medical_problems', :action => 'deactivate', :id => medical_problem %>
      </td>
    <% else %>
      <td>
        <%=h nice_date medical_problem.date_closed %>
      </td>
      <td></td>
      <td>
        <%= link_to 'Reactivate', :controller => 'medical_problems', :action => 'reactivate', :id => medical_problem %>
      </td>
    <% end %>

    <% for proposed_treatment in medical_problem.proposed_treatments.current %>
      <td>
        <%= link_to proposed_treatment.treatment, :controller => 'proposed_treatments', :action => 'show', :id => proposed_treatment %>
      </td>
      <td>
        <% if proposed_treatment.medical_care_actions.today.length > 0 %>
          Done
        <% else %>
          <%= link_to 'Do', :controller => 'medical_care_actions', :action => 'new', :id => proposed_treatment %>
        <% end %>
      </td>
      <td>
        <%= link_to 'End', :controller => 'proposed_treatments', :action => 'deactivate', :id => proposed_treatment %>
      </td>
      </tr>
      <tr>
      <td></td><td></td><td></td><td></td><td></td>
      <% if @list_all %>
        <td></td>
      <% end %>
      <% if @show_bat %>
        <td></td>
      <% end %>
    <% end %><commit_msg>Added parenthesis for future version<commit_after><%# @show_bat is needed to show the bat band column %>

<% bat = @bat %>
<% medical_problem = medical_problem_for_bat %>

<tr>
    <% if @show_bat %>
    <td><%= link_to bat.band, :controller => 'bats', :action => 'show', :id => bat %></td>
    <% end %>
    
    <td>
      <%= link_to medical_problem.title, :controller => 'medical_problems', :action => 'show', :id => medical_problem %>
    </td>
    <td>
      <%= link_to medical_problem.user.initials, :controller => 'users', :action => 'show', :id => medical_problem.user %>
    </td>

    <td>
      <%=h nice_date(medical_problem.date_opened) %>
    </td>
    

    <% if medical_problem.date_closed == nil %>
      <% if @list_all %>
        <td>
          <%=h nice_date(medical_problem.date_closed) %>
        </td>
      <% end %>
      <td>
        <%= link_to 'Edit', :controller => 'medical_problems', :action => 'edit', :id => medical_problem %>
      </td>
      <td>
        <%= link_to 'Close', :controller => 'medical_problems', :action => 'deactivate', :id => medical_problem %>
      </td>
    <% else %>
      <td>
        <%=h nice_date(medical_problem.date_closed) %>
      </td>
      <td></td>
      <td>
        <%= link_to 'Reactivate', :controller => 'medical_problems', :action => 'reactivate', :id => medical_problem %>
      </td>
    <% end %>

    <% for proposed_treatment in medical_problem.proposed_treatments.current %>
      <td>
        <%= link_to proposed_treatment.treatment, :controller => 'proposed_treatments', :action => 'show', :id => proposed_treatment %>
      </td>
      <td>
        <% if proposed_treatment.medical_care_actions.today.length > 0 %>
          Done
        <% else %>
          <%= link_to 'Do', :controller => 'medical_care_actions', :action => 'new', :id => proposed_treatment %>
        <% end %>
      </td>
      <td>
        <%= link_to 'End', :controller => 'proposed_treatments', :action => 'deactivate', :id => proposed_treatment %>
      </td>
      </tr>
      <tr>
      <td></td><td></td><td></td><td></td><td></td>
      <% if @list_all %>
        <td></td>
      <% end %>
      <% if @show_bat %>
        <td></td>
      <% end %>
    <% end %>
{'fraction_non_alphanumeric': 0.19395579612088407, 'fraction_numerical': 0.0004510599909788002, 'mean_word_length': 2.4433229813664594, 'pattern_counts': {'":': 0, '<': 151, '<?xml version=': 0, '>': 207, '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': '6648079', 'n_tokens_mistral': 1656, 'n_tokens_neox': 1435, 'n_words': 309}