bonnie_bundler 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/bonnie-bundler.gemspec +1 -1
- data/lib/measures/loading/cql_loader.rb +39 -13
- data/test/fixtures/CMS134v6.zip +0 -0
- data/test/fixtures/vcr_cassettes/valid_vsac_response_hospice.yml +4842 -0
- data/test/unit/cql_loader_test.rb +27 -0
- metadata +6 -3
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'vcr_setup.rb'
|
3
|
+
|
4
|
+
class CQLLoaderTest < ActiveSupport::TestCase
|
5
|
+
|
6
|
+
setup do
|
7
|
+
@cql_mat_export = File.new File.join('test', 'fixtures', 'CMS134v6.zip')
|
8
|
+
end
|
9
|
+
|
10
|
+
test 'Loading a measure that has a definition with the same name as a library definition' do
|
11
|
+
VCR.use_cassette('valid_vsac_response_hospice') do
|
12
|
+
dump_db
|
13
|
+
user = User.new
|
14
|
+
user.save
|
15
|
+
|
16
|
+
measure_details = { 'episode_of_care'=> false }
|
17
|
+
Measures::CqlLoader.load(@cql_mat_export, user, measure_details, ENV['VSAC_USERNAME'], ENV['VSAC_PASSWORD']).save
|
18
|
+
assert_equal 1, CqlMeasure.all.count
|
19
|
+
measure = CqlMeasure.all.first
|
20
|
+
assert_equal 'Diabetes: Medical Attention for Nephropathy', measure.title
|
21
|
+
cql_statement_dependencies = measure.cql_statement_dependencies
|
22
|
+
assert_equal 3, cql_statement_dependencies.length
|
23
|
+
assert_equal 1, cql_statement_dependencies['Hospice'].length
|
24
|
+
assert_equal [], cql_statement_dependencies['Hospice']['Has Hospice']
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bonnie_bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The MITRE Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: health-data-standards
|
@@ -202,6 +202,7 @@ files:
|
|
202
202
|
- lib/models/cql_measure.rb
|
203
203
|
- lib/models/measure.rb
|
204
204
|
- test/fixtures/BCS_v5_0_Artifacts.zip
|
205
|
+
- test/fixtures/CMS134v6.zip
|
205
206
|
- test/fixtures/CMS158_v5_4_Artifacts.zip
|
206
207
|
- test/fixtures/CMS158_v5_4_Artifacts_Update.zip
|
207
208
|
- test/fixtures/DRAFT_CMS2_CQL.zip
|
@@ -212,6 +213,7 @@ files:
|
|
212
213
|
- test/fixtures/vcr_cassettes/valid_vsac_response.yml
|
213
214
|
- test/fixtures/vcr_cassettes/valid_vsac_response_158.yml
|
214
215
|
- test/fixtures/vcr_cassettes/valid_vsac_response_158_update.yml
|
216
|
+
- test/fixtures/vcr_cassettes/valid_vsac_response_hospice.yml
|
215
217
|
- test/fixtures/vcr_cassettes/valid_vsac_response_includes_draft.yml
|
216
218
|
- test/fixtures/vcr_cassettes/vs_loading_draft_no_profile_version.yml
|
217
219
|
- test/fixtures/vcr_cassettes/vs_loading_draft_profile.yml
|
@@ -224,6 +226,7 @@ files:
|
|
224
226
|
- test/fixtures/vs_loading/DocofMeds_v5_1_Artifacts_With_Profiles.zip
|
225
227
|
- test/simplecov_init.rb
|
226
228
|
- test/test_helper.rb
|
229
|
+
- test/unit/cql_loader_test.rb
|
227
230
|
- test/unit/load_mat_export_test.rb
|
228
231
|
- test/unit/measure_complexity_test.rb
|
229
232
|
- test/unit/measure_diff_test.rb
|
@@ -251,7 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
251
254
|
version: '0'
|
252
255
|
requirements: []
|
253
256
|
rubyforge_project:
|
254
|
-
rubygems_version: 2.6.
|
257
|
+
rubygems_version: 2.6.12
|
255
258
|
signing_key:
|
256
259
|
specification_version: 4
|
257
260
|
summary: A Gem for creating and managing bonnie bundles
|