<commit_before>= content_for :alerts do
  = alerts_for(@patient.anamnesis)

= error_messages_for @consultation
%input{ type: "hidden", value: @consultation.id, id: "consultation_id" }
= form_for [@patient, @consultation], html: { class: "form" } do |f|
  .panel.panel-info
    .panel-heading
      %b Motivo de Consulta
    .panel-body
      .row-fluid
        .form-group.col-md-12
          = f.text_area :reason, class: "form-control input-sm"
  = render 'anamnesis'

  .panel.panel-info
    .panel-heading
      %b Enfermedad o Problema Actual
    .panel-body
      .row-fluid
        .form-group.col-md-12
          = f.text_area :ongoing_issue, class: "form-control input-sm"

  .panel.panel-warning
    .panel-heading
      %b Revisión de Órganos y Sistemas
    .panel-body
      .row-fluid
        .form-group.col-md-12
          = f.text_area :organs_examination, class: "form-control input-sm"

  .panel.panel-danger
    .panel-heading
      %b Signos Vitales
    .panel-body
      .row-fluid
        .form-group.col-md-4
          .input-group
            %span.input-group-addon.input-sm Temperatura
            = f.text_field :temperature, class: "form-control input-sm"
            %span.input-group-addon.input-sm °C
        .form-group.col-md-4
          .input-group
            %span.input-group-addon.input-sm Pulso
            = f.text_field :heart_rate, class: "form-control input-sm"
            %span.input-group-addon.input-sm lpm
        .form-group.col-md-4
          .input-group
            %span.input-group-addon.input-sm T. Arterial
            = f.text_field :blood_pressure, class: "form-control input-sm"
            %span.input-group-addon.input-sm mmHg
      .row-fluid
        .form-group.col-md-4
          .input-group
            %span.input-group-addon.input-sm Frec. Respiratoria
            = f.text_field :respiratory_rate, class: "form-control input-sm"
            %span.input-group-addon.input-sm rpm
        .form-group.col-md-4
          .input-group
            %span.input-group-addon.input-sm Peso:
            = f.text_field :weight, class: "form-control input-sm"
            %span.input-group-addon.input-sm Kg
        .form-group.col-md-4
          .input-group
            %span.input-group-addon.input-sm Talla
            = f.text_field :height, class: "form-control input-sm"
            %span.input-group-addon.input-sm cm

  .panel.panel-danger
    .panel-heading
      %b Examen Físico
    .panel-body
      .row-fluid
        .form-group.col-md-12
          = f.text_field :physical_examination, class: "form-control input-sm"
      .row-fluid
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm Oído Derecho
            = f.text_field :right_ear, class: "form-control input-sm", placeholder: 'NORMAL'
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm Oído Izquierdo
            = f.text_field :left_ear, class: "form-control input-sm", placeholder: 'NORMAL'
      .row-fluid
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm FND
            = f.text_field :right_nostril, class: "form-control input-sm", placeholder: 'NORMAL'
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm FNI
            = f.text_field :left_nostril, class: "form-control input-sm", placeholder: 'NORMAL'
      .row-fluid
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm Nasofaringe
            = f.text_field :nasopharynx, class: "form-control input-sm", placeholder: 'NORMAL'
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm Otros
            = f.text_field :nose_others, class: "form-control input-sm", placeholder: 'NORMAL'
      .row-fluid
        .form-group.col-md-12
          .input-group
            %span.input-group-addon.input-sm Cavidad Bucal
            = f.text_field :oral_cavity, class: "form-control input-sm", placeholder: 'NORMAL'
      .row-fluid
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm Orofaringe
            = f.text_field :oropharynx, class: "form-control input-sm", placeholder: 'NORMAL'
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm Hipofaringe
            = f.text_field :hypopharynx, class: "form-control input-sm", placeholder: 'NORMAL'
      .row-fluid
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm Laringe
            = f.text_field :larynx, class: "form-control input-sm", placeholder: 'NORMAL'
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm Cuello
            = f.text_field :neck, class: "form-control input-sm", placeholder: 'NORMAL'
      .row-fluid
        .form-group.col-md-12
          .input-group
            %span.input-group-addon.input-sm Otros
            = f.text_field :others, class: "form-control input-sm", placeholder: 'NORMAL'

  .panel.panel-caution
    .panel-heading
      %b Diagnóstico
    .panel-body
      .row-fluid
        .form-group.col-md-12.diagnoses
          %table.table.table-striped.table-hover.table-condensed
            %thead
              %tr
                %th.col-md-9
                %th.col-md-1 CIE
                %th.col-md-1.text-center Presuntivo
                %th.col-md-1.text-center Definitivo
            %tbody
              = f.fields_for :diagnoses do |ff|
                %tr
                  %td
                    = ff.text_field :description, class: "form-control input-sm disease", autocomplete: "off"
                  %td
                    = ff.text_field :disease_code, class: "form-control input-sm code", readonly: "true"
                  %td.text-center
                    = ff.radio_button :type, "presuntive", class: "input-sm"
                  %td.text-center
                    = ff.radio_button :type, "definitive", class: "input-sm"

  .panel.panel-caution
    .panel-heading
      %b Planes
    .panel-body
      .row-fluid
        .form-group.col-md-12
          .input-group
            %span.input-group-addon.input-sm Diagnóstico
            = f.text_field :diagnostic_plan, class: "form-control input-sm"
      .row-fluid
        .form-group.col-md-12
          .input-group
            %span.input-group-addon.input-sm Misceláneos
            = f.text_field :miscellaneous, class: "form-control input-sm"
      .row-fluid
        .form-group.col-md-12
          .input-group
            %span.input-group-addon.input-sm Procedimiento médico
            = f.text_field :treatment_plan, class: "form-control input-sm"
      .row-fluid
        .form-group.col-md-12.prescriptions
          %table.table.table-striped.table-hover.table-condensed
            %thead
              %tr
                %th.col-md-6 Receta
                %th.col-md-6 Indicaciones
            %tbody
              = f.fields_for :prescriptions do |ff|
                %tr
                  %td
                    = ff.text_field :inscription, class: "form-control input-sm inscription", autocomplete: "off"
                  %td
                    = ff.text_field :subscription, class: "form-control input-sm subscription"
      .row-fluid
        .form-group.col-md-12
          .input-group
            %span.input-group-addon.input-sm Educacional
            = f.text_field :educational_plan, class: "form-control input-sm"

  .panel.panel-advice<commit_msg>Change controls for consultation's plans<commit_after>= content_for :alerts do
  = alerts_for(@patient.anamnesis)

= error_messages_for @consultation
%input{ type: "hidden", value: @consultation.id, id: "consultation_id" }
= form_for [@patient, @consultation], html: { class: "form" } do |f|
  .panel.panel-info
    .panel-heading
      %b Motivo de Consulta
    .panel-body
      .row-fluid
        .form-group.col-md-12
          = f.text_area :reason, class: "form-control input-sm"
  = render 'anamnesis'

  .panel.panel-info
    .panel-heading
      %b Enfermedad o Problema Actual
    .panel-body
      .row-fluid
        .form-group.col-md-12
          = f.text_area :ongoing_issue, class: "form-control input-sm"

  .panel.panel-warning
    .panel-heading
      %b Revisión de Órganos y Sistemas
    .panel-body
      .row-fluid
        .form-group.col-md-12
          = f.text_area :organs_examination, class: "form-control input-sm"

  .panel.panel-danger
    .panel-heading
      %b Signos Vitales
    .panel-body
      .row-fluid
        .form-group.col-md-4
          .input-group
            %span.input-group-addon.input-sm Temperatura
            = f.text_field :temperature, class: "form-control input-sm"
            %span.input-group-addon.input-sm °C
        .form-group.col-md-4
          .input-group
            %span.input-group-addon.input-sm Pulso
            = f.text_field :heart_rate, class: "form-control input-sm"
            %span.input-group-addon.input-sm lpm
        .form-group.col-md-4
          .input-group
            %span.input-group-addon.input-sm T. Arterial
            = f.text_field :blood_pressure, class: "form-control input-sm"
            %span.input-group-addon.input-sm mmHg
      .row-fluid
        .form-group.col-md-4
          .input-group
            %span.input-group-addon.input-sm Frec. Respiratoria
            = f.text_field :respiratory_rate, class: "form-control input-sm"
            %span.input-group-addon.input-sm rpm
        .form-group.col-md-4
          .input-group
            %span.input-group-addon.input-sm Peso:
            = f.text_field :weight, class: "form-control input-sm"
            %span.input-group-addon.input-sm Kg
        .form-group.col-md-4
          .input-group
            %span.input-group-addon.input-sm Talla
            = f.text_field :height, class: "form-control input-sm"
            %span.input-group-addon.input-sm cm

  .panel.panel-danger
    .panel-heading
      %b Examen Físico
    .panel-body
      .row-fluid
        .form-group.col-md-12
          = f.text_field :physical_examination, class: "form-control input-sm"
      .row-fluid
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm Oído Derecho
            = f.text_field :right_ear, class: "form-control input-sm", placeholder: 'NORMAL'
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm Oído Izquierdo
            = f.text_field :left_ear, class: "form-control input-sm", placeholder: 'NORMAL'
      .row-fluid
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm FND
            = f.text_field :right_nostril, class: "form-control input-sm", placeholder: 'NORMAL'
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm FNI
            = f.text_field :left_nostril, class: "form-control input-sm", placeholder: 'NORMAL'
      .row-fluid
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm Nasofaringe
            = f.text_field :nasopharynx, class: "form-control input-sm", placeholder: 'NORMAL'
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm Otros
            = f.text_field :nose_others, class: "form-control input-sm", placeholder: 'NORMAL'
      .row-fluid
        .form-group.col-md-12
          .input-group
            %span.input-group-addon.input-sm Cavidad Bucal
            = f.text_field :oral_cavity, class: "form-control input-sm", placeholder: 'NORMAL'
      .row-fluid
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm Orofaringe
            = f.text_field :oropharynx, class: "form-control input-sm", placeholder: 'NORMAL'
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm Hipofaringe
            = f.text_field :hypopharynx, class: "form-control input-sm", placeholder: 'NORMAL'
      .row-fluid
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm Laringe
            = f.text_field :larynx, class: "form-control input-sm", placeholder: 'NORMAL'
        .form-group.col-md-6
          .input-group
            %span.input-group-addon.input-sm Cuello
            = f.text_field :neck, class: "form-control input-sm", placeholder: 'NORMAL'
      .row-fluid
        .form-group.col-md-12
          .input-group
            %span.input-group-addon.input-sm Otros
            = f.text_field :others, class: "form-control input-sm", placeholder: 'NORMAL'

  .panel.panel-caution
    .panel-heading
      %b Diagnóstico
    .panel-body
      .row-fluid
        .form-group.col-md-12.diagnoses
          %table.table.table-striped.table-hover.table-condensed
            %thead
              %tr
                %th.col-md-9
                %th.col-md-1 CIE
                %th.col-md-1.text-center Presuntivo
                %th.col-md-1.text-center Definitivo
            %tbody
              = f.fields_for :diagnoses do |ff|
                %tr
                  %td
                    = ff.text_field :description, class: "form-control input-sm disease", autocomplete: "off"
                  %td
                    = ff.text_field :disease_code, class: "form-control input-sm code", readonly: "true"
                  %td.text-center
                    = ff.radio_button :type, "presuntive", class: "input-sm"
                  %td.text-center
                    = ff.radio_button :type, "definitive", class: "input-sm"

  .panel.panel-caution
    .panel-heading
      %b Planes
    .panel-body
      .row-fluid
        .form-group.col-md-12
          .input-group
            %span.input-group-addon.input-sm Diagnóstico
            = f.text_area :diagnostic_plan, class: "form-control input-sm"
      .row-fluid
        .form-group.col-md-12
          .input-group
            %span.input-group-addon.input-sm Misceláneos
            = f.text_area :miscellaneous, class: "form-control input-sm"
      .row-fluid
        .form-group.col-md-12
          .input-group
            %span.input-group-addon.input-sm Procedimiento médico
            = f.text_area :treatment_plan, class: "form-control input-sm"
      .row-fluid
        .form-group.col-md-12.prescriptions
          %table.table.table-striped.table-hover.table-condensed
            %thead
              %tr
                %th.col-md-6 Receta
                %th.col-md-6 Indicaciones
            %tbody
              = f.fields_for :prescriptions do |ff|
                %tr
                  %td
                    = ff.text_field :inscription, class: "form-control input-sm inscription", autocomplete: "off"
                  %td
                    = ff.text_field :subscription, class: "form-control input-sm subscription"
      .row-fluid
        .form-group.col-md-12
          .input-group
            %span.input-group-addon.input-sm Educacional
            = f.text_field :educational_plan, class: "form-control input-sm"

  .panel.panel-advice
{'fraction_non_alphanumeric': 0.12141730212989744, 'fraction_numerical': 0.0060478569550354985, 'mean_word_length': 1.6844891476971944, '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': '2211993', 'n_tokens_mistral': 5107, 'n_tokens_neox': 4925, 'n_words': 865}