Sha256: bf33de439cf39a87df33873885ba01c6bbf0155b832f68d686cd2082bc210155

Contents?: true

Size: 651 Bytes

Versions: 62

Compression:

Stored size: 651 Bytes

Contents

# frozen_string_literal: true

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

62 entries across 62 versions & 1 rubygems

Version Path
renalware-core-2.0.77 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.76 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.75 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.74 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.73 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.72 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.71 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.70 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.69 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.68 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.67 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.64 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.63 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.62 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.61 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.60 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.58 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.57 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.56 app/models/renalware/pathology/observation_description.rb
renalware-core-2.0.55 app/models/renalware/pathology/observation_description.rb