us_core_test_kit 1.0.0 → 1.1.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 (90) hide show
  1. checksums.yaml +4 -4
  2. data/config/presets/client_demo_against_server_800_preset.json.erb +46 -0
  3. data/config/presets/server_demo_against_client_800_preset.json.erb +30 -0
  4. data/lib/us_core_test_kit/client/generated/v3.1.1/bodyheight_client_group.rb +1 -1
  5. data/lib/us_core_test_kit/client/generated/v3.1.1/bodytemp_client_group.rb +1 -1
  6. data/lib/us_core_test_kit/client/generated/v3.1.1/bodyweight_client_group.rb +1 -1
  7. data/lib/us_core_test_kit/client/generated/v3.1.1/bp_client_group.rb +1 -1
  8. data/lib/us_core_test_kit/client/generated/v3.1.1/condition_client_group.rb +1 -1
  9. data/lib/us_core_test_kit/client/generated/v3.1.1/head_circumference_client_group.rb +1 -1
  10. data/lib/us_core_test_kit/client/generated/v3.1.1/heartrate_client_group.rb +1 -1
  11. data/lib/us_core_test_kit/client/generated/v3.1.1/resprate_client_group.rb +1 -1
  12. data/lib/us_core_test_kit/client/generated/v3.1.1/us_core_client_test_suite.rb +1 -1
  13. data/lib/us_core_test_kit/client/generated/v4.0.0/condition_client_group.rb +1 -1
  14. data/lib/us_core_test_kit/client/generated/v4.0.0/head_circumference_client_group.rb +1 -1
  15. data/lib/us_core_test_kit/client/generated/v4.0.0/us_core_client_test_suite.rb +1 -1
  16. data/lib/us_core_test_kit/client/generated/v5.0.1/head_circumference_client_group.rb +1 -1
  17. data/lib/us_core_test_kit/client/generated/v5.0.1/us_core_client_test_suite.rb +1 -1
  18. data/lib/us_core_test_kit/client/generated/v6.1.0/head_circumference_client_group.rb +1 -1
  19. data/lib/us_core_test_kit/client/generated/v6.1.0/observation_clinical_result/observation_clinical_result_client_read_test.rb +2 -2
  20. data/lib/us_core_test_kit/client/generated/v6.1.0/observation_clinical_result_client_group.rb +2 -1
  21. data/lib/us_core_test_kit/client/generated/v6.1.0/us_core_client_test_suite.rb +1 -1
  22. data/lib/us_core_test_kit/client/generated/v7.0.0/head_circumference_client_group.rb +1 -1
  23. data/lib/us_core_test_kit/client/generated/v7.0.0/observation_clinical_result/observation_clinical_result_client_read_test.rb +2 -2
  24. data/lib/us_core_test_kit/client/generated/v7.0.0/observation_clinical_result_client_group.rb +2 -1
  25. data/lib/us_core_test_kit/client/generated/v7.0.0/us_core_client_test_suite.rb +2 -1
  26. data/lib/us_core_test_kit/client/generated/v8.0.0/head_circumference_client_group.rb +1 -1
  27. data/lib/us_core_test_kit/client/generated/v8.0.0/observation_clinical_result/observation_clinical_result_client_read_test.rb +2 -2
  28. data/lib/us_core_test_kit/client/generated/v8.0.0/observation_clinical_result_client_group.rb +2 -1
  29. data/lib/us_core_test_kit/client/generated/v8.0.0/us_core_client_test_suite.rb +10 -1
  30. data/lib/us_core_test_kit/client/generator/group_generator.rb +19 -5
  31. data/lib/us_core_test_kit/client/generator/read_test_generator.rb +9 -1
  32. data/lib/us_core_test_kit/client/generator/templates/read_test.rb.erb +5 -1
  33. data/lib/us_core_test_kit/client/generator/templates/suite.rb.erb +12 -1
  34. data/lib/us_core_test_kit/client/test_helper.rb +5 -3
  35. data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/condition/condition_patient_abatement_date_granular_scope_search_test.rb +14 -1
  36. data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/condition/condition_patient_asserted_date_granular_scope_search_test.rb +14 -1
  37. data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/condition/condition_patient_category_clinical_status_granular_scope_search_test.rb +14 -1
  38. data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/condition/condition_patient_category_encounter_granular_scope_search_test.rb +14 -1
  39. data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/condition/condition_patient_category_granular_scope_search_test.rb +14 -1
  40. data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/condition/condition_patient_clinical_status_granular_scope_search_test.rb +14 -1
  41. data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/condition/condition_patient_code_granular_scope_search_test.rb +14 -1
  42. data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/condition/condition_patient_granular_scope_search_test.rb +14 -1
  43. data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/condition/condition_patient_onset_date_granular_scope_search_test.rb +14 -1
  44. data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/condition/condition_patient_recorded_date_granular_scope_search_test.rb +14 -1
  45. data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/observation/observation_patient_category_date_granular_scope_search_test.rb +14 -1
  46. data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/observation/observation_patient_category_granular_scope_search_test.rb +14 -1
  47. data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/observation/observation_patient_category_status_granular_scope_search_test.rb +14 -1
  48. data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/observation/observation_patient_code_date_granular_scope_search_test.rb +14 -1
  49. data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/observation/observation_patient_code_granular_scope_search_test.rb +14 -1
  50. data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/condition/condition_patient_abatement_date_granular_scope_search_test.rb +14 -1
  51. data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/condition/condition_patient_asserted_date_granular_scope_search_test.rb +14 -1
  52. data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/condition/condition_patient_category_clinical_status_granular_scope_search_test.rb +14 -1
  53. data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/condition/condition_patient_category_encounter_granular_scope_search_test.rb +14 -1
  54. data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/condition/condition_patient_category_granular_scope_search_test.rb +14 -1
  55. data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/condition/condition_patient_clinical_status_granular_scope_search_test.rb +14 -1
  56. data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/condition/condition_patient_code_granular_scope_search_test.rb +14 -1
  57. data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/condition/condition_patient_granular_scope_search_test.rb +14 -1
  58. data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/condition/condition_patient_lastupdated_granular_scope_search_test.rb +14 -1
  59. data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/condition/condition_patient_onset_date_granular_scope_search_test.rb +14 -1
  60. data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/condition/condition_patient_recorded_date_granular_scope_search_test.rb +14 -1
  61. data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/observation/observation_patient_category_date_granular_scope_search_test.rb +14 -1
  62. data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/observation/observation_patient_category_granular_scope_search_test.rb +14 -1
  63. data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/observation/observation_patient_category_lastupdated_granular_scope_search_test.rb +14 -1
  64. data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/observation/observation_patient_category_status_granular_scope_search_test.rb +14 -1
  65. data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/observation/observation_patient_code_date_granular_scope_search_test.rb +14 -1
  66. data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/observation/observation_patient_code_granular_scope_search_test.rb +14 -1
  67. data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/condition/condition_patient_abatement_date_granular_scope_search_test.rb +14 -1
  68. data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/condition/condition_patient_asserted_date_granular_scope_search_test.rb +14 -1
  69. data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/condition/condition_patient_category_clinical_status_granular_scope_search_test.rb +14 -1
  70. data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/condition/condition_patient_category_encounter_granular_scope_search_test.rb +14 -1
  71. data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/condition/condition_patient_category_granular_scope_search_test.rb +14 -1
  72. data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/condition/condition_patient_clinical_status_granular_scope_search_test.rb +14 -1
  73. data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/condition/condition_patient_code_granular_scope_search_test.rb +14 -1
  74. data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/condition/condition_patient_granular_scope_search_test.rb +14 -1
  75. data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/condition/condition_patient_lastupdated_granular_scope_search_test.rb +14 -1
  76. data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/condition/condition_patient_onset_date_granular_scope_search_test.rb +14 -1
  77. data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/condition/condition_patient_recorded_date_granular_scope_search_test.rb +14 -1
  78. data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/observation/observation_patient_category_date_granular_scope_search_test.rb +14 -1
  79. data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/observation/observation_patient_category_granular_scope_search_test.rb +14 -1
  80. data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/observation/observation_patient_category_lastupdated_granular_scope_search_test.rb +14 -1
  81. data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/observation/observation_patient_category_status_granular_scope_search_test.rb +14 -1
  82. data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/observation/observation_patient_code_date_granular_scope_search_test.rb +14 -1
  83. data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/observation/observation_patient_code_granular_scope_search_test.rb +14 -1
  84. data/lib/us_core_test_kit/generator/granular_scope_test_generator.rb +14 -1
  85. data/lib/us_core_test_kit/granular_scope_search_test.rb +36 -11
  86. data/lib/us_core_test_kit/metadata.rb +1 -1
  87. data/lib/us_core_test_kit/requirements/generated/us_core_client_v800_requirements_coverage.csv +140 -0
  88. data/lib/us_core_test_kit/version.rb +2 -2
  89. data/lib/us_core_test_kit.rb +1 -0
  90. metadata +5 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09c99914668f955a93193b97ca8d5ab37ef25159b41146eb77634380f8df0ad5'
4
- data.tar.gz: 15f69930bf9b8afccfd27975001b9ebbfb7ad74a8eec817a3f93e72f2b19e2e1
3
+ metadata.gz: a121ebdf4c6d4f64205243404d6a60ffa914c360c82b12a5d87db7dfdc5cdcea
4
+ data.tar.gz: 653526a65dbbba58f5e2b2e1022c82f61e7df87dc988af09f9d7da0c041f9f9f
5
5
  SHA512:
6
- metadata.gz: 037c12c604ab66cb5bb0c02e89089ed4853c7d6f3042d3c4f599210e8132b81cd6b59315a88298956c8421979bd5a50326508b44d7be46659e4c3391e042c7c7
7
- data.tar.gz: e11c3d1bd77b8bb1ca4bb6bf3ef92b22baa1def830f68b0e096534744c7490cbf8878e0e535baac09e677f6c4cac99ca62c5e26bb35146d283ec0e4e51a0805a
6
+ metadata.gz: deb705f62b68c74d8dbe4875bbb5eeeb03320d62b725229a797882558469d8cb8e09c75bd2ce71fa9c9426c2d2e8cab363ee77af621fc3ad83bb36b141f052f6
7
+ data.tar.gz: dac0ba9320a455434c6d976b926828ed16997d6f7434f121683a9d6ef8671315af861a6d6887cf2b4f240043718481a9d2a1c8e9bafac7ec4b62577e501f9da3
@@ -0,0 +1,46 @@
1
+ {
2
+ "title": "Demo: Run Against the US Core Server Suite",
3
+ "id": "demo_us_core_client_against_server_v800",
4
+ "test_suite_id": "us_core_client_v800",
5
+ "inputs": [
6
+ {
7
+ "name": "client_id",
8
+ "description": "Testers may provide a specific value for Inferno to assign as the client id. If no value is provided, the Inferno session id will be used.",
9
+ "optional": true,
10
+ "title": "Client Id",
11
+ "type": "text",
12
+ "value": "us_core_client_demo"
13
+ },
14
+ {
15
+ "name": "smart_launch_urls",
16
+ "description": "If the client app supports EHR launch, a comma-delimited list of one or more URLs that Inferno can use to launch the app.",
17
+ "optional": true,
18
+ "title": "SMART App Launch URL(s)",
19
+ "type": "textarea",
20
+ "value": ""
21
+ },
22
+ {
23
+ "name": "smart_redirect_uris",
24
+ "description": "A comma-separated list of one or more URIs that the app will sepcify as the target of the redirect for Inferno to use when providing the authorization code.",
25
+ "title": "SMART App Launch Redirect URI(s)",
26
+ "type": "textarea",
27
+ "value": "<%= Inferno::Application['base_url'] %>/custom/smart/redirect"
28
+ },
29
+ {
30
+ "name": "launch_context",
31
+ "description": "Launch context details to be included in access token responses, specified as a JSON array. If provided, the contents will be merged into Inferno's token responses.",
32
+ "optional": true,
33
+ "title": "Launch Context",
34
+ "type": "textarea",
35
+ "value": ""
36
+ },
37
+ {
38
+ "name": "fhir_user_relative_reference",
39
+ "description": "A FHIR relative reference (<resource type>/<id>) for the FHIR user record to return when the openid and fhirUser scopes are requested. Include this resource in the **Available Resources** input so that it can be accessed via FHIR read.",
40
+ "optional": true,
41
+ "title": "FHIR User Relative Reference",
42
+ "type": "text",
43
+ "value": "Patient/us-core-client-tests-patient"
44
+ }
45
+ ]
46
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "title": "Demo: Run Against the US Core Client Suite",
3
+ "id": "demo_us_core_server_against_client_v800",
4
+ "test_suite_id": "us_core_v800",
5
+ "inputs": [
6
+ {
7
+ "name": "url",
8
+ "type": "text",
9
+ "title": "FHIR Endpoint",
10
+ "description": "URL of the FHIR endpoint",
11
+ "value": "<%= Inferno::Application['base_url'] %>/custom/us_core_client_v800/fhir"
12
+ },
13
+ {
14
+ "name": "smart_auth_info",
15
+ "type": "auth_info",
16
+ "value": {
17
+ "auth_type": "public",
18
+ "use_discovery": "true",
19
+ "client_id": "us_core_client_demo"
20
+ }
21
+ },
22
+ {
23
+ "name": "patient_ids",
24
+ "type": "text",
25
+ "title": "Patient IDs",
26
+ "description": "Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements",
27
+ "value": "us-core-client-tests-patient"
28
+ }
29
+ ]
30
+ }
@@ -38,7 +38,7 @@ for the resource type is required, and omitted otherwise.
38
38
  ## Reading
39
39
  This test will check that the client performed a read of the following id:
40
40
 
41
- * `us-core-client-tests-bodyheight`
41
+ * `us-core-client-tests-body-height`
42
42
 
43
43
  ## Searching
44
44
  These tests will check that the client performed searches agains the
@@ -38,7 +38,7 @@ for the resource type is required, and omitted otherwise.
38
38
  ## Reading
39
39
  This test will check that the client performed a read of the following id:
40
40
 
41
- * `us-core-client-tests-bodytemp`
41
+ * `us-core-client-tests-body-temperature`
42
42
 
43
43
  ## Searching
44
44
  These tests will check that the client performed searches agains the
@@ -38,7 +38,7 @@ for the resource type is required, and omitted otherwise.
38
38
  ## Reading
39
39
  This test will check that the client performed a read of the following id:
40
40
 
41
- * `us-core-client-tests-bodyweight`
41
+ * `us-core-client-tests-body-weight`
42
42
 
43
43
  ## Searching
44
44
  These tests will check that the client performed searches agains the
@@ -38,7 +38,7 @@ for the resource type is required, and omitted otherwise.
38
38
  ## Reading
39
39
  This test will check that the client performed a read of the following id:
40
40
 
41
- * `us-core-client-tests-bp`
41
+ * `us-core-client-tests-blood-pressure`
42
42
 
43
43
  ## Searching
44
44
  These tests will check that the client performed searches agains the
@@ -37,7 +37,7 @@ for the resource type is required, and omitted otherwise.
37
37
  ## Reading
38
38
  This test will check that the client performed a read of the following id:
39
39
 
40
- * `us-core-client-tests-condition`
40
+ * `us-core-client-tests-condition-encounter-diagnosis`
41
41
 
42
42
  ## Searching
43
43
  These tests will check that the client performed searches agains the
@@ -38,7 +38,7 @@ for the resource type is required, and omitted otherwise.
38
38
  ## Reading
39
39
  This test will check that the client performed a read of the following id:
40
40
 
41
- * `us-core-client-tests-head-circumference`
41
+ * `us-core-client-tests-head-circumference-percentile`
42
42
 
43
43
  ## Searching
44
44
  These tests will check that the client performed searches agains the
@@ -38,7 +38,7 @@ for the resource type is required, and omitted otherwise.
38
38
  ## Reading
39
39
  This test will check that the client performed a read of the following id:
40
40
 
41
- * `us-core-client-tests-heartrate`
41
+ * `us-core-client-tests-heart-rate`
42
42
 
43
43
  ## Searching
44
44
  These tests will check that the client performed searches agains the
@@ -38,7 +38,7 @@ for the resource type is required, and omitted otherwise.
38
38
  ## Reading
39
39
  This test will check that the client performed a read of the following id:
40
40
 
41
- * `us-core-client-tests-resprate`
41
+ * `us-core-client-tests-respiratory-rate`
42
42
 
43
43
  ## Searching
44
44
  These tests will check that the client performed searches agains the
@@ -290,7 +290,7 @@ The current version of this test suite does not:
290
290
  route(:get, SMARTAppLaunch::SMART_DISCOVERY_PATH, lambda { |_env|
291
291
  SMARTAppLaunch::MockSMARTServer.smart_server_metadata(id)
292
292
  })
293
- route(:get, SMARTAppLaunch::OIDC_DISCOVERY_PATH, ->(_env) {SMARTAppLaunch::MockSMARTServer.openid_connect_metadata(id) })
293
+ route(:get, SMARTAppLaunch::OIDC_DISCOVERY_PATH, ->(_env) {SMARTAppLaunch::MockSMARTServer.openid_connect_metadata(id) })
294
294
  route(
295
295
  :get,
296
296
  SMARTAppLaunch::OIDC_JWKS_PATH,
@@ -37,7 +37,7 @@ for the resource type is required, and omitted otherwise.
37
37
  ## Reading
38
38
  This test will check that the client performed a read of the following id:
39
39
 
40
- * `us-core-client-tests-condition`
40
+ * `us-core-client-tests-condition-encounter-diagnosis`
41
41
 
42
42
  ## Searching
43
43
  These tests will check that the client performed searches agains the
@@ -38,7 +38,7 @@ for the resource type is required, and omitted otherwise.
38
38
  ## Reading
39
39
  This test will check that the client performed a read of the following id:
40
40
 
41
- * `us-core-client-tests-head-circumference`
41
+ * `us-core-client-tests-head-circumference-percentile`
42
42
 
43
43
  ## Searching
44
44
  These tests will check that the client performed searches agains the
@@ -294,7 +294,7 @@ The current version of this test suite does not:
294
294
  route(:get, SMARTAppLaunch::SMART_DISCOVERY_PATH, lambda { |_env|
295
295
  SMARTAppLaunch::MockSMARTServer.smart_server_metadata(id)
296
296
  })
297
- route(:get, SMARTAppLaunch::OIDC_DISCOVERY_PATH, ->(_env) {SMARTAppLaunch::MockSMARTServer.openid_connect_metadata(id) })
297
+ route(:get, SMARTAppLaunch::OIDC_DISCOVERY_PATH, ->(_env) {SMARTAppLaunch::MockSMARTServer.openid_connect_metadata(id) })
298
298
  route(
299
299
  :get,
300
300
  SMARTAppLaunch::OIDC_JWKS_PATH,
@@ -33,7 +33,7 @@ for the resource type is required, and omitted otherwise.
33
33
  ## Reading
34
34
  This test will check that the client performed a read of the following id:
35
35
 
36
- * `us-core-client-tests-head-circumference`
36
+ * `us-core-client-tests-head-circumference-percentile`
37
37
 
38
38
  ## Searching
39
39
  These tests will check that the client performed searches agains the
@@ -314,7 +314,7 @@ The current version of this test suite does not:
314
314
  route(:get, SMARTAppLaunch::SMART_DISCOVERY_PATH, lambda { |_env|
315
315
  SMARTAppLaunch::MockSMARTServer.smart_server_metadata(id)
316
316
  })
317
- route(:get, SMARTAppLaunch::OIDC_DISCOVERY_PATH, ->(_env) {SMARTAppLaunch::MockSMARTServer.openid_connect_metadata(id) })
317
+ route(:get, SMARTAppLaunch::OIDC_DISCOVERY_PATH, ->(_env) {SMARTAppLaunch::MockSMARTServer.openid_connect_metadata(id) })
318
318
  route(
319
319
  :get,
320
320
  SMARTAppLaunch::OIDC_JWKS_PATH,
@@ -33,7 +33,7 @@ for the resource type is required, and omitted otherwise.
33
33
  ## Reading
34
34
  This test will check that the client performed a read of the following id:
35
35
 
36
- * `us-core-client-tests-head-circumference`
36
+ * `us-core-client-tests-head-circumference-percentile`
37
37
 
38
38
  ## Searching
39
39
  These tests will check that the client performed searches agains the
@@ -17,14 +17,14 @@ module USCoreTestKit
17
17
  end
18
18
 
19
19
  def failure_message
20
- "Inferno did not receive the expected read request for the target instance of the US Core Observation Clinical Result Profile: `Observation/us-core-client-tests-observation-clinical-result`."
20
+ "Inferno did not receive the expected read request for the target instance of the US Core Observation Clinical Result Profile: `Observation/us-core-client-tests-observation-clinical-result`, `Observation/us-core-client-tests-observation-lab`."
21
21
  end
22
22
 
23
23
  run do
24
24
  requests = load_tagged_requests(READ_OBSERVATION_TAG)
25
25
  skip_if requests.blank?, skip_message
26
26
 
27
- requests_for_id = filter_requests_by_resource_id(requests, 'us-core-client-tests-observation-clinical-result')
27
+ requests_for_id = filter_requests_by_resource_id(requests, ["us-core-client-tests-observation-clinical-result", "us-core-client-tests-observation-lab"])
28
28
  assert requests_for_id.any?, failure_message
29
29
  end
30
30
  end
@@ -31,9 +31,10 @@ Observation resource type. In this case, the test will be marked as skip if supp
31
31
  for the resource type is required, and omitted otherwise.
32
32
 
33
33
  ## Reading
34
- This test will check that the client performed a read of the following id:
34
+ This test will check that the client performed a read of one of the following ids:
35
35
 
36
36
  * `us-core-client-tests-observation-clinical-result`
37
+ * `us-core-client-tests-observation-lab`
37
38
 
38
39
  ## Searching
39
40
  These tests will check that the client performed searches agains the
@@ -332,7 +332,7 @@ The current version of this test suite does not:
332
332
  route(:get, SMARTAppLaunch::SMART_DISCOVERY_PATH, lambda { |_env|
333
333
  SMARTAppLaunch::MockSMARTServer.smart_server_metadata(id)
334
334
  })
335
- route(:get, SMARTAppLaunch::OIDC_DISCOVERY_PATH, ->(_env) {SMARTAppLaunch::MockSMARTServer.openid_connect_metadata(id) })
335
+ route(:get, SMARTAppLaunch::OIDC_DISCOVERY_PATH, ->(_env) {SMARTAppLaunch::MockSMARTServer.openid_connect_metadata(id) })
336
336
  route(
337
337
  :get,
338
338
  SMARTAppLaunch::OIDC_JWKS_PATH,
@@ -34,7 +34,7 @@ for the resource type is required, and omitted otherwise.
34
34
  ## Reading
35
35
  This test will check that the client performed a read of the following id:
36
36
 
37
- * `us-core-client-tests-head-circumference`
37
+ * `us-core-client-tests-head-circumference-percentile`
38
38
 
39
39
  ## Searching
40
40
  These tests will check that the client performed searches agains the
@@ -17,14 +17,14 @@ module USCoreTestKit
17
17
  end
18
18
 
19
19
  def failure_message
20
- "Inferno did not receive the expected read request for the target instance of the US Core Observation Clinical Result Profile: `Observation/us-core-client-tests-observation-clinical-result`."
20
+ "Inferno did not receive the expected read request for the target instance of the US Core Observation Clinical Result Profile: `Observation/us-core-client-tests-observation-clinical-result`, `Observation/us-core-client-tests-observation-lab`."
21
21
  end
22
22
 
23
23
  run do
24
24
  requests = load_tagged_requests(READ_OBSERVATION_TAG)
25
25
  skip_if requests.blank?, skip_message
26
26
 
27
- requests_for_id = filter_requests_by_resource_id(requests, 'us-core-client-tests-observation-clinical-result')
27
+ requests_for_id = filter_requests_by_resource_id(requests, ["us-core-client-tests-observation-clinical-result", "us-core-client-tests-observation-lab"])
28
28
  assert requests_for_id.any?, failure_message
29
29
  end
30
30
  end
@@ -32,9 +32,10 @@ Observation resource type. In this case, the test will be marked as skip if supp
32
32
  for the resource type is required, and omitted otherwise.
33
33
 
34
34
  ## Reading
35
- This test will check that the client performed a read of the following id:
35
+ This test will check that the client performed a read of one of the following ids:
36
36
 
37
37
  * `us-core-client-tests-observation-clinical-result`
38
+ * `us-core-client-tests-observation-lab`
38
39
 
39
40
  ## Searching
40
41
  These tests will check that the client performed searches agains the
@@ -319,6 +319,7 @@ The current version of this test suite does not:
319
319
  }
320
320
  )
321
321
 
322
+
322
323
  suite_option :client_type,
323
324
  title: 'Client Security Type',
324
325
  list_options: [
@@ -340,7 +341,7 @@ The current version of this test suite does not:
340
341
  route(:get, SMARTAppLaunch::SMART_DISCOVERY_PATH, lambda { |_env|
341
342
  SMARTAppLaunch::MockSMARTServer.smart_server_metadata(id)
342
343
  })
343
- route(:get, SMARTAppLaunch::OIDC_DISCOVERY_PATH, ->(_env) {SMARTAppLaunch::MockSMARTServer.openid_connect_metadata(id) })
344
+ route(:get, SMARTAppLaunch::OIDC_DISCOVERY_PATH, ->(_env) {SMARTAppLaunch::MockSMARTServer.openid_connect_metadata(id) })
344
345
  route(
345
346
  :get,
346
347
  SMARTAppLaunch::OIDC_JWKS_PATH,
@@ -34,7 +34,7 @@ for the resource type is required, and omitted otherwise.
34
34
  ## Reading
35
35
  This test will check that the client performed a read of the following id:
36
36
 
37
- * `us-core-client-tests-head-circumference`
37
+ * `us-core-client-tests-head-circumference-percentile`
38
38
 
39
39
  ## Searching
40
40
  These tests will check that the client performed searches agains the
@@ -17,14 +17,14 @@ module USCoreTestKit
17
17
  end
18
18
 
19
19
  def failure_message
20
- "Inferno did not receive the expected read request for the target instance of the US Core Observation Clinical Result Profile: `Observation/us-core-client-tests-observation-clinical-result`."
20
+ "Inferno did not receive the expected read request for the target instance of the US Core Observation Clinical Result Profile: `Observation/us-core-client-tests-observation-clinical-result`, `Observation/us-core-client-tests-observation-lab`."
21
21
  end
22
22
 
23
23
  run do
24
24
  requests = load_tagged_requests(READ_OBSERVATION_TAG)
25
25
  skip_if requests.blank?, skip_message
26
26
 
27
- requests_for_id = filter_requests_by_resource_id(requests, 'us-core-client-tests-observation-clinical-result')
27
+ requests_for_id = filter_requests_by_resource_id(requests, ["us-core-client-tests-observation-clinical-result", "us-core-client-tests-observation-lab"])
28
28
  assert requests_for_id.any?, failure_message
29
29
  end
30
30
  end
@@ -32,9 +32,10 @@ Observation resource type. In this case, the test will be marked as skip if supp
32
32
  for the resource type is required, and omitted otherwise.
33
33
 
34
34
  ## Reading
35
- This test will check that the client performed a read of the following id:
35
+ This test will check that the client performed a read of one of the following ids:
36
36
 
37
37
  * `us-core-client-tests-observation-clinical-result`
38
+ * `us-core-client-tests-observation-lab`
38
39
 
39
40
  ## Searching
40
41
  These tests will check that the client performed searches agains the
@@ -315,6 +315,15 @@ The current version of this test suite does not:
315
315
  }
316
316
  ]
317
317
 
318
+ requirement_sets(
319
+ {
320
+ identifier: 'hl7.fhir.us.core_8.0.0',
321
+ title: 'US Core Implementation Guide',
322
+ actor: 'Client'
323
+ }
324
+ )
325
+
326
+
318
327
  suite_option :client_type,
319
328
  title: 'Client Security Type',
320
329
  list_options: [
@@ -336,7 +345,7 @@ The current version of this test suite does not:
336
345
  route(:get, SMARTAppLaunch::SMART_DISCOVERY_PATH, lambda { |_env|
337
346
  SMARTAppLaunch::MockSMARTServer.smart_server_metadata(id)
338
347
  })
339
- route(:get, SMARTAppLaunch::OIDC_DISCOVERY_PATH, ->(_env) {SMARTAppLaunch::MockSMARTServer.openid_connect_metadata(id) })
348
+ route(:get, SMARTAppLaunch::OIDC_DISCOVERY_PATH, ->(_env) {SMARTAppLaunch::MockSMARTServer.openid_connect_metadata(id) })
340
349
  route(
341
350
  :get,
342
351
  SMARTAppLaunch::OIDC_JWKS_PATH,
@@ -37,7 +37,7 @@ module USCoreTestKit
37
37
  conforming to the #{profile_name}.
38
38
 
39
39
  # Testing Methodology
40
-
40
+
41
41
  ## Data Access Supported
42
42
 
43
43
  Clients may not be required to support the #{resource_type} FHIR resource type. However, if they
@@ -47,20 +47,20 @@ module USCoreTestKit
47
47
  for the resource type is required, and omitted otherwise.
48
48
 
49
49
  ## Reading
50
- This test will check that the client performed a read of the following id:
50
+ This test will check that the client performed a read of #{expected_resource_id.length > 1 ? 'one of the following ids' : 'the following id'}:
51
51
 
52
- * `us-core-client-tests-#{profile_identifier.underscore.dasherize}`
52
+ #{expected_resource_id_string}
53
53
 
54
54
  ## Searching
55
55
  These tests will check that the client performed searches agains the
56
56
  #{resource_type} resource type with the following required parameters:
57
57
 
58
58
  #{search_param_name_string}
59
-
59
+
60
60
  Inferno will also look for searches using the following optional parameters:
61
61
 
62
62
  #{optional_search_param_name_string}
63
-
63
+
64
64
  DESCRIPTION
65
65
  end
66
66
 
@@ -84,6 +84,20 @@ module USCoreTestKit
84
84
  group_metadata.id = group_id
85
85
  group_metadata.file_name = base_output_file_name
86
86
  end
87
+
88
+ def expected_resource_id
89
+ resource_id = [ Naming.instance_id_for_profile_identifier(profile_identifier) ]
90
+
91
+ if profile_identifier == 'observation_clinical_result'
92
+ resource_id << Naming.instance_id_for_profile_identifier('observation_lab')
93
+ end
94
+
95
+ resource_id
96
+ end
97
+
98
+ def expected_resource_id_string
99
+ expected_resource_id.map { |id| "* `#{id}`"}.join("\n")
100
+ end
87
101
  end
88
102
  end
89
103
  end
@@ -38,7 +38,15 @@ module USCoreTestKit
38
38
  end
39
39
 
40
40
  def expected_resource_id
41
- Naming.instance_id_for_profile_identifier(profile_identifier)
41
+ if profile_identifier == 'observation_clinical_result'
42
+ return [ Naming.instance_id_for_profile_identifier(profile_identifier), Naming.instance_id_for_profile_identifier('observation_lab') ]
43
+ else
44
+ Naming.instance_id_for_profile_identifier(profile_identifier)
45
+ end
46
+ end
47
+
48
+ def expected_resource_id_string
49
+ Array(expected_resource_id).map { |id| "`#{resource_type}/#{id}`"}.join(', ')
42
50
  end
43
51
 
44
52
  def title
@@ -31,14 +31,18 @@ module USCoreTestKit
31
31
  end
32
32
 
33
33
  def failure_message
34
- "Inferno did not receive the expected read request for the target instance of the <%= group_metadata.profile_name %>: `<%= resource_type %>/<%= expected_resource_id %>`."
34
+ "Inferno did not receive the expected read request for the target instance of the <%= group_metadata.profile_name %>: <%= expected_resource_id_string %>."
35
35
  end
36
36
 
37
37
  run do
38
38
  requests = load_tagged_requests(READ_<%= resource.underscore.upcase %>_TAG)
39
39
  skip_if requests.blank?, skip_message
40
40
 
41
+ <%- if profile_identifier == 'observation_clinical_result' -%>
42
+ requests_for_id = filter_requests_by_resource_id(requests, <%= expected_resource_id %>)
43
+ <%- else -%>
41
44
  requests_for_id = filter_requests_by_resource_id(requests, '<%= expected_resource_id %>')
45
+ <%- end -%>
42
46
  assert requests_for_id.any?, failure_message
43
47
  end
44
48
  end
@@ -69,6 +69,17 @@ module USCoreTestKit
69
69
  actor: 'Client'
70
70
  }
71
71
  )
72
+
73
+ <%- elsif module_name == 'USCoreClientV800'-%>
74
+
75
+ requirement_sets(
76
+ {
77
+ identifier: 'hl7.fhir.us.core_8.0.0',
78
+ title: 'US Core Implementation Guide',
79
+ actor: 'Client'
80
+ }
81
+ )
82
+
72
83
  <%- end -%>
73
84
 
74
85
  suite_option :client_type,
@@ -92,7 +103,7 @@ module USCoreTestKit
92
103
  route(:get, SMARTAppLaunch::SMART_DISCOVERY_PATH, lambda { |_env|
93
104
  SMARTAppLaunch::MockSMARTServer.smart_server_metadata(id)
94
105
  })
95
- route(:get, SMARTAppLaunch::OIDC_DISCOVERY_PATH, ->(_env) {SMARTAppLaunch::MockSMARTServer.openid_connect_metadata(id) })
106
+ route(:get, SMARTAppLaunch::OIDC_DISCOVERY_PATH, ->(_env) {SMARTAppLaunch::MockSMARTServer.openid_connect_metadata(id) })
96
107
  route(
97
108
  :get,
98
109
  SMARTAppLaunch::OIDC_JWKS_PATH,
@@ -10,14 +10,16 @@ module USCoreTestKit
10
10
  end
11
11
 
12
12
  def filter_requests_by_resource_id(requests, resource_id)
13
- requests.select do |request|
14
- request.url.split('/').last.split('?').first&.casecmp?(resource_id)
13
+ Array(resource_id).flat_map do |id|
14
+ requests.select do |request|
15
+ request.url.split('/').last.split('?').first&.casecmp?(id)
16
+ end
15
17
  end
16
18
  end
17
19
 
18
20
  def filter_requests_by_search_parameters(requests, search_parameters)
19
21
  requests.select do |request|
20
- included_params =
22
+ included_params =
21
23
  if request.verb.downcase == 'get'
22
24
  url_params(request.url).keys
23
25
  elsif request.verb.downcase == 'post'
@@ -12,7 +12,20 @@ module USCoreTestKit
12
12
  description %(
13
13
  This test repeats all Condition searches by
14
14
  patient + abatement-date and verifies that the results have been
15
- filtered based on the granted granular scopes.
15
+ filtered based on the granted granular scopes. The response to each
16
+ repeated request will be compared to the corresponding original response
17
+ independently using the following logic:
18
+ - If the repeated search filters on a category value that
19
+ is explicitly included within the granted scopes, e.g., a search for
20
+ `Observation?category=survey` when the granted scopes includes
21
+ `patient/Observation.rs?category=survey`, then the server is required to
22
+ return the original response filtered to include only entries that match
23
+ one of the granted scopes.
24
+ - Otherwise, e.g., a search for `Observation?category=cognitive-status`
25
+ when the granted scopes include only `patient/Observation.rs?category=survey`,
26
+ servers may indicate that the request is unauthorized either through an empty
27
+ Bundle or an explicit HTTP error, or they may return the original response
28
+ filtered to include only entries that match one of the granted scopes.
16
29
 
17
30
  )
18
31
 
@@ -12,7 +12,20 @@ module USCoreTestKit
12
12
  description %(
13
13
  This test repeats all Condition searches by
14
14
  patient + asserted-date and verifies that the results have been
15
- filtered based on the granted granular scopes.
15
+ filtered based on the granted granular scopes. The response to each
16
+ repeated request will be compared to the corresponding original response
17
+ independently using the following logic:
18
+ - If the repeated search filters on a category value that
19
+ is explicitly included within the granted scopes, e.g., a search for
20
+ `Observation?category=survey` when the granted scopes includes
21
+ `patient/Observation.rs?category=survey`, then the server is required to
22
+ return the original response filtered to include only entries that match
23
+ one of the granted scopes.
24
+ - Otherwise, e.g., a search for `Observation?category=cognitive-status`
25
+ when the granted scopes include only `patient/Observation.rs?category=survey`,
26
+ servers may indicate that the request is unauthorized either through an empty
27
+ Bundle or an explicit HTTP error, or they may return the original response
28
+ filtered to include only entries that match one of the granted scopes.
16
29
 
17
30
  )
18
31
 
@@ -12,7 +12,20 @@ module USCoreTestKit
12
12
  description %(
13
13
  This test repeats all Condition searches by
14
14
  patient + category + clinical-status and verifies that the results have been
15
- filtered based on the granted granular scopes.
15
+ filtered based on the granted granular scopes. The response to each
16
+ repeated request will be compared to the corresponding original response
17
+ independently using the following logic:
18
+ - If the repeated search filters on a category value that
19
+ is explicitly included within the granted scopes, e.g., a search for
20
+ `Observation?category=survey` when the granted scopes includes
21
+ `patient/Observation.rs?category=survey`, then the server is required to
22
+ return the original response filtered to include only entries that match
23
+ one of the granted scopes.
24
+ - Otherwise, e.g., a search for `Observation?category=cognitive-status`
25
+ when the granted scopes include only `patient/Observation.rs?category=survey`,
26
+ servers may indicate that the request is unauthorized either through an empty
27
+ Bundle or an explicit HTTP error, or they may return the original response
28
+ filtered to include only entries that match one of the granted scopes.
16
29
 
17
30
  )
18
31