Sha256: 37e08d38dc47de951905ff4e2beed35c4b08a7e140924cf0d51c4fea585bfcc9

Contents?: true

Size: 620 Bytes

Versions: 9

Compression:

Stored size: 620 Bytes

Contents

require_dependency "renalware/pathology"

module Renalware
  module Pathology
    class ObservationDescription < ApplicationRecord
      has_many :observations,
               class_name: "Pathology::Observation",
               inverse_of: :description
      belongs_to :measurement_unit

      scope :in_display_order, lambda {
        where("display_group is not null and display_order is not null")
        .order([:display_group, :display_order])
      }

      def self.for(codes)
        ObservationDescriptionsByCodeQuery.new(codes: codes).call
      end

      def to_s
        code
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
renalware-core-2.0.8 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.7 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.5 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.4 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.3 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.2 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.1 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.0 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.0.pre.rc13 app/models/renalware/pathology/observation_description.rb