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.16 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.15 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.14 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.13 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.12 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.11 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.9 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.8 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.7 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.5 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.4 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.3 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.2 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.1 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.rc13 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.rc11 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.rc10 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.rc9 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.0.pre.rc8 app/controllers/renalware/pathology/observations_controller.rb