<commit_before><tr>
    <% if show_bat %>
    <td><%= link_to medical_problem.bat.band, :controller => 'bats', :action => 'show', :id => medical_problem.bat %></td>
    <td><%= link_to medical_problem.bat.cage.name, :controller => 'cages', :action => :show, :id => medical_problem.bat.cage %></td>
    <% end %>
    
    <td>
      <%= link_to medical_problem.title, :controller => 'medical_problems', :action => 'show', :id => medical_problem %>
    </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 medical_treatment in medical_problem.medical_treatments.current %>
      <td>
        <%= link_to medical_treatment.title, :controller => 'medical_treatments', :action => 'show', :id => medical_treatment%>
      </td>
      <td>
        <% if medical_treatment.done_today == true %>
          Done
        <% elsif medical_treatment.tasks.medical_tasks_today.length > 0 %>
          [<%= link_to 'Do', :controller => 'tasks', :action => 'do_medical_task', :id => medical_treatment.todays_task %>]
				<% else %>
          [<%= link_to 'Create Medical Tasks', :controller => 'medical_treatments', :action=>:show, :id=> medical_treatment %>]
        <% end %>
      </td>
      <td>
        [<%= link_to 'End', {:controller => 'medical_treatments', :action => 'destroy_medical_treatment', :id => medical_treatment}, :confirm => 'Are you sure?', :method => :post %>]
      </td>
			<% if medical_treatment.tasks.current.length < 7 %>
			<td><warning>Treatment not given every day</warning></td>
			<% end %>
      </tr>
      <tr>
      <td></td><td></td><td></td><td></td>
      <% if @list_all %>
        <td></td>
      <% end %>
      <% if show_bat %>
        <td></td>
      <% end %>
    <% end %>
    <% if medical_problem.date_closed == nil %>
      <td>[<%= link_to 'Add New Treatment', :controller => 'medical_treatments', :action => 'new', :id => medical_problem %>]</td>
    <% end %>
		<% if (medical_problem.medical_treatments.current.length == 0) && (medical_problem.date_closed == nil) %>
			<td></td>
			<td></td>
			<td><warning>No treatment</warning></td>
		<% end %>
    </tr>
<tr><td colspan = 10><hr /></td></tr><commit_msg>fixing misaligned table items<commit_after><tr>
    <% if show_bat %>
    <td><%= link_to medical_problem.bat.band, :controller => 'bats', :action => 'show', :id => medical_problem.bat %></td>
    <td><%= link_to medical_problem.bat.cage.name, :controller => 'cages', :action => :show, :id => medical_problem.bat.cage %></td>
    <% end %>
    
    <td>
      <%= link_to medical_problem.title, :controller => 'medical_problems', :action => 'show', :id => medical_problem %>
    </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 medical_treatment in medical_problem.medical_treatments.current %>
      <td>
        <%= link_to medical_treatment.title, :controller => 'medical_treatments', :action => 'show', :id => medical_treatment%>
      </td>
      <td>
        <% if medical_treatment.done_today == true %>
          Done
        <% elsif medical_treatment.tasks.medical_tasks_today.length > 0 %>
          [<%= link_to 'Do', :controller => 'tasks', :action => 'do_medical_task', :id => medical_treatment.todays_task %>]
				<% else %>
          [<%= link_to 'Create Medical Tasks', :controller => 'medical_treatments', :action=>:show, :id=> medical_treatment %>]
        <% end %>
      </td>
      <td>
        [<%= link_to 'End', {:controller => 'medical_treatments', :action => 'destroy_medical_treatment', :id => medical_treatment}, :confirm => 'Are you sure?', :method => :post %>]
      </td>
			<% if medical_treatment.tasks.current.length < 7 %>
			<td><warning>Treatment not given every day</warning></td>
			<% end %>
      </tr>
      <tr>
      <td></td><td></td><td></td><td></td>
      <% if @list_all %>
        <td></td>
      <% end %>
      <% if show_bat %>
        <td></td><td></td>
      <% end %>
    <% end %>
    <% if medical_problem.date_closed == nil %>
      <td>[<%= link_to 'Add New Treatment', :controller => 'medical_treatments', :action => 'new', :id => medical_problem %>]</td>
    <% end %>
		<% if (medical_problem.medical_treatments.current.length == 0) && (medical_problem.date_closed == nil) %>
			<td></td>
			<td></td>
			<td><warning>No treatment</warning></td>
		<% end %>
    </tr>
<tr><td colspan = 10><hr /></td></tr>
{'fraction_non_alphanumeric': 0.2013733905579399, 'fraction_numerical': 0.0017167381974248926, 'mean_word_length': 2.775761503564485, 'pattern_counts': {'":': 0, '<': 203, '<?xml version=': 0, '>': 273, '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': '374605', 'n_tokens_mistral': 2241, 'n_tokens_neox': 1896, 'n_words': 392}