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.84 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.83 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.82 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.81 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.80 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.79 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.78 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.77 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.76 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.75 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.74 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.73 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.72 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.71 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.70 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.69 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.68 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.67 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.64 app/controllers/renalware/admissions/patient_admissions_controller.rb
renalware-core-2.0.63 app/controllers/renalware/admissions/patient_admissions_controller.rb