davinci_crd_test_kit 0.14.1 → 0.14.2

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 (121) hide show
  1. checksums.yaml +4 -4
  2. data/config/presets/{inferno_crd_server_suite.json.erb → client_against_inferno_crd_server_suite.json.erb} +0 -33
  3. data/config/presets/{ri_crd_request_generator.json.erb → client_against_ri_crd_request_generator.json.erb} +1 -14
  4. data/config/presets/client_v221_against_inferno_crd_server_suite.json.erb +84 -0
  5. data/config/presets/client_v221_against_ri_br_provider.json.erb +31 -0
  6. data/config/presets/{ri_crd_request_generator.json_v221.json.erb → client_v221_against_ri_crd_request_generator.json.erb} +1 -1
  7. data/config/presets/{inferno_crd_client_suite.json.erb → server_against_inferno_crd_client_suite.json.erb} +0 -43
  8. data/config/presets/{ri_crd_server.json.erb → server_against_ri_crd_server.json.erb} +1 -44
  9. data/config/presets/{inferno_crd_client_suite_v221.json.erb → server_v221_against_inferno_crd_client_suite.json.erb} +0 -61
  10. data/config/presets/{inferno_crd_client_suite_prefetch_subset_v221.json.erb → server_v221_against_inferno_crd_client_suite_prefetch_subset.json.erb} +0 -46
  11. data/config/presets/server_v221_against_inferno_g31_suite.json.erb +49 -0
  12. data/lib/davinci_crd_test_kit/client/cross_hook_helper.rb +26 -0
  13. data/lib/davinci_crd_test_kit/client/endpoints/custom_service_response.rb +7 -7
  14. data/lib/davinci_crd_test_kit/client/endpoints/gather_response_generation_data.rb +4 -1
  15. data/lib/davinci_crd_test_kit/client/endpoints/hook_request_endpoint.rb +63 -38
  16. data/lib/davinci_crd_test_kit/client/endpoints/mock_service_response.rb +26 -7
  17. data/lib/davinci_crd_test_kit/client/endpoints/scenario_service_response.rb +54 -0
  18. data/lib/davinci_crd_test_kit/client/tagged_request_load_helper.rb +8 -27
  19. data/lib/davinci_crd_test_kit/client/v2.0.1/auth/retrieve_jwks_test.rb +35 -23
  20. data/lib/davinci_crd_test_kit/client/v2.0.1/auth/token_payload_test.rb +34 -21
  21. data/lib/davinci_crd_test_kit/client/v2.0.1/cds-services-v201.json +20 -20
  22. data/lib/davinci_crd_test_kit/client/v2.0.1/client_appointment_book_group.rb +12 -10
  23. data/lib/davinci_crd_test_kit/client/v2.0.1/client_encounter_discharge_group.rb +12 -10
  24. data/lib/davinci_crd_test_kit/client/v2.0.1/client_encounter_start_group.rb +12 -10
  25. data/lib/davinci_crd_test_kit/client/v2.0.1/client_hooks_group.rb +5 -5
  26. data/lib/davinci_crd_test_kit/client/v2.0.1/client_order_dispatch_group.rb +12 -10
  27. data/lib/davinci_crd_test_kit/client/v2.0.1/client_order_select_group.rb +12 -10
  28. data/lib/davinci_crd_test_kit/client/v2.0.1/client_order_sign_group.rb +12 -10
  29. data/lib/davinci_crd_test_kit/client/v2.0.1/must_support/client_card_must_support_coverage_information.rb +3 -36
  30. data/lib/davinci_crd_test_kit/client/v2.0.1/must_support/client_card_must_support_external_reference.rb +3 -36
  31. data/lib/davinci_crd_test_kit/client/v2.0.1/must_support/client_card_must_support_instructions.rb +3 -36
  32. data/lib/davinci_crd_test_kit/client/v2.0.1/verify_request/hook_request_fetched_data_test.rb +4 -13
  33. data/lib/davinci_crd_test_kit/client/v2.0.1/verify_request/hook_request_prefetch_equals_queried_test.rb +3 -13
  34. data/lib/davinci_crd_test_kit/client/v2.0.1/verify_response/client_display_cards_attest.rb +3 -13
  35. data/lib/davinci_crd_test_kit/client/v2.0.1/verify_response/inferno_response_validation.rb +3 -13
  36. data/lib/davinci_crd_test_kit/client/v2.2.1/api/client_coverage_info_update_test.rb +1 -1
  37. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/attestation_instructions.rb +10 -0
  38. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_authorized_scope_attestation_test.rb +45 -0
  39. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_coverage_based_invocation_attestation_test.rb +44 -0
  40. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_data_element_expectations_attestation_test.rb +44 -0
  41. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_hook_invocation_logging_attestation_test.rb +43 -0
  42. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_must_support_exposure_attestation_test.rb +43 -0
  43. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_must_support_use_attestation_test.rb +41 -0
  44. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_order_sign_support_attestation_test.rb +42 -0
  45. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_prefetch_key_omission_attestation_test.rb +42 -0
  46. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_resource_identifiers_attestation_test.rb +43 -0
  47. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_response_case_distinction_attestation_test.rb +43 -0
  48. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_security_and_privacy_attestation_test.rb +43 -0
  49. data/lib/davinci_crd_test_kit/client/v2.2.1/attestations/client_workflow_integration_attestation_test.rb +44 -0
  50. data/lib/davinci_crd_test_kit/client/v2.2.1/auth/decode_auth_token_test.rb +1 -1
  51. data/lib/davinci_crd_test_kit/client/v2.2.1/auth/retrieve_jwks_test.rb +29 -18
  52. data/lib/davinci_crd_test_kit/client/v2.2.1/auth/token_payload_test.rb +35 -22
  53. data/lib/davinci_crd_test_kit/client/v2.2.1/cds-services-prefetch-subset-v221.json +47 -47
  54. data/lib/davinci_crd_test_kit/client/v2.2.1/cds-services-v221.json +50 -50
  55. data/lib/davinci_crd_test_kit/client/v2.2.1/client_appointment_book_group.rb +16 -14
  56. data/lib/davinci_crd_test_kit/client/v2.2.1/client_attestations_group.rb +49 -0
  57. data/lib/davinci_crd_test_kit/client/v2.2.1/client_cross_hook_group.rb +22 -6
  58. data/lib/davinci_crd_test_kit/client/v2.2.1/client_cross_hook_interaction_group.rb +98 -0
  59. data/lib/davinci_crd_test_kit/client/v2.2.1/client_encounter_discharge_group.rb +12 -10
  60. data/lib/davinci_crd_test_kit/client/v2.2.1/client_encounter_start_group.rb +12 -10
  61. data/lib/davinci_crd_test_kit/client/v2.2.1/client_fhir_api_group.rb +14 -12
  62. data/lib/davinci_crd_test_kit/client/v2.2.1/client_hooks_group.rb +9 -9
  63. data/lib/davinci_crd_test_kit/client/v2.2.1/client_long_running_hook_group.rb +2 -1
  64. data/lib/davinci_crd_test_kit/client/v2.2.1/client_order_dispatch_group.rb +16 -14
  65. data/lib/davinci_crd_test_kit/client/v2.2.1/client_order_select_group.rb +12 -10
  66. data/lib/davinci_crd_test_kit/client/v2.2.1/client_order_sign_group.rb +16 -14
  67. data/lib/davinci_crd_test_kit/client/v2.2.1/client_scenarios_group.rb +26 -0
  68. data/lib/davinci_crd_test_kit/client/v2.2.1/client_self_pay_hook_group.rb +36 -0
  69. data/lib/davinci_crd_test_kit/client/v2.2.1/client_unknown_content_hook_group.rb +34 -0
  70. data/lib/davinci_crd_test_kit/client/v2.2.1/crd_client_suite.rb +19 -3
  71. data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_card_must_support_coverage_information_test.rb +1 -1
  72. data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_fhirpath_collection_as_comma_delimited_string_test.rb +4 -11
  73. data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_hook_instances_unique_test.rb +1 -9
  74. data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_location_address_propagation_test.rb +6 -2
  75. data/lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_prefetch_complete_and_subset_test.rb +3 -12
  76. data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/appointment_book_receive_request_test.rb +8 -89
  77. data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/base_hook_invocation_receive_request_test.rb +163 -0
  78. data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/cross_hooks_receive_request_test.rb +97 -0
  79. data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/encounter_discharge_receive_request_test.rb +8 -90
  80. data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/encounter_start_receive_request_test.rb +8 -90
  81. data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/order_dispatch_receive_request_test.rb +8 -98
  82. data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/order_select_receive_request_test.rb +8 -98
  83. data/lib/davinci_crd_test_kit/client/v2.2.1/invocation/order_sign_receive_request_test.rb +8 -98
  84. data/lib/davinci_crd_test_kit/client/v2.2.1/long_running/client_long_running_receive_request_test.rb +10 -2
  85. data/lib/davinci_crd_test_kit/client/v2.2.1/long_running/client_skip_long_running_attestation_test.rb +1 -1
  86. data/lib/davinci_crd_test_kit/client/v2.2.1/self_pay/client_self_pay_no_request_test.rb +30 -0
  87. data/lib/davinci_crd_test_kit/client/v2.2.1/self_pay/client_self_pay_workflow_test.rb +55 -0
  88. data/lib/davinci_crd_test_kit/client/v2.2.1/unknown_content/client_unknown_content_attestation_test.rb +99 -0
  89. data/lib/davinci_crd_test_kit/client/v2.2.1/unknown_content/client_unknown_content_receive_request_test.rb +62 -0
  90. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_conformance_test.rb +1 -1
  91. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_coverage_verification_test.rb +10 -2
  92. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_data_fetch_verification_test.rb +1 -1
  93. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_granted_scopes_test.rb +1 -1
  94. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_prefetch_complete_test.rb +1 -1
  95. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_prefetch_profiles_test.rb +1 -1
  96. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_requested_version_test.rb +1 -1
  97. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_request/hook_request_secured_transport_test.rb +1 -1
  98. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_response/client_display_cards_attest.rb +52 -20
  99. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_response/hook_response_support_coverage_information_test.rb +1 -1
  100. data/lib/davinci_crd_test_kit/client/v2.2.1/verify_response/inferno_response_validation.rb +6 -3
  101. data/lib/davinci_crd_test_kit/cross_suite/cards_identification.rb +9 -0
  102. data/lib/davinci_crd_test_kit/cross_suite/logical_models_override_helper.rb +30 -13
  103. data/lib/davinci_crd_test_kit/cross_suite/prefetch_profile_validation.rb +2 -0
  104. data/lib/davinci_crd_test_kit/cross_suite/requests_logical_model_validation.rb +26 -27
  105. data/lib/davinci_crd_test_kit/cross_suite/response_logical_model_validation.rb +48 -41
  106. data/lib/davinci_crd_test_kit/cross_suite/tags.rb +3 -0
  107. data/lib/davinci_crd_test_kit/requirements/cds-hooks_3.0.0-ballot_requirements.xlsx +0 -0
  108. data/lib/davinci_crd_test_kit/requirements/davinci_crd_test_kit_requirements.csv +6 -2
  109. data/lib/davinci_crd_test_kit/requirements/generated/crd_client_requirements_coverage.csv +107 -107
  110. data/lib/davinci_crd_test_kit/requirements/generated/crd_client_v221_requirements_coverage.csv +101 -97
  111. data/lib/davinci_crd_test_kit/requirements/generated/crd_server_requirements_coverage.csv +18 -18
  112. data/lib/davinci_crd_test_kit/requirements/generated/crd_server_v221_requirements_coverage.csv +36 -32
  113. data/lib/davinci_crd_test_kit/requirements/hl7.fhir.us.davinci-crd_2.2.1_requirements.xlsx +0 -0
  114. data/lib/davinci_crd_test_kit/server/v2.0.1/crd_server_suite.rb +1 -1
  115. data/lib/davinci_crd_test_kit/server/v2.0.1/server_hooks_group.rb +5 -5
  116. data/lib/davinci_crd_test_kit/server/v2.2.1/discovery/discovery_standard_prefetch_expressions_test.rb +1 -2
  117. data/lib/davinci_crd_test_kit/server/v2.2.1/server_demonstrate_hook_response_group.rb +2 -2
  118. data/lib/davinci_crd_test_kit/server/v2.2.1/server_hooks_group.rb +5 -5
  119. data/lib/davinci_crd_test_kit/version.rb +2 -2
  120. metadata +40 -12
  121. data/config/presets/inferno_crd_server_suite_v221.json.erb +0 -94
@@ -3,6 +3,7 @@ require_relative 'cross_hook/client_location_address_propagation_test'
3
3
  require_relative 'cross_hook/client_fhirpath_collection_as_comma_delimited_string_test'
4
4
  require_relative 'cross_hook/client_hook_instances_unique_test'
5
5
  require_relative 'cross_hook/client_prefetch_complete_and_subset_test'
6
+ require_relative 'client_cross_hook_interaction_group'
6
7
 
7
8
  module DaVinciCRDTestKit
8
9
  module V221
@@ -11,18 +12,33 @@ module DaVinciCRDTestKit
11
12
  id :crd_v221_client_cross_hook
12
13
  description <<~DESCRIPTION
13
14
  This group checks CRD requirements that pertain across all hooks
14
- rather than a specific one.
15
+ and hook requests rather than specific ones.
15
16
 
16
17
  These tests must be run after the tests in the "Hooks" group are run.
18
+ Clients may, but are not required to, make additional hook requests
19
+ during these tests to show additional features not demonstrated during
20
+ previous hook requests. Note that only the requests made during the
21
+ most recent execution of a given group will be included in the analysis.
17
22
  DESCRIPTION
18
23
 
19
24
  run_as_group
20
25
 
21
- test from: :crd_v221_client_card_must_support_coverage_information
22
- test from: :crd_v221_client_location_address_propagation
23
- test from: :crd_v221_client_fhir_path_collection_as_comma_delimited_string
24
- test from: :crd_v221_client_hook_instances_unique
25
- test from: :crd_v221_client_prefetch_complete_and_subset
26
+ group from: :crd_v221_client_cross_hook_interaction
27
+ group do
28
+ id :crd_v221_client_cross_hook_must_support
29
+ title 'Must Support'
30
+
31
+ test from: :crd_v221_client_card_must_support_coverage_information
32
+ end
33
+ group do
34
+ id :crd_v221_client_cross_hook_additional_capabilities
35
+ title 'Additional Capabilities'
36
+
37
+ test from: :crd_v221_client_location_address_propagation
38
+ test from: :crd_v221_client_fhir_path_collection_as_comma_delimited_string
39
+ test from: :crd_v221_client_hook_instances_unique
40
+ test from: :crd_v221_client_prefetch_complete_and_subset
41
+ end
26
42
  end
27
43
  end
28
44
  end
@@ -0,0 +1,98 @@
1
+ require_relative 'invocation/cross_hooks_receive_request_test'
2
+ require_relative 'auth/decode_auth_token_test'
3
+ require_relative 'auth/retrieve_jwks_test'
4
+ require_relative 'auth/token_header_test'
5
+ require_relative 'auth/token_payload_test'
6
+ require_relative 'verify_request/hook_request_conformance_test'
7
+ require_relative 'verify_request/hook_request_requested_version_test'
8
+ require_relative 'verify_request/hook_request_prefetch_profiles_test'
9
+ require_relative 'verify_request/hook_request_prefetch_complete_test'
10
+ require_relative 'verify_request/hook_request_granted_scopes_test'
11
+ require_relative 'verify_request/hook_request_secured_transport_test'
12
+ require_relative 'verify_request/hook_request_coverage_verification_test'
13
+ require_relative 'verify_request/hook_request_data_fetch_verification_test'
14
+ require_relative 'verify_response/inferno_response_validation'
15
+ require_relative 'verify_response/client_display_cards_attest'
16
+ require_relative 'verify_response/hook_response_support_coverage_information_test'
17
+ require_relative 'client_urls'
18
+
19
+ module DaVinciCRDTestKit
20
+ module V221
21
+ class ClientCrossHookInteractionGroup < Inferno::TestGroup
22
+ title 'Additional Hook Invocations for Cross Hook Support Demonstration'
23
+ id :crd_v221_client_cross_hook_interaction
24
+ description <<~DESCRIPTION
25
+ Optionally send more hook requests demonstrating additional cross-hook
26
+ features.
27
+
28
+ Inferno's simulated hook endpoints can be discovered at:
29
+ - Complete Prefetch: `#{ClientURLs.base_url}#{DISCOVERY_PATH}`
30
+ - Subset Prefetch: `#{ClientURLs.base_url}#{PREFETCH_DISCOVERY_PATH}`
31
+ DESCRIPTION
32
+ run_as_group
33
+
34
+ input_order :cross_hooks_response_approach,
35
+ :cross_hooks_selected_response_types,
36
+ :cross_hooks_custom_response_template
37
+
38
+ config(
39
+ inputs: {
40
+ auth_token_headers_json: { name: :cross_hooks_auth_token_headers_json },
41
+ auth_tokens: { name: :cross_hooks_auth_tokens },
42
+ auth_tokens_jwk_json: { name: :cross_hooks_auth_tokens_jwk_json },
43
+ client_access_token: { name: :cross_hooks_client_access_token },
44
+ client_fhir_server: { name: :cross_hooks_client_fhir_server },
45
+ crd_jwks_keys_json: { name: :cross_hooks_crd_jwks_keys_json },
46
+ custom_response_template: { name: :cross_hooks_custom_response_template },
47
+ selected_response_types: { name: :cross_hooks_selected_response_types }
48
+ },
49
+ outputs: {
50
+ auth_token_headers_json: { name: :cross_hooks_auth_token_headers_json },
51
+ auth_token_payloads_json: { name: :cross_hooks_auth_token_payloads_json },
52
+ auth_tokens: { name: :cross_hooks_auth_tokens },
53
+ auth_tokens_jwk_json: { name: :cross_hooks_auth_tokens_jwk_json },
54
+ client_access_token: { name: :cross_hooks_client_access_token },
55
+ client_fhir_server: { name: :cross_hooks_client_fhir_server },
56
+ crd_jwks_keys_json: { name: :cross_hooks_crd_jwks_keys_json }
57
+ },
58
+ options: {
59
+ hook_name: ANY_HOOK_TAG,
60
+ crd_interaction_group: 'additional-cross-hooks',
61
+ include_in_cross_hook_analysis: true
62
+ }
63
+ )
64
+
65
+ group do
66
+ title 'Interaction'
67
+ test from: :crd_v221_cross_hooks_request
68
+ end
69
+
70
+ group do
71
+ title 'Response Handling'
72
+
73
+ test from: :crd_v221_card_display_attest_test
74
+ test from: :crd_v221_inferno_response_validation
75
+ end
76
+
77
+ group do
78
+ title 'Requests'
79
+ test from: :crd_v221_hook_request_conformance
80
+ test from: :crd_v221_hook_request_requested_version
81
+ test from: :crd_v221_hook_request_prefetch_profiles
82
+ test from: :crd_v221_hook_request_prefetch_complete
83
+ test from: :crd_v221_hook_request_coverage_verification
84
+ test from: :crd_v221_hook_data_fetch_verification
85
+ test from: :crd_v221_hook_request_granted_scopes
86
+ test from: :crd_v221_hook_request_secured_transport
87
+ end
88
+
89
+ group do
90
+ title 'Authorization'
91
+ test from: :crd_v221_decode_auth_token
92
+ test from: :crd_v221_retrieve_jwks
93
+ test from: :crd_v221_token_header
94
+ test from: :crd_v221_token_payload
95
+ end
96
+ end
97
+ end
98
+ end
@@ -59,7 +59,9 @@ module DaVinciCRDTestKit
59
59
  crd_jwks_keys_json: { name: :encounter_discharge_crd_jwks_keys_json }
60
60
  },
61
61
  options: {
62
- hook_name: 'encounter-discharge'
62
+ hook_name: 'encounter-discharge',
63
+ crd_interaction_group: 'hooks-encounter-discharge',
64
+ include_in_cross_hook_analysis: true
63
65
  }
64
66
  )
65
67
 
@@ -69,11 +71,10 @@ module DaVinciCRDTestKit
69
71
  end
70
72
 
71
73
  group do
72
- title 'Authorization'
73
- test from: :crd_v221_decode_auth_token
74
- test from: :crd_v221_retrieve_jwks
75
- test from: :crd_v221_token_header
76
- test from: :crd_v221_token_payload
74
+ title 'Response Handling'
75
+
76
+ test from: :crd_v221_card_display_attest_test
77
+ test from: :crd_v221_inferno_response_validation
77
78
  end
78
79
 
79
80
  group do
@@ -92,10 +93,11 @@ module DaVinciCRDTestKit
92
93
  end
93
94
 
94
95
  group do
95
- title 'Response Handling'
96
-
97
- test from: :crd_v221_inferno_response_validation
98
- test from: :crd_v221_card_display_attest_test
96
+ title 'Authorization'
97
+ test from: :crd_v221_decode_auth_token
98
+ test from: :crd_v221_retrieve_jwks
99
+ test from: :crd_v221_token_header
100
+ test from: :crd_v221_token_payload
99
101
  end
100
102
  end
101
103
  end
@@ -58,7 +58,9 @@ module DaVinciCRDTestKit
58
58
  crd_jwks_keys_json: { name: :encounter_start_crd_jwks_keys_json }
59
59
  },
60
60
  options: {
61
- hook_name: 'encounter-start'
61
+ hook_name: 'encounter-start',
62
+ crd_interaction_group: 'hooks-encounter-start',
63
+ include_in_cross_hook_analysis: true
62
64
  }
63
65
  )
64
66
 
@@ -68,11 +70,10 @@ module DaVinciCRDTestKit
68
70
  end
69
71
 
70
72
  group do
71
- title 'Authorization'
72
- test from: :crd_v221_decode_auth_token
73
- test from: :crd_v221_retrieve_jwks
74
- test from: :crd_v221_token_header
75
- test from: :crd_v221_token_payload
73
+ title 'Response Handling'
74
+
75
+ test from: :crd_v221_card_display_attest_test
76
+ test from: :crd_v221_inferno_response_validation
76
77
  end
77
78
 
78
79
  group do
@@ -91,10 +92,11 @@ module DaVinciCRDTestKit
91
92
  end
92
93
 
93
94
  group do
94
- title 'Response Handling'
95
-
96
- test from: :crd_v221_inferno_response_validation
97
- test from: :crd_v221_card_display_attest_test
95
+ title 'Authorization'
96
+ test from: :crd_v221_decode_auth_token
97
+ test from: :crd_v221_retrieve_jwks
98
+ test from: :crd_v221_token_header
99
+ test from: :crd_v221_token_payload
98
100
  end
99
101
  end
100
102
  end
@@ -10,16 +10,13 @@ module DaVinciCRDTestKit
10
10
  CRD client systems are responsible for returning data requested by the CRD server needed to provide decision support.
11
11
  This group contains tests that verify the required 'server' FHIR API capabilities.
12
12
  These 'server' capabilities are based on the US Core Server Capability Statement for the US Core version chosen
13
- when initiating the test session:
14
- - [US Core 3.1.1 Server Capability Statement](http://hl7.org/fhir/us/core/STU3.1.1/CapabilityStatement-us-core-server.html)
15
- - [US Core 6.1.0 Server Capability Statement](http://hl7.org/fhir/us/core/STU6.1/CapabilityStatement-us-core-server.html)
16
- - [US Core 7.0.0 Server Capability Statement](http://hl7.org/fhir/us/core/STU7/CapabilityStatement-us-core-server.html)
13
+ when the test session was initiated.
17
14
  DESCRIPTION
18
15
  id :crd_v221_client_fhir_api
19
16
 
20
17
  verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@conf-1'
21
18
 
22
- input_instructions %(
19
+ INPUT_INSTRUCTIONS = %(
23
20
  The location of and an access token for the client's FHIR server are expected to come in
24
21
  the CDS Hooks request. The following information will be auto-populated from
25
22
  the body of the latest hook invocation made during this session:
@@ -29,7 +26,9 @@ module DaVinciCRDTestKit
29
26
  If that access token will not be long-lived enough to perform
30
27
  a full test of the US Core FHIR API, provide an updated token and/or refresh
31
28
  token with Client ID and token endpoint so that Inferno can perform these tests.
32
- )
29
+ ).freeze
30
+
31
+ input_instructions INPUT_INSTRUCTIONS
33
32
 
34
33
  input :url,
35
34
  title: 'FHIR Endpoint',
@@ -46,10 +45,11 @@ module DaVinciCRDTestKit
46
45
  This test group verifies that the CRD client can respond to queries as required by the
47
46
  [US Core 3.1.1 Server Capability Statement](http://hl7.org/fhir/us/core/STU3.1.1/CapabilityStatement-us-core-server.html).
48
47
 
49
- Note: these tests do not look for crd-specific data and so only verify conformance against
50
- US Core profiles. The hook tests take the CRD-specific profiles into account.
48
+ Note: unlike the hook tests, these US Core tests do not require CRD-specific data but
49
+ instead verify conformance against US Core profiles rather than the CRD-defined profiles.
51
50
  )
52
51
  required_suite_options CRDClientOptions::US_CORE_3_REQUIREMENT
52
+ input_instructions INPUT_INSTRUCTIONS
53
53
 
54
54
  group from: :crd_v221_client_update_verification,
55
55
  id: :crd_v221_us_core_311_client_update_verification
@@ -60,10 +60,11 @@ module DaVinciCRDTestKit
60
60
  This test group verifies that the CRD client can respond to queries as required by the
61
61
  [US Core 6.1.0 Server Capability Statement](http://hl7.org/fhir/us/core/STU6.1/CapabilityStatement-us-core-server.html).
62
62
 
63
- Note: these tests do not look for crd-specific data and so only verify conformance against
64
- US Core profiles. The hook tests take the CRD-specific profiles into account.
63
+ Note: unlike the hook tests, these US Core tests do not require CRD-specific data but
64
+ instead verify conformance against US Core profiles rather than the CRD-defined profiles.
65
65
  )
66
66
  required_suite_options CRDClientOptions::US_CORE_6_REQUIREMENT
67
+ input_instructions INPUT_INSTRUCTIONS
67
68
 
68
69
  group from: :crd_v221_client_update_verification,
69
70
  id: :crd_v221_us_core_610_client_update_verification
@@ -74,10 +75,11 @@ module DaVinciCRDTestKit
74
75
  This test group verifies that the CRD client can respond to queries as required by the
75
76
  [US Core 7.0.0 Server Capability Statement](http://hl7.org/fhir/us/core/STU7/CapabilityStatement-us-core-server.html).
76
77
 
77
- Note: these tests do not look for crd-specific data and so only verify conformance against
78
- US Core profiles. The hook tests take the CRD-specific profiles into account.
78
+ Note: unlike the hook tests, these US Core tests do not require CRD-specific data but
79
+ instead verify conformance against US Core profiles rather than the CRD-defined profiles.
79
80
  )
80
81
  required_suite_options CRDClientOptions::US_CORE_7_REQUIREMENT
82
+ input_instructions INPUT_INSTRUCTIONS
81
83
 
82
84
  group from: :crd_v221_client_update_verification,
83
85
  id: :crd_v221_us_core_700_client_update_verification
@@ -15,10 +15,10 @@ module DaVinciCRDTestKit
15
15
  one of the [six hooks described in the CRD IG](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html):
16
16
  * [appointment-book](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#appointment-book)
17
17
  * [encounter-start](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#encounter-start)
18
- * [encounter-discharge](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#encounter-discharge)
19
18
  * [order-select](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#order-select)
20
- * [order-dispatch](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#order-dispatch)
21
19
  * [order-sign](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#order-sign)
20
+ * [order-dispatch](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#order-dispatch)
21
+ * [encounter-discharge](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/hooks.html#encounter-discharge)
22
22
 
23
23
  Each hook-specific group follows the same pattern:
24
24
  1. Allow the client to make hook invocations for the tested hook, waiting until the tester indicates
@@ -36,18 +36,18 @@ module DaVinciCRDTestKit
36
36
  `#{ClientURLs.discovery_url}`
37
37
  * `appointment-book` service id: `appointment-book-service`
38
38
  * `encounter-start` service id: `encounter-start-service`
39
- * `encounter-discharge` service id: `encounter-discharge-service`
40
39
  * `order-select` service id: `order-select-service`
41
- * `order-dispatch` service id: `order-dispatch-service`
42
40
  * `order-sign` service id: `order-sign-service`
41
+ * `order-dispatch` service id: `order-dispatch-service`
42
+ * `encounter-discharge` service id: `encounter-discharge-service`
43
43
  - Discovery endpoint for services requesting the a subset of the [standard prefetch data set](https://hl7.org/fhir/us/davinci-crd/2.2.1/en/foundation.html#standard-prefetch):
44
44
  `#{ClientURLs.prefetch_subset_discovery_url}`
45
45
  * `appointment-book` service id: `appointment-book-subset`
46
46
  * `encounter-start` service id: `encounter-start-subset`
47
- * `encounter-discharge` service id: `encounter-discharge-subset`
48
47
  * `order-select` service id: `order-select-subset`
49
- * `order-dispatch` service id: `order-dispatch-subset`
50
48
  * `order-sign` service id: `order-sign-subset`
49
+ * `order-dispatch` service id: `order-dispatch-subset`
50
+ * `encounter-discharge` service id: `encounter-discharge-subset`
51
51
  DESCRIPTION
52
52
  id :crd_v221_client_hooks
53
53
 
@@ -68,16 +68,16 @@ module DaVinciCRDTestKit
68
68
  group from: :crd_v221_client_encounter_start,
69
69
  optional: true
70
70
 
71
- group from: :crd_v221_client_encounter_discharge,
71
+ group from: :crd_v221_client_order_select,
72
72
  optional: true
73
73
 
74
- group from: :crd_v221_client_order_select,
74
+ group from: :crd_v221_client_order_sign,
75
75
  optional: true
76
76
 
77
77
  group from: :crd_v221_client_order_dispatch,
78
78
  optional: true
79
79
 
80
- group from: :crd_v221_client_order_sign,
80
+ group from: :crd_v221_client_encounter_discharge,
81
81
  optional: true
82
82
  end
83
83
  end
@@ -21,7 +21,8 @@ module DaVinciCRDTestKit
21
21
  config(
22
22
  options: {
23
23
  hook_name: ANY_HOOK_TAG,
24
- crd_test_group: LONG_RUNNING_GROUP_TAG
24
+ crd_interaction_group: LONG_RUNNING_GROUP_TAG,
25
+ include_in_cross_hook_analysis: false
25
26
  }
26
27
  )
27
28
 
@@ -60,7 +60,9 @@ module DaVinciCRDTestKit
60
60
  crd_jwks_keys_json: { name: :order_dispatch_crd_jwks_keys_json }
61
61
  },
62
62
  options: {
63
- hook_name: 'order-dispatch'
63
+ hook_name: 'order-dispatch',
64
+ crd_interaction_group: 'hooks-order-dispatch',
65
+ include_in_cross_hook_analysis: true
64
66
  }
65
67
  )
66
68
 
@@ -70,11 +72,14 @@ module DaVinciCRDTestKit
70
72
  end
71
73
 
72
74
  group do
73
- title 'Authorization'
74
- test from: :crd_v221_decode_auth_token
75
- test from: :crd_v221_retrieve_jwks
76
- test from: :crd_v221_token_header
77
- test from: :crd_v221_token_payload
75
+ title 'Response Handling'
76
+
77
+ test from: :crd_v221_card_display_attest_test
78
+ test from: :crd_v221_inferno_response_validation
79
+ test from: :crd_v221_client_hook_response_support_coverage_information do
80
+ title 'Client supports the Coverage Information response type on the order-dispatch hook'
81
+ verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@hook-33'
82
+ end
78
83
  end
79
84
 
80
85
  group do
@@ -93,14 +98,11 @@ module DaVinciCRDTestKit
93
98
  end
94
99
 
95
100
  group do
96
- title 'Response Handling'
97
-
98
- test from: :crd_v221_inferno_response_validation
99
- test from: :crd_v221_card_display_attest_test
100
- test from: :crd_v221_client_hook_response_support_coverage_information do
101
- title 'Client supports the Coverage Information response type on the order-dispatch hook'
102
- verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@hook-33'
103
- end
101
+ title 'Authorization'
102
+ test from: :crd_v221_decode_auth_token
103
+ test from: :crd_v221_retrieve_jwks
104
+ test from: :crd_v221_token_header
105
+ test from: :crd_v221_token_payload
104
106
  end
105
107
  end
106
108
  end
@@ -59,7 +59,9 @@ module DaVinciCRDTestKit
59
59
  crd_jwks_keys_json: { name: :order_select_crd_jwks_keys_json }
60
60
  },
61
61
  options: {
62
- hook_name: 'order-select'
62
+ hook_name: 'order-select',
63
+ crd_interaction_group: 'hooks-order-select',
64
+ include_in_cross_hook_analysis: true
63
65
  }
64
66
  )
65
67
 
@@ -69,11 +71,10 @@ module DaVinciCRDTestKit
69
71
  end
70
72
 
71
73
  group do
72
- title 'Authorization'
73
- test from: :crd_v221_decode_auth_token
74
- test from: :crd_v221_retrieve_jwks
75
- test from: :crd_v221_token_header
76
- test from: :crd_v221_token_payload
74
+ title 'Response Handling'
75
+
76
+ test from: :crd_v221_card_display_attest_test
77
+ test from: :crd_v221_inferno_response_validation
77
78
  end
78
79
 
79
80
  group do
@@ -98,10 +99,11 @@ module DaVinciCRDTestKit
98
99
  end
99
100
 
100
101
  group do
101
- title 'Response Handling'
102
-
103
- test from: :crd_v221_inferno_response_validation
104
- test from: :crd_v221_card_display_attest_test
102
+ title 'Authorization'
103
+ test from: :crd_v221_decode_auth_token
104
+ test from: :crd_v221_retrieve_jwks
105
+ test from: :crd_v221_token_header
106
+ test from: :crd_v221_token_payload
105
107
  end
106
108
  end
107
109
  end
@@ -60,7 +60,9 @@ module DaVinciCRDTestKit
60
60
  crd_jwks_keys_json: { name: :order_sign_crd_jwks_keys_json }
61
61
  },
62
62
  options: {
63
- hook_name: 'order-sign'
63
+ hook_name: 'order-sign',
64
+ crd_interaction_group: 'hooks-order-sign',
65
+ include_in_cross_hook_analysis: true
64
66
  }
65
67
  )
66
68
 
@@ -70,11 +72,14 @@ module DaVinciCRDTestKit
70
72
  end
71
73
 
72
74
  group do
73
- title 'Authorization'
74
- test from: :crd_v221_decode_auth_token
75
- test from: :crd_v221_retrieve_jwks
76
- test from: :crd_v221_token_header
77
- test from: :crd_v221_token_payload
75
+ title 'Response Handling'
76
+
77
+ test from: :crd_v221_card_display_attest_test
78
+ test from: :crd_v221_inferno_response_validation
79
+ test from: :crd_v221_client_hook_response_support_coverage_information do
80
+ title 'Client supports the Coverage Information response type on the order-sign hook'
81
+ verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@hook-39'
82
+ end
78
83
  end
79
84
 
80
85
  group do
@@ -99,14 +104,11 @@ module DaVinciCRDTestKit
99
104
  end
100
105
 
101
106
  group do
102
- title 'Response Handling'
103
-
104
- test from: :crd_v221_inferno_response_validation
105
- test from: :crd_v221_card_display_attest_test
106
- test from: :crd_v221_client_hook_response_support_coverage_information do
107
- title 'Client supports the Coverage Information response type on the order-sign hook'
108
- verifies_requirements 'hl7.fhir.us.davinci-crd_2.2.1@hook-39'
109
- end
107
+ title 'Authorization'
108
+ test from: :crd_v221_decode_auth_token
109
+ test from: :crd_v221_retrieve_jwks
110
+ test from: :crd_v221_token_header
111
+ test from: :crd_v221_token_payload
110
112
  end
111
113
  end
112
114
  end
@@ -0,0 +1,26 @@
1
+ require_relative 'client_long_running_hook_group'
2
+ require_relative 'client_unknown_content_hook_group'
3
+ require_relative 'client_self_pay_hook_group'
4
+
5
+ module DaVinciCRDTestKit
6
+ module V221
7
+ class ClientScenariosGroup < Inferno::TestGroup
8
+ title 'Scenarios'
9
+ id :crd_v221_client_scenarios
10
+ description <<~DESCRIPTION
11
+ This group checks CRD requirements that pertain to specific scenarios
12
+ that clients need to handle.
13
+
14
+ These scenarios test specific situations and conformance details of requests
15
+ and responses beyond those required for the scenario and for Inferno to
16
+ recognize client requests are not checked. Testers are expected to follow
17
+ the same workflows as used during other tests and should adhere to the
18
+ same CRD requirements when performing these scenarios.
19
+ DESCRIPTION
20
+
21
+ group from: :crd_v221_client_long_running_hook
22
+ group from: :crd_v221_client_unknown_content_hook
23
+ group from: :crd_v221_client_self_pay_hook
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,36 @@
1
+ require_relative 'self_pay/client_self_pay_workflow_test'
2
+ require_relative 'self_pay/client_self_pay_no_request_test'
3
+
4
+ module DaVinciCRDTestKit
5
+ module V221
6
+ class ClientSelfPayHookGroup < Inferno::TestGroup
7
+ title 'Self-Pay'
8
+ id :crd_v221_client_self_pay_hook
9
+ description <<~DESCRIPTION
10
+ The CRD IG requires clients to invoke hooks on payer services only when the patient
11
+ record indicates active coverage with the payer associated with the service and there
12
+ is no recorded indication that the patient intends to bypass insurance coverage, i.e.,
13
+ the service or product is not flagged as 'self-pay'. During this scenario the tester
14
+ will perform a workflow that would normally trigger a hook request, but for a service or
15
+ product that the patient has indicated they intend to self-pay for, and Inferno
16
+ will verify that no hook requests are made.
17
+
18
+ Any hook requests made during these tests will not be checked for conformance
19
+ or included in the cross-hook analyses around must support and other coverage requirements.
20
+ DESCRIPTION
21
+
22
+ run_as_group
23
+
24
+ config(
25
+ options: {
26
+ hook_name: ANY_HOOK_TAG,
27
+ crd_interaction_group: SELF_PAY_GROUP_TAG,
28
+ include_in_cross_hook_analysis: false
29
+ }
30
+ )
31
+
32
+ test from: :crd_v221_client_self_pay_workflow
33
+ test from: :crd_v221_client_self_pay_no_request
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,34 @@
1
+ require_relative 'unknown_content/client_unknown_content_receive_request_test'
2
+ require_relative 'unknown_content/client_unknown_content_attestation_test'
3
+
4
+ module DaVinciCRDTestKit
5
+ module V221
6
+ class ClientUnknownContentHookGroup < Inferno::TestGroup
7
+ title 'Unknown Response Content'
8
+ id :crd_v221_client_unknown_content_hook
9
+ description <<~DESCRIPTION
10
+ CRD servers may return content that clients do not recognize, and the CRD IG requires
11
+ clients to ignore it rather than fail. During this scenario Inferno returns coverage
12
+ information accompanied by an element within the system action and a custom extension
13
+ on the response, both with randomly generated names. This content is added at the CRD
14
+ response level rather than within the FHIR resources carried in the response.
15
+
16
+ Hook requests made during these tests will not be checked for conformance
17
+ or included in the cross-hook analyses around must support and other coverage requirements.
18
+ DESCRIPTION
19
+
20
+ run_as_group
21
+
22
+ config(
23
+ options: {
24
+ hook_name: ANY_HOOK_TAG,
25
+ crd_interaction_group: UNKNOWN_CONTENT_GROUP_TAG,
26
+ include_in_cross_hook_analysis: false
27
+ }
28
+ )
29
+
30
+ test from: :crd_v221_client_unknown_content_receive_request
31
+ test from: :crd_v221_client_unknown_content_attestation_test
32
+ end
33
+ end
34
+ end