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.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/config/presets/carin_cpcds_client_ri.json +12 -0
  3. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/c4bb_client_test_suite.rb +17 -5
  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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/claim_data_request_tests/organization_claims_data_request_test.rb +0 -1
  11. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/claim_data_request_tests/patient_claims_data_request_test.rb +0 -1
  12. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/claim_data_request_tests/practitioner_claims_data_request_test.rb +0 -1
  13. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/claim_data_request_tests/relatedperson_claims_data_request_test.rb +0 -1
  14. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/endpoints/authorize_endpoint.rb +32 -0
  15. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/endpoints/next_page_endpoint.rb +3 -1
  16. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/endpoints/resource_api_endpoint.rb +3 -1
  17. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/endpoints/resource_id_endpoint.rb +3 -1
  18. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/endpoints/token_endpoint.rb +69 -13
  19. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/initial_wait_test.rb +35 -4
  20. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/metadata/{mock_capability_statement.json → mock_capability_statement.json.erb} +28 -0
  21. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/mock_authorization.rb +35 -0
  22. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/mock_server.rb +43 -9
  23. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/required_searches_tests/coverage_required_searches.rb +0 -1
  24. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/required_searches_tests/eob_required_searches.rb +0 -1
  25. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/required_searches_tests/organization_required_searches.rb +0 -1
  26. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/required_searches_tests/patient_required_searches.rb +0 -1
  27. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/required_searches_tests/practitioner_required_searches.rb +0 -1
  28. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/required_searches_tests/relatedperson_required_searches.rb +0 -1
  29. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/tags.rb +2 -0
  30. data/lib/carin_for_blue_button_test_kit/client/v2.0.0/urls.rb +25 -10
  31. data/lib/carin_for_blue_button_test_kit/custom_groups/v2.0.0/c4bb_smart_launch/smart_scopes_test.rb +6 -1
  32. data/lib/carin_for_blue_button_test_kit/custom_groups/v2.0.0/c4bb_smart_launch_group.rb +26 -29
  33. data/lib/carin_for_blue_button_test_kit/custom_groups/v2.0.0-dev-nonfinancial/c4bb_smart_launch/smart_scopes_test.rb +6 -1
  34. data/lib/carin_for_blue_button_test_kit/custom_groups/v2.0.0-dev-nonfinancial/c4bb_smart_launch_group.rb +26 -32
  35. data/lib/carin_for_blue_button_test_kit/docs/carin_for_blue_button_v2.0.0_client_suite_description.md +7 -4
  36. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/c4bb_test_suite.rb +21 -6
  37. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/c4bb_test_suite.rb +21 -6
  38. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0-dev-nonfinancial/c4bb_test_suite.rb +21 -6
  39. data/lib/carin_for_blue_button_test_kit/generator/templates/group.rb.erb +24 -0
  40. data/lib/carin_for_blue_button_test_kit/generator/templates/include_search.rb.erb +37 -0
  41. data/lib/carin_for_blue_button_test_kit/generator/templates/must_support.rb.erb +44 -0
  42. data/lib/carin_for_blue_button_test_kit/generator/templates/read.rb.erb +38 -0
  43. data/lib/carin_for_blue_button_test_kit/generator/templates/resource_list.rb.erb +9 -0
  44. data/lib/carin_for_blue_button_test_kit/generator/templates/search.rb.erb +43 -0
  45. data/lib/carin_for_blue_button_test_kit/generator/templates/suite.rb.erb +99 -0
  46. data/lib/carin_for_blue_button_test_kit/generator/templates/validation.rb.erb +34 -0
  47. data/lib/carin_for_blue_button_test_kit/metadata.rb +70 -0
  48. data/lib/carin_for_blue_button_test_kit/requirements/carin-for-blue-button-test-kit_out_of_scope_requirements.csv +53 -0
  49. data/lib/carin_for_blue_button_test_kit/requirements/carin-for-blue-button-test-kit_requirements.csv +335 -0
  50. data/lib/carin_for_blue_button_test_kit/requirements/generated/carin-for-blue-button-test-kit_requirements_coverage.csv +335 -0
  51. data/lib/carin_for_blue_button_test_kit/version.rb +2 -1
  52. data/lib/carin_for_blue_button_test_kit.rb +1 -0
  53. data/lib/inferno_requirements_tools/rake/rakefile_template +31 -0
  54. data/lib/requirements_config.yaml +14 -0
  55. metadata +27 -9
@@ -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,99 @@
1
+ require 'smart_app_launch_test_kit'
2
+ require_relative '../../version'
3
+
4
+ require_relative '../../capability_statement/capability_statement_group'
5
+ require_relative '<%= smart_launch_file_name %>'
6
+
7
+ <% group_file_list.each do |file_name| %>require_relative '<%= file_name %>'
8
+ <% end %>
9
+ module CarinForBlueButtonTestKit
10
+ module <%= module_name %>
11
+ class <%= class_name %> < Inferno::TestSuite
12
+ title '<%= title %>'
13
+ description %(
14
+ The CARIN for Blue Button test suite validates system conformance to the HL7® FHIR® [CARIN for Blue Button® Implementation Guide](<%= ig_link %>).
15
+
16
+ <% if module_name.include? ("FINANCIAL") %>
17
+ Development build for the [non-financial branch](https://build.fhir.org/ig/HL7/carin-bb/branches/non-financial/).
18
+ <% end %>
19
+ )
20
+
21
+ links [
22
+ {
23
+ label: 'Report Issue',
24
+ url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit/issues'
25
+ },
26
+ {
27
+ label: 'Open Source',
28
+ url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit'
29
+ },
30
+ {
31
+ label: 'Download',
32
+ url: 'https://github.com/inferno-framework/carin-for-blue-button-test-kit/releases'
33
+ },
34
+ {
35
+ label: 'Implementation Guide',
36
+ url: '<%= ig_link %>'
37
+ }
38
+ ]
39
+
40
+ def self.metadata
41
+ @metadata ||= YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true)[:groups].map do |raw_metadata|
42
+ Generator::GroupMetadata.new(raw_metadata)
43
+ end
44
+ end
45
+
46
+ id :<%= suite_id %>
47
+
48
+ VALIDATION_MESSAGE_FILTERS = [
49
+ /\A\S+: \S+: URL value '.*' does not resolve/
50
+ ].freeze
51
+
52
+ fhir_resource_validator do
53
+ igs '<%= ig_relative_path %>'
54
+
55
+ exclude_message do |message|
56
+ VALIDATION_MESSAGE_FILTERS.any? { |filter| filter.match? message.message }
57
+ end
58
+ end
59
+
60
+ config(
61
+ inputs: {
62
+ smart_auth_info: { name: :smart_auth_info }
63
+ },
64
+ outputs: {
65
+ smart_auth_info: { name: :smart_auth_info }
66
+ }
67
+ )
68
+
69
+ input :url,
70
+ title: 'FHIR Endpoint',
71
+ description: 'URL of the FHIR endpoint'
72
+
73
+ fhir_client do
74
+ url :url
75
+ auth_info :smart_auth_info
76
+ end
77
+
78
+ group from: :<%= smart_launch_group_id %>
79
+
80
+ group do
81
+ title 'C4BB FHIR API Tests'
82
+ description %(
83
+ The CARIN for Blue Button FHIR API Tests evaluate the ability of a system (C4BB FHIR Server)
84
+ to support required and optional FHIR operations and search parameters to return
85
+ conformant C4BB resources.
86
+ )
87
+
88
+ input :smart_auth_info,
89
+ title: 'OAuth Credentials',
90
+ type: :auth_info,
91
+ optional: true
92
+
93
+ group from: :capability_statement_group
94
+ <% group_id_list.each do |id| %>
95
+ group from: :<%= id %><% end %>
96
+ end
97
+ end
98
+ end
99
+ 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
@@ -0,0 +1,53 @@
1
+ Req Set,ID,Reason,Details
2
+ hl7.fhir.us.carin-bb_2.0.0,7,Not Verifiable,Can't know if the Health Plan API actor knows the precise reason for the absence of data
3
+ hl7.fhir.us.carin-bb_2.0.0,15,Not Verifiable,There's no point in checking that maybe something exists that could exist.
4
+ hl7.fhir.us.carin-bb_2.0.0,16,Not Verifiable,Nothing to verify
5
+ hl7.fhir.us.carin-bb_2.0.0,18,Not Verifiable,There's no point in checking that maybe something exists that could exist.
6
+ hl7.fhir.us.carin-bb_2.0.0,20,Not Verifiable,Cannot know if the a business value is an exact match or not
7
+ hl7.fhir.us.carin-bb_2.0.0,21,Not Verifiable,There's no point in checking that maybe something exists that could exist.
8
+ hl7.fhir.us.carin-bb_2.0.0,22,Not Verifiable,There's no point in checking that maybe something exists that could exist.
9
+ hl7.fhir.us.carin-bb_2.0.0,23,Not Verifiable,There's no point in checking that maybe something exists that could exist.
10
+ hl7.fhir.us.carin-bb_2.0.0,24,Not Verifiable,Doesn't specify where the descriptions would be provided.
11
+ hl7.fhir.us.carin-bb_2.0.0,25,Not Verifiable,There's no point in checking that maybe something exists that could exist.
12
+ hl7.fhir.us.carin-bb_2.0.0,26,Not Verifiable,There's no point in checking that maybe something exists that could exist.
13
+ hl7.fhir.us.carin-bb_2.0.0,27,Not Verifiable,This is a description of the CPCDS dataset rather than a requirement specification for an implementer.
14
+ hl7.fhir.us.carin-bb_2.0.0,29,Not Verifiable,This defines a mapping not a requirement on the Health Plan.
15
+ hl7.fhir.us.carin-bb_2.0.0,49,Not Verifiable,"""Proper"" undefined"
16
+ hl7.fhir.us.carin-bb_2.0.0,50,Not Verifiable,"""Appropriately secured"" undefined"
17
+ hl7.fhir.us.carin-bb_2.0.0,52,Not Verifiable,We can't know agreements between trading partners
18
+ hl7.fhir.us.carin-bb_2.0.0,59,Not Tested,"""should consider"" not strong enough to warrant testing."
19
+ hl7.fhir.us.carin-bb_2.0.0,82,Not Tested,"Maybe - It's a ""MAY"" requirement but I think the criteria will turn it into a ""SHALL"" requirement."
20
+ hl7.fhir.us.carin-bb_2.0.0,84,Not Verifiable,Doesn't specify where and how these will be recorded so they are not verifiable.
21
+ hl7.fhir.us.carin-bb_2.0.0,85,Not Verifiable,"Unclear wth ""IG related data"" is"
22
+ hl7.fhir.us.carin-bb_2.0.0,88,Not Verifiable,There's no point in checking that maybe something exists that could exist.
23
+ hl7.fhir.us.carin-bb_2.0.0,91,Not Verifiable,Cannot know what data was effective at what time
24
+ hl7.fhir.us.carin-bb_2.0.0,92,Not Verifiable,There's no point in checking that maybe something exists that could exist.
25
+ hl7.fhir.us.carin-bb_2.0.0,93,Not Verifiable,Cannot know when data was last changed
26
+ hl7.fhir.us.carin-bb_2.0.0,94,Not Verifiable,Cannot verify the internal of an app
27
+ hl7.fhir.us.carin-bb_2.0.0,96,Not Verifiable,Overly broad
28
+ hl7.fhir.us.carin-bb_2.0.0,104,Not Verifiable,There's no point in checking that maybe something exists that could exist.
29
+ hl7.fhir.us.carin-bb_2.0.0,106,Not Verifiable,There's no point in checking that maybe something exists that could exist.
30
+ hl7.fhir.us.carin-bb_2.0.0,107,Not Verifiable,MAY requirement
31
+ hl7.fhir.us.carin-bb_2.0.0,121,Not Verifiable,Cannot test how client apps do look ups
32
+ hl7.fhir.us.carin-bb_2.0.0,122,Not Verifiable,Cannot confirm if client apps assign value to something
33
+ hl7.fhir.us.carin-bb_2.0.0,123,Not Verifiable,There's no point in checking that maybe something exists that could exist.
34
+ hl7.fhir.us.carin-bb_2.0.0,126,Not Verifiable,There's no point in checking that maybe something exists that could exist.
35
+ hl7.fhir.us.carin-bb_2.0.0,137,Not Verifiable,Cannot confirm if client apps assign value to something
36
+ hl7.fhir.us.carin-bb_2.0.0,138,Not Verifiable,Cannot confirm how a client uses values
37
+ hl7.fhir.us.carin-bb_2.0.0,139,Not Verifiable,Cannot confirm if client apps assign value to something
38
+ hl7.fhir.us.carin-bb_2.0.0,140,Not Verifiable,Cannot confirm how a client uses values
39
+ hl7.fhir.us.carin-bb_2.0.0,143,Not Verifiable,Appears to be business logic not a calculation that we can confirm
40
+ hl7.fhir.us.carin-bb_2.0.0,147,Not Verifiable,Cannot confirm how a client uses values
41
+ hl7.fhir.us.carin-bb_2.0.0,154,Not Verifiable,Appears to be business logic not a calculation that we can confirm
42
+ hl7.fhir.us.carin-bb_2.0.0,155,Not Verifiable,Appears to be business logic not a calculation that we can confirm
43
+ hl7.fhir.us.carin-bb_2.0.0,166,Not Verifiable,Cannot know how clients interpret data.
44
+ hl7.fhir.us.carin-bb_2.0.0,167,Not Verifiable,Cannot know how clients interpret data.
45
+ hl7.fhir.us.carin-bb_2.0.0,169,Not Verifiable,Unclear if this should *only* be populated if it's different
46
+ hl7.fhir.us.carin-bb_2.0.0,174,Not Verifiable,"This is a definition, not a requirement."
47
+ hl7.fhir.us.carin-bb_2.0.0,176,Not Verifiable,Cannot know when data was in effect
48
+ hl7.fhir.us.carin-bb_2.0.0,180,Not Verifiable,Cannot confirm how a client uses values
49
+ hl7.fhir.us.carin-bb_2.0.0,181,Not Verifiable,Business rule that we cannot verify
50
+ hl7.fhir.us.carin-bb_2.0.0,182,Not Verifiable,Cannot know
51
+ hl7.fhir.us.carin-bb_2.0.0,184,Not Verifiable,Cannot confirm how a client uses values
52
+ hl7.fhir.us.carin-bb_2.0.0,185,Not Verifiable,Cannot know
53
+ hl7.fhir.us.carin-bb_2.0.0,188,Not Verifiable,Cannot confirm how a client uses values