carin_for_blue_button_test_kit 0.15.1 → 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 +4 -4
- data/lib/carin_for_blue_button_test_kit/capability_statement/tests/instantiates_test.rb +14 -15
- data/lib/carin_for_blue_button_test_kit/capability_statement/tests/json_support_test.rb +0 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/c4bb_client_test_suite.rb +14 -0
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/claim_data_request_tests/client_claims_data_attestation_test.rb +2 -2
- data/lib/carin_for_blue_button_test_kit/custom_groups/v2.0.0/eob/insurer_same_test.rb +74 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/v2.0.0/eob/outcome_complete_test.rb +32 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/v2.0.0/eob/type_data_absent_test.rb +41 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_client/authentication.rb +30 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_client/last_updated.rb +31 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_client/must_support_absent_reason.rb +26 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_client/must_support_display.rb +26 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_client/must_support_missing.rb +27 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_client.rb +25 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/00_authorization_group/attestation_test_requirement_48.rb +50 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/00_authorization_group/attestation_test_requirement_60.rb +48 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/00_authorization_group/attestation_test_requirement_97.rb +41 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/00_authorization_group.rb +15 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/01_must_support_group/attestation_test_requirement_10.rb +26 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/01_must_support_group/attestation_test_requirement_2.rb +29 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/01_must_support_group/attestation_test_requirement_5.rb +29 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/01_must_support_group/attestation_test_requirement_7.rb +30 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/01_must_support_group/attestation_test_requirement_9.rb +26 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/01_must_support_group.rb +19 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/03_eob_group/attestation_test_requirement_105.rb +29 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/03_eob_group/attestation_test_requirement_108.rb +29 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/03_eob_group/attestation_test_requirement_115.rb +24 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/03_eob_group/attestation_test_requirement_116.rb +30 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/03_eob_group/attestation_test_requirement_118.rb +31 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/03_eob_group/attestation_test_requirement_119.rb +31 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/03_eob_group/attestation_test_requirement_120.rb +29 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/03_eob_group/attestation_test_requirement_124.rb +38 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/03_eob_group.rb +25 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/04_eob_inpatient_group/attestation_test_requirement_130.rb +29 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/04_eob_inpatient_group/attestation_test_requirement_132.rb +27 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/04_eob_inpatient_group.rb +13 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/05_eob_outpatient_group/attestation_test_requirement_156.rb +28 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/05_eob_outpatient_group/attestation_test_requirement_157.rb +33 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/05_eob_outpatient_group.rb +13 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/06_eob_oral_group/attestation_test_requirement_144.rb +33 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/06_eob_oral_group/attestation_test_requirement_148.rb +29 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/06_eob_oral_group/attestation_test_requirement_149.rb +27 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/06_eob_oral_group/attestation_test_requirement_150.rb +29 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/06_eob_oral_group/attestation_test_requirement_151.rb +27 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/06_eob_oral_group/attestation_test_requirement_152.rb +29 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/06_eob_oral_group/attestation_test_requirement_153.rb +31 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/06_eob_oral_group.rb +23 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/07_eob_pharmacy_group/attestation_test_requirement_161.rb +27 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/07_eob_pharmacy_group/attestation_test_requirement_162.rb +27 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/07_eob_pharmacy_group/attestation_test_requirement_163.rb +27 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/07_eob_pharmacy_group/attestation_test_requirement_164.rb +25 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/07_eob_pharmacy_group/attestation_test_requirement_165.rb +27 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/07_eob_pharmacy_group.rb +19 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/08_eob_nonclinician_group/attestation_test_requirement_168_170.rb +29 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/08_eob_nonclinician_group/attestation_test_requirement_173.rb +29 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/08_eob_nonclinician_group.rb +13 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/09_organization_group/attestation_test_requirement_177.rb +29 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/09_organization_group/attestation_test_requirement_178.rb +27 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/09_organization_group.rb +12 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/10_practitioner_group/attestation_test_requirement_186.rb +27 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/10_practitioner_group.rb +10 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/11_crosscutting_group/adjudication_amount.rb +38 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/11_crosscutting_group/amount_calculations.rb +69 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/11_crosscutting_group/attestation_test_requirement_19.rb +27 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/11_crosscutting_group/attestation_test_requirement_28.rb +26 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/11_crosscutting_group/attestation_test_requirement_99.rb +26 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/11_crosscutting_group/coverage_reference_resource.rb +31 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/11_crosscutting_group/licensing.rb +33 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/11_crosscutting_group/meta_lastupdated.rb +46 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server/11_crosscutting_group.rb +24 -0
- data/lib/carin_for_blue_button_test_kit/custom_groups/visual_inspection_and_attestation/v200_server.rb +37 -0
- data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/c4bb_test_suite.rb +2 -0
- data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/c4bb_test_suite.rb +20 -2
- data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/eob_group.rb +6 -0
- data/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/c4bb_test_suite.rb +8 -0
- data/lib/carin_for_blue_button_test_kit/generator/suite_generator.rb +1 -1
- data/lib/carin_for_blue_button_test_kit/generator/templates/group.rb.erb +7 -1
- data/lib/carin_for_blue_button_test_kit/generator/templates/suite.rb.erb +21 -1
- data/lib/carin_for_blue_button_test_kit/requirements/{carin-for-blue-button-test-kit_requirements.csv → carin_for_blue_button_test_kit_requirements.csv} +198 -198
- data/lib/carin_for_blue_button_test_kit/requirements/generated/c4bb_v110_requirements_coverage.csv +1 -0
- data/lib/carin_for_blue_button_test_kit/requirements/generated/c4bb_v200_client_requirements_coverage.csv +47 -0
- data/lib/carin_for_blue_button_test_kit/requirements/generated/{carin-for-blue-button-test-kit_requirements_coverage.csv → c4bb_v200_requirements_coverage.csv} +156 -190
- data/lib/carin_for_blue_button_test_kit/requirements/generated/c4bb_v200devnonfinancial_requirements_coverage.csv +244 -0
- data/lib/carin_for_blue_button_test_kit/requirements/hl7.fhir.us.carin-bb_2.0.0_reqs.xlsx +0 -0
- data/lib/carin_for_blue_button_test_kit/version.rb +2 -2
- data/lib/carin_for_blue_button_test_kit.rb +0 -1
- metadata +80 -15
- data/lib/carin_for_blue_button_test_kit/requirements/carin-for-blue-button-test-kit_out_of_scope_requirements.csv +0 -68
- data/lib/inferno_requirements_tools/ext/inferno_core/runnable.rb +0 -22
- data/lib/inferno_requirements_tools/rake/rakefile_template +0 -31
- data/lib/inferno_requirements_tools/tasks/requirements_coverage.rb +0 -284
- data/lib/requirements_config.yaml +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67e7b14eb8555dfd3b698224f6588d8d7697a53d97806dd8edc142ad8ec342ca
|
4
|
+
data.tar.gz: 8f8a1bf9dbb75ffb68151e3cd5a7a944cea6568c41932549f26665b959c7be80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 865d150b32a6e1bee5bb4af634bf588721ebcafcdd7ad0168d20aaeb1f75535d8435a9f17c7db78112fb68b66b92606c988cfc8f582a65cc3a5d7ea0739dbc18
|
7
|
+
data.tar.gz: 78cca118754975e754777beb20e21199f46bda13855350d04ea4031fa68210fe471cf5db9e915eebe6df80c238a8bb0c5affe180278cde9f4e57d816d2505446
|
@@ -1,21 +1,20 @@
|
|
1
1
|
module CarinForBlueButtonTestKit
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
verifies_requirements 'hl7.fhir.us.carin-bb_2.0.0@17'
|
2
|
+
class InstantiatesTest < Inferno::Test
|
3
|
+
id :carin_bb_instantiate
|
4
|
+
title 'Server instantiates CARIN BlueButton '
|
5
|
+
description %(
|
6
|
+
This test inspects the CapabilityStatement returned by the server to
|
7
|
+
verify that the server instantiates http://hl7.org/fhir/us/carin-bb/CapabilityStatement/c4bb
|
8
|
+
)
|
10
9
|
|
11
|
-
|
10
|
+
uses_request :capability_statement
|
12
11
|
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
run do
|
13
|
+
assert_resource_type(:capability_statement)
|
14
|
+
capability_statement = resource
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
end
|
16
|
+
assert capability_statement.instantiates.include?('http://hl7.org/fhir/us/carin-bb/CapabilityStatement/c4bb'),
|
17
|
+
"Server CapabilityStatement.instantiates does not include 'http://hl7.org/fhir/us/carin-bb/CapabilityStatement/c4bb'"
|
20
18
|
end
|
21
19
|
end
|
20
|
+
end
|
@@ -38,6 +38,8 @@ require_relative 'required_searches_tests/eob_required_searches'
|
|
38
38
|
|
39
39
|
require_relative 'claim_data_request_tests/client_claims_data_attestation_test'
|
40
40
|
|
41
|
+
require_relative '../../custom_groups/visual_inspection_and_attestation/v200_client'
|
42
|
+
|
41
43
|
module CarinForBlueButtonTestKit
|
42
44
|
class C4BBV200ClientSuite < Inferno::TestSuite
|
43
45
|
extend MockServer
|
@@ -83,6 +85,14 @@ module CarinForBlueButtonTestKit
|
|
83
85
|
end
|
84
86
|
end
|
85
87
|
|
88
|
+
requirement_sets(
|
89
|
+
{
|
90
|
+
identifier: 'hl7.fhir.us.carin-bb_2.0.0',
|
91
|
+
title: 'CARIN IG for Blue Button® v2.0.0',
|
92
|
+
actor: 'Consumer'
|
93
|
+
}
|
94
|
+
)
|
95
|
+
|
86
96
|
suite_option :client_type,
|
87
97
|
title: 'Client Security Type',
|
88
98
|
list_options: [
|
@@ -300,5 +310,9 @@ module CarinForBlueButtonTestKit
|
|
300
310
|
client_type: CarinClientOptions::UDAP_AUTHORIZATION_CODE
|
301
311
|
}
|
302
312
|
end
|
313
|
+
|
314
|
+
group from: :c4bb_client_v200_visual_inspection_and_attestation do
|
315
|
+
optional
|
316
|
+
end
|
303
317
|
end
|
304
318
|
end
|
@@ -22,9 +22,9 @@ module CarinForBlueButtonTestKit
|
|
22
22
|
greater than or equal to 1 and/or flagged as Must Support as defined by that profiles StructureDefinition
|
23
23
|
for each resource.
|
24
24
|
|
25
|
-
[Click here](#{resume_pass_url}?token=#{identifier}) if the system **meets**
|
25
|
+
[Click here](#{resume_pass_url}?token=#{identifier}) if the system **meets** these requirements.
|
26
26
|
|
27
|
-
[Click here](#{resume_fail_url}?token=#{identifier}) if the system **does not meet**
|
27
|
+
[Click here](#{resume_fail_url}?token=#{identifier}) if the system **does not meet** these requirements.
|
28
28
|
)
|
29
29
|
)
|
30
30
|
end
|
@@ -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
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module CarinForBlueButtonTestKit
|
2
|
+
class CARIN4BBAuthTest < Inferno::Test
|
3
|
+
title 'Uses appropriate authentication'
|
4
|
+
description <<~DESCRIPTION
|
5
|
+
The Health IT Module must
|
6
|
+
- Direct communication through authenticated, authorized, and secure channels.
|
7
|
+
- Use the SMART App Launch Framework’s standalone launch.
|
8
|
+
DESCRIPTION
|
9
|
+
id :c4bb_authentication
|
10
|
+
|
11
|
+
verifies_requirements 'hl7.fhir.us.carin-bb_2.0.0@1',
|
12
|
+
'hl7.fhir.us.carin-bb_2.0.0@48'
|
13
|
+
|
14
|
+
run do
|
15
|
+
identifier = SecureRandom.hex(32)
|
16
|
+
wait(
|
17
|
+
identifier:,
|
18
|
+
message: <<~MESSAGE
|
19
|
+
I attest that the Health IT Module
|
20
|
+
- Directed communication through authenticated, authorized, and secure channels.
|
21
|
+
- Used the SMART App Launch Framework’s standalone launch.
|
22
|
+
|
23
|
+
[Click here](#{resume_pass_url}?token=#{identifier}) if the tester visually confirmed system **meets** these requirements.
|
24
|
+
|
25
|
+
[Click here](#{resume_fail_url}?token=#{identifier}) if the tester visually confirmed system **does not meet** these requirements.
|
26
|
+
MESSAGE
|
27
|
+
)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module CarinForBlueButtonTestKit
|
2
|
+
class CARIN4BBLastUpdatedTest < Inferno::Test
|
3
|
+
title 'Uses meta.lastUpdated value appropriately'
|
4
|
+
description <<~DESCRIPTION
|
5
|
+
The Health IT Module must use the meta.lastUpdated value to determine if the associated data is
|
6
|
+
accurate as of the date of service or as of the current date.
|
7
|
+
DESCRIPTION
|
8
|
+
id :c4bb_last_updated
|
9
|
+
|
10
|
+
verifies_requirements 'hl7.fhir.us.carin-bb_2.0.0@90',
|
11
|
+
'hl7.fhir.us.carin-bb_2.0.0@94',
|
12
|
+
'hl7.fhir.us.carin-bb_2.0.0@180',
|
13
|
+
'hl7.fhir.us.carin-bb_2.0.0@184',
|
14
|
+
'hl7.fhir.us.carin-bb_2.0.0@188'
|
15
|
+
|
16
|
+
run do
|
17
|
+
identifier = SecureRandom.hex(32)
|
18
|
+
wait(
|
19
|
+
identifier:,
|
20
|
+
message: <<~MESSAGE
|
21
|
+
The developer of the Health IT Module attests that the Health IT Module used the
|
22
|
+
meta.lastUpdated value to determine if the associated data is accurate as of the date of service or as of the current date.
|
23
|
+
|
24
|
+
[Click here](#{resume_pass_url}?token=#{identifier}) if the tester visually confirmed system **meets** these requirements.
|
25
|
+
|
26
|
+
[Click here](#{resume_fail_url}?token=#{identifier}) if the tester visually confirmed system **does not meet** these requirements.
|
27
|
+
MESSAGE
|
28
|
+
)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module CarinForBlueButtonTestKit
|
2
|
+
class CARIN4BBMustSupportAbsentReasonTest < Inferno::Test
|
3
|
+
title 'Processes Must Support elements that assert missing information'
|
4
|
+
description <<~DESCRIPTION
|
5
|
+
The Health IT Module must process Must Support elements that assert missing information.
|
6
|
+
DESCRIPTION
|
7
|
+
id :c4bb_must_support_absent_reason
|
8
|
+
|
9
|
+
verifies_requirements 'hl7.fhir.us.carin-bb_2.0.0@8'
|
10
|
+
|
11
|
+
run do
|
12
|
+
identifier = SecureRandom.hex(32)
|
13
|
+
wait(
|
14
|
+
identifier:,
|
15
|
+
message: <<~MESSAGE
|
16
|
+
The developer of the Health IT Module attests that the Health IT Module processed
|
17
|
+
Must Support elements that asserted missing information.
|
18
|
+
|
19
|
+
[Click here](#{resume_pass_url}?token=#{identifier}) if the tester visually confirmed system **meets** this requirement.
|
20
|
+
|
21
|
+
[Click here](#{resume_fail_url}?token=#{identifier}) if the tester visually confirmed system **does not meet** this requirement.
|
22
|
+
MESSAGE
|
23
|
+
)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module CarinForBlueButtonTestKit
|
2
|
+
class CARIN4BBMustSupportDisplayTest < Inferno::Test
|
3
|
+
title 'Can display Must Support data elements'
|
4
|
+
description <<~DESCRIPTION
|
5
|
+
The Health IT Module must be capable of displaying all Must Support data elements.
|
6
|
+
DESCRIPTION
|
7
|
+
id :c4bb_must_support_display
|
8
|
+
|
9
|
+
verifies_requirements 'hl7.fhir.us.carin-bb_2.0.0@4'
|
10
|
+
|
11
|
+
run do
|
12
|
+
identifier = SecureRandom.hex(32)
|
13
|
+
wait(
|
14
|
+
identifier:,
|
15
|
+
message: <<~MESSAGE
|
16
|
+
The developer of the Health IT Module attests that the Health IT Module can display all
|
17
|
+
Must Support data elements for human use.
|
18
|
+
|
19
|
+
[Click here](#{resume_pass_url}?token=#{identifier}) if the tester visually confirmed system **meets** this requirement.
|
20
|
+
|
21
|
+
[Click here](#{resume_fail_url}?token=#{identifier}) if the tester visually confirmed system **does not meet** this requirement.
|
22
|
+
MESSAGE
|
23
|
+
)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module CarinForBlueButtonTestKit
|
2
|
+
class CARIN4BBMustSupportMissingTest < Inferno::Test
|
3
|
+
title 'Interprets missing Must Support data elements'
|
4
|
+
description <<~DESCRIPTION
|
5
|
+
The Health IT Module must interpret missing Must Support data elements within resource instances as
|
6
|
+
data not present in the Health Plan API actors system.
|
7
|
+
DESCRIPTION
|
8
|
+
id :c4bb_must_support_missing
|
9
|
+
|
10
|
+
verifies_requirements 'hl7.fhir.us.carin-bb_2.0.0@6'
|
11
|
+
|
12
|
+
run do
|
13
|
+
identifier = SecureRandom.hex(32)
|
14
|
+
wait(
|
15
|
+
identifier:,
|
16
|
+
message: <<~MESSAGE
|
17
|
+
The developer of the Health IT Module attests that the Health IT Module interpreted missing Must Support
|
18
|
+
data elements within resource instances as data not present in the Health Plan API actors system.
|
19
|
+
|
20
|
+
[Click here](#{resume_pass_url}?token=#{identifier}) if the tester visually confirmed system **meets** this requirement.
|
21
|
+
|
22
|
+
[Click here](#{resume_fail_url}?token=#{identifier}) if the tester visually confirmed system **does not meet** this requirement.
|
23
|
+
MESSAGE
|
24
|
+
)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require_relative 'v200_client/must_support_display'
|
2
|
+
require_relative 'v200_client/must_support_missing'
|
3
|
+
require_relative 'v200_client/must_support_absent_reason'
|
4
|
+
require_relative 'v200_client/last_updated'
|
5
|
+
require_relative 'v200_client/authentication'
|
6
|
+
|
7
|
+
module CarinForBlueButtonTestKit
|
8
|
+
class CarinClientVisualInspectionAndAttestationGroup < Inferno::TestGroup
|
9
|
+
id :c4bb_client_v200_visual_inspection_and_attestation
|
10
|
+
|
11
|
+
title 'Visual Inspection and Attestation'
|
12
|
+
|
13
|
+
description <<~DESCRIPTION
|
14
|
+
Perform visual inspections or attestations to ensure that the Client is conformant to the CARIN for Blue Button® IG requirements.
|
15
|
+
DESCRIPTION
|
16
|
+
|
17
|
+
run_as_group
|
18
|
+
|
19
|
+
test from: :c4bb_authentication
|
20
|
+
test from: :c4bb_must_support_display
|
21
|
+
test from: :c4bb_must_support_missing
|
22
|
+
test from: :c4bb_must_support_absent_reason
|
23
|
+
test from: :c4bb_last_updated
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module CarinForBlueButtonTestKit
|
2
|
+
class AttestationTestCarinV2Requirement48_57 < Inferno::Test
|
3
|
+
title 'Secures data'
|
4
|
+
description <<~DESCRIPTION
|
5
|
+
The Health IT Module
|
6
|
+
- Enables members to direct the communication of CARIN4BB data through authenticated, authorized, and secure channels.
|
7
|
+
- Protects CARIN4BB data with proper security and privacy protections to avoid malicious or unintentional exposure of
|
8
|
+
such information.
|
9
|
+
- Secures all consumer-directed payer data exchanges in transit and limits access only to authorized individuals.
|
10
|
+
- Ensures that APIs fully and successfully implement privacy and security features such as, but not limited to, those
|
11
|
+
required to comply with HIPAA privacy and security requirements and other applicable law protecting the privacy and
|
12
|
+
security of protected health information.
|
13
|
+
- Uses either current or the immediately prior release of Transport Level Security (TLS) as specified by the current release
|
14
|
+
of NIST guidelines (SP 800-52).
|
15
|
+
- Supports the FHIR US Core [Patient Privacy and Security requirements](https://www.hl7.org/fhir/us/core/security.html).
|
16
|
+
DESCRIPTION
|
17
|
+
id :carin_server_requirement_48_57_attestation
|
18
|
+
|
19
|
+
verifies_requirements 'hl7.fhir.us.carin-bb_2.0.0@48',
|
20
|
+
'hl7.fhir.us.carin-bb_2.0.0@49',
|
21
|
+
'hl7.fhir.us.carin-bb_2.0.0@50',
|
22
|
+
'hl7.fhir.us.carin-bb_2.0.0@51',
|
23
|
+
'hl7.fhir.us.carin-bb_2.0.0@55',
|
24
|
+
'hl7.fhir.us.carin-bb_2.0.0@57'
|
25
|
+
|
26
|
+
run do
|
27
|
+
identifier = SecureRandom.hex(32)
|
28
|
+
wait(
|
29
|
+
identifier:,
|
30
|
+
message: <<~MESSAGE
|
31
|
+
I attest that the Health IT Module
|
32
|
+
- Enables members to direct the communication of CARIN4BB data through authenticated, authorized, and secure channels.
|
33
|
+
- Protects CARIN4BB data with proper security and privacy protections to avoid malicious or unintentional exposure of
|
34
|
+
such information.
|
35
|
+
- Secures all consumer-directed payer data exchanges in transit and limits access only to authorized individuals.
|
36
|
+
- Ensures that APIs fully and successfully implement privacy and security features such as, but not limited to, those
|
37
|
+
required to comply with HIPAA privacy and security requirements and other applicable law protecting the privacy and
|
38
|
+
security of protected health information.
|
39
|
+
- Uses either current or the immediately prior release of Transport Level Security (TLS) as specified by the current release
|
40
|
+
of NIST guidelines (SP 800-52).
|
41
|
+
- Supports the FHIR US Core [Patient Privacy and Security requirements](https://www.hl7.org/fhir/us/core/security.html).
|
42
|
+
|
43
|
+
[Click here](#{resume_pass_url}?token=#{identifier}) if the system **meets** these requirements.
|
44
|
+
|
45
|
+
[Click here](#{resume_fail_url}?token=#{identifier}) if the system **does not meet** these requirements.
|
46
|
+
MESSAGE
|
47
|
+
)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module CarinForBlueButtonTestKit
|
2
|
+
class AttestationTestCarinV2Requirement60_67 < Inferno::Test
|
3
|
+
title 'Supports SMART Core Capabilities'
|
4
|
+
description <<~DESCRIPTION
|
5
|
+
The Health IT Module supports the following “SMART Core Capabilities”:
|
6
|
+
- `launch-standalone`: support for SMART’s Standalone Launch mode
|
7
|
+
- `client-public`: support for SMART’s public client profile (no client authentication)
|
8
|
+
- `client-confidential-symmetric`: support for SMART’s confidential client profile
|
9
|
+
- `sso-openid-connect`: support for SMART’s OpenID Connect profile
|
10
|
+
- `context-standalone-patient`: support for patient-level launch context (requested by launch/patient scope, conveyed via patient token parameter)
|
11
|
+
- `permission-offline`: support for refresh tokens (requested by offline_access scope)
|
12
|
+
- `permission-patient`: support for patient-level scopes (e.g. patient Observation.read)
|
13
|
+
- `permission-user`: support for user-level scopes (e.g. user/Appointment.read)
|
14
|
+
DESCRIPTION
|
15
|
+
id :carin_server_requirement_60_67_attestation
|
16
|
+
|
17
|
+
verifies_requirements 'hl7.fhir.us.carin-bb_2.0.0@60',
|
18
|
+
'hl7.fhir.us.carin-bb_2.0.0@61',
|
19
|
+
'hl7.fhir.us.carin-bb_2.0.0@62',
|
20
|
+
'hl7.fhir.us.carin-bb_2.0.0@63',
|
21
|
+
'hl7.fhir.us.carin-bb_2.0.0@64',
|
22
|
+
'hl7.fhir.us.carin-bb_2.0.0@65',
|
23
|
+
'hl7.fhir.us.carin-bb_2.0.0@66',
|
24
|
+
'hl7.fhir.us.carin-bb_2.0.0@67'
|
25
|
+
|
26
|
+
run do
|
27
|
+
identifier = SecureRandom.hex(32)
|
28
|
+
wait(
|
29
|
+
identifier:,
|
30
|
+
message: <<~MESSAGE
|
31
|
+
The Health IT Module supports the following “SMART Core Capabilities”:
|
32
|
+
- `launch-standalone`: support for SMART’s Standalone Launch mode
|
33
|
+
- `client-public`: support for SMART’s public client profile (no client authentication)
|
34
|
+
- `client-confidential-symmetric`: support for SMART’s confidential client profile
|
35
|
+
- `sso-openid-connect`: support for SMART’s OpenID Connect profile
|
36
|
+
- `context-standalone-patient`: support for patient-level launch context (requested by launch/patient scope, conveyed via patient token parameter)
|
37
|
+
- `permission-offline`: support for refresh tokens (requested by offline_access scope)
|
38
|
+
- `permission-patient`: support for patient-level scopes (e.g. patient Observation.read)
|
39
|
+
- `permission-user`: support for user-level scopes (e.g. user/Appointment.read)
|
40
|
+
|
41
|
+
[Click here](#{resume_pass_url}?token=#{identifier}) if the system **meets** these requirements.
|
42
|
+
|
43
|
+
[Click here](#{resume_fail_url}?token=#{identifier}) if the system **does not meet** these requirements.
|
44
|
+
MESSAGE
|
45
|
+
)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module CarinForBlueButtonTestKit
|
2
|
+
class AttestationTestCarinV2Requirement97 < Inferno::Test
|
3
|
+
title 'Responds with appropriate error codes'
|
4
|
+
description <<~DESCRIPTION
|
5
|
+
The Health IT Module returns the following response classes:
|
6
|
+
- (Status 400): invalid parameter
|
7
|
+
- (Status 401/4xx): unauthorized request
|
8
|
+
- (Status 403): insufficient scope
|
9
|
+
- (Status 404): unknown resource
|
10
|
+
- (Status 410): deleted resource
|
11
|
+
|
12
|
+
The Health IT Module rejects any unauthorized request by returning an HTTP 401 "Unauthorized", HTTP 403 "Forbidden",
|
13
|
+
or HTTP 404 "Not Found".
|
14
|
+
DESCRIPTION
|
15
|
+
id :carin_server_requirement_97_attestation
|
16
|
+
|
17
|
+
verifies_requirements 'hl7.fhir.us.carin-bb_2.0.0@97', 'hl7.fhir.us.carin-bb_2.0.0@102'
|
18
|
+
|
19
|
+
run do
|
20
|
+
identifier = SecureRandom.hex(32)
|
21
|
+
wait(
|
22
|
+
identifier:,
|
23
|
+
message: <<~MESSAGE
|
24
|
+
I attest that the Health IT Module returns the following response classes:
|
25
|
+
- (Status 400): invalid parameter
|
26
|
+
- (Status 401/4xx): unauthorized request
|
27
|
+
- (Status 403): insufficient scope
|
28
|
+
- (Status 404): unknown resource
|
29
|
+
- (Status 410): deleted resource
|
30
|
+
|
31
|
+
I further attest that the Health IT Module rejects any unauthorized request by returning an HTTP 401 "Unauthorized",
|
32
|
+
HTTP 403 "Forbidden", or HTTP 404 "Not Found".
|
33
|
+
|
34
|
+
[Click here](#{resume_pass_url}?token=#{identifier}) if the system **meets** these requirements.
|
35
|
+
|
36
|
+
[Click here](#{resume_fail_url}?token=#{identifier}) if the system **does not meet** these requirements.
|
37
|
+
MESSAGE
|
38
|
+
)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require_relative '00_authorization_group/attestation_test_requirement_48'
|
2
|
+
require_relative '00_authorization_group/attestation_test_requirement_60'
|
3
|
+
require_relative '00_authorization_group/attestation_test_requirement_97'
|
4
|
+
|
5
|
+
module CarinForBlueButtonTestKit
|
6
|
+
class CarinSecurityAttestationGroup < Inferno::TestGroup
|
7
|
+
id :c4bb_security
|
8
|
+
title 'Security'
|
9
|
+
short_title 'Security'
|
10
|
+
|
11
|
+
test from: :carin_server_requirement_97_attestation
|
12
|
+
test from: :carin_server_requirement_48_57_attestation
|
13
|
+
test from: :carin_server_requirement_60_67_attestation
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module CarinForBlueButtonTestKit
|
2
|
+
class AttestationTestCarinV2Requirement10 < Inferno::Test
|
3
|
+
title 'Follows FHIR and US Core guidance when data is unavailable'
|
4
|
+
description <<~DESCRIPTION
|
5
|
+
The Health IT Module follows the FHIR core specification and US Core guidance when no data is available
|
6
|
+
for required data elements (minimum cardinality > 0).
|
7
|
+
DESCRIPTION
|
8
|
+
id :carin_server_requirement_10_attestation
|
9
|
+
|
10
|
+
verifies_requirements 'hl7.fhir.us.carin-bb_2.0.0@10'
|
11
|
+
|
12
|
+
run do
|
13
|
+
identifier = SecureRandom.hex(32)
|
14
|
+
wait(
|
15
|
+
identifier:,
|
16
|
+
message: <<~MESSAGE
|
17
|
+
I attest that the Health IT Module applies FHIR and US Core guidance
|
18
|
+
when the source system lacks data for required elements with minimum cardinality > 0.
|
19
|
+
|
20
|
+
[Click here](#{resume_pass_url}?token=#{identifier}) if the system **meets** this requirement.
|
21
|
+
[Click here](#{resume_fail_url}?token=#{identifier}) if the system **does not meet** this requirement.
|
22
|
+
MESSAGE
|
23
|
+
)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module CarinForBlueButtonTestKit
|
2
|
+
class AttestationTestCarinV2Requirement2 < Inferno::Test
|
3
|
+
title 'Returns maintained data'
|
4
|
+
description <<~DESCRIPTION
|
5
|
+
The Health IT Module is capable of populating and returning all data elements maintained
|
6
|
+
by the payer as part of the query results, as specified by the CARIN Blue Button Health Plan API
|
7
|
+
CapabilityStatement.
|
8
|
+
DESCRIPTION
|
9
|
+
id :carin_server_requirement_2_attestation
|
10
|
+
|
11
|
+
verifies_requirements 'hl7.fhir.us.carin-bb_2.0.0@2'
|
12
|
+
|
13
|
+
run do
|
14
|
+
identifier = SecureRandom.hex(32)
|
15
|
+
wait(
|
16
|
+
identifier:,
|
17
|
+
message: <<~MESSAGE
|
18
|
+
I attest that the Health IT Module is capable of populating and returning all data elements maintained
|
19
|
+
by the payer as part of the query results, as specified by the CARIN Blue Button Health Plan API
|
20
|
+
CapabilityStatement.
|
21
|
+
|
22
|
+
[Click here](#{resume_pass_url}?token=#{identifier}) if the system **meets** this requirement.
|
23
|
+
|
24
|
+
[Click here](#{resume_fail_url}?token=#{identifier}) if the system **does not meet** this requirement.
|
25
|
+
MESSAGE
|
26
|
+
)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|