Class: Renalware::HD::PatientsController
- Inherits:
-
BaseController
- Object
- ApplicationController
- ApplicationController
- BaseController
- BaseController
- Renalware::HD::PatientsController
- Defined in:
- app/controllers/renalware/hd/patients_controller.rb
Instance Method Summary collapse
Methods inherited from BaseController
Instance Method Details
#dialysing_at_hospital ⇒ Object
17 18 19 20 21 |
# File 'app/controllers/renalware/hd/patients_controller.rb', line 17 def dialysing_at_hospital patients = all_hd_patients_matching_search_term render json: simplify(patients).to_json end |
#dialysing_at_unit ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'app/controllers/renalware/hd/patients_controller.rb', line 8 def dialysing_at_unit unit_id = params.fetch(:unit_id) patients = all_hd_patients_matching_search_term .eager_load(:hd_profile) .merge(HD::Profile.dialysing_at_unit(unit_id)) render json: simplify(patients).to_json end |