From 00b6b3b6d76f8bdd3fb7e9a5bab1189655146990 Mon Sep 17 00:00:00 2001 From: Lauro Gripa Date: Tue, 5 Oct 2021 14:57:08 -0300 Subject: [PATCH] =?UTF-8?q?Adicionada=20melhoria=20na=20visualiza=C3=A7?= =?UTF-8?q?=C3=A3o=20do=20paciente=20(#396)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mateus Bittencourt --- app/views/admin/patients/show.html.erb | 299 +++++++++++++------------ 1 file changed, 156 insertions(+), 143 deletions(-) diff --git a/app/views/admin/patients/show.html.erb b/app/views/admin/patients/show.html.erb index 39ca86f0..7db9607d 100644 --- a/app/views/admin/patients/show.html.erb +++ b/app/views/admin/patients/show.html.erb @@ -46,160 +46,173 @@ -
-

Grupos que pertence

- <% if @patient.groups.any? -%> - - - - - - - - - <% @patient.groups.admin_order.each do |group| -%> +
+
+

Grupos que pertence

+
+
+ <% if @patient.groups.any? -%> +
#Grupo
+ - - + + - <% end -%> - -
- <%= group.id %> - - <%= group.name_with_parent %> - #Grupo
- <% else -%> -

Não preencheu nenhum grupo.

- <% end -%> + + + <% @patient.groups.admin_order.each do |group| -%> + + + <%= group.id %> + + + <%= group.name_with_parent %> + + + <% end -%> + + + <% else -%> +

Não preencheu nenhum grupo.

+ <% end -%> +
-

Agendamentos

-<% if @patient.appointments.any? -%> -

Clique no # do agendamento para realizar procedimentos no mesmo.

- - - - - - - - - - - - - - - - - <% @patient.appointments.order(:start).each do |appointment| -%> - - - - - - - - - - - +
+
+

Agendamentos

+
+
+ <% if @patient.appointments.any? -%> +

Clique no # do agendamento para realizar procedimentos no mesmo.

+
#Data agendadaUnidadeCheck-inCheck-outDoseVacinaSuspenso?Criou dose #
- <%= link_to appointment.id, admin_appointment_path(appointment) %> - - <%= l(appointment.start, format: :human) %> - - <%= appointment.ubs.name %> - - <% if appointment.checked_in? -%> - <%= l(appointment.check_in, format: :human) %> - <% end -%> - - <% if appointment.checked_out? -%> - <%= l(appointment.check_out, format: :human) %> - <% end -%> - - <%= appointment.dose_sequence_number %> - - <%= appointment.dose_vaccine&.name %> - - <%= appointment.active ? "Não" : "Sim" %> - - <% if appointment.dose -%> - <%= appointment.dose.id %> - <% end -%> -
+ + + + + + + + + + + + + + + + <% @patient.appointments.order(:start).each do |appointment| -%> + + + + + + + + + + + + <% end -%> + +
#Data agendadaUnidadeCheck-inCheck-outDoseVacinaSuspenso?Criou dose #
+ <%= link_to appointment.id, admin_appointment_path(appointment) %> + + <%= l(appointment.start, format: :human) %> + + <%= appointment.ubs.name %> + + <% if appointment.checked_in? -%> + <%= l(appointment.check_in, format: :human) %> + <% end -%> + + <% if appointment.checked_out? -%> + <%= l(appointment.check_out, format: :human) %> + <% end -%> + + <%= appointment.dose_sequence_number %> + + <%= appointment.dose_vaccine&.name %> + + <%= appointment.active ? "Não" : "Sim" %> + + <% if appointment.dose -%> + <%= appointment.dose.id %> + <% end -%> +
+ <% else -%> +

Paciente sem nenhum agendamento.

<% end -%> - - -<% else -%> -

Paciente sem nenhum agendamento.

-<% end -%> - -
-
-

- Doses de vacinas -

+
-
- <%= link_to "Registrar dose", new_admin_appointment_path(patient_id: @patient.id), class: 'btn btn-success btn-block' %> +
+
+
+
+

+ Doses de vacinas +

+
+
+ <%= link_to "Registrar dose", new_admin_appointment_path(patient_id: @patient.id), class: 'btn btn-success' %> +
+
-
-
- <% if @patient.doses.any? -%> -

- Caso deseje remover uma dose registrada incorretamente, vá no agendamento onde ocorreu a vacinação e clique para desfazer o check-out do mesmo. -

- - - - - - - - - - - - - - - - <% @patient.doses.order(:created_at).each do |dose| -%> +
+ <% if @patient.doses.any? -%> +

+ Caso deseje remover uma dose registrada incorretamente, vá no agendamento onde ocorreu a vacinação e clique para desfazer o check-out do mesmo. +

+ +
#Data da aplicaçãoUnidadeVacinaDoseAgendamento #Reforço #
+ - - - - - - - + + + + + + + - <% end -%> - -
- <%= dose.id %> - - <%= l(dose.appointment.check_out, format: :human) %> - - <%= dose.appointment.ubs.name %> - - <%= dose.vaccine.name %> - - <%= dose.sequence_number %>a - - <%= link_to dose.appointment.id, admin_appointment_path(dose.appointment) %> - - <% if dose.follow_up_appointment -%> - <%= link_to dose.follow_up_appointment.id, admin_appointment_path(dose.follow_up_appointment) %> - <% end -%> - #Data da aplicaçãoUnidadeVacinaDoseAgendamento #Reforço #
- <% else -%> -

Paciente sem nenhuma vacina.

- <% end -%> + + + + <% @patient.doses.order(:created_at).each do |dose| -%> + + + <%= dose.id %> + + + <%= l(dose.created_at, format: :human) %> + + + <%= dose.appointment.ubs.name %> + + + <%= dose.vaccine.name %> + + + <%= dose.sequence_number %>a + + + <%= link_to dose.appointment.id, admin_appointment_path(dose.appointment) %> + + + <% if dose.follow_up_appointment -%> + <%= link_to dose.follow_up_appointment.id, admin_appointment_path(dose.follow_up_appointment) %> + <% end -%> + + + <% end -%> + + + <% else -%> +

Paciente sem nenhuma vacina.

+ <% end -%> +