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, #bone_prescriptions, #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
46
47
48
|
# File 'app/presenters/renalware/hd/mdm_presenter.rb', line 46
def audits
@audits ||= PatientStatistics.for_patient(patient).limit(6).ordered
end
|
#dry_weights ⇒ Object
36
37
38
39
40
|
# File 'app/presenters/renalware/hd/mdm_presenter.rb', line 36
def dry_weights
@dry_weights ||= begin
Clinical::DryWeight.for_patient(patient).ordered.includes(:assessor).limit(5)
end
end
|
#hd_profile ⇒ Object
25
26
27
28
29
30
31
32
33
34
|
# File 'app/presenters/renalware/hd/mdm_presenter.rb', line 25
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
42
43
44
|
# File 'app/presenters/renalware/hd/mdm_presenter.rb', line 42
def preference_set
@preference_set ||= PreferenceSet.for_patient(patient).first || NullObject.instance
end
|
#rolling_audit ⇒ Object
50
51
52
|
# File 'app/presenters/renalware/hd/mdm_presenter.rb', line 50
def rolling_audit
@rolling_audit ||= audits.find_by(rolling: true)
end
|