carin_for_blue_button_test_kit 0.13.2 → 0.14.0
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/config/presets/carin_cpcds_client_ri.json +12 -0
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/c4bb_client_test_suite.rb +17 -4
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/claim_data_request_tests/coverage_claims_data_request_test.rb +0 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/claim_data_request_tests/eob_inpatient_claims_data_request_test.rb +0 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/claim_data_request_tests/eob_oral_claims_data_request_test.rb +0 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/claim_data_request_tests/eob_outpatient_claims_data_request_test.rb +0 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/claim_data_request_tests/eob_pharmacy_claims_data_request_test.rb +0 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/claim_data_request_tests/eob_professional_claims_data_request_test.rb +0 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/claim_data_request_tests/organization_claims_data_request_test.rb +0 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/claim_data_request_tests/patient_claims_data_request_test.rb +0 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/claim_data_request_tests/practitioner_claims_data_request_test.rb +0 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/claim_data_request_tests/relatedperson_claims_data_request_test.rb +0 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/endpoints/authorize_endpoint.rb +32 -0
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/endpoints/next_page_endpoint.rb +3 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/endpoints/resource_api_endpoint.rb +3 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/endpoints/resource_id_endpoint.rb +3 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/endpoints/token_endpoint.rb +69 -13
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/initial_wait_test.rb +35 -4
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/metadata/{mock_capability_statement.json → mock_capability_statement.json.erb} +28 -0
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/mock_authorization.rb +35 -0
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/mock_server.rb +43 -9
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/required_searches_tests/coverage_required_searches.rb +0 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/required_searches_tests/eob_required_searches.rb +0 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/required_searches_tests/organization_required_searches.rb +0 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/required_searches_tests/patient_required_searches.rb +0 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/required_searches_tests/practitioner_required_searches.rb +0 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/required_searches_tests/relatedperson_required_searches.rb +0 -1
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/tags.rb +2 -0
- data/lib/carin_for_blue_button_test_kit/client/v2.0.0/urls.rb +25 -10
- data/lib/carin_for_blue_button_test_kit/docs/carin_for_blue_button_v2.0.0_client_suite_description.md +13 -8
- data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/c4bb_test_suite.rb +9 -1
- data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/c4bb_test_suite.rb +9 -1
- data/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/c4bb_test_suite.rb +9 -1
- data/lib/carin_for_blue_button_test_kit/generator/templates/group.rb.erb +24 -0
- data/lib/carin_for_blue_button_test_kit/generator/templates/include_search.rb.erb +37 -0
- data/lib/carin_for_blue_button_test_kit/generator/templates/must_support.rb.erb +44 -0
- data/lib/carin_for_blue_button_test_kit/generator/templates/read.rb.erb +38 -0
- data/lib/carin_for_blue_button_test_kit/generator/templates/resource_list.rb.erb +9 -0
- data/lib/carin_for_blue_button_test_kit/generator/templates/search.rb.erb +43 -0
- data/lib/carin_for_blue_button_test_kit/generator/templates/suite.rb.erb +92 -0
- data/lib/carin_for_blue_button_test_kit/generator/templates/validation.rb.erb +34 -0
- data/lib/carin_for_blue_button_test_kit/metadata.rb +70 -0
- data/lib/carin_for_blue_button_test_kit/requirements/carin-for-blue-button-test-kit_out_of_scope_requirements.csv +53 -0
- data/lib/carin_for_blue_button_test_kit/requirements/carin-for-blue-button-test-kit_requirements.csv +335 -0
- data/lib/carin_for_blue_button_test_kit/requirements/generated/carin-for-blue-button-test-kit_requirements_coverage.csv +335 -0
- data/lib/carin_for_blue_button_test_kit/version.rb +2 -1
- data/lib/carin_for_blue_button_test_kit.rb +1 -0
- data/lib/inferno_requirements_tools/rake/rakefile_template +31 -0
- data/lib/requirements_config.yaml +14 -0
- metadata +27 -9
@@ -1,13 +1,16 @@
|
|
1
1
|
module CarinForBlueButtonTestKit
|
2
|
-
TOKEN_PATH = '/mock_auth/token'
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
2
|
+
TOKEN_PATH = '/mock_auth/token'.freeze
|
3
|
+
AUTH_PATH = '/mock_auth/authorization'.freeze
|
4
|
+
JKWS_PATH = '/.well-known/jwks.json'.freeze
|
5
|
+
SMART_CONFIG_PATH = '/.well-known/smart-configuration'.freeze
|
6
|
+
PATIENT_PATH = '/fhir/Patient'.freeze
|
7
|
+
RESOURCE_API_PATH = '/fhir/:endpoint'.freeze
|
8
|
+
RESOURCE_ID_PATH = '/fhir/:endpoint/:id'.freeze
|
9
|
+
METADATA_PATH = '/fhir/metadata'.freeze
|
10
|
+
BASE_FHIR_PATH = '/fhir'.freeze
|
11
|
+
RESUME_PASS_PATH = '/resume_pass'.freeze
|
12
|
+
RESUME_CLAIMS_DATA_PATH = '/resume_claims_data'.freeze
|
13
|
+
RESUME_FAIL_PATH = '/resume_fail'.freeze
|
11
14
|
|
12
15
|
module URLs
|
13
16
|
def base_url
|
@@ -18,6 +21,18 @@ module CarinForBlueButtonTestKit
|
|
18
21
|
@token_url ||= base_url + TOKEN_PATH
|
19
22
|
end
|
20
23
|
|
24
|
+
def authorization_url
|
25
|
+
@authorization_url ||= base_url + AUTH_PATH
|
26
|
+
end
|
27
|
+
|
28
|
+
def jwks_url
|
29
|
+
@jwks_url ||= base_url + JKWS_PATH
|
30
|
+
end
|
31
|
+
|
32
|
+
def smart_configuration_url
|
33
|
+
@smart_configuration_url ||= base_url + SMART_CONFIG_PATH
|
34
|
+
end
|
35
|
+
|
21
36
|
def base_fhir_url
|
22
37
|
@base_fhir_url ||= base_url + BASE_FHIR_PATH
|
23
38
|
end
|
@@ -51,7 +66,7 @@ module CarinForBlueButtonTestKit
|
|
51
66
|
end
|
52
67
|
|
53
68
|
def suite_id
|
54
|
-
|
69
|
+
CarinForBlueButtonTestKit::C4BBV200ClientSuite.id
|
55
70
|
end
|
56
71
|
end
|
57
72
|
end
|
@@ -32,7 +32,7 @@ During execution, Inferno will wait for the client under test to issue requests
|
|
32
32
|
- Retrieved instances of each [CARIN IG for Blue Button profile](https://hl7.org/fhir/us/carin-bb/STU2/artifacts.html#structures-resource-profiles)
|
33
33
|
- Performed searches using the search parameters and search parameter combinations marked as **SHALL** within the [C4BB CapabilityStatement](https://hl7.org/fhir/us/carin-bb/STU2/CapabilityStatement-c4bb.html)
|
34
34
|
and the [US Core Client CapabilityStatement](https://hl7.org/fhir/us/core/STU3.1.1/CapabilityStatement-us-core-client.html).
|
35
|
-
- Processed and retained all profile instances and data elements marked as required or must support
|
35
|
+
- Processed and retained all profile instances and data elements marked as required or must support.
|
36
36
|
|
37
37
|
## Running the Tests
|
38
38
|
|
@@ -40,7 +40,8 @@ During execution, Inferno will wait for the client under test to issue requests
|
|
40
40
|
|
41
41
|
The following input must be provided by the tester to execute
|
42
42
|
any tests in this suite:
|
43
|
-
1. *
|
43
|
+
1. *Client ID*: A Client ID that the client under test will use to connect to the test suite via SMART.
|
44
|
+
This client ID will be sent back to the client as the `Bearer` token that the client under test will send in the
|
44
45
|
`Authorization` header of HTTP requests made against Inferno. Inferno uses the
|
45
46
|
value to identify incoming requests that belong to the testing session.
|
46
47
|
|
@@ -58,12 +59,12 @@ return the requested CARIN resources to the client, and verify the interaction.
|
|
58
59
|
### Sample Execution - Postman
|
59
60
|
|
60
61
|
To try out these tests without a CARIN for Blue Button client implementation, you may
|
61
|
-
run them using [this Postman collection](https://github.com/inferno-framework/carin-for-blue-button-test-kit/blob/config/C4BB%20Client%20Search%20Tests.postman_collection.json). This Postman collection includes all of the required CARIN for Blue Button profile resource requests and required search
|
62
|
-
requests needed to pass all of the tests.
|
62
|
+
run them using [this Postman collection](https://github.com/inferno-framework/carin-for-blue-button-test-kit/blob/main/config/C4BB%20Client%20Search%20Tests.postman_collection.json). This Postman collection includes all of the required CARIN for Blue Button profile resource requests and required search
|
63
|
+
requests needed to pass all of the tests. Note that some requests within the collection (those suffixed with "(unsupported)") are expected to return a 400 status and OperationOutcome indicating failure due to current limitations on search parameter support.
|
63
64
|
|
64
65
|
To run the client tests against the Postman collection:
|
65
66
|
1. Start an Inferno session of the CARIN for Blue Button Client test suite.
|
66
|
-
3. Click the "Run All Tests" button in the upper right and type in "
|
67
|
+
3. Click the "Run All Tests" button in the upper right and type in "SAMPLE_CLIENT_ID" for the `Client ID` input in the dialog that appears.
|
67
68
|
4. Click the "Submit" button. The simulated server will then be waiting for an interaction.
|
68
69
|
4. Open Postman and import the `C4BB Client Search Tests` Postman collection.
|
69
70
|
5. Send each of the requests listed under the `C4BB Client Search Tests` Postman collection and ensure a
|
@@ -77,8 +78,9 @@ to associate requests with sessions. If multiple concurrent sessions are configu
|
|
77
78
|
to use the same token, they may interfere with each other. To prevent concurrent executors
|
78
79
|
of these sample executions from disrupting your session it
|
79
80
|
is recommended, but not required, to:
|
80
|
-
1.
|
81
|
-
2.
|
81
|
+
1. When starting the tests, provide a random client id in the `Client ID` input.
|
82
|
+
2. A wait dialog will appear for the first test to wait for incoming requests. This window provides the bearer token Inferno expects to receive in the Authorization header of incoming requests.
|
83
|
+
3. Update the Authorization tab of the C4BB Client Search Tests collection in Postman to this provided bearer token.
|
82
84
|
|
83
85
|
## Current Limitations
|
84
86
|
|
@@ -88,4 +90,7 @@ that the test kit covers and does not cover in the [Requirements Coverage](https
|
|
88
90
|
CSV document.
|
89
91
|
|
90
92
|
Specific current limitations to highlight include:
|
91
|
-
-
|
93
|
+
- Inferno's simulated CARIN server does not support all required search parameters on the ExplanationOfBenefit resource, including service-date, service-start-date, billable-period-start, type, and _include=ExplanationOfBenefit:insurer. Inferno recognizes searches made using those parameters and will give the client credit for having performed them, but will always return an OperationOutcome indicating failure.
|
94
|
+
- Testers must manually configure their client system to connect to a specific target patient and ingest specific curated sample CARIN data. Future versions of the tests may allow more flexibility in the patient identity and the associated data.
|
95
|
+
- Testers must attest to their system's ability to process and retain all received information. Currently, this is implemented as a single test. Future versions of the tests may split this test out into different attestations per profile or other more fine-grained organization.
|
96
|
+
- This test kit contains basic SMART App Launch capabilities that may not be complete. In particular, refresh tokens are not currently supported and scopes are not precise. To provide feedback and input on the design of this feature and help us prioritize improvements, submit a ticket [here](https://github.com/inferno-framework/carin-for-blue-button-test-kit/issues).
|
@@ -20,12 +20,20 @@ module CarinForBlueButtonTestKit
|
|
20
20
|
|
21
21
|
|
22
22
|
)
|
23
|
-
|
23
|
+
|
24
24
|
links [
|
25
|
+
{
|
26
|
+
label: 'Report Issue',
|
27
|
+
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit/issues'
|
28
|
+
},
|
25
29
|
{
|
26
30
|
label: 'Open Source',
|
27
31
|
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit'
|
28
32
|
},
|
33
|
+
{
|
34
|
+
label: 'Download',
|
35
|
+
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit/releases'
|
36
|
+
},
|
29
37
|
{
|
30
38
|
label: 'Implementation Guide',
|
31
39
|
url: 'http://hl7.org/fhir/us/carin-bb/STU1.1'
|
@@ -21,12 +21,20 @@ module CarinForBlueButtonTestKit
|
|
21
21
|
|
22
22
|
|
23
23
|
)
|
24
|
-
|
24
|
+
|
25
25
|
links [
|
26
|
+
{
|
27
|
+
label: 'Report Issue',
|
28
|
+
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit/issues'
|
29
|
+
},
|
26
30
|
{
|
27
31
|
label: 'Open Source',
|
28
32
|
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit'
|
29
33
|
},
|
34
|
+
{
|
35
|
+
label: 'Download',
|
36
|
+
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit/releases'
|
37
|
+
},
|
30
38
|
{
|
31
39
|
label: 'Implementation Guide',
|
32
40
|
url: 'http://hl7.org/fhir/us/carin-bb/STU2'
|
data/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/c4bb_test_suite.rb
CHANGED
@@ -23,12 +23,20 @@ module CarinForBlueButtonTestKit
|
|
23
23
|
Development build for the [non-financial branch](https://build.fhir.org/ig/HL7/carin-bb/branches/non-financial/).
|
24
24
|
|
25
25
|
)
|
26
|
-
|
26
|
+
|
27
27
|
links [
|
28
|
+
{
|
29
|
+
label: 'Report Issue',
|
30
|
+
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit/issues'
|
31
|
+
},
|
28
32
|
{
|
29
33
|
label: 'Open Source',
|
30
34
|
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit'
|
31
35
|
},
|
36
|
+
{
|
37
|
+
label: 'Download',
|
38
|
+
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit/releases'
|
39
|
+
},
|
32
40
|
{
|
33
41
|
label: 'Implementation Guide',
|
34
42
|
url: 'http://hl7.org/fhir/us/carin-bb/history.html'
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<% test_file_list.each do |file_name| %>require_relative '<%= file_name %>'
|
2
|
+
<% end %>
|
3
|
+
module CarinForBlueButtonTestKit
|
4
|
+
module <%= module_name %>
|
5
|
+
class <%= class_name %> < Inferno::TestGroup
|
6
|
+
title '<%= title %> Tests'
|
7
|
+
short_description '<%= short_description %>'
|
8
|
+
description %(
|
9
|
+
<%=description %>
|
10
|
+
)
|
11
|
+
|
12
|
+
id :<%= group_id %>
|
13
|
+
run_as_group<% if optional? %>
|
14
|
+
optional
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
def self.metadata
|
18
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, '<%= profile_identifier %>', 'metadata.yml'), aliases: true))
|
19
|
+
end
|
20
|
+
<% test_id_list.each do |id| %>
|
21
|
+
test from: :<%= id %><% end %>
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require_relative '../../../carin_search_test'
|
2
|
+
require_relative '../../../generator/group_metadata'
|
3
|
+
|
4
|
+
module CarinForBlueButtonTestKit
|
5
|
+
module <%= module_name %>
|
6
|
+
class <%= class_name %> < Inferno::Test
|
7
|
+
include CarinForBlueButtonTestKit::CarinSearchTest
|
8
|
+
|
9
|
+
title 'Server returns valid results for <%= resource_type %> search by id + _include=<%= search_param %>'
|
10
|
+
description %(<%=
|
11
|
+
description %>
|
12
|
+
)
|
13
|
+
|
14
|
+
def self.properties
|
15
|
+
@properties ||= SearchTestProperties.new(
|
16
|
+
resource_type: '<%=resource_type%>',
|
17
|
+
search_param_names: ['_include'],
|
18
|
+
include_parameters: <%= include_parameters %>
|
19
|
+
)
|
20
|
+
end
|
21
|
+
|
22
|
+
id :<%= test_id %>
|
23
|
+
|
24
|
+
def self.metadata
|
25
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
26
|
+
end
|
27
|
+
|
28
|
+
def scratch_resources
|
29
|
+
scratch[:<%= resource_type.downcase %>_resources] ||= {}
|
30
|
+
end
|
31
|
+
|
32
|
+
run do
|
33
|
+
run_include_search('<%=include_search_param%>')
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require_relative '../../../must_support_test'
|
2
|
+
require_relative './read_test'
|
3
|
+
require_relative '../../../generator/group_metadata'
|
4
|
+
|
5
|
+
module CarinForBlueButtonTestKit
|
6
|
+
module <%= module_name %>
|
7
|
+
class <%= class_name %> < Inferno::Test
|
8
|
+
include CarinForBlueButtonTestKit::MustSupportTest
|
9
|
+
include CarinForBlueButtonTestKit::<%= module_name %>
|
10
|
+
|
11
|
+
title 'All must support elements are provided in the <%= specific_resource_type %> resources returned'
|
12
|
+
description %(
|
13
|
+
CARIN for Blue Button Responders SHALL be capable of populating all data elements as
|
14
|
+
part of the query results as specified by the CARIN for Blue Button Capability
|
15
|
+
Statement. This test will look through the <%= specific_resource_type %> resources
|
16
|
+
found previously for the following must support elements:
|
17
|
+
|
18
|
+
<%= must_support_list_string %><% if uscdi_list_string.present? %>
|
19
|
+
|
20
|
+
For ONC USCDI requirements, each <%= resource_type %> must support the following additional elements:
|
21
|
+
|
22
|
+
<%= uscdi_list_string %><% end %>
|
23
|
+
)
|
24
|
+
|
25
|
+
id :<%= test_id %>
|
26
|
+
|
27
|
+
def resource_type
|
28
|
+
'<%= resource_type %>'
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.metadata
|
32
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
33
|
+
end
|
34
|
+
|
35
|
+
def scratch_resources
|
36
|
+
scratch[:<%= resource_type.downcase %>_resources] ||= {}
|
37
|
+
end
|
38
|
+
|
39
|
+
run do
|
40
|
+
perform_must_support_test(all_scratch_resources)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require_relative '../../../read_test'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module CarinForBlueButtonTestKit
|
5
|
+
module <%= module_name %>
|
6
|
+
class <%= class_name %> < Inferno::Test
|
7
|
+
include CarinForBlueButtonTestKit::ReadTest
|
8
|
+
|
9
|
+
title 'Server returns correct <%= resource_type %> resource from <%= resource_type %> read interaction'
|
10
|
+
description 'A server <%= conformance_expectation %> support the <%= resource_type %> read interaction.'
|
11
|
+
|
12
|
+
id :<%= test_id %>
|
13
|
+
<% if no_search_params? %>
|
14
|
+
input :additional_<%= profile_identifier %>_ids,
|
15
|
+
title: "Additional <%= profile_identifier %> IDs",
|
16
|
+
type: 'text',
|
17
|
+
description: "<%= input_description.strip %>. This is optional, but must be provided if executing only the <%= resource_type %> test group.",
|
18
|
+
optional: true
|
19
|
+
<% end %>
|
20
|
+
def resource_type
|
21
|
+
'<%= resource_type %>'
|
22
|
+
end
|
23
|
+
|
24
|
+
def scratch_resources
|
25
|
+
scratch[:<%= resource_type.downcase %>_resources] ||= {}
|
26
|
+
end
|
27
|
+
|
28
|
+
def resource_ids
|
29
|
+
return [] unless respond_to? :additional_<%= profile_identifier%>_ids
|
30
|
+
additional_<%= profile_identifier%>_ids.split(',').map(&:strip)
|
31
|
+
end
|
32
|
+
|
33
|
+
run do
|
34
|
+
perform_read_test(<%= resource_collection_string %>)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require_relative '../../../carin_search_test'
|
2
|
+
require_relative '../../../generator/group_metadata'
|
3
|
+
|
4
|
+
module CarinForBlueButtonTestKit
|
5
|
+
module <%= module_name %>
|
6
|
+
class <%= class_name %> < Inferno::Test
|
7
|
+
include CarinForBlueButtonTestKit::CarinSearchTest
|
8
|
+
|
9
|
+
title 'Server returns valid results for <%= resource_type %> search by <%= search_param_name_string %>'
|
10
|
+
description %(<%=
|
11
|
+
description %>
|
12
|
+
)
|
13
|
+
|
14
|
+
id :<%= test_id %><% if optional? %>
|
15
|
+
optional
|
16
|
+
<% end %>
|
17
|
+
<% if first_search? %>
|
18
|
+
input :<%=input_id%>,
|
19
|
+
title: '<%=input_title.strip%>',
|
20
|
+
type: 'text',
|
21
|
+
description: '<%=input_description.strip%>'<%if !needs_patient_id?%>,
|
22
|
+
optional: true<% end %>
|
23
|
+
<% end %>
|
24
|
+
def self.properties
|
25
|
+
@properties ||= SearchTestProperties.new(
|
26
|
+
<%= search_test_properties_string.gsub("\n", "\n" + " "*2) %>
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.metadata
|
31
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
32
|
+
end
|
33
|
+
|
34
|
+
def scratch_resources
|
35
|
+
scratch[:<%= resource_type.downcase %>_resources] ||= {}
|
36
|
+
end
|
37
|
+
|
38
|
+
run do
|
39
|
+
run_search_test<% if first_search? && !needs_patient_id? %>(<%=input_id%>)<% end %>
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
require 'inferno/dsl/oauth_credentials'
|
2
|
+
require 'smart_app_launch_test_kit'
|
3
|
+
require_relative '../../version'
|
4
|
+
|
5
|
+
require_relative '../../capability_statement/capability_statement_group'
|
6
|
+
require_relative '<%= smart_launch_file_name %>'
|
7
|
+
|
8
|
+
<% group_file_list.each do |file_name| %>require_relative '<%= file_name %>'
|
9
|
+
<% end %>
|
10
|
+
module CarinForBlueButtonTestKit
|
11
|
+
module <%= module_name %>
|
12
|
+
class <%= class_name %> < Inferno::TestSuite
|
13
|
+
title '<%= title %>'
|
14
|
+
description %(
|
15
|
+
The CARIN for Blue Button test suite validates system conformance to the HL7® FHIR® [CARIN for Blue Button® Implementation Guide](<%= ig_link %>).
|
16
|
+
|
17
|
+
<% if module_name.include? ("FINANCIAL") %>
|
18
|
+
Development build for the [non-financial branch](https://build.fhir.org/ig/HL7/carin-bb/branches/non-financial/).
|
19
|
+
<% end %>
|
20
|
+
)
|
21
|
+
|
22
|
+
links [
|
23
|
+
{
|
24
|
+
label: 'Report Issue',
|
25
|
+
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit/issues'
|
26
|
+
},
|
27
|
+
{
|
28
|
+
label: 'Open Source',
|
29
|
+
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit'
|
30
|
+
},
|
31
|
+
{
|
32
|
+
label: 'Download',
|
33
|
+
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit/releases'
|
34
|
+
},
|
35
|
+
{
|
36
|
+
label: 'Implementation Guide',
|
37
|
+
url: '<%= ig_link %>'
|
38
|
+
}
|
39
|
+
]
|
40
|
+
|
41
|
+
def self.metadata
|
42
|
+
@metadata ||= YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true)[:groups].map do |raw_metadata|
|
43
|
+
Generator::GroupMetadata.new(raw_metadata)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
id :<%= suite_id %>
|
48
|
+
|
49
|
+
VALIDATION_MESSAGE_FILTERS = [
|
50
|
+
/\A\S+: \S+: URL value '.*' does not resolve/
|
51
|
+
].freeze
|
52
|
+
|
53
|
+
fhir_resource_validator do
|
54
|
+
igs '<%= ig_relative_path %>'
|
55
|
+
|
56
|
+
exclude_message do |message|
|
57
|
+
VALIDATION_MESSAGE_FILTERS.any? { |filter| filter.match? message.message }
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
input :url,
|
62
|
+
title: 'FHIR Endpoint',
|
63
|
+
description: 'URL of the FHIR endpoint'
|
64
|
+
|
65
|
+
fhir_client do
|
66
|
+
url :url
|
67
|
+
oauth_credentials :smart_credentials
|
68
|
+
end
|
69
|
+
|
70
|
+
group from: :<%= smart_launch_group_id %>
|
71
|
+
|
72
|
+
group do
|
73
|
+
title 'C4BB FHIR API Tests'
|
74
|
+
description %(
|
75
|
+
The CARIN for Blue Button FHIR API Tests evaluate the ability of a system (C4BB FHIR Server)
|
76
|
+
to support required and optional FHIR operations and search parameters to return
|
77
|
+
conformant C4BB resources.
|
78
|
+
)
|
79
|
+
|
80
|
+
input :smart_credentials,
|
81
|
+
title: 'OAuth Credentials',
|
82
|
+
type: :oauth_credentials,
|
83
|
+
optional: true
|
84
|
+
input_order :url, :smart_credentials
|
85
|
+
|
86
|
+
group from: :capability_statement_group
|
87
|
+
<% group_id_list.each do |id| %>
|
88
|
+
group from: :<%= id %><% end %>
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require_relative '../../../validation_test'
|
2
|
+
require_relative './read_test'
|
3
|
+
|
4
|
+
module CarinForBlueButtonTestKit
|
5
|
+
module <%= module_name %>
|
6
|
+
class <%= class_name %> < Inferno::Test
|
7
|
+
include CarinForBlueButtonTestKit::ValidationTest
|
8
|
+
include CarinForBlueButtonTestKit::<%= module_name %>
|
9
|
+
|
10
|
+
id :<%= test_id %>
|
11
|
+
title '<%= resource_type %> resources returned during previous tests conform to the <%= profile_name %>'
|
12
|
+
description %(<%=
|
13
|
+
description %>
|
14
|
+
)
|
15
|
+
|
16
|
+
output :dar_code_found, :dar_extension_found
|
17
|
+
|
18
|
+
def resource_type
|
19
|
+
'<%= resource_type %>'
|
20
|
+
end
|
21
|
+
|
22
|
+
def scratch_resources
|
23
|
+
scratch[:<%= resource_type.downcase %>_resources] ||= {}
|
24
|
+
end
|
25
|
+
|
26
|
+
run do
|
27
|
+
perform_validation_test(scratch_resources[:all] || [],
|
28
|
+
'<%= profile_url %>',
|
29
|
+
'<%= profile_version %>',
|
30
|
+
skip_if_empty: <%= skip_if_empty %>)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
require_relative 'version'
|
2
|
+
|
3
|
+
module CarinForBlueButtonTestKit
|
4
|
+
class Metadata < Inferno::TestKit
|
5
|
+
id :carin_for_blue_button_test_kit
|
6
|
+
title 'CARIN IG for Blue Button Test Kit'
|
7
|
+
description <<~DESCRIPTION
|
8
|
+
The Carin IG for Blue Button Test Kit validates the conformance of server
|
9
|
+
and client implementations to the [CARIN IG for Blue
|
10
|
+
Button](https://hl7.org/fhir/us/carin-bb/) including versions:
|
11
|
+
- [**v1.1.0**](http://hl7.org/fhir/us/carin-bb/STU1.1) (server tests only)
|
12
|
+
- [**v2.0.0**](http://hl7.org/fhir/us/carin-bb/STU2) (server and client tests)
|
13
|
+
- **Non-financial Proposal** (server tests only)
|
14
|
+
|
15
|
+
<!-- break -->
|
16
|
+
|
17
|
+
This test kit is built using the [Inferno Framework](https://inferno-framework.github.io/inferno-core/). The Inferno Framework is
|
18
|
+
designed for reuse and aims to make it easier to build test kits for any
|
19
|
+
FHIR-based data exchange.
|
20
|
+
|
21
|
+
## Status
|
22
|
+
|
23
|
+
These tests are intended to allow CARIN IG for Blue Button server implementers to perform checks of their server against CARIN IG for Blue Button requrirements. Future versions of these tests may validate other requirements and may change how these are tested.
|
24
|
+
|
25
|
+
For more details on the specific validations performed as part of testing the following requirements, see the test descriptions within the test suites.
|
26
|
+
|
27
|
+
### Server Tests
|
28
|
+
|
29
|
+
The server suites currently test the following requirements:
|
30
|
+
- SMART on FHIR Discovery
|
31
|
+
- SMART App Launch Protocol's standalone launch sequence
|
32
|
+
- Support for Capability Statement
|
33
|
+
- Support for Must Support Elements
|
34
|
+
- Profile Validation
|
35
|
+
- Reference Validation
|
36
|
+
- Searching on ExplanationofBenefit Resource
|
37
|
+
|
38
|
+
### Client Tests
|
39
|
+
|
40
|
+
The client suite currently tests that clients are able to
|
41
|
+
- Fetch instances conformant to each FHIR profile defined in the CARIN IG.
|
42
|
+
- Perform searches using each of the required search parameters.
|
43
|
+
- Correctly process instances containing populated examples of all must support elements.
|
44
|
+
|
45
|
+
You can find additional information on the IG requirements that the client test suite covers
|
46
|
+
and does not cover in the [Requirements Coverage](https://github.com/inferno-framework/carin-for-blue-button-test-kit/blob/main/lib/carin_for_blue_button_test_kit/requirements/generated/carin-for-blue-button-test-kit_requirements_coverage.csv)
|
47
|
+
CSV document.
|
48
|
+
|
49
|
+
Specific known limitations of the client tests include:
|
50
|
+
- Inferno's simulated CARIN server does not support all required search parameters on the ExplanationOfBenefit resource, including service-date, service-start-date, billable-period-start, type, and _include=ExplanationOfBenefit:insurer. Inferno recognizes searches made using those parameters and will give the client credit for having performed them but will always return an OperationOutcome indicating failure.
|
51
|
+
- Testers must manually configure their client system to connect to a specific target patient and ingest specific curated sample CARIN data. Future versions of the tests may allow more flexibility in the patient identity and the associated data.
|
52
|
+
- Testers must attest to their system's ability to process and retain all received information. Currently, this is implemented as a single test. Future versions of the tests may split this test out into different attestations per profile or other more fine-grained organization.
|
53
|
+
|
54
|
+
## Repository
|
55
|
+
|
56
|
+
The Carin IG for Blue Button Test Kit GitHub repository can be [found here](https://github.com/inferno-framework/carin-for-blue-button-test-kit).
|
57
|
+
|
58
|
+
## Providing Feedback and Reporting Issues
|
59
|
+
|
60
|
+
Please report any issues with this set of tests in the [issues section](https://github.com/inferno-framework/carin-for-blue-button-test-kit/issues) of the repository.
|
61
|
+
DESCRIPTION
|
62
|
+
suite_ids [:c4bb_v110, :c4bb_v200, :c4bb_v200_client, :c4bb_v200devnonfinancial]
|
63
|
+
tags ['CARIN']
|
64
|
+
last_updated LAST_UPDATED
|
65
|
+
version VERSION
|
66
|
+
maturity 'Medium'
|
67
|
+
authors ['Inferno Team']
|
68
|
+
repo 'https://github.com/inferno-framework/carin-for-blue-button-test-kit'
|
69
|
+
end
|
70
|
+
end
|