Sha256: d62e9cf0c07caaf20d83b5b32765155c116379d9ef0e5ee34f5aff02734acb96

Contents?: true

Size: 1.18 KB

Versions: 1

Compression:

Stored size: 1.18 KB

Contents

module HealthDataStandards
  module Export
    class Cat3
      def initialize
        template_helper = HealthDataStandards::Export::TemplateHelper.new('cat3', 'cat3')
        @rendering_context = HealthDataStandards::Export::RenderingContext.new
        @rendering_context.template_helper = template_helper
        @cat1_renderer = HealthDataStandards::Export::RenderingContext.new
        @cat1_renderer.template_helper = HealthDataStandards::Export::TemplateHelper.new('cat1', 'cat1')
      end

      def export(measures, header, effective_date, start_date, end_date, test_id=nil)
        results = {}
        measures.each do |measure|
          results[measure['hqmf_id']] = HealthDataStandards::CQM::QueryCache.aggregate_measure(measure['hqmf_id'], effective_date, test_id)
        end
        @rendering_context.render(:template => 'show', 
                                  :locals => {:measures => measures, :start_date => start_date, 
                                              :end_date => end_date, :cat1_renderer => @cat1_renderer,
                                              :results => results,
                                              :header=>header})
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
health-data-standards-3.2.12 lib/health-data-standards/export/cat_3.rb