<commit_before>table.toggleable(data-controller="toggle" )
  thead
    tr
      th.togglers= rows_toggler
      - if Pundit.policy(current_user, Renalware::PD::PETResult).edit? # only eg admin can edit or delete
        th.col-width-tiny
      - if local_assigns.fetch(:display_patient, false)
        th.col-width-medium= t("thead.patient")
      th.col-width-date Date
      th.col-width-tiny
        i.far.fa-check-circle(title="Complete")
      th.col-width-tiny Type
      th.bg-gray-100 D_Pcr
      th.bg-gray-100 netUF
      th Volume in
      th Drain time
      th Infusion time
      th O/N dextrose
      th O/N vol in
      th O/N vol out
      th O/N dwell time
      th.col-width-date=t("thead.updated_at")

    - results.each do |result|
      tbody
        tr
          td= row_toggler
          - if Pundit.policy(current_user, Renalware::PD::PETResult).edit?
            td.actions
              - if Pundit.policy(current_user, result).edit?
                - if local_assigns.fetch(:display_patient, false)
                  = link_to renalware.edit_patient_pd_pet_result_path(result.patient, result)
                    i.fas.fa-external-link-alt
                    |  Edit
                - else
                  = link_to t("btn.edit"), renalware.edit_patient_pd_pet_result_path(result.patient, result)
              - if Pundit.policy(current_user, result).destroy?
                = link_to t("btn.delete"),
                          renalware.patient_pd_pet_result_path(result.patient, result),
                          data: { method: :delete, confirm: "Are you sure?" }
          - if local_assigns.fetch(:display_patient, false)
            td= result.patient
          td= l(result.performed_on)
          -if result.complete?
            td.text-green-500
              i.fas.fa-check-circle(title="Complete")
          - else
            td.text-red-600
              i.far.fa-circle
          th= result.test_type&.text
          th.bg-gray-100= result.d_pcr
          th.bg-gray-100= result.net_uf
          td= result.volume_in
          td= result.drain_time
          td= result.infusion_time
          td= result.overnight_dextrose_concentration
          td= result.overnight_volume_in
          td= result.overnight_volume_out
          td= result.overnight_dwell_time
          td= l(result.updated_at.to_date)
        tr
          td(colspan=14) &nbsp;<commit_msg>Add T4 to PET table<commit_after>table.toggleable(data-controller="toggle" )
  thead
    tr
      th.togglers= rows_toggler
      - if Pundit.policy(current_user, Renalware::PD::PETResult).edit? # only eg admin can edit or delete
        th.col-width-tiny
      - if local_assigns.fetch(:display_patient, false)
        th.col-width-medium= t("thead.patient")
      th.col-width-date Date
      th.col-width-tiny
        i.far.fa-check-circle(title="Complete")
      th.col-width-tiny Type
      th.bg-gray-100 D_Pcr
      th.bg-gray-100 netUF
      th T4
      th Volume in
      th Drain time
      th Infusion time
      th O/N dextrose
      th O/N vol in
      th O/N vol out
      th O/N dwell time
      th.col-width-date=t("thead.updated_at")

    - results.each do |result|
      tbody
        tr
          td= row_toggler
          - if Pundit.policy(current_user, Renalware::PD::PETResult).edit?
            td.actions
              - if Pundit.policy(current_user, result).edit?
                - if local_assigns.fetch(:display_patient, false)
                  = link_to renalware.edit_patient_pd_pet_result_path(result.patient, result)
                    i.fas.fa-external-link-alt
                    |  Edit
                - else
                  = link_to t("btn.edit"), renalware.edit_patient_pd_pet_result_path(result.patient, result)
              - if Pundit.policy(current_user, result).destroy?
                = link_to t("btn.delete"),
                          renalware.patient_pd_pet_result_path(result.patient, result),
                          data: { method: :delete, confirm: "Are you sure?" }
          - if local_assigns.fetch(:display_patient, false)
            td= result.patient
          td= l(result.performed_on)
          -if result.complete?
            td.text-green-500
              i.fas.fa-check-circle(title="Complete")
          - else
            td.text-red-600
              i.far.fa-circle
          th= result.test_type&.text
          th.bg-gray-100= result.d_pcr
          th.bg-gray-100= result.net_uf
          td= result.sample_4hr_time
          td= result.volume_in
          td= result.drain_time
          td= result.infusion_time
          td= result.overnight_dextrose_concentration
          td= result.overnight_volume_in
          td= result.overnight_volume_out
          td= result.overnight_dwell_time
          td= l(result.updated_at.to_date)
        tr
          td(colspan=14) &nbsp;
{'fraction_non_alphanumeric': 0.09727067514877899, 'fraction_numerical': 0.008824132977631849, 'mean_word_length': 1.7412823397075365, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4037579', 'n_tokens_mistral': 1574, 'n_tokens_neox': 1507, 'n_words': 279}