Class: Renalware::Accesses::DashboardPresenter

Inherits:
Object
  • Object
show all
Defined in:
app/presenters/renalware/accesses/dashboard_presenter.rb

Instance Method Summary collapse

Instance Method Details

#assessmentsObject



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_planObject



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_profileObject



39
40
41
# File 'app/presenters/renalware/accesses/dashboard_presenter.rb', line 39

def current_profile
  @current_profile ||= ProfilePresenter.new(patient.current_profile)
end

#plansObject



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

#proceduresObject



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

#profilesObject



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