<commit_before>ruby:
  back_path = patient_hd_dashboard_path(@patient)

= f.input :type, as: :hidden
.row.top
  .large-12.columns
    =render 'form_actions', f: f, back_path: back_path, session: session, patient: @patient

.form-content
  = f.simple_fields_for :document, f.object.document do |fd|

    = render layout: "renalware/shared/fieldset",
        locals: { legend: "Sign-In", name: "signin" } do
      = f.input :performed_on, as: :date_picker, wrapper: :horizontal_datepicker
      = f.association :hospital_unit,
          as: :grouped_select,
          group_method: :hd_sites,
          collection: Renalware::Hospitals::Centre.with_hd_sites.ordered,
          label_method: :to_s
      = f.input :start_time, as: :clock_picker, wrapper: :horizontal_clockpicker
      = f.association :signed_on_by, as: :user_picker, collection: Renalware::User.ordered

    = render layout: "renalware/shared/fieldset",
        locals: { legend: "Sign-Off", name: "signoff" } do

      = f.input :end_time, as: :clock_picker, wrapper: :horizontal_clockpicker
      = f.association :signed_off_by, as: :user_picker, collection: Renalware::User.ordered

    = render layout: "renalware/shared/fieldset",
        locals: { legend: "Session Info", name: "info" } do

      = fd.simple_fields_for :info, fd.object.info do |fcm|
        = fcm.input :hd_type, as: :inline_radio_buttons
        fieldset
          legend Access
          = fcm.input :access_type, as: :select, value_method: :name,
              collection: Renalware::Accesses::Type.ordered, input_html: { class: "small-input" }
          = fcm.input :access_side, input_html: { class: "small-input" }
          = fcm.input :access_site, as: :select, value_method: :name,
              collection: Renalware::Accesses::Site.ordered
          = fcm.input :access_confirmed, as: :boolean
        = fcm.input :is_access_first_use, as: :inline_radio_buttons
        = fcm.input :fistula_plus_line, as: :inline_radio_buttons
        = fcm.input :single_needle, as: :inline_radio_buttons
        = fcm.input :lines_reversed, as: :inline_radio_buttons
        = fcm.input :machine_no, input_html: { class: "small-input" }
        = fcm.input :dialysis_fluid_used, input_html: { class: "small-input" }

    = render layout: "renalware/shared/fieldset",
        locals: { legend: "Pre-Dialysis Observations", name: "before" } do
      = fd.simple_fields_for :observations_before, fd.object.observations_before do |fcm|
        = fcm.input :weight_measured, as: :inline_radio_buttons
        = fcm.input :weight, input_html: { class: "small-input" }
        = fcm.input :pulse, input_html: { class: "small-input" }
        = render_input fcm, :blood_pressure
        = fcm.input :temperature_measured, as: :inline_radio_buttons
        = fcm.input :temperature, input_html: { class: "small-input" }
        = fcm.input :bm_stix, input_html: { class: "small-input" }

    = render layout: "renalware/shared/fieldset",
        locals: { legend: "Post-Dialysis Observations", name: "after" } do
      = fd.simple_fields_for :observations_after, fd.object.observations_after do |fcm|
        = fcm.input :weight_measured, as: :inline_radio_buttons
        = fcm.input :weight, input_html: { class: "small-input" }
        = fcm.input :pulse, input_html: { class: "small-input" }
        = render_input fcm, :blood_pressure
        = fcm.input :temperature_measured, as: :inline_radio_buttons
        = fcm.input :temperature, input_html: { class: "small-input" }
        = fcm.input :bm_stix, input_html: { class: "small-input" }

    = render layout: "renalware/shared/fieldset",
        locals: { legend: "Dialysis", name: "dialysis" } do
      = fd.simple_fields_for :dialysis, fd.object.dialysis do |fcm|
        = fcm.input :arterial_pressure, input_html: { class: "small-input" }
        = fcm.input :venous_pressure, input_html: { class: "small-input" }
        = fcm.input :fluid_removed, input_html: { class: "small-input" }
        = fcm.input :flow_rate, collection: fcm.object.class.flow_rates, input_html: { class: "small-input" }
        = fcm.input :blood_flow, input_html: { class: "small-input" }
        = fcm.input :machine_urr, input_html: { class: "small-input" }
        = fcm.input :machine_ktv, input_html: { class: "small-input" }
        = fcm.input :litres_processed, input_html: { class: "small-input" }

    = render layout: "renalware/shared/fieldset",
        locals: { legend: "HDF", name: "hdf" } do
      = fd.simple_fields_for :hdf, fd.object.hdf do |fcm|
        = fcm.input :subs_fluid_pct, input_html: { class: "small-input" }
        = fcm.input :subs_rate, input_html: { class: "small-input" }
        = fcm.input :subs_goal, input_html: { class: "small-input" }
        = fcm.input :subs_volume, input_html: { class: "small-input" }

    = render layout: "renalware/shared/fieldset",
        locals: { legend: "Notes/Complications", name: "complications" } do
      = fd.simple_fields_for :complications, fd.object.complications do |fcm|
        = fcm.input :access_site_status, input_html: { class: "small-input" }
        = fcm.input :was_dressing_changed, as: :inline_radio_buttons
        = fcm.input :had_mrsa_swab, as: :inline_radio_buttons
        = fcm.input :had_mssa_swab, as: :inline_radio_buttons
        = fcm.input :had_intradialytic_hypotension, as: :inline_radio_buttons
        = fcm.input :had_saline_administration, as: :inline_radio_buttons
        = fcm.input :had_cramps, as: :inline_radio_buttons
        = fcm.input :had_headache, as: :inline_radio_buttons
        = fcm.input :had_chest_pain, as: :inline_radio_buttons
        = fcm.input :had_alteplase_urokinase, as: :inline_radio_buttons
        = fcm.input :had_blood_transfusion, as: :inline_radio_buttons
        = f.input :notes, as: :text, input_html: { rows: 5 }

.row
  .large-12.columns
    =render 'form_actions', f: f, back_path: back_path, session: session, patient: @patient
<commit_msg>Tidy up error messages on session form<commit_after>ruby:
  back_path = patient_hd_dashboard_path(@patient)

= f.input :type, as: :hidden
.row.top
  .large-12.columns
    =render 'form_actions', f: f, back_path: back_path, session: session, patient: @patient

.form-content
  = f.simple_fields_for :document, f.object.document do |fd|

    = render layout: "renalware/shared/fieldset",
        locals: { legend: "Sign-In", name: "signin" } do
      = f.input :performed_on, as: :date_picker, wrapper: :horizontal_datepicker
      = f.association :hospital_unit,
          as: :grouped_select,
          group_method: :hd_sites,
          collection: Renalware::Hospitals::Centre.with_hd_sites.ordered,
          label_method: :to_s
      = f.input :start_time, as: :clock_picker, wrapper: :horizontal_clockpicker
      = f.association :signed_on_by, as: :user_picker, collection: Renalware::User.ordered

    = render layout: "renalware/shared/fieldset",
        locals: { legend: "Sign-Off", name: "signoff" } do

      = f.input :end_time, as: :clock_picker, wrapper: :horizontal_clockpicker
      = f.association :signed_off_by, as: :user_picker, collection: Renalware::User.ordered

    = render layout: "renalware/shared/fieldset",
        locals: { legend: "Session Info", name: "info" } do

      = fd.simple_fields_for :info, fd.object.info do |fcm|
        = fcm.input :hd_type, as: :inline_radio_buttons
        fieldset
          legend Access
          = fcm.input :access_type, as: :select, value_method: :name,
              collection: Renalware::Accesses::Type.ordered, wrapper: :horizontal_small
          = fcm.input :access_side, wrapper: :horizontal_tiny
          = fcm.input :access_site, as: :select, value_method: :name,
              collection: Renalware::Accesses::Site.ordered, wrapper: :horizontal_small
          = fcm.input :access_confirmed, as: :boolean, wrapper: :horizontal_medium
        = fcm.input :is_access_first_use, as: :inline_radio_buttons
        = fcm.input :fistula_plus_line, as: :inline_radio_buttons
        = fcm.input :single_needle, as: :inline_radio_buttons
        = fcm.input :lines_reversed, as: :inline_radio_buttons
        = fcm.input :machine_no, wrapper: :horizontal_tiny
        = fcm.input :dialysis_fluid_used, wrapper: :horizontal_tiny

    = render layout: "renalware/shared/fieldset",
        locals: { legend: "Pre-Dialysis Observations", name: "before" } do
      = fd.simple_fields_for :observations_before, fd.object.observations_before do |fcm|
        = fcm.input :weight_measured, as: :inline_radio_buttons
        = fcm.input :weight, wrapper: :horizontal_tiny
        = fcm.input :pulse, wrapper: :horizontal_tiny
        = render_input fcm, :blood_pressure
        = fcm.input :temperature_measured, as: :inline_radio_buttons
        = fcm.input :temperature, wrapper: :horizontal_tiny
        = fcm.input :bm_stix, wrapper: :horizontal_tiny

    = render layout: "renalware/shared/fieldset",
        locals: { legend: "Post-Dialysis Observations", name: "after" } do
      = fd.simple_fields_for :observations_after, fd.object.observations_after do |fcm|
        = fcm.input :weight_measured, as: :inline_radio_buttons
        = fcm.input :weight, wrapper: :horizontal_tiny
        = fcm.input :pulse, wrapper: :horizontal_tiny
        = render_input fcm, :blood_pressure
        = fcm.input :temperature_measured, as: :inline_radio_buttons
        = fcm.input :temperature, wrapper: :horizontal_tiny
        = fcm.input :bm_stix, wrapper: :horizontal_tiny

    = render layout: "renalware/shared/fieldset",
        locals: { legend: "Dialysis", name: "dialysis" } do
      = fd.simple_fields_for :dialysis, fd.object.dialysis do |fcm|

        = fcm.input :arterial_pressure, wrapper: :horizontal_tiny
        = fcm.input :venous_pressure, wrapper: :horizontal_tiny
        = fcm.input :fluid_removed, wrapper: :horizontal_tiny
        = fcm.input :flow_rate, collection: fcm.object.class.flow_rates, wrapper: :horizontal_tiny
        = fcm.input :blood_flow, wrapper: :horizontal_tiny
        = fcm.input :machine_urr, wrapper: :horizontal_tiny
        = fcm.input :machine_ktv, wrapper: :horizontal_tiny
        = fcm.input :litres_processed, wrapper: :horizontal_tiny

    = render layout: "renalware/shared/fieldset",
        locals: { legend: "HDF", name: "hdf" } do
      = fd.simple_fields_for :hdf, fd.object.hdf do |fcm|
        = fcm.input :subs_fluid_pct, input_html: { class: "small-input" }
        = fcm.input :subs_rate, input_html: { class: "small-input" }
        = fcm.input :subs_goal, input_html: { class: "small-input" }
        = fcm.input :subs_volume, input_html: { class: "small-input" }

    = render layout: "renalware/shared/fieldset",
        locals: { legend: "Notes/Complications", name: "complications" } do
      = fd.simple_fields_for :complications, fd.object.complications do |fcm|
        = fcm.input :access_site_status, input_html: { class: "small-input" }
        = fcm.input :was_dressing_changed, as: :inline_radio_buttons
        = fcm.input :had_mrsa_swab, as: :inline_radio_buttons
        = fcm.input :had_mssa_swab, as: :inline_radio_buttons
        = fcm.input :had_intradialytic_hypotension, as: :inline_radio_buttons
        = fcm.input :had_saline_administration, as: :inline_radio_buttons
        = fcm.input :had_cramps, as: :inline_radio_buttons
        = fcm.input :had_headache, as: :inline_radio_buttons
        = fcm.input :had_chest_pain, as: :inline_radio_buttons
        = fcm.input :had_alteplase_urokinase, as: :inline_radio_buttons
        = fcm.input :had_blood_transfusion, as: :inline_radio_buttons
        = f.input :notes, as: :text, input_html: { rows: 5 }

.row
  .large-12.columns
    =render 'form_actions', f: f, back_path: back_path, session: session, patient: @patient

{'fraction_non_alphanumeric': 0.12116069913456644, 'fraction_numerical': 0.0008484642796538266, 'mean_word_length': 3.3687916975537435, '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': '2882440', 'n_tokens_mistral': 4023, 'n_tokens_neox': 3917, 'n_words': 828}