<commit_before>.modality-form
  = m.hidden_field :id

  = m.hidden_field :patient_id

  %li
    / TODO hidden
    = m.label :user_id, "Entered By"
    = m.text_field :user_id

  %li
    = m.label :modality_code_id, "Modality"
    = m.collection_select :modality_code_id, ModalityCode.all, :id, :name, {}, :id => "modality-code-select" 
  
  .row  
    %li.large-2.columns
      = link_to "Cause of Death", death_update_patient_path, {:style => m.object.modality_code.name == "Death" ? 'display:block' : 'display:none', class: "update-death button tiny mt"}
   
  %li
    = m.label :modal_change_type, "Type of Change"
    = m.select :modal_change_type, modal_change_options(m.object.modal_change_type), {}, :class => "modal-change-type"  
  %li
    = m.label :modality_reason_id, "Reason for Change"
    = m.collection_select :modality_reason_id, modal_reasons_for(m.object.modal_change_type), :id, :description, {}, :class => "modality-reason-select"
  
  %li
    = link_to "Renal Registry Reason for Change Codes", modality_reasons_path, class: "button tiny mt"

  %li<commit_msg>Fixing issues with displaying cause of death link when selecting death modal<commit_after>.modality-form
  = m.hidden_field :id

  = m.hidden_field :patient_id

  %li
    / TODO hidden
    = m.label :user_id, "Entered By"
    = m.text_field :user_id

  %li
    = m.label :modality_code_id, "Modality"
    = m.collection_select :modality_code_id, ModalityCode.all, :id, :name, {}, :id => "modality-code-select" 
  
  .row  
    %li.large-2.columns
      = link_to "Cause of Death", death_update_patient_path, {:style => m.object.modality_code.blank? || m.object.modality_code.name == "Death" ? 'display:block' : 'display:none', class: "update-death button tiny mt"}
   
  %li
    = m.label :modal_change_type, "Type of Change"
    = m.select :modal_change_type, modal_change_options(m.object.modal_change_type), {}, :class => "modal-change-type"  
  %li
    = m.label :modality_reason_id, "Reason for Change"
    = m.collection_select :modality_reason_id, modal_reasons_for(m.object.modal_change_type), :id, :description, {}, :class => "modality-reason-select"
  
  %li
    = link_to "Renal Registry Reason for Change Codes", modality_reasons_path, class: "button tiny mt"

  %li
{'fraction_non_alphanumeric': 0.13539823008849558, 'fraction_numerical': 0.0008849557522123894, 'mean_word_length': 3.925925925925926, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '3737523', 'n_tokens_mistral': 826, 'n_tokens_neox': 798, 'n_words': 171}