Sha256: 6ca5dac381ed4c9e6d5a62ec4ed91d9fe63b0f76269597691de65f325a469702

Contents?: true

Size: 1.42 KB

Versions: 8

Compression:

Stored size: 1.42 KB

Contents

module HealthDataStandards
  module Export
    class Cat1
      
      def initialize(qrda_version = nil)
        template_helper = HealthDataStandards::Export::TemplateHelper.new('cat1', 'cat1', nil, qrda_version)
        @rendering_context = HealthDataStandards::Export::RenderingContext.new
        @rendering_context.template_helper = template_helper
        @rendering_context.extensions = [HealthDataStandards::Export::Helper::Cat1ViewHelper]
      end


      @@vs_map = nil

      @@most_recent_qrda_version = 'r4'
      @@valid_qrda_versions = ['r5', 'r4', 'r3_1', 'r3', 'r2']

      #default qrda_version should default to latest version
      def export(patient, measures, start_date, end_date, header=nil, qrda_version='r5', cms_compatibility=false)
        qrda_version = qrda_version.nil? ? @@most_recent_qrda_version : qrda_version

        if (!@@valid_qrda_versions.include? qrda_version)
          raise "Unknown QRDA version provided"
        end

        qrda_template = 'show'
        r2_compatibility = false

        if qrda_version == 'r2'
          r2_compatibility = true
        end
        @rendering_context.render(:template => qrda_template, :locals => {:patient => patient, :measures => measures,
						:start_date => start_date, :end_date => end_date, :header => header, :qrda_version => qrda_version,
						:r2_compatibility => r2_compatibility, :cms_compatibility => cms_compatibility})
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
health-data-standards-4.3.5 lib/health-data-standards/export/cat_1.rb
health-data-standards-4.3.4 lib/health-data-standards/export/cat_1.rb
health-data-standards-4.3.3 lib/health-data-standards/export/cat_1.rb
health-data-standards-4.3.2 lib/health-data-standards/export/cat_1.rb
health-data-standards-4.3.1 lib/health-data-standards/export/cat_1.rb
health-data-standards-4.3.0 lib/health-data-standards/export/cat_1.rb
health-data-standards-4.2.0 lib/health-data-standards/export/cat_1.rb
health-data-standards-4.1.0 lib/health-data-standards/export/cat_1.rb