Sha256: ec883411261c23bf5ddee6ae14d315d90735178a71676c406d47e466efe68891

Contents?: true

Size: 551 Bytes

Versions: 142

Compression:

Stored size: 551 Bytes

Contents

# frozen_string_literal: true

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

142 entries across 142 versions & 1 rubygems

Version Path
renalware-core-2.0.104 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.103 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.102 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.101 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.100 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.99 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.98 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.97 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.96 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.95 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.94 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.93 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.92 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.91 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.90 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.89 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.88 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.87 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.86 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.85 app/controllers/renalware/admissions/patient_admissions_controller.rb