Class: HealthDataStandards::CQM::QueryCache
- Inherits:
-
Object
- Object
- HealthDataStandards::CQM::QueryCache
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/health-data-standards/models/cqm/query_cache.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.aggregate_measure(measure_id, effective_date, filter = nil, test_id = nil) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/health-data-standards/models/cqm/query_cache.rb', line 24 def self.aggregate_measure(measure_id, effective_date, filter=nil, test_id=nil) cache_entries = self.where(effective_date: effective_date, measure_id: measure_id, test_id: test_id, filter: filter) aggregate_count = AggregateCount.new(measure_id) cache_entries.each do |cache_entry| aggregate_count.add_entry(cache_entry) end aggregate_count end |
Instance Method Details
#is_cv? ⇒ Boolean
37 38 39 |
# File 'lib/health-data-standards/models/cqm/query_cache.rb', line 37 def is_cv? population_ids.has_key?('MSRPOPL') end |
#is_stratification? ⇒ Boolean
33 34 35 |
# File 'lib/health-data-standards/models/cqm/query_cache.rb', line 33 def is_stratification? population_ids.has_key?('stratification') end |