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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: eab81982007411f9a2ad3ed8defc9196514826b7
4
- data.tar.gz: f347a12d4b75249da751a807982d2796f022fe4e
2
+ SHA256:
3
+ metadata.gz: 4c8067796e458fb6576378bcfedadb762e75cfc3222e7b71288a1ac24f706087
4
+ data.tar.gz: 5ee8cfad30be91371fee0b0ebcd454d5c7bd5993d6ff96b3e565fd148039e5b8
5
5
  SHA512:
6
- metadata.gz: b1d27039617962694f3a319c15cffa03519d12cf924953f70be84f17e4be010bd0fc6701bf53fc9c3a9701ca2143cbba4417a4f9b8bb788c9d05fa723c7038c5
7
- data.tar.gz: 268e8ece14624f63778ed9fc2c27574b97bb9f752b7f01aae7817f3c858ea678b9d48984e8e92cbb23594f2f91d2ee96150fb5cfbab48cf6d5e1464ad4e8e443
6
+ metadata.gz: 0333e138838bda558b17d0612b5f270d9d549c908531e5e1792433941aaaa913c7d0d7754d09f60ca91df98cd355612418a68cb122a2d9440479d923fbff2989
7
+ data.tar.gz: 58deb72053f7e7e29e9c2174b21e7b603bbd5fffe954665add5899de6d0438b0b24d40c403b08735358bb10001585731230c4452d8a345295c19fab1bb49308c
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.6
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
- Naming/UncommunicativeMethodParamName:
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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  SimpleCov.start do
2
4
  merge_timeout 3600
3
5
  end
@@ -2,8 +2,6 @@ language: ruby
2
2
  rvm:
3
3
  - 2.6
4
4
  - 2.5
5
- - 2.4
6
- - 2.3
7
5
  cache:
8
6
  - bundler
9
7
  sudo: required
@@ -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.add_dependency 'nokogiri', '~>1.10.3'
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', '~> 10.0'
34
- spec.add_development_dependency 'rubocop', '~> 0.60'
35
+ spec.add_development_dependency 'rake', '>= 12.3.3'
36
+ spec.add_development_dependency 'rubocop', '~> 0.93'
35
37
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CqmValidators
4
- VERSION = '2.0.1'
4
+ VERSION = '2.0.2'
5
5
  end
@@ -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.all.map(&:hqmf_id)
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
- return build_error("Reported Performance Rate for Numerator #{numer_id} should be NA", '/', data[:file_name])
56
- elsif reported_result['PR']['nullFlavor'] == 'NA'
57
- return build_error("Reported Performance Rate for Numerator #{numer_id} should not be NA", '/', data[:file_name])
58
- elsif reported_result['PR']['value'].split('.', 2).last.size > 6
59
- return build_error('Reported Performance Rate SHALL not have a precision greater than .000001 ', '/', data[:file_name])
60
- elsif (reported_result['PR']['value'].to_f - expected.round(6)).abs > 0.0000001
61
- return build_error("Reported Performance Rate of #{reported_result['PR']['value']} for Numerator #{numer_id} does not match expected"\
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.1
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: 2019-10-25 00:00:00.000000000 Z
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.3
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.3
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: '10.0'
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: '10.0'
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.60'
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.60'
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: '0'
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
- rubyforge_project:
235
- rubygems_version: 2.6.14
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: []