Sha256: 575fb5a1035a7b6ba2a2b9d463ec3207c0539eba0b9cbb2225d6b80f93c2fd60

Contents?: true

Size: 1.33 KB

Versions: 6

Compression:

Stored size: 1.33 KB

Contents

require 'test_helper'

class MeasureComplexityTest < ActiveSupport::TestCase

  setup do
    @cql_mat_export = File.new File.join('test', 'fixtures', 'BCS_v5_0_Artifacts.zip')
  end

  test "Loading a CQL Mat export zip file, with VSAC credentials" do
    VCR.use_cassette("valid_vsac_response") do
      dump_db
      user = User.new
      user.save
      measure_details = { 'episode_of_care'=> false }
      Measures::CqlLoader.load(@cql_mat_export, user, measure_details, { profile: APP_CONFIG['vsac']['default_profile'] }, get_ticket_granting_ticket).save
      assert_equal 1, CqlMeasure.all.count
      measure = CqlMeasure.all.first
      assert_equal 10, measure.complexity["variables"].length
      assert_equal [{"name"=>"Patient", "complexity"=>1},
                    {"name"=>"SDE Ethnicity", "complexity"=>1},
                    {"name"=>"SDE Payer", "complexity"=>1},
                    {"name"=>"SDE Race", "complexity"=>1},
                    {"name"=>"SDE Sex", "complexity"=>1},
                    {"name"=>"Initial Pop", "complexity"=>2},
                    {"name"=>"Num", "complexity"=>1},
                    {"name"=>"Double Unilateral Mastectomy", "complexity"=>1},
                    {"name"=>"Denom", "complexity"=>3},
                    {"name"=>"Denom Excl", "complexity"=>2}], measure.complexity["variables"]
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bonnie_bundler-2.2.3 test/unit/measure_complexity_test.rb
bonnie_bundler-2.2.1 test/unit/measure_complexity_test.rb
bonnie_bundler-2.2.0 test/unit/measure_complexity_test.rb
bonnie_bundler-2.1.2 test/unit/measure_complexity_test.rb
bonnie_bundler-2.1.1 test/unit/measure_complexity_test.rb
bonnie_bundler-2.1.0 test/unit/measure_complexity_test.rb