Sha256: 895a02bcee1d1ae7bc5f478aa3615ff4be36ff9da7f03b18a2996d455787adb5

Contents?: true

Size: 825 Bytes

Versions: 124

Compression:

Stored size: 825 Bytes

Contents

# frozen_string_literal: true

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

124 entries across 124 versions & 1 rubygems

Version Path
renalware-core-2.0.149 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.148 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.147 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.146 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.145 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.144 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.143 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.142 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.141 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.140 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.139 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.138 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.137 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.136 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.135 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.134 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.133 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.132 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.131 app/controllers/renalware/pathology/observations_controller.rb
renalware-core-2.0.130 app/controllers/renalware/pathology/observations_controller.rb