carin_for_blue_button_test_kit 0.13.3 → 0.15.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 -5
- 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/custom_groups/v2.0.0/c4bb_smart_launch/smart_scopes_test.rb +6 -1
- data/lib/carin_for_blue_button_test_kit/custom_groups/v2.0.0/c4bb_smart_launch_group.rb +26 -29
- data/lib/carin_for_blue_button_test_kit/custom_groups/v2.0.0-dev-nonfinancial/c4bb_smart_launch/smart_scopes_test.rb +6 -1
- data/lib/carin_for_blue_button_test_kit/custom_groups/v2.0.0-dev-nonfinancial/c4bb_smart_launch_group.rb +26 -32
- data/lib/carin_for_blue_button_test_kit/docs/carin_for_blue_button_v2.0.0_client_suite_description.md +7 -4
- data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/c4bb_test_suite.rb +21 -6
- data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/c4bb_test_suite.rb +21 -6
- data/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/c4bb_test_suite.rb +21 -6
- 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 +99 -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
|
data/lib/carin_for_blue_button_test_kit/custom_groups/v2.0.0/c4bb_smart_launch/smart_scopes_test.rb
CHANGED
@@ -22,7 +22,8 @@ module CarinForBlueButtonTestKit
|
|
22
22
|
* `user/Organization.read`
|
23
23
|
* `user/Practitioner.read`
|
24
24
|
)
|
25
|
-
input :
|
25
|
+
input :received_scopes
|
26
|
+
input :smart_auth_info, type: :auth_info
|
26
27
|
uses_request :token
|
27
28
|
|
28
29
|
PATIENT_COMPARTMENT_RESOURCE_TYPES = %w[
|
@@ -41,6 +42,10 @@ module CarinForBlueButtonTestKit
|
|
41
42
|
config.options[:required_scopes]
|
42
43
|
end
|
43
44
|
|
45
|
+
def requested_scopes
|
46
|
+
smart_auth_info.requested_scopes
|
47
|
+
end
|
48
|
+
|
44
49
|
def access_level_regex
|
45
50
|
/\A(\*|\b(read|c?ru?d?s?)\b)/
|
46
51
|
end
|
@@ -22,12 +22,32 @@ module CarinForBlueButtonTestKit
|
|
22
22
|
They then perform a standalone launch to obtain an access token which
|
23
23
|
can be used by the remaining tests to access patient data.
|
24
24
|
)
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
25
|
+
|
26
|
+
config(
|
27
|
+
inputs: {
|
28
|
+
received_scopes: { name: :standalone_received_scopes },
|
29
|
+
smart_auth_info: {
|
30
|
+
options: {
|
31
|
+
components: [
|
32
|
+
{
|
33
|
+
name: :requested_scopes,
|
34
|
+
default: %(
|
35
|
+
launch/patient openid fhirUser
|
36
|
+
patient/ExplanationOfBenefit.read patient/Coverage.read
|
37
|
+
patient/Patient.read patient/Organization.read
|
38
|
+
patient/Practitioner.read user/ExplanationOfBenefit.read
|
39
|
+
user/Coverage.read user/Patient.read
|
40
|
+
user/Organization.read user/Practitioner.read
|
41
|
+
).gsub(/\s{2,}/, ' ').strip
|
42
|
+
}
|
43
|
+
]
|
44
|
+
}
|
45
|
+
}
|
46
|
+
},
|
47
|
+
outputs: {
|
48
|
+
patient_id: { name: :patient_ids }
|
49
|
+
}
|
50
|
+
)
|
31
51
|
|
32
52
|
group from: :smart_discovery do
|
33
53
|
run_as_group
|
@@ -76,31 +96,8 @@ module CarinForBlueButtonTestKit
|
|
76
96
|
* [Standalone Launch Sequence](https://www.hl7.org/fhir/smart-app-launch/1.0.0/index.html#standalone-launch-sequence)
|
77
97
|
)
|
78
98
|
|
79
|
-
config(
|
80
|
-
inputs: {
|
81
|
-
requested_scopes: {
|
82
|
-
default: %(
|
83
|
-
launch/patient openid fhirUser
|
84
|
-
patient/ExplanationOfBenefit.read patient/Coverage.read
|
85
|
-
patient/Patient.read patient/Organization.read
|
86
|
-
patient/Practitioner.read user/ExplanationOfBenefit.read
|
87
|
-
user/Coverage.read user/Patient.read
|
88
|
-
user/Organization.read user/Practitioner.read
|
89
|
-
).gsub(/\s{2,}/, ' ').strip
|
90
|
-
}
|
91
|
-
},
|
92
|
-
outputs: {
|
93
|
-
patient_id: { name: :patient_ids },
|
94
|
-
smart_credentials: { name: :smart_credentials }
|
95
|
-
}
|
96
|
-
)
|
97
|
-
|
98
99
|
test from: :c4bb_v200_smart_scopes do
|
99
100
|
config(
|
100
|
-
inputs: {
|
101
|
-
requested_scopes: { name: :standalone_requested_scopes },
|
102
|
-
received_scopes: { name: :standalone_received_scopes }
|
103
|
-
},
|
104
101
|
options: {
|
105
102
|
required_scopes: %w[
|
106
103
|
openid
|
@@ -22,7 +22,8 @@ module CarinForBlueButtonTestKit
|
|
22
22
|
* `user/Organization.read`
|
23
23
|
* `user/Practitioner.read`
|
24
24
|
)
|
25
|
-
input :
|
25
|
+
input :received_scopes
|
26
|
+
input :smart_auth_info, type: :auth_info
|
26
27
|
uses_request :token
|
27
28
|
|
28
29
|
PATIENT_COMPARTMENT_RESOURCE_TYPES = %w[
|
@@ -41,6 +42,10 @@ module CarinForBlueButtonTestKit
|
|
41
42
|
config.options[:required_scopes]
|
42
43
|
end
|
43
44
|
|
45
|
+
def requested_scopes
|
46
|
+
smart_auth_info.requested_scopes
|
47
|
+
end
|
48
|
+
|
44
49
|
def access_level_regex
|
45
50
|
/\A(\*|\b(read|c?ru?d?s?)\b)/
|
46
51
|
end
|
@@ -22,15 +22,32 @@ module CarinForBlueButtonTestKit
|
|
22
22
|
They then perform a standalone launch to obtain an access token which
|
23
23
|
can be used by the remaining tests to access patient data.
|
24
24
|
)
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
:
|
25
|
+
|
26
|
+
config(
|
27
|
+
inputs: {
|
28
|
+
received_scopes: { name: :standalone_received_scopes },
|
29
|
+
smart_auth_info: {
|
30
|
+
options: {
|
31
|
+
components: [
|
32
|
+
{
|
33
|
+
name: :requested_scopes,
|
34
|
+
default: %(
|
35
|
+
launch/patient openid fhirUser
|
36
|
+
patient/ExplanationOfBenefit.read patient/Coverage.read
|
37
|
+
patient/Patient.read patient/Organization.read
|
38
|
+
patient/Practitioner.read user/ExplanationOfBenefit.read
|
39
|
+
user/Coverage.read user/Patient.read
|
40
|
+
user/Organization.read user/Practitioner.read
|
41
|
+
).gsub(/\s{2,}/, ' ').strip
|
42
|
+
}
|
43
|
+
]
|
44
|
+
}
|
45
|
+
}
|
46
|
+
},
|
47
|
+
outputs: {
|
48
|
+
patient_id: { name: :patient_ids }
|
49
|
+
}
|
50
|
+
)
|
34
51
|
|
35
52
|
group from: :smart_discovery do
|
36
53
|
run_as_group
|
@@ -79,31 +96,8 @@ module CarinForBlueButtonTestKit
|
|
79
96
|
* [Standalone Launch Sequence](https://www.hl7.org/fhir/smart-app-launch/1.0.0/index.html#standalone-launch-sequence)
|
80
97
|
)
|
81
98
|
|
82
|
-
config(
|
83
|
-
inputs: {
|
84
|
-
requested_scopes: {
|
85
|
-
default: %(
|
86
|
-
launch/patient openid fhirUser
|
87
|
-
patient/ExplanationOfBenefit.read patient/Coverage.read
|
88
|
-
patient/Patient.read patient/Organization.read
|
89
|
-
patient/Practitioner.read user/ExplanationOfBenefit.read
|
90
|
-
user/Coverage.read user/Patient.read
|
91
|
-
user/Organization.read user/Practitioner.read
|
92
|
-
).gsub(/\s{2,}/, ' ').strip
|
93
|
-
}
|
94
|
-
},
|
95
|
-
outputs: {
|
96
|
-
patient_id: { name: :patient_ids },
|
97
|
-
smart_credentials: { name: :smart_credentials }
|
98
|
-
}
|
99
|
-
)
|
100
|
-
|
101
99
|
test from: :c4bb_v200devnonfinancial_smart_scopes do
|
102
100
|
config(
|
103
|
-
inputs: {
|
104
|
-
requested_scopes: { name: :standalone_requested_scopes },
|
105
|
-
received_scopes: { name: :standalone_received_scopes }
|
106
|
-
},
|
107
101
|
options: {
|
108
102
|
required_scopes: %w[
|
109
103
|
openid
|
@@ -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
|
|
@@ -63,7 +64,7 @@ requests needed to pass all of the tests. Note that some requests within the col
|
|
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
|
|
@@ -91,3 +93,4 @@ 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.
|
92
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.
|
93
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).
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'inferno/dsl/oauth_credentials'
|
2
1
|
require 'smart_app_launch_test_kit'
|
3
2
|
require_relative '../../version'
|
4
3
|
|
@@ -20,12 +19,20 @@ module CarinForBlueButtonTestKit
|
|
20
19
|
|
21
20
|
|
22
21
|
)
|
23
|
-
|
22
|
+
|
24
23
|
links [
|
24
|
+
{
|
25
|
+
label: 'Report Issue',
|
26
|
+
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit/issues'
|
27
|
+
},
|
25
28
|
{
|
26
29
|
label: 'Open Source',
|
27
30
|
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit'
|
28
31
|
},
|
32
|
+
{
|
33
|
+
label: 'Download',
|
34
|
+
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit/releases'
|
35
|
+
},
|
29
36
|
{
|
30
37
|
label: 'Implementation Guide',
|
31
38
|
url: 'http://hl7.org/fhir/us/carin-bb/STU1.1'
|
@@ -52,13 +59,22 @@ module CarinForBlueButtonTestKit
|
|
52
59
|
end
|
53
60
|
end
|
54
61
|
|
62
|
+
config(
|
63
|
+
inputs: {
|
64
|
+
smart_auth_info: { name: :smart_auth_info }
|
65
|
+
},
|
66
|
+
outputs: {
|
67
|
+
smart_auth_info: { name: :smart_auth_info }
|
68
|
+
}
|
69
|
+
)
|
70
|
+
|
55
71
|
input :url,
|
56
72
|
title: 'FHIR Endpoint',
|
57
73
|
description: 'URL of the FHIR endpoint'
|
58
74
|
|
59
75
|
fhir_client do
|
60
76
|
url :url
|
61
|
-
|
77
|
+
auth_info :smart_auth_info
|
62
78
|
end
|
63
79
|
|
64
80
|
group from: :c4bb_v110_smart_launch
|
@@ -71,11 +87,10 @@ module CarinForBlueButtonTestKit
|
|
71
87
|
conformant C4BB resources.
|
72
88
|
)
|
73
89
|
|
74
|
-
input :
|
90
|
+
input :smart_auth_info,
|
75
91
|
title: 'OAuth Credentials',
|
76
|
-
type: :
|
92
|
+
type: :auth_info,
|
77
93
|
optional: true
|
78
|
-
input_order :url, :smart_credentials
|
79
94
|
|
80
95
|
group from: :capability_statement_group
|
81
96
|
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'inferno/dsl/oauth_credentials'
|
2
1
|
require 'smart_app_launch_test_kit'
|
3
2
|
require_relative '../../version'
|
4
3
|
|
@@ -21,12 +20,20 @@ module CarinForBlueButtonTestKit
|
|
21
20
|
|
22
21
|
|
23
22
|
)
|
24
|
-
|
23
|
+
|
25
24
|
links [
|
25
|
+
{
|
26
|
+
label: 'Report Issue',
|
27
|
+
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit/issues'
|
28
|
+
},
|
26
29
|
{
|
27
30
|
label: 'Open Source',
|
28
31
|
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit'
|
29
32
|
},
|
33
|
+
{
|
34
|
+
label: 'Download',
|
35
|
+
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit/releases'
|
36
|
+
},
|
30
37
|
{
|
31
38
|
label: 'Implementation Guide',
|
32
39
|
url: 'http://hl7.org/fhir/us/carin-bb/STU2'
|
@@ -53,13 +60,22 @@ module CarinForBlueButtonTestKit
|
|
53
60
|
end
|
54
61
|
end
|
55
62
|
|
63
|
+
config(
|
64
|
+
inputs: {
|
65
|
+
smart_auth_info: { name: :smart_auth_info }
|
66
|
+
},
|
67
|
+
outputs: {
|
68
|
+
smart_auth_info: { name: :smart_auth_info }
|
69
|
+
}
|
70
|
+
)
|
71
|
+
|
56
72
|
input :url,
|
57
73
|
title: 'FHIR Endpoint',
|
58
74
|
description: 'URL of the FHIR endpoint'
|
59
75
|
|
60
76
|
fhir_client do
|
61
77
|
url :url
|
62
|
-
|
78
|
+
auth_info :smart_auth_info
|
63
79
|
end
|
64
80
|
|
65
81
|
group from: :c4bb_v200_smart_launch
|
@@ -72,11 +88,10 @@ module CarinForBlueButtonTestKit
|
|
72
88
|
conformant C4BB resources.
|
73
89
|
)
|
74
90
|
|
75
|
-
input :
|
91
|
+
input :smart_auth_info,
|
76
92
|
title: 'OAuth Credentials',
|
77
|
-
type: :
|
93
|
+
type: :auth_info,
|
78
94
|
optional: true
|
79
|
-
input_order :url, :smart_credentials
|
80
95
|
|
81
96
|
group from: :capability_statement_group
|
82
97
|
|
data/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/c4bb_test_suite.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'inferno/dsl/oauth_credentials'
|
2
1
|
require 'smart_app_launch_test_kit'
|
3
2
|
require_relative '../../version'
|
4
3
|
|
@@ -23,12 +22,20 @@ module CarinForBlueButtonTestKit
|
|
23
22
|
Development build for the [non-financial branch](https://build.fhir.org/ig/HL7/carin-bb/branches/non-financial/).
|
24
23
|
|
25
24
|
)
|
26
|
-
|
25
|
+
|
27
26
|
links [
|
27
|
+
{
|
28
|
+
label: 'Report Issue',
|
29
|
+
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit/issues'
|
30
|
+
},
|
28
31
|
{
|
29
32
|
label: 'Open Source',
|
30
33
|
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit'
|
31
34
|
},
|
35
|
+
{
|
36
|
+
label: 'Download',
|
37
|
+
url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit/releases'
|
38
|
+
},
|
32
39
|
{
|
33
40
|
label: 'Implementation Guide',
|
34
41
|
url: 'http://hl7.org/fhir/us/carin-bb/history.html'
|
@@ -55,13 +62,22 @@ module CarinForBlueButtonTestKit
|
|
55
62
|
end
|
56
63
|
end
|
57
64
|
|
65
|
+
config(
|
66
|
+
inputs: {
|
67
|
+
smart_auth_info: { name: :smart_auth_info }
|
68
|
+
},
|
69
|
+
outputs: {
|
70
|
+
smart_auth_info: { name: :smart_auth_info }
|
71
|
+
}
|
72
|
+
)
|
73
|
+
|
58
74
|
input :url,
|
59
75
|
title: 'FHIR Endpoint',
|
60
76
|
description: 'URL of the FHIR endpoint'
|
61
77
|
|
62
78
|
fhir_client do
|
63
79
|
url :url
|
64
|
-
|
80
|
+
auth_info :smart_auth_info
|
65
81
|
end
|
66
82
|
|
67
83
|
group from: :c4bb_v200devnonfinancial_smart_launch
|
@@ -74,11 +90,10 @@ module CarinForBlueButtonTestKit
|
|
74
90
|
conformant C4BB resources.
|
75
91
|
)
|
76
92
|
|
77
|
-
input :
|
93
|
+
input :smart_auth_info,
|
78
94
|
title: 'OAuth Credentials',
|
79
|
-
type: :
|
95
|
+
type: :auth_info,
|
80
96
|
optional: true
|
81
|
-
input_order :url, :smart_credentials
|
82
97
|
|
83
98
|
group from: :capability_statement_group
|
84
99
|
|
@@ -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
|