Module: Renalware::TransplantHelper

Defined in:
app/helpers/renalware/transplant_helper.rb

Instance Method Summary collapse

Instance Method Details

#donor_donation_breadcrumb(patient, donation) ⇒ Object



20
21
22
# File 'app/helpers/renalware/transplant_helper.rb', line 20

def donor_donation_breadcrumb(patient, donation)
  breadcrumb_for("Donation", patient_transplants_donation_path(patient, donation))
end

#donor_operation_breadcrumb(patient, operation, with_timestamp: false) ⇒ Object



14
15
16
17
18
# File 'app/helpers/renalware/transplant_helper.rb', line 14

def donor_operation_breadcrumb(patient, operation, with_timestamp: false)
  title = "Donor Operation"
  title += " #{l(operation.performed_on)}" if with_timestamp
  breadcrumb_for(title, patient_transplants_donor_operation_path(patient, operation))
end

#donor_summary_breadcrumb(patient) ⇒ Object



5
6
7
8
# File 'app/helpers/renalware/transplant_helper.rb', line 5

def donor_summary_breadcrumb(patient)
  breadcrumb_for("Transplant Donor Summary",
                 patient_transplants_donor_dashboard_path(patient))
end

#donor_workup_breadrumb(patient) ⇒ Object



10
11
12
# File 'app/helpers/renalware/transplant_helper.rb', line 10

def donor_workup_breadrumb(patient)
  breadcrumb_for("Workup", patient_transplants_donor_workup_path(patient))
end

#recipient_followup_breadcrumbs(patient, followup) ⇒ Object



60
61
62
63
64
65
66
67
68
# File 'app/helpers/renalware/transplant_helper.rb', line 60

def recipient_followup_breadcrumbs(patient, followup)
  [
    recipient_summary_breadcrumb(patient),
    breadcrumb_for(
      recipient_followup_title(followup),
      patient_transplants_recipient_operation_followup_path(patient, followup.operation)
    )
  ]
end

#recipient_followup_title(followup) ⇒ Object



70
71
72
# File 'app/helpers/renalware/transplant_helper.rb', line 70

def recipient_followup_title(followup)
  "Operation (#{l(followup.operation.performed_on)}) Followup"
end

#recipient_operation_breadcrumb(patient, operation) ⇒ Object



29
30
31
32
# File 'app/helpers/renalware/transplant_helper.rb', line 29

def recipient_operation_breadcrumb(patient, operation)
  breadcrumb_for("Recipient Operation",
                 patient_transplants_recipient_operation_path(patient, operation))
end

#recipient_operation_breadcrumbs(patient, operation) ⇒ Object



34
35
36
37
38
39
# File 'app/helpers/renalware/transplant_helper.rb', line 34

def recipient_operation_breadcrumbs(patient, operation)
  [
    recipient_summary_breadcrumb(patient),
    recipient_operation_breadcrumb(patient, operation)
  ]
end

#recipient_summary_breadcrumb(patient) ⇒ Object



24
25
26
27
# File 'app/helpers/renalware/transplant_helper.rb', line 24

def recipient_summary_breadcrumb(patient)
  breadcrumb_for("Transplant Recipient Summary",
                 patient_transplants_recipient_dashboard_path(patient))
end

#recipient_wait_list_breadcrumbs(patient) ⇒ Object



53
54
55
56
57
58
# File 'app/helpers/renalware/transplant_helper.rb', line 53

def recipient_wait_list_breadcrumbs(patient)
  [
    recipient_summary_breadcrumb(patient),
    breadcrumb_for("Wait List Registration", patient_transplants_registration_path(patient))
  ]
end

#recipient_workup_breadcrumb(patient, workup) ⇒ Object



41
42
43
44
# File 'app/helpers/renalware/transplant_helper.rb', line 41

def recipient_workup_breadcrumb(patient, workup)
  breadcrumb_for("Recipient Workup",
                 patient_transplants_recipient_workup_path(patient, workup))
end

#recipient_workup_breadcrumbs(patient, workup) ⇒ Object



46
47
48
49
50
51
# File 'app/helpers/renalware/transplant_helper.rb', line 46

def recipient_workup_breadcrumbs(patient, workup)
  [
    recipient_summary_breadcrumb(patient),
    recipient_workup_breadcrumb(patient, workup)
  ]
end