Sha256: 5c6baf842b4ce58c788fef119502c0b0cc350d86f16594aad43afe6e2d4da85b

Contents?: true

Size: 1.41 KB

Versions: 8

Compression:

Stored size: 1.41 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 = ['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='r4', 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.0.6 lib/health-data-standards/export/cat_1.rb
health-data-standards-4.0.5 lib/health-data-standards/export/cat_1.rb
health-data-standards-4.0.4 lib/health-data-standards/export/cat_1.rb
health-data-standards-4.0.3 lib/health-data-standards/export/cat_1.rb
health-data-standards-4.0.2 lib/health-data-standards/export/cat_1.rb
health-data-standards-4.0.1 lib/health-data-standards/export/cat_1.rb
health-data-standards-4.0.0 lib/health-data-standards/export/cat_1.rb
health-data-standards-3.7.0 lib/health-data-standards/export/cat_1.rb