Class: Renalware::Medications::PrescriptionPresenter
- Inherits:
-
DumbDelegator
- Object
- DumbDelegator
- Renalware::Medications::PrescriptionPresenter
show all
- Defined in:
- app/presenters/renalware/medications/prescription_presenter.rb
Instance Method Summary
collapse
#inspect, #public_send, #send, #try, #try!
Instance Method Details
#administer_on_hd? ⇒ Boolean
37
38
39
|
# File 'app/presenters/renalware/medications/prescription_presenter.rb', line 37
def administer_on_hd?
administer_on_hd ? "Yes" : "No"
end
|
#dose ⇒ Object
33
34
35
|
# File 'app/presenters/renalware/medications/prescription_presenter.rb', line 33
def dose
"#{dose_amount} #{translated_dose_unit}"
end
|
#drug_type_names ⇒ Object
25
26
27
|
# File 'app/presenters/renalware/medications/prescription_presenter.rb', line 25
def drug_type_names
drug_types.map(&:name).join(", ")
end
|
#patient_current_modality_name ⇒ Object
15
16
17
18
19
|
# File 'app/presenters/renalware/medications/prescription_presenter.rb', line 15
def patient_current_modality_name
return unless patient_current_modality
patient_current_modality.description.to_s
end
|
#patient_name ⇒ Object
11
12
13
|
# File 'app/presenters/renalware/medications/prescription_presenter.rb', line 11
def patient_name
patient.to_s
end
|
#provider ⇒ Object
29
30
31
|
# File 'app/presenters/renalware/medications/prescription_presenter.rb', line 29
def provider
::I18n.t(super, scope: "enums.provider")
end
|
#route_code ⇒ Object
21
22
23
|
# File 'app/presenters/renalware/medications/prescription_presenter.rb', line 21
def route_code
medication_route.other? ? route_description : medication_route.code
end
|