carin_for_blue_button_test_kit 0.15.2 → 0.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2dc38afa573d1f7641e80954a89f35b8ab5013e043b2c68250c7159f13b161e2
4
- data.tar.gz: 05cb08c7006b30649a3674234aed72e1bbb759f16cd427b0ef037d2962caa469
3
+ metadata.gz: 67e7b14eb8555dfd3b698224f6588d8d7697a53d97806dd8edc142ad8ec342ca
4
+ data.tar.gz: 8f8a1bf9dbb75ffb68151e3cd5a7a944cea6568c41932549f26665b959c7be80
5
5
  SHA512:
6
- metadata.gz: 87a90792fc246764f3020bf8f7ded8aba134204bad7f26d1a5b9c7fa02150dc654ecde222577b51ef4c19a4d43cd35007949fd2ca9f87bf4ef9878488585a788
7
- data.tar.gz: 7b78e1c9aee4871e3459a7fbd26d7e74002b01a2cbe6b2c33f4a313656c6c56991e5dce0b4556c0a9a41d35719fb04faed806fab9f13bab82d42c17c9d3d02ec
6
+ metadata.gz: 865d150b32a6e1bee5bb4af634bf588721ebcafcdd7ad0168d20aaeb1f75535d8435a9f17c7db78112fb68b66b92606c988cfc8f582a65cc3a5d7ea0739dbc18
7
+ data.tar.gz: 78cca118754975e754777beb20e21199f46bda13855350d04ea4031fa68210fe471cf5db9e915eebe6df80c238a8bb0c5affe180278cde9f4e57d816d2505446
@@ -0,0 +1,74 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CarinForBlueButtonTestKit
4
+ module CARIN4BBV200
5
+ class InsurerSameTest < Inferno::Test
6
+ include CarinSearchTest
7
+
8
+ id :c4bb_v200_custom_eob_insurer_same
9
+ title 'ExplanationOfBenefit insurer is properly referenced in insurance list'
10
+ description %(This test confirms that the ExplanationOfBenefit.insurer is equal to the insurance referenced
11
+ in the ExplanationOfBenefit.insurance list with focal=True, and that ExplanationOfBenefit.insurer is not
12
+ equal to any insurance referenced in the ExplanationOfBenefit.insurance list with focal=False.
13
+ )
14
+
15
+ verifies_requirements 'hl7.fhir.us.carin-bb_2.0.0@116',
16
+ 'hl7.fhir.us.carin-bb_2.0.0@124',
17
+ 'hl7.fhir.us.carin-bb_2.0.0@125',
18
+ 'hl7.fhir.us.carin-bb_2.0.0@127',
19
+ 'hl7.fhir.us.carin-bb_2.0.0@128',
20
+ 'hl7.fhir.us.carin-bb_2.0.0@129'
21
+
22
+ def resource_type
23
+ 'ExplanationOfBenefit'
24
+ end
25
+
26
+ def scratch_resources
27
+ scratch[:explanationofbenefit_resources] ||= {}
28
+ end
29
+
30
+ def get_reference(reference, type)
31
+ reference_id = resource_id(reference)
32
+ fhir_read(type, reference_id)&.resource
33
+ end
34
+
35
+ run do
36
+ resources = scratch_resources[:all]
37
+ skip_if resources.blank?,
38
+ "No #{resource_type} resources were returned"
39
+
40
+ skip_if !resources
41
+ .map(&:insurance)
42
+ .flatten
43
+ .map(&:coverage)
44
+ .map { |eob_insurance_coverage| get_reference(eob_insurance_coverage, :coverage) }
45
+ .any?,
46
+ "None of the ExplanationOfBenefit resources has .insurance.coverage."
47
+
48
+ resources.each do |eob|
49
+ eob.insurance.each_with_index do |eob_insurance, index|
50
+ eob_insurance_coverage = get_reference(eob_insurance.coverage, :coverage)
51
+
52
+ next if eob_insurance_coverage.nil?
53
+
54
+ if eob_insurance.focal
55
+ assert resource_id(eob.insurer) == resource_id(eob_insurance_coverage.payor.first),
56
+ <<~ERROR_MESSAGE1
57
+ ExplanationOfBenefit.insurer.reference differs from
58
+ ExplanationOfBenefit.insurance.coverage.reference -> Coverage.payor[0].reference
59
+ when ExplanationOfBenefit.insurance.focal == True. They must be equal.
60
+ ERROR_MESSAGE1
61
+ else
62
+ assert resource_id(eob.insurer) != resource_id(eob_insurance_coverage.payor.first),
63
+ <<~ERROR_MESSAGE2
64
+ ExplanationOfBenefit.insurer.reference equals
65
+ ExplanationOfBenefit.insurance.coverage.reference -> Coverage.payor[0].reference
66
+ when ExplanationOfBenefit.insurance.focal == False. They must differ.
67
+ ERROR_MESSAGE2
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CarinForBlueButtonTestKit
4
+ module CARIN4BBV200
5
+ class OutcomeCompleteTest < Inferno::Test
6
+ id :c4bb_v200_custom_eob_outcome_complete
7
+ title 'ExplanationOfBenefit.outcome has value "complete"'
8
+ description %(ExplanationOfBenefit.outcome has value "complete")
9
+
10
+ verifies_requirements 'hl7.fhir.us.carin-bb_2.0.0@117'
11
+
12
+ def resource_type
13
+ 'ExplanationOfBenefit'
14
+ end
15
+
16
+ def scratch_resources
17
+ scratch[:explanationofbenefit_resources] ||= {}
18
+ end
19
+
20
+ run do
21
+ resources = scratch_resources[:all]
22
+
23
+ skip_if resources.blank?,
24
+ "No #{resource_type} resources were returned"
25
+
26
+ resources.each do |resource|
27
+ assert resource.outcome == 'complete', "ExplanationOfBenefit.outcome was '#{resource.outcome}'. Expected 'complete'."
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CarinForBlueButtonTestKit
4
+ module CARIN4BBV200
5
+ class TypeDataAbsentTest < Inferno::Test
6
+ id :c4bb_v200_custom_eob_type_data_absent
7
+ title 'ExplanationOfBenefit.type does not use a data absent reason'
8
+ description %(
9
+ ExplanationOfBenefit.type SHALL NOT use a data absent reason.
10
+ )
11
+
12
+ verifies_requirements 'hl7.fhir.us.carin-bb_2.0.0@115'
13
+
14
+ DAR_CODE_SYSTEM_URL = 'http://terminology.hl7.org/CodeSystem/data-absent-reason'
15
+
16
+ def resource_type
17
+ 'ExplanationOfBenefit'
18
+ end
19
+
20
+ def scratch_resources
21
+ scratch[:explanationofbenefit_resources] ||= {}
22
+ end
23
+
24
+ run do
25
+ resources = scratch_resources[:all]
26
+
27
+ skip_if resources.blank?,
28
+ "No #{resource_type} resources were returned"
29
+
30
+ resources.each do |resource|
31
+ resource.type&.coding&.each do |coding|
32
+ if coding.system
33
+ assert coding.system != DAR_CODE_SYSTEM_URL,
34
+ 'ExplanationOfBenefit.type uses a data absent reason. It must not.'
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -26,6 +26,9 @@ require_relative 'eob_pharmacy/validation_test'
26
26
  require_relative 'eob_pharmacy/must_support_test'
27
27
  require_relative 'eob_professional_non_clinician/validation_test'
28
28
  require_relative 'eob_professional_non_clinician/must_support_test'
29
+ require_relative '../../custom_groups/v2.0.0/eob/type_data_absent_test'
30
+ require_relative '../../custom_groups/v2.0.0/eob/insurer_same_test'
31
+ require_relative '../../custom_groups/v2.0.0/eob/outcome_complete_test'
29
32
 
30
33
  module CarinForBlueButtonTestKit
31
34
  module CARIN4BBV200
@@ -133,6 +136,9 @@ read succeeds.
133
136
  test from: :c4bb_v200_eob_pharmacy_must_support_test
134
137
  test from: :c4bb_v200_eob_professional_non_clinician_validation_test
135
138
  test from: :c4bb_v200_eob_professional_non_clinician_must_support_test
139
+ test from: :c4bb_v200_custom_eob_type_data_absent
140
+ test from: :c4bb_v200_custom_eob_insurer_same
141
+ test from: :c4bb_v200_custom_eob_outcome_complete
136
142
  end
137
143
  end
138
144
  end
@@ -1,4 +1,7 @@
1
1
  <% test_file_list.each do |file_name| %>require_relative '<%= file_name %>'
2
+ <% end %><% if module_name== 'CARIN4BBV200' && class_name == 'EobGroup' %>require_relative '../../custom_groups/v2.0.0/eob/type_data_absent_test'
3
+ require_relative '../../custom_groups/v2.0.0/eob/insurer_same_test'
4
+ require_relative '../../custom_groups/v2.0.0/eob/outcome_complete_test'
2
5
  <% end %>
3
6
  module CarinForBlueButtonTestKit
4
7
  module <%= module_name %>
@@ -23,7 +26,10 @@ module CarinForBlueButtonTestKit
23
26
  @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, '<%= profile_identifier %>', 'metadata.yml'), aliases: true))
24
27
  end
25
28
  <% test_id_list.each do |id| %>
26
- test from: :<%= id %><% end %>
29
+ test from: :<%= id %><% end %><% if module_name == 'CARIN4BBV200' && class_name == 'EobGroup' %>
30
+ test from: :c4bb_v200_custom_eob_type_data_absent
31
+ test from: :c4bb_v200_custom_eob_insurer_same
32
+ test from: :c4bb_v200_custom_eob_outcome_complete<% end %>
27
33
  end
28
34
  end
29
35
  end
@@ -118,9 +118,9 @@ hl7.fhir.us.carin-bb_2.0.0,111,http://hl7.org/fhir/us/carin-bb/STU2/StructureDef
118
118
  hl7.fhir.us.carin-bb_2.0.0,112,http://hl7.org/fhir/us/carin-bb/STU2/StructureDefinition-C4BB-ExplanationOfBenefit.html#notes-on-fields,".meta.lastUpdated: Payers SHALL provide the last time the data was updated or the date of creation in the payer’s system of record, whichever comes last.",SHALL,Health Plan,false,,,2.3.17,c4bb_v200-Group02-c4bb_v200_eob-c4bb_v200_eob_validation_test
119
119
  hl7.fhir.us.carin-bb_2.0.0,113,http://hl7.org/fhir/us/carin-bb/STU2/StructureDefinition-C4BB-ExplanationOfBenefit.html#notes-on-fields,".status: value =Expected values are active or cancelled. To comply with the CMS rule, draft EOBs are not required.",SHOULD,Health Plan,false,,,"",""
120
120
  hl7.fhir.us.carin-bb_2.0.0,114,http://hl7.org/fhir/us/carin-bb/STU2/StructureDefinition-C4BB-ExplanationOfBenefit.html#notes-on-fields,.type Defines the Claims profiles. Values from Claim Type Codes are required;,SHALL,Health Plan,false,,,2.3.17,c4bb_v200-Group02-c4bb_v200_eob-c4bb_v200_eob_validation_test
121
- hl7.fhir.us.carin-bb_2.0.0,115,http://hl7.org/fhir/us/carin-bb/STU2/StructureDefinition-C4BB-ExplanationOfBenefit.html#notes-on-fields,.type Defines the Claims profiles…. .type SHALL NOT use a data absent reason.,SHALL NOT,Health Plan,false,,,3.3.03,c4bb_v200-c4bb_server_v200_visual_inspection_and_attestation-c4bb_eob-carin_server_requirement_115_attestation
122
- hl7.fhir.us.carin-bb_2.0.0,116,http://hl7.org/fhir/us/carin-bb/STU2/StructureDefinition-C4BB-ExplanationOfBenefit.html#notes-on-fields,.insurer Same as insurance.coverage.organization. Party responsible for reimbursing the provider,SHALL,Health Plan,false,,,3.3.04,c4bb_v200-c4bb_server_v200_visual_inspection_and_attestation-c4bb_eob-carin_server_requirement_116_117_attestation
123
- hl7.fhir.us.carin-bb_2.0.0,117,http://hl7.org/fhir/us/carin-bb/STU2/StructureDefinition-C4BB-ExplanationOfBenefit.html#notes-on-fields,.outcome: value = complete,SHALL,Health Plan,false,,,3.3.04,c4bb_v200-c4bb_server_v200_visual_inspection_and_attestation-c4bb_eob-carin_server_requirement_116_117_attestation
121
+ hl7.fhir.us.carin-bb_2.0.0,115,http://hl7.org/fhir/us/carin-bb/STU2/StructureDefinition-C4BB-ExplanationOfBenefit.html#notes-on-fields,.type Defines the Claims profiles…. .type SHALL NOT use a data absent reason.,SHALL NOT,Health Plan,false,,,"2.3.29, 3.3.03","c4bb_v200-Group02-c4bb_v200_eob-c4bb_v200_custom_eob_type_data_absent, c4bb_v200-c4bb_server_v200_visual_inspection_and_attestation-c4bb_eob-carin_server_requirement_115_attestation"
122
+ hl7.fhir.us.carin-bb_2.0.0,116,http://hl7.org/fhir/us/carin-bb/STU2/StructureDefinition-C4BB-ExplanationOfBenefit.html#notes-on-fields,.insurer Same as insurance.coverage.organization. Party responsible for reimbursing the provider,SHALL,Health Plan,false,,,"2.3.30, 3.3.04","c4bb_v200-Group02-c4bb_v200_eob-c4bb_v200_custom_eob_insurer_same, c4bb_v200-c4bb_server_v200_visual_inspection_and_attestation-c4bb_eob-carin_server_requirement_116_117_attestation"
123
+ hl7.fhir.us.carin-bb_2.0.0,117,http://hl7.org/fhir/us/carin-bb/STU2/StructureDefinition-C4BB-ExplanationOfBenefit.html#notes-on-fields,.outcome: value = complete,SHALL,Health Plan,false,,,"2.3.31, 3.3.04","c4bb_v200-Group02-c4bb_v200_eob-c4bb_v200_custom_eob_outcome_complete, c4bb_v200-c4bb_server_v200_visual_inspection_and_attestation-c4bb_eob-carin_server_requirement_116_117_attestation"
124
124
  hl7.fhir.us.carin-bb_2.0.0,118,http://hl7.org/fhir/us/carin-bb/STU2/StructureDefinition-C4BB-ExplanationOfBenefit.html#notes-on-fields,".related:
125
125
 
126
126
  If the current adjusts a prior ExplanationOfBenefit, .related.reference = the prior ExplanationOfBenefit identifier and related.relationship value = 'prior'.",SHALL,Health Plan,true,,,3.3.05,c4bb_v200-c4bb_server_v200_visual_inspection_and_attestation-c4bb_eob-carin_server_requirement_118_attestation
@@ -135,20 +135,20 @@ hl7.fhir.us.carin-bb_2.0.0,123,http://hl7.org/fhir/us/carin-bb/STU2/StructureDef
135
135
  ExplanationOfBenefit.insurer MAY have a boolean value = 'True'",MAY,Health Plan,false,,,"",""
136
136
  hl7.fhir.us.carin-bb_2.0.0,124,http://hl7.org/fhir/us/carin-bb/STU2/StructureDefinition-C4BB-ExplanationOfBenefit.html#notes-on-fields,".insurance:
137
137
 
138
- .insurance occurring other than ExplanationOfBenefit.insurer SHALL NOT have a boolean value = 'True'",SHALL NOT,Health Plan,false,,,3.3.08,c4bb_v200-c4bb_server_v200_visual_inspection_and_attestation-c4bb_eob-carin_server_requirement_124_125_127_128_129_attestation
138
+ .insurance occurring other than ExplanationOfBenefit.insurer SHALL NOT have a boolean value = 'True'",SHALL NOT,Health Plan,false,,,"2.3.30, 3.3.08","c4bb_v200-Group02-c4bb_v200_eob-c4bb_v200_custom_eob_insurer_same, c4bb_v200-c4bb_server_v200_visual_inspection_and_attestation-c4bb_eob-carin_server_requirement_124_125_127_128_129_attestation"
139
139
  hl7.fhir.us.carin-bb_2.0.0,125,http://hl7.org/fhir/us/carin-bb/STU2/StructureDefinition-C4BB-ExplanationOfBenefit.html#notes-on-fields,".insurance.focal:
140
140
 
141
- If there is an occurrence, with focal = true, EOB.insurance.coverage.payor = EOB.insurer",SHALL,Health Plan,true,,,3.3.08,c4bb_v200-c4bb_server_v200_visual_inspection_and_attestation-c4bb_eob-carin_server_requirement_124_125_127_128_129_attestation
141
+ If there is an occurrence, with focal = true, EOB.insurance.coverage.payor = EOB.insurer",SHALL,Health Plan,true,,,"2.3.30, 3.3.08","c4bb_v200-Group02-c4bb_v200_eob-c4bb_v200_custom_eob_insurer_same, c4bb_v200-c4bb_server_v200_visual_inspection_and_attestation-c4bb_eob-carin_server_requirement_124_125_127_128_129_attestation"
142
142
  hl7.fhir.us.carin-bb_2.0.0,126,http://hl7.org/fhir/us/carin-bb/STU2/StructureDefinition-C4BB-ExplanationOfBenefit.html#notes-on-fields,".insurance.focal:
143
143
 
144
144
  There can be 0 or * occurrences with focal = false",MAY,Health Plan,false,,,"",""
145
145
  hl7.fhir.us.carin-bb_2.0.0,127,http://hl7.org/fhir/us/carin-bb/STU2/StructureDefinition-C4BB-ExplanationOfBenefit.html#notes-on-fields,".insurance.coverage:
146
146
 
147
- When focal = true, Coverage.payer--> Organization.identifier.",SHALL,Health Plan,true,,,3.3.08,c4bb_v200-c4bb_server_v200_visual_inspection_and_attestation-c4bb_eob-carin_server_requirement_124_125_127_128_129_attestation
147
+ When focal = true, Coverage.payer--> Organization.identifier.",SHALL,Health Plan,true,,,"2.3.30, 3.3.08","c4bb_v200-Group02-c4bb_v200_eob-c4bb_v200_custom_eob_insurer_same, c4bb_v200-c4bb_server_v200_visual_inspection_and_attestation-c4bb_eob-carin_server_requirement_124_125_127_128_129_attestation"
148
148
  hl7.fhir.us.carin-bb_2.0.0,128,http://hl7.org/fhir/us/carin-bb/STU2/StructureDefinition-C4BB-ExplanationOfBenefit.html#notes-on-fields,".insurance.coverage:
149
149
 
150
- When focal = false, EOB.insurance.coverage.display = [name of other carrier]",SHALL,Health Plan,true,,,3.3.08,c4bb_v200-c4bb_server_v200_visual_inspection_and_attestation-c4bb_eob-carin_server_requirement_124_125_127_128_129_attestation
151
- hl7.fhir.us.carin-bb_2.0.0,129,http://hl7.org/fhir/us/carin-bb/STU2/StructureDefinition-C4BB-ExplanationOfBenefit.html#notes-on-fields,insurance.coverage: Same as insurance.coverage.organization.,SHALL,Health Plan,false,,,3.3.08,c4bb_v200-c4bb_server_v200_visual_inspection_and_attestation-c4bb_eob-carin_server_requirement_124_125_127_128_129_attestation
150
+ When focal = false, EOB.insurance.coverage.display = [name of other carrier]",SHALL,Health Plan,true,,,"2.3.30, 3.3.08","c4bb_v200-Group02-c4bb_v200_eob-c4bb_v200_custom_eob_insurer_same, c4bb_v200-c4bb_server_v200_visual_inspection_and_attestation-c4bb_eob-carin_server_requirement_124_125_127_128_129_attestation"
151
+ hl7.fhir.us.carin-bb_2.0.0,129,http://hl7.org/fhir/us/carin-bb/STU2/StructureDefinition-C4BB-ExplanationOfBenefit.html#notes-on-fields,insurance.coverage: Same as insurance.coverage.organization.,SHALL,Health Plan,false,,,"2.3.30, 3.3.08","c4bb_v200-Group02-c4bb_v200_eob-c4bb_v200_custom_eob_insurer_same, c4bb_v200-c4bb_server_v200_visual_inspection_and_attestation-c4bb_eob-carin_server_requirement_124_125_127_128_129_attestation"
152
152
  hl7.fhir.us.carin-bb_2.0.0,130,http://hl7.org/fhir/us/carin-bb/STU2/StructureDefinition-C4BB-ExplanationOfBenefit-Inpatient-Institutional.html#notes-on-fields,"CPCDS data elements
153
153
 
154
154
  If a Payer does not have line item amounts, provide the claim amounts and amount types in the EOB header data elements.",SHALL,Health Plan,true,,,3.4.01,c4bb_v200-c4bb_server_v200_visual_inspection_and_attestation-c4bb_eob_inpatient-carin_server_requirement_130_attestation
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CarinForBlueButtonTestKit
4
- VERSION = '0.15.2'
5
- LAST_UPDATED = '2025-07-02'.freeze
4
+ VERSION = '0.15.3'
5
+ LAST_UPDATED = '2025-07-02'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carin_for_blue_button_test_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.2
4
+ version: 0.15.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Morrison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-07-02 00:00:00.000000000 Z
11
+ date: 2025-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inferno_core
@@ -172,6 +172,9 @@ files:
172
172
  - lib/carin_for_blue_button_test_kit/custom_groups/v2.0.0/c4bb_smart_launch/smart_scopes_test.rb
173
173
  - lib/carin_for_blue_button_test_kit/custom_groups/v2.0.0/c4bb_smart_launch/well_known_capabilities_test.rb
174
174
  - lib/carin_for_blue_button_test_kit/custom_groups/v2.0.0/c4bb_smart_launch_group.rb
175
+ - lib/carin_for_blue_button_test_kit/custom_groups/v2.0.0/eob/insurer_same_test.rb
176
+ - lib/carin_for_blue_button_test_kit/custom_groups/v2.0.0/eob/outcome_complete_test.rb
177
+ - lib/carin_for_blue_button_test_kit/custom_groups/v2.0.0/eob/type_data_absent_test.rb
175
178
  - lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_client.rb
176
179
  - lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_client/authentication.rb
177
180
  - lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_client/last_updated.rb