Sha256: 58bb531fe33f1192bb1b2fb4b6c016d534a5ddbf32463ba527d34ace9ecb2f35

Contents?: true

Size: 520 Bytes

Versions: 24

Compression:

Stored size: 520 Bytes

Contents

require "renalware/admissions"
require "collection_presenter"

module Renalware
  module Admissions
    class PatientAdmissionsController < BaseController
      include Renalware::Concerns::Pageable

      def index
        admissions = Admission
          .where(patient_id: patient.id).page(page).per(per_page)
          .order(admitted_on: :desc)
        authorize admissions
        render locals: {
          admissions: CollectionPresenter.new(admissions, AdmissionPresenter)
        }
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
renalware-core-2.0.16 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.15 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.14 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.13 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.12 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.11 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.9 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.8 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.7 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.5 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.4 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.3 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.2 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.1 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.0 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.0.pre.rc13 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.0.pre.rc11 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.0.pre.rc10 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.0.pre.rc9 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.0.pre.rc8 app/controllers/renalware/admissions/patient_admissions_controller.rb