Class: Renalware::Pathology::AllObservationCodes
- Inherits:
-
Object
- Object
- Renalware::Pathology::AllObservationCodes
- Includes:
- Singleton
- Defined in:
- app/models/renalware/pathology/all_observation_codes.rb
Overview
A singleton exposing all defined OBX codes as an array of symbols
Class Method Summary collapse
-
.include?(code) ⇒ Boolean
Example usage: AllObservationCodes.include?(code).
Instance Method Summary collapse
Class Method Details
.include?(code) ⇒ Boolean
Example usage:
AllObservationCodes.include?(code)
13 14 15 |
# File 'app/models/renalware/pathology/all_observation_codes.rb', line 13 def self.include?(code) instance.all.include?(code) end |
Instance Method Details
#all ⇒ Object
17 18 19 |
# File 'app/models/renalware/pathology/all_observation_codes.rb', line 17 def all @all ||= ObservationDescription.order(:code).pluck(:code).map(&:upcase).map(&:to_sym) end |