= within_patient_layout(title: "Required Observations", navigation_partial: "renalware/pathology/navigation") do .row .large-4.columns .row .large-12.columns label for="clinic_id" Clinic = form_tag(patient_pathology_required_observations_path(patient_id: @patient), method: :get, class: "fn-form" ) do = select_tag "request[clinic_id]", options_from_collection_for_select(all_clinics, "id", "name", request_html_form_params.clinic_id), onchange: raw("this.form.submit();") .row .large-12.columns = simple_form_for request_html_form_params, url: pathology_requests_new_request_path, html: { autocomplete: "off" }, as: :request do |f| = f.input :patient_ids, as: :hidden_array = f.input :clinic_id, as: :hidden = f.button :submit, "Generate Forms", class: "button tiny" .row .large-12.columns - unless request.has_global_requests? p No observation requests are required. - else p The following observation requests are required for this patient. table#global_pathology thead tr th Code th Lab th Bottle Type th Name tbody - request.request_descriptions.each do |request_description| tr td = request_description.code td = request_description.lab.name td = request_description.bottle_type&.capitalize td = request_description.name .row .large-12.columns - unless request.has_patient_requests? p No patient specific observations are required. - else p The following patient specific observations are required for this patient. table#patient_pathology thead tr th Lab th= t("thead.description") th Sample # Bottles th Sample Type th Frequency th Last Observed th Start Date th End Date th th tbody - request.patient_rules.each do |patient_rule| tr td = patient_rule.lab.name td = patient_rule.test_description td = patient_rule.sample_number_bottles td = patient_rule.sample_type td = patient_rule.frequency td = patient_rule.last_observed_at td = patient_rule.start_date td = patient_rule.end_date th = link_to t("btn.edit"), edit_patient_pathology_patient_rule_path(patient_id: @patient, id: patient_rule.id) th = link_to t("btn.delete"), patient_pathology_patient_rule_path(patient_id: @patient, id: patient_rule.id), method: :delete