|
2 | 2 | model: form, |
3 | 3 | url:, |
4 | 4 | method: :post, |
5 | | - class: "nhsuk-card", |
6 | 5 | builder: MavisFormBuilder, |
7 | 6 | ) do |f| %> |
8 | 7 | <%= f.mavis_error_summary %> |
9 | 8 |
|
10 | 9 | <%= render AppCardComponent.new() do |card| %> |
11 | | - <section> |
12 | | - <h4 class="nhsuk-card__heading nhsuk-heading-s"> |
13 | | - Pre-screening checks |
14 | | - </h4> |
| 10 | + <%= f.govuk_radio_buttons_fieldset :identity_check_confirmed_by_patient, |
| 11 | + legend: { text: "Has #{patient.given_name} confirmed their identity?", class: "nhsuk-u-font-size-22" } do %> |
15 | 12 |
|
16 | | - <%= f.govuk_radio_buttons_fieldset :identity_check_confirmed_by_patient, |
17 | | - legend: { text: "Has #{patient.given_name} confirmed their identity?", size: nil } do %> |
| 13 | + <%= f.govuk_radio_button :identity_check_confirmed_by_patient, true, label: { text: "Yes" }, checked: true, link_errors: true %> |
18 | 14 |
|
19 | | - <%= f.govuk_radio_button :identity_check_confirmed_by_patient, true, label: { text: "Yes" }, checked: true, link_errors: true %> |
| 15 | + <%= f.govuk_radio_button :identity_check_confirmed_by_patient, false, |
| 16 | + label: { text: "No, it was confirmed by somebody else" } do %> |
20 | 17 |
|
21 | | - <%= f.govuk_radio_button :identity_check_confirmed_by_patient, false, |
22 | | - label: { text: "No, it was confirmed by somebody else" } do %> |
| 18 | + <%= f.govuk_text_field :identity_check_confirmed_by_other_name, |
| 19 | + label: { text: "What is the person’s name?" } %> |
23 | 20 |
|
24 | | - <%= f.govuk_text_field :identity_check_confirmed_by_other_name, |
25 | | - label: { text: "What is the person’s name?" } %> |
26 | | - |
27 | | - <%= f.govuk_text_field :identity_check_confirmed_by_other_relationship, |
28 | | - label: { text: "What is their relationship to the child?" }, |
29 | | - hint: { text: "For example, parent, teacher or teaching assistant" } %> |
30 | | - <% end %> |
| 21 | + <%= f.govuk_text_field :identity_check_confirmed_by_other_relationship, |
| 22 | + label: { text: "What is their relationship to the child?" }, |
| 23 | + hint: { text: "For example, parent, teacher or teaching assistant" } %> |
31 | 24 | <% end %> |
| 25 | + <% end %> |
32 | 26 |
|
33 | | - <p>Have you checked that <%= patient.given_name %>:</p> |
| 27 | + <hr class="nhsuk-section-break nhsuk-section-break--visible nhsuk-section-break--m"> |
34 | 28 |
|
35 | | - <ul class="nhsuk-list nhsuk-list--bullet"> |
36 | | - <li>is not acutely unwell</li> |
37 | | - <% if ask_not_pregnant? %> |
38 | | - <li>is not pregnant</li> |
39 | | - <% end %> |
40 | | - <li>knows what the vaccination is for, and agrees to have it</li> |
41 | | - <% if ask_not_taking_medication? %> |
42 | | - <li>is not taking any medication which prevents vaccination</li> |
43 | | - <% end %> |
44 | | - <% if ask_asthma_flare_up? %> |
45 | | - <li>if they have asthma, has not had a flare-up of symptoms in the past 72 hours, including wheezing or needing to use a reliever inhaler more than usual</li> |
46 | | - <% end %> |
47 | | - <li>has no other contraindications which prevent vaccination</li> |
48 | | - </ul> |
| 29 | + <h4 class="nhsuk-heading-s nhsuk-u-margin-bottom-2"> |
| 30 | + Pre-screening checks |
| 31 | + </h4> |
49 | 32 |
|
50 | | - <%= f.govuk_check_boxes_fieldset :pre_screening_confirmed, multiple: false, legend: nil do %> |
51 | | - <%= f.govuk_check_box :pre_screening_confirmed, 1, 0, multiple: false, link_errors: true, |
52 | | - label: { text: "I have checked that the above statements are true" } %> |
53 | | - <% end %> |
| 33 | + <p class="nhsuk-body nhsuk-u-margin-bottom-2">Have you checked that <%= patient.given_name %>:</p> |
54 | 34 |
|
55 | | - <%= f.govuk_text_area :pre_screening_notes, label: { text: "Pre-screening notes (optional)" }, rows: 3 %> |
56 | | - |
57 | | - <% if show_supplied_by_user_id_outside_vaccine_method? %> |
58 | | - <%= f.govuk_select :supplied_by_user_id, |
59 | | - label: { text: "Which nurse identified and pre-screened the child and supplied the vaccine?" }, |
60 | | - data: { module: "app-autocomplete" } do %> |
61 | | - <%= tag.option "", value: "" %> |
62 | | - <% form.supplied_by_users.each do |user| %> |
63 | | - <%= tag.option user.full_name, |
64 | | - value: user.id, |
65 | | - selected: user.id == form.supplied_by_user_id, |
66 | | - data: { hint: user.email } %> |
67 | | - <% end %> |
| 35 | + <ul class="nhsuk-list nhsuk-list--bullet"> |
| 36 | + <li>is not acutely unwell</li> |
| 37 | + <% if ask_not_pregnant? %> |
| 38 | + <li>is not pregnant</li> |
| 39 | + <% end %> |
| 40 | + <li>knows what the vaccination is for, and agrees to have it</li> |
| 41 | + <% if ask_not_taking_medication? %> |
| 42 | + <li>is not taking any medication which prevents vaccination</li> |
| 43 | + <% end %> |
| 44 | + <% if ask_asthma_flare_up? %> |
| 45 | + <li>if they have asthma, has not had a flare-up of symptoms in the past 72 hours, including wheezing or needing to use a reliever inhaler more than usual</li> |
| 46 | + <% end %> |
| 47 | + <li>has no other contraindications which prevent vaccination</li> |
| 48 | + </ul> |
| 49 | + |
| 50 | + <%= f.govuk_check_boxes_fieldset :pre_screening_confirmed, multiple: false, legend: nil do %> |
| 51 | + <%= f.govuk_check_box :pre_screening_confirmed, 1, 0, multiple: false, link_errors: true, |
| 52 | + label: { text: "I have checked that the above statements are true" } %> |
| 53 | + <% end %> |
| 54 | + |
| 55 | + <%= f.govuk_text_area :pre_screening_notes, label: { text: "Pre-screening notes (optional)" }, rows: 2 %> |
| 56 | + |
| 57 | + <% if show_supplied_by_user_id_outside_vaccine_method? %> |
| 58 | + <%= f.govuk_select :supplied_by_user_id, |
| 59 | + label: { text: "Which nurse identified and pre-screened the child and supplied the vaccine?" }, |
| 60 | + data: { module: "app-autocomplete" } do %> |
| 61 | + <%= tag.option "", value: "" %> |
| 62 | + <% form.supplied_by_users.each do |user| %> |
| 63 | + <%= tag.option user.full_name, |
| 64 | + value: user.id, |
| 65 | + selected: user.id == form.supplied_by_user_id, |
| 66 | + data: { hint: user.email } %> |
68 | 67 | <% end %> |
69 | 68 | <% end %> |
70 | | - </section> |
71 | | - |
72 | | - <hr class="nhsuk-section-break nhsuk-section-break--visible nhsuk-section-break--l"> |
73 | | - |
74 | | - <section> |
75 | | - <h4 class="nhsuk-card__heading nhsuk-heading-s"> |
76 | | - Is <%= patient.given_name %> ready for their <%= vaccination_name %>? |
77 | | - </h4> |
| 69 | + <% end %> |
78 | 70 |
|
79 | | - <% hint = "Pre-screening checks must be completed for vaccination to go ahead" %> |
| 71 | + <hr class="nhsuk-section-break nhsuk-section-break--visible nhsuk-section-break--m"> |
80 | 72 |
|
81 | | - <%= f.govuk_radio_buttons_fieldset :vaccine_method, legend: nil do %> |
82 | | - <% vaccine_methods.each_with_index do |vaccine_method, index| %> |
83 | | - <% if index == 1 %> |
84 | | - <%= f.govuk_radio_divider %> |
85 | | - <% end %> |
| 73 | + <%= f.govuk_radio_buttons_fieldset :vaccine_method, legend: { text: "Is #{patient.given_name} ready for their #{vaccination_name}?", class: "nhsuk-u-font-size-22" } do %> |
| 74 | + <% vaccine_methods.each_with_index do |vaccine_method, index| %> |
| 75 | + <% if index == 1 %> |
| 76 | + <%= f.govuk_radio_divider %> |
| 77 | + <% end %> |
86 | 78 |
|
87 | | - <% label = if index.zero? |
88 | | - "Yes" |
89 | | - else |
90 | | - "No — but they can have the #{Vaccine.human_enum_name(:method_prefix, vaccine_method)} #{programme.name_in_sentence} instead" |
91 | | - end %> |
92 | | - |
93 | | - <% options = common_delivery_site_options(vaccine_method) %> |
94 | | - |
95 | | - <% if options.length > 1 || show_supplied_by_user_id_inside_vaccine_method?(vaccine_method) %> |
96 | | - <%= f.govuk_radio_button :vaccine_method, vaccine_method, label: { text: label }, hint: { text: hint }, link_errors: index.zero? do %> |
97 | | - <% if show_supplied_by_user_id_inside_vaccine_method?(vaccine_method) %> |
98 | | - <%= f.govuk_select :supplied_by_user_id, |
99 | | - label: { text: "Which nurse identified and pre-screened the child and supplied the vaccine?" }, |
100 | | - data: { module: "app-autocomplete" } do %> |
101 | | - <%= tag.option "", value: "" %> |
102 | | - <% form.supplied_by_users.each do |user| %> |
103 | | - <%= tag.option user.full_name, |
104 | | - value: user.id, |
105 | | - selected: user.id == form.supplied_by_user_id, |
106 | | - data: { hint: user.email } %> |
107 | | - <% end %> |
| 79 | + <% label = if index.zero? |
| 80 | + "Yes" |
| 81 | + else |
| 82 | + "No — but they can have the #{Vaccine.human_enum_name(:method_prefix, vaccine_method)} #{programme.name_in_sentence} instead" |
| 83 | + end %> |
| 84 | + |
| 85 | + <% options = common_delivery_site_options(vaccine_method) %> |
| 86 | + |
| 87 | + <% if options.length > 1 || show_supplied_by_user_id_inside_vaccine_method?(vaccine_method) %> |
| 88 | + <%= f.govuk_radio_button :vaccine_method, vaccine_method, label: { text: label }, link_errors: index.zero? do %> |
| 89 | + <% if show_supplied_by_user_id_inside_vaccine_method?(vaccine_method) %> |
| 90 | + <%= f.govuk_select :supplied_by_user_id, |
| 91 | + label: { text: "Which nurse identified and pre-screened the child and supplied the vaccine?" }, |
| 92 | + data: { module: "app-autocomplete" } do %> |
| 93 | + <%= tag.option "", value: "" %> |
| 94 | + <% form.supplied_by_users.each do |user| %> |
| 95 | + <%= tag.option user.full_name, |
| 96 | + value: user.id, |
| 97 | + selected: user.id == form.supplied_by_user_id, |
| 98 | + data: { hint: user.email } %> |
108 | 99 | <% end %> |
109 | 100 | <% end %> |
| 101 | + <% end %> |
110 | 102 |
|
111 | | - <% if options.length > 1 %> |
112 | | - <%= f.govuk_collection_radio_buttons :delivery_site, |
113 | | - options, |
114 | | - :value, |
115 | | - :label, |
116 | | - legend: { |
117 | | - text: "Where will the #{Vaccine.human_enum_name(:method, vaccine_method).downcase} be given?", |
118 | | - size: "s", |
119 | | - } %> |
120 | | - <% end %> |
| 103 | + <% if options.length > 1 %> |
| 104 | + <%= f.govuk_collection_radio_buttons :delivery_site, |
| 105 | + options, |
| 106 | + :value, |
| 107 | + :label, |
| 108 | + legend: { |
| 109 | + text: "Where will the #{Vaccine.human_enum_name(:method, vaccine_method).downcase} be given?", |
| 110 | + size: "s", |
| 111 | + } %> |
121 | 112 | <% end %> |
122 | | - <% else %> |
123 | | - <%= f.govuk_radio_button :vaccine_method, vaccine_method, label: { text: label }, hint: { text: hint }, link_errors: index.zero? %> |
124 | 113 | <% end %> |
| 114 | + <% else %> |
| 115 | + <%= f.govuk_radio_button :vaccine_method, vaccine_method, label: { text: label }, link_errors: index.zero? %> |
| 116 | + <% end %> |
125 | 117 |
|
126 | | - <% if index.zero? %> |
127 | | - <%= f.govuk_radio_button :vaccine_method, "none", label: { text: "No" } %> |
128 | | - <% end %> |
| 118 | + <% if index.zero? %> |
| 119 | + <%= f.govuk_radio_button :vaccine_method, "none", label: { text: "No" } %> |
129 | 120 | <% end %> |
130 | 121 | <% end %> |
| 122 | + <% end %> |
131 | 123 |
|
132 | | - <%= f.hidden_field :dose_sequence, value: dose_sequence %> |
133 | | - <%= f.hidden_field :programme_type, value: programme.type %> |
| 124 | + <%= f.hidden_field :dose_sequence, value: dose_sequence %> |
| 125 | + <%= f.hidden_field :programme_type, value: programme.type %> |
134 | 126 |
|
135 | | - <%= f.govuk_submit "Continue", class: "nhsuk-u-margin-bottom-0" %> |
136 | | - </section> |
| 127 | + <%= f.govuk_submit "Continue", class: "nhsuk-u-margin-bottom-0" %> |
137 | 128 | <% end %> |
138 | 129 | <% end %> |
0 commit comments