Class: Renalware::Accesses::DashboardPresenter
- Inherits:
-
Object
- Object
- Renalware::Accesses::DashboardPresenter
- Defined in:
- app/presenters/renalware/accesses/dashboard_presenter.rb
Instance Method Summary collapse
- #assessments ⇒ Object
- #current_plan ⇒ Object
- #current_profile ⇒ Object
- #plans ⇒ Object
- #procedures ⇒ Object
- #profiles ⇒ Object
Instance Method Details
#assessments ⇒ Object
32 33 34 35 36 37 |
# File 'app/presenters/renalware/accesses/dashboard_presenter.rb', line 32 def assessments @assessments ||= CollectionPresenter.new( patient.assessments.ordered.includes(:type), AssessmentPresenter ) end |
#current_plan ⇒ Object
43 44 45 |
# File 'app/presenters/renalware/accesses/dashboard_presenter.rb', line 43 def current_plan @current_plan ||= ProfilePresenter.new(patient.current_plan) end |
#current_profile ⇒ Object
39 40 41 |
# File 'app/presenters/renalware/accesses/dashboard_presenter.rb', line 39 def current_profile @current_profile ||= ProfilePresenter.new(patient.current_profile) end |
#plans ⇒ Object
18 19 20 21 22 23 |
# File 'app/presenters/renalware/accesses/dashboard_presenter.rb', line 18 def plans @plans ||= CollectionPresenter.new( patient.plans.historical.ordered, PlanPresenter ) end |
#procedures ⇒ Object
25 26 27 28 29 30 |
# File 'app/presenters/renalware/accesses/dashboard_presenter.rb', line 25 def procedures @procedures ||= CollectionPresenter.new( patient.procedures.ordered.includes(:type), ProcedurePresenter ) end |
#profiles ⇒ Object
11 12 13 14 15 16 |
# File 'app/presenters/renalware/accesses/dashboard_presenter.rb', line 11 def profiles @profiles ||= CollectionPresenter.new( patient.profiles.past_and_future.ordered.includes(:type), ProfilePresenter ) end |