cqm-validators 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +12 -10
- data/.simplecov +2 -0
- data/.travis.yml +0 -2
- data/cqm_validators.gemspec +5 -3
- data/lib/cqm_validators/version.rb +1 -1
- data/lib/measure_validator.rb +1 -1
- data/lib/performance_rate_validator.rb +7 -7
- metadata +15 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4c8067796e458fb6576378bcfedadb762e75cfc3222e7b71288a1ac24f706087
|
4
|
+
data.tar.gz: 5ee8cfad30be91371fee0b0ebcd454d5c7bd5993d6ff96b3e565fd148039e5b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0333e138838bda558b17d0612b5f270d9d549c908531e5e1792433941aaaa913c7d0d7754d09f60ca91df98cd355612418a68cb122a2d9440479d923fbff2989
|
7
|
+
data.tar.gz: 58deb72053f7e7e29e9c2174b21e7b603bbd5fffe954665add5899de6d0438b0b24d40c403b08735358bb10001585731230c4452d8a345295c19fab1bb49308c
|
data/.rubocop.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion: 2.
|
2
|
+
TargetRubyVersion: 2.5
|
3
3
|
Exclude:
|
4
4
|
- bin/*
|
5
5
|
Documentation:
|
@@ -8,6 +8,14 @@ Documentation:
|
|
8
8
|
Lint/RescueException:
|
9
9
|
Exclude:
|
10
10
|
- 'lib/schematron/java_processor.rb'
|
11
|
+
Layout/LineLength:
|
12
|
+
Max: 150
|
13
|
+
Exclude:
|
14
|
+
- 'test/**/*'
|
15
|
+
# TODO: remove exclusions below this line as line length is fixed
|
16
|
+
- 'lib/reported_result_extractor.rb'
|
17
|
+
- 'lib/data_validator.rb'
|
18
|
+
- 'lib/measure_validator.rb'
|
11
19
|
Metrics/AbcSize:
|
12
20
|
# The ABC size is a calculated magnitude, so this number can be a Fixnum or
|
13
21
|
# a Float.
|
@@ -25,14 +33,6 @@ Metrics/ClassLength:
|
|
25
33
|
- 'test/**/*'
|
26
34
|
# TODO: remove exclusions below this line as Class length is fixed
|
27
35
|
- 'lib/qrda_qdm_template_validator.rb'
|
28
|
-
Metrics/LineLength:
|
29
|
-
Max: 150
|
30
|
-
Exclude:
|
31
|
-
- 'test/**/*'
|
32
|
-
# TODO: remove exclusions below this line as line length is fixed
|
33
|
-
- 'lib/reported_result_extractor.rb'
|
34
|
-
- 'lib/data_validator.rb'
|
35
|
-
- 'lib/measure_validator.rb'
|
36
36
|
Metrics/MethodLength:
|
37
37
|
CountComments: false # count full line comments?
|
38
38
|
Max: 20
|
@@ -50,7 +50,9 @@ Metrics/CyclomaticComplexity:
|
|
50
50
|
Max: 10
|
51
51
|
Metrics/PerceivedComplexity:
|
52
52
|
Max: 10
|
53
|
-
|
53
|
+
Exclude:
|
54
|
+
- 'lib/reported_result_extractor.rb'
|
55
|
+
Naming/MethodParameterName:
|
54
56
|
Enabled: false
|
55
57
|
Style/DateTime:
|
56
58
|
Enabled: false
|
data/.simplecov
CHANGED
data/.travis.yml
CHANGED
data/cqm_validators.gemspec
CHANGED
@@ -22,7 +22,9 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ['lib']
|
24
24
|
|
25
|
-
spec.
|
25
|
+
spec.required_ruby_version = '>= 2.5.0'
|
26
|
+
|
27
|
+
spec.add_dependency 'nokogiri', '~>1.10'
|
26
28
|
|
27
29
|
spec.add_development_dependency 'bundler'
|
28
30
|
spec.add_development_dependency 'byebug'
|
@@ -30,6 +32,6 @@ Gem::Specification.new do |spec|
|
|
30
32
|
spec.add_development_dependency 'minitest-reporters'
|
31
33
|
spec.add_development_dependency 'mongoid'
|
32
34
|
spec.add_development_dependency 'overcommit'
|
33
|
-
spec.add_development_dependency 'rake', '
|
34
|
-
spec.add_development_dependency 'rubocop', '~> 0.
|
35
|
+
spec.add_development_dependency 'rake', '>= 12.3.3'
|
36
|
+
spec.add_development_dependency 'rubocop', '~> 0.93'
|
35
37
|
end
|
data/lib/measure_validator.rb
CHANGED
@@ -12,7 +12,7 @@ module CqmValidators
|
|
12
12
|
@errors = []
|
13
13
|
@doc = get_document(file)
|
14
14
|
@doc.root.add_namespace_definition('cda', 'urn:hl7-org:v3')
|
15
|
-
measure_ids = CQM::Measure.
|
15
|
+
measure_ids = CQM::Measure.pluck(:hqmf_id)
|
16
16
|
doc_measure_ids = @doc.xpath(measure_selector).map(&:value).map(&:upcase)
|
17
17
|
# list of all of the set ids in the QRDA
|
18
18
|
doc_neutral_ids = @doc.xpath(neutral_measure_selector).map(&:value).map(&:upcase).sort
|
@@ -52,13 +52,13 @@ module CqmValidators
|
|
52
52
|
expected = calculate_performance_rates(reported_result)
|
53
53
|
numer_id = population_set.populations.NUMER.hqmf_id
|
54
54
|
if expected == 'NA' && reported_result['PR']['nullFlavor'] != 'NA'
|
55
|
-
|
56
|
-
elsif reported_result['PR']['nullFlavor'] == 'NA'
|
57
|
-
|
58
|
-
elsif reported_result['PR']['value'].split('.', 2).last.size > 6
|
59
|
-
|
60
|
-
elsif (reported_result['PR']['value'].to_f - expected.round(6)).abs > 0.0000001
|
61
|
-
|
55
|
+
build_error("Reported Performance Rate for Numerator #{numer_id} should be NA", '/', data[:file_name])
|
56
|
+
elsif expected != 'NA' && reported_result['PR']['nullFlavor'] == 'NA'
|
57
|
+
build_error("Reported Performance Rate for Numerator #{numer_id} should not be NA", '/', data[:file_name])
|
58
|
+
elsif expected != 'NA' && reported_result['PR']['value'].split('.', 2).last.size > 6
|
59
|
+
build_error('Reported Performance Rate SHALL not have a precision greater than .000001 ', '/', data[:file_name])
|
60
|
+
elsif expected != 'NA' && (reported_result['PR']['value'].to_f - expected.round(6)).abs > 0.0000001
|
61
|
+
build_error("Reported Performance Rate of #{reported_result['PR']['value']} for Numerator #{numer_id} does not match expected"\
|
62
62
|
" value of #{expected.round(6)}.", '/', data[:file_name])
|
63
63
|
end
|
64
64
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cqm-validators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Laura
|
8
8
|
- Michael O'Keefe
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-11-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 1.10
|
20
|
+
version: '1.10'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 1.10
|
27
|
+
version: '1.10'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: bundler
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -113,30 +113,30 @@ dependencies:
|
|
113
113
|
name: rake
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- - "
|
116
|
+
- - ">="
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
118
|
+
version: 12.3.3
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- - "
|
123
|
+
- - ">="
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
125
|
+
version: 12.3.3
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: rubocop
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
130
|
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: '0.
|
132
|
+
version: '0.93'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - "~>"
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: '0.
|
139
|
+
version: '0.93'
|
140
140
|
description: new cqm validator library
|
141
141
|
email:
|
142
142
|
- laclark@mitre.org
|
@@ -216,7 +216,7 @@ homepage: https://github.com/projecttacoma/cqm-validators
|
|
216
216
|
licenses:
|
217
217
|
- Apache-2.0
|
218
218
|
metadata: {}
|
219
|
-
post_install_message:
|
219
|
+
post_install_message:
|
220
220
|
rdoc_options: []
|
221
221
|
require_paths:
|
222
222
|
- lib
|
@@ -224,16 +224,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
224
224
|
requirements:
|
225
225
|
- - ">="
|
226
226
|
- !ruby/object:Gem::Version
|
227
|
-
version:
|
227
|
+
version: 2.5.0
|
228
228
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
229
229
|
requirements:
|
230
230
|
- - ">="
|
231
231
|
- !ruby/object:Gem::Version
|
232
232
|
version: '0'
|
233
233
|
requirements: []
|
234
|
-
|
235
|
-
|
236
|
-
signing_key:
|
234
|
+
rubygems_version: 3.1.4
|
235
|
+
signing_key:
|
237
236
|
specification_version: 4
|
238
237
|
summary: new cqm validator library
|
239
238
|
test_files: []
|