Class: HealthDataStandards::CQM::AggregateCount
- Inherits:
-
Object
- Object
- HealthDataStandards::CQM::AggregateCount
- Includes:
- PopulationSelectors
- Defined in:
- lib/health-data-standards/models/cqm/aggregate_objects.rb
Instance Attribute Summary collapse
-
#measure_id ⇒ Object
Returns the value of attribute measure_id.
-
#stratifications ⇒ Object
Returns the value of attribute stratifications.
-
#supplemental_data ⇒ Object
Returns the value of attribute supplemental_data.
-
#top_level_populations ⇒ Object
(also: #populations)
Returns the value of attribute top_level_populations.
Instance Method Summary collapse
-
#initialize ⇒ AggregateCount
constructor
A new instance of AggregateCount.
- #is_cv? ⇒ Boolean
- #performance_rate ⇒ Object
- #supplemental_data_for(population_type, supplemental_data_type) ⇒ Object
Methods included from PopulationSelectors
#denominator, #denominator_exceptions, #denominator_exclusions, #method_missing, #multiple_population_types?, #numerator, #population_count, #population_id
Constructor Details
#initialize ⇒ AggregateCount
Returns a new instance of AggregateCount.
73 74 75 76 |
# File 'lib/health-data-standards/models/cqm/aggregate_objects.rb', line 73 def initialize @stratifications = [] @top_level_populations = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class HealthDataStandards::CQM::PopulationSelectors
Instance Attribute Details
#measure_id ⇒ Object
Returns the value of attribute measure_id.
69 70 71 |
# File 'lib/health-data-standards/models/cqm/aggregate_objects.rb', line 69 def measure_id @measure_id end |
#stratifications ⇒ Object
Returns the value of attribute stratifications.
69 70 71 |
# File 'lib/health-data-standards/models/cqm/aggregate_objects.rb', line 69 def stratifications @stratifications end |
#supplemental_data ⇒ Object
Returns the value of attribute supplemental_data.
69 70 71 |
# File 'lib/health-data-standards/models/cqm/aggregate_objects.rb', line 69 def supplemental_data @supplemental_data end |
#top_level_populations ⇒ Object Also known as: populations
Returns the value of attribute top_level_populations.
69 70 71 |
# File 'lib/health-data-standards/models/cqm/aggregate_objects.rb', line 69 def top_level_populations @top_level_populations end |
Instance Method Details
#is_cv? ⇒ Boolean
78 79 80 |
# File 'lib/health-data-standards/models/cqm/aggregate_objects.rb', line 78 def is_cv? top_level_populations.any? {|pop| pop.type == 'MSRPOPL'} end |
#performance_rate ⇒ Object
82 83 84 85 |
# File 'lib/health-data-standards/models/cqm/aggregate_objects.rb', line 82 def performance_rate numerator_count.to_f / (denominator_count - denominator_exclusions_count - denominator_exceptions_count) end |
#supplemental_data_for(population_type, supplemental_data_type) ⇒ Object
87 88 89 |
# File 'lib/health-data-standards/models/cqm/aggregate_objects.rb', line 87 def supplemental_data_for(population_type, supplemental_data_type) supplemental_data[population_type][supplemental_data_type] end |