Class: Renalware::Pathology::Requests::RulesController

Inherits:
BaseController show all
Defined in:
app/controllers/renalware/pathology/requests/rules_controller.rb

Instance Method Summary collapse

Methods inherited from BaseController

#patient

Instance Method Details

#indexObject



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/controllers/renalware/pathology/requests/rules_controller.rb', line 9

def index
  rule_sets = GlobalRuleSet.all
  clinics = Renalware::Pathology::Clinic.for_algorithm
  authorize rule_sets

  rules_table = GlobalRuleSetsTable.new(
    Renalware::Pathology::RequestDescription.with_global_rule_set,
    clinics,
    GlobalRuleSetPresenter.present(rule_sets)
  )

  render :index, locals: { rules_table: rules_table, clinics: clinics }
end