Class: Renalware::Renal::RegistryPreflightChecksController
- Inherits:
-
BaseController
show all
- Includes:
- Concerns::Pageable
- Defined in:
- app/controllers/renalware/renal/registry_preflight_checks_controller.rb
Defined Under Namespace
Classes: DeceasedPatientPresenter, PatientPresenter
Instance Method Summary
collapse
#patient
Instance Method Details
#deaths ⇒ Object
47
48
49
50
51
52
53
|
# File 'app/controllers/renalware/renal/registry_preflight_checks_controller.rb', line 47
def deaths
authorize [:renalware, :renal, :registry_preflight_check], :deaths?
query = Registry::PreflightChecks::DeathsQuery.new(query_params: query_params)
patients = query.call.page(page).per(per_page)
patients = CollectionPresenter.new(patients, DeceasedPatientPresenter)
render locals: { patients: patients, query: query.search }
end
|
#patients ⇒ Object
39
40
41
42
43
44
45
|
# File 'app/controllers/renalware/renal/registry_preflight_checks_controller.rb', line 39
def patients
authorize [:renalware, :renal, :registry_preflight_check], :patients?
query = Registry::PreflightChecks::PatientsQuery.new(query_params: query_params)
patients = query.call.page(page).per(per_page)
patients = CollectionPresenter.new(patients, PatientPresenter)
render locals: { patients: patients, query: query.search }
end
|