Sha256: 459c8cd80bf48ef28cbb30b0cab987e102c67e317637f61e86f9a5efbd16a7f8

Contents?: true

Size: 1.02 KB

Versions: 4

Compression:

Stored size: 1.02 KB

Contents

module HealthDataStandards
  module CQM

  	class Measure
		  include Mongoid::Document
		  store_in collection: 'measures'
		  field :id, type: String
		  field :sub_id, type: String
		  field :name, type: String
		  field :subtitle, type: String
		  field :short_subtitle, type: String
		  field :hqmf_id, type: String
		  field :hqmf_set_id, type: String
		  field :hqmf_version_number, type: String
		  field :nqf_id, type: String
		  field :type, type: String
		  field :category, type: String
		  field :population_ids , type: Hash
		  field :oids, type: Array 
		  field :data_criteria, type: Array
		  scope :top_level_by_type , ->(type){where({"type"=> type}).any_of({"sub_id" => nil}, {"sub_id" => "a"})}
		  scope :top_level , any_of({"sub_id" => nil}, {"sub_id" => "a"})
		  scope :order_by_id_sub_id, order_by([["id", :asc],["sub_id", :asc]])
		  index({oids: 1})
		  index({hqmf_id: 1})
		  index({category: 1})
		  index "bundle_id" => 1
		  
		  validates_presence_of :id
		  validates_presence_of :name
		  


		end
	end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
health-data-standards-3.0.6 lib/health-data-standards/models/cqm/measure.rb
health-data-standards-3.0.5 lib/health-data-standards/models/cqm/measure.rb
health-data-standards-3.0.4 lib/health-data-standards/models/cqm/measure.rb
health-data-standards-3.0.3 lib/health-data-standards/models/cqm/measure.rb