Class: Renalware::Clinics::ClinicVisit
Instance Method Summary
collapse
#first_or_create_by!, #save_by, #save_by!, #update_by
Instance Method Details
#bp ⇒ Object
44
45
46
47
48
|
# File 'app/models/renalware/clinics/clinic_visit.rb', line 44
def bp
return unless systolic_bp.present? && diastolic_bp.present?
"#{systolic_bp}/#{diastolic_bp}"
end
|
#bp=(val) ⇒ Object
56
57
58
|
# File 'app/models/renalware/clinics/clinic_visit.rb', line 56
def bp=(val)
self.systolic_bp, self.diastolic_bp = val.split("/")
end
|
#datetime ⇒ Object
64
65
66
67
68
69
|
# File 'app/models/renalware/clinics/clinic_visit.rb', line 64
def datetime
return if date.blank?
return date.to_datetime if time.blank?
datetime_from_date_and_time
end
|
#standing_bp ⇒ Object
50
51
52
53
54
|
# File 'app/models/renalware/clinics/clinic_visit.rb', line 50
def standing_bp
return unless standing_systolic_bp.present? && standing_diastolic_bp.present?
"#{standing_systolic_bp}/#{standing_diastolic_bp}"
end
|
#standing_bp=(val) ⇒ Object
60
61
62
|
# File 'app/models/renalware/clinics/clinic_visit.rb', line 60
def standing_bp=(val)
self.standing_systolic_bp, self.standing_diastolic_bp = val.split("/")
end
|