Sha256: c2ac3573d031f05178fede322194449663a2d5c40cea2a73d92b69148745f7ba

Contents?: true

Size: 794 Bytes

Versions: 35

Compression:

Stored size: 794 Bytes

Contents

require_dependency "renalware/pathology"

module Renalware
  module Pathology
    class ObservationsController < Pathology::BaseController
      include Renalware::Concerns::Pageable
      before_action :load_patient

      def index
        description = find_description
        observations = find_observations_for_description(description)

        render locals: { patient: @patient, observations: observations, description: description }
      end

      private

      def find_description
        ObservationDescription.find(params[:description_id])
      end

      def find_observations_for_description(description)
        @patient.observations
          .page(page)
          .includes(:request)
          .for_description(description)
          .ordered
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.rc7 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.rc6 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.rc5 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.rc4 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.rc3 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.rc1 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.beta12 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.beta11 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.beta10 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.beta9 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.beta8 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.beta7 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.beta6 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.beta5 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.beta4 app/controllers/renalware/pathology/observations_controller.rb