class HealthDataStandards::CQM::QueryCache
Public Class Methods
aggregate_measure(measure_id, effective_date, filters=nil, test_id=nil)
click to toggle source
# File lib/health-data-standards/models/cqm/query_cache.rb, line 26 def self.aggregate_measure(measure_id, effective_date, filters=nil, test_id=nil) query_hash = {'effective_date' => effective_date, 'measure_id' => measure_id, 'test_id' => test_id} if filters query_hash.merge!(filters) end cache_entries = self.where(query_hash) aggregate_count = AggregateCount.new(measure_id) cache_entries.each do |cache_entry| aggregate_count.add_entry(cache_entry) end aggregate_count end
Public Instance Methods
is_cv?()
click to toggle source
# File lib/health-data-standards/models/cqm/query_cache.rb, line 44 def is_cv? population_ids.has_key?('MSRPOPL') end
is_stratification?()
click to toggle source
# File lib/health-data-standards/models/cqm/query_cache.rb, line 40 def is_stratification? population_ids.has_key?('stratification') || population_ids.has_key?('STRAT') end