Class: Renalware::HD::MDMPresenter
Constant Summary
collapse
- NullObject =
Naught.build do |config|
config.black_hole
config.define_explicit_conversions
config.singleton
config.predicates_return false
end
Constants inherited
from MDMPresenter
MDMPresenter::NullAccess
Instance Attribute Summary
Attributes inherited from MDMPresenter
#patient, #view_context
Instance Method Summary
collapse
#access, #clinic_visits, #clinic_visits_having_measurements, #current_immunosuppressant_prescriptions, #current_pathology_for_code, #current_prescriptions, #current_problems, #current_transplant_status, #esa_prescriptions, #events_of_type, #historical_immunosuppressant_prescriptions, #historical_prescriptions, #initialize, #letters, #pathology, #pathology_for_codes
Instance Method Details
#audits ⇒ Object
39
40
41
|
# File 'app/presenters/renalware/hd/mdm_presenter.rb', line 39
def audits
@audits ||= PatientStatistics.for_patient(patient).limit(6).ordered
end
|
#hd_profile ⇒ Object
24
25
26
27
28
29
30
31
32
33
|
# File 'app/presenters/renalware/hd/mdm_presenter.rb', line 24
def hd_profile
@hd_profile ||= begin
profile = HD::Profile.for_patient(patient).first
if profile.present?
HD::ProfilePresenter.new(profile)
else
NullObject.instance
end
end
end
|
#preference_set ⇒ Object
35
36
37
|
# File 'app/presenters/renalware/hd/mdm_presenter.rb', line 35
def preference_set
@preference_set ||= PreferenceSet.for_patient(patient).first || NullObject.instance
end
|
#rolling_audit ⇒ Object
43
44
45
|
# File 'app/presenters/renalware/hd/mdm_presenter.rb', line 43
def rolling_audit
@rolling_audit ||= audits.find_by(rolling: true)
end
|