Class: Renalware::Patients::PatientDrop
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Renalware::Patients::PatientDrop
- Defined in:
- app/drops/renalware/patients/patient_drop.rb
Instance Method Summary collapse
- #born_on ⇒ Object
- #current_modality ⇒ Object
- #diabetic ⇒ Object
- #hospital_identifier ⇒ Object
-
#initialize(patient) ⇒ PatientDrop
constructor
A new instance of PatientDrop.
- #name ⇒ Object
Constructor Details
#initialize(patient) ⇒ PatientDrop
Returns a new instance of PatientDrop.
16 17 18 |
# File 'app/drops/renalware/patients/patient_drop.rb', line 16 def initialize(patient) @patient = patient end |
Instance Method Details
#born_on ⇒ Object
20 21 22 |
# File 'app/drops/renalware/patients/patient_drop.rb', line 20 def born_on I18n.l(patient.born_on) end |
#current_modality ⇒ Object
32 33 34 |
# File 'app/drops/renalware/patients/patient_drop.rb', line 32 def current_modality patient.current_modality&.to_s end |
#diabetic ⇒ Object
36 37 38 |
# File 'app/drops/renalware/patients/patient_drop.rb', line 36 def diabetic patient.diabetic? ? "Yes" : "No" end |
#hospital_identifier ⇒ Object
24 25 26 |
# File 'app/drops/renalware/patients/patient_drop.rb', line 24 def hospital_identifier patient.hospital_identifier&.to_s end |
#name ⇒ Object
28 29 30 |
# File 'app/drops/renalware/patients/patient_drop.rb', line 28 def name patient.to_s(:default) end |