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.
- checksums.yaml +4 -4
- data/config/presets/client_demo_against_server_800_preset.json.erb +46 -0
- data/config/presets/server_demo_against_client_800_preset.json.erb +30 -0
- data/lib/us_core_test_kit/client/generated/v3.1.1/bodyheight_client_group.rb +1 -1
- data/lib/us_core_test_kit/client/generated/v3.1.1/bodytemp_client_group.rb +1 -1
- data/lib/us_core_test_kit/client/generated/v3.1.1/bodyweight_client_group.rb +1 -1
- data/lib/us_core_test_kit/client/generated/v3.1.1/bp_client_group.rb +1 -1
- data/lib/us_core_test_kit/client/generated/v3.1.1/condition_client_group.rb +1 -1
- data/lib/us_core_test_kit/client/generated/v3.1.1/head_circumference_client_group.rb +1 -1
- data/lib/us_core_test_kit/client/generated/v3.1.1/heartrate_client_group.rb +1 -1
- data/lib/us_core_test_kit/client/generated/v3.1.1/resprate_client_group.rb +1 -1
- data/lib/us_core_test_kit/client/generated/v3.1.1/us_core_client_test_suite.rb +1 -1
- data/lib/us_core_test_kit/client/generated/v4.0.0/condition_client_group.rb +1 -1
- data/lib/us_core_test_kit/client/generated/v4.0.0/head_circumference_client_group.rb +1 -1
- data/lib/us_core_test_kit/client/generated/v4.0.0/us_core_client_test_suite.rb +1 -1
- data/lib/us_core_test_kit/client/generated/v5.0.1/head_circumference_client_group.rb +1 -1
- data/lib/us_core_test_kit/client/generated/v5.0.1/us_core_client_test_suite.rb +1 -1
- data/lib/us_core_test_kit/client/generated/v6.1.0/head_circumference_client_group.rb +1 -1
- data/lib/us_core_test_kit/client/generated/v6.1.0/observation_clinical_result/observation_clinical_result_client_read_test.rb +2 -2
- data/lib/us_core_test_kit/client/generated/v6.1.0/observation_clinical_result_client_group.rb +2 -1
- data/lib/us_core_test_kit/client/generated/v6.1.0/us_core_client_test_suite.rb +1 -1
- data/lib/us_core_test_kit/client/generated/v7.0.0/head_circumference_client_group.rb +1 -1
- data/lib/us_core_test_kit/client/generated/v7.0.0/observation_clinical_result/observation_clinical_result_client_read_test.rb +2 -2
- data/lib/us_core_test_kit/client/generated/v7.0.0/observation_clinical_result_client_group.rb +2 -1
- data/lib/us_core_test_kit/client/generated/v7.0.0/us_core_client_test_suite.rb +2 -1
- data/lib/us_core_test_kit/client/generated/v8.0.0/head_circumference_client_group.rb +1 -1
- data/lib/us_core_test_kit/client/generated/v8.0.0/observation_clinical_result/observation_clinical_result_client_read_test.rb +2 -2
- data/lib/us_core_test_kit/client/generated/v8.0.0/observation_clinical_result_client_group.rb +2 -1
- data/lib/us_core_test_kit/client/generated/v8.0.0/us_core_client_test_suite.rb +10 -1
- data/lib/us_core_test_kit/client/generator/group_generator.rb +19 -5
- data/lib/us_core_test_kit/client/generator/read_test_generator.rb +9 -1
- data/lib/us_core_test_kit/client/generator/templates/read_test.rb.erb +5 -1
- data/lib/us_core_test_kit/client/generator/templates/suite.rb.erb +12 -1
- data/lib/us_core_test_kit/client/test_helper.rb +5 -3
- 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
- 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
- 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
- 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
- data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/condition/condition_patient_category_granular_scope_search_test.rb +14 -1
- 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
- data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/condition/condition_patient_code_granular_scope_search_test.rb +14 -1
- data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/condition/condition_patient_granular_scope_search_test.rb +14 -1
- 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
- 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
- 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
- data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/observation/observation_patient_category_granular_scope_search_test.rb +14 -1
- 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
- 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
- data/lib/us_core_test_kit/generated/v6.1.0/granular_scope_tests/observation/observation_patient_code_granular_scope_search_test.rb +14 -1
- 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
- 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
- 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
- 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
- data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/condition/condition_patient_category_granular_scope_search_test.rb +14 -1
- 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
- data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/condition/condition_patient_code_granular_scope_search_test.rb +14 -1
- data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/condition/condition_patient_granular_scope_search_test.rb +14 -1
- data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/condition/condition_patient_lastupdated_granular_scope_search_test.rb +14 -1
- 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
- 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
- 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
- data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/observation/observation_patient_category_granular_scope_search_test.rb +14 -1
- 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
- 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
- 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
- data/lib/us_core_test_kit/generated/v7.0.0/granular_scope_tests/observation/observation_patient_code_granular_scope_search_test.rb +14 -1
- 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
- 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
- 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
- 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
- data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/condition/condition_patient_category_granular_scope_search_test.rb +14 -1
- 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
- data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/condition/condition_patient_code_granular_scope_search_test.rb +14 -1
- data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/condition/condition_patient_granular_scope_search_test.rb +14 -1
- data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/condition/condition_patient_lastupdated_granular_scope_search_test.rb +14 -1
- 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
- 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
- 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
- data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/observation/observation_patient_category_granular_scope_search_test.rb +14 -1
- 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
- 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
- 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
- data/lib/us_core_test_kit/generated/v8.0.0/granular_scope_tests/observation/observation_patient_code_granular_scope_search_test.rb +14 -1
- data/lib/us_core_test_kit/generator/granular_scope_test_generator.rb +14 -1
- data/lib/us_core_test_kit/granular_scope_search_test.rb +36 -11
- data/lib/us_core_test_kit/metadata.rb +1 -1
- data/lib/us_core_test_kit/requirements/generated/us_core_client_v800_requirements_coverage.csv +140 -0
- data/lib/us_core_test_kit/version.rb +2 -2
- data/lib/us_core_test_kit.rb +1 -0
- metadata +5 -2
|
@@ -12,7 +12,20 @@ module USCoreTestKit
|
|
|
12
12
|
description %(
|
|
13
13
|
This test repeats all Observation searches by
|
|
14
14
|
patient + code + 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 Observation searches by
|
|
14
14
|
patient + code 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 + 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
|
|
|
@@ -12,7 +12,20 @@ module USCoreTestKit
|
|
|
12
12
|
description %(
|
|
13
13
|
This test repeats all Condition searches by
|
|
14
14
|
patient + category + encounter 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 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 + 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
|
|
|
@@ -12,7 +12,20 @@ module USCoreTestKit
|
|
|
12
12
|
description %(
|
|
13
13
|
This test repeats all Condition searches by
|
|
14
14
|
patient + code 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 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 + _lastUpdated 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 + onset-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 + recorded-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 Observation searches by
|
|
14
14
|
patient + category + 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 Observation searches by
|
|
14
14
|
patient + category 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 Observation searches by
|
|
14
14
|
patient + category + _lastUpdated 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 Observation searches by
|
|
14
14
|
patient + category + 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
|
|
|
@@ -12,7 +12,20 @@ module USCoreTestKit
|
|
|
12
12
|
description %(
|
|
13
13
|
This test repeats all Observation searches by
|
|
14
14
|
patient + code + 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 Observation searches by
|
|
14
14
|
patient + code 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
|
|
|
@@ -155,7 +155,20 @@ module USCoreTestKit
|
|
|
155
155
|
<<~DESCRIPTION.gsub(/\n{3,}/, "\n\n")
|
|
156
156
|
This test repeats all #{resource_type} searches by
|
|
157
157
|
#{search_param_name_string} and verifies that the results have been
|
|
158
|
-
filtered based on the granted granular scopes.
|
|
158
|
+
filtered based on the granted granular scopes. The response to each
|
|
159
|
+
repeated request will be compared to the corresponding original response
|
|
160
|
+
independently using the following logic:
|
|
161
|
+
- If the repeated search filters on a category value that
|
|
162
|
+
is explicitly included within the granted scopes, e.g., a search for
|
|
163
|
+
`Observation?category=survey` when the granted scopes includes
|
|
164
|
+
`patient/Observation.rs?category=survey`, then the server is required to
|
|
165
|
+
return the original response filtered to include only entries that match
|
|
166
|
+
one of the granted scopes.
|
|
167
|
+
- Otherwise, e.g., a search for `Observation?category=cognitive-status`
|
|
168
|
+
when the granted scopes include only `patient/Observation.rs?category=survey`,
|
|
169
|
+
servers may indicate that the request is unauthorized either through an empty
|
|
170
|
+
Bundle or an explicit HTTP error, or they may return the original response
|
|
171
|
+
filtered to include only entries that match one of the granted scopes.
|
|
159
172
|
DESCRIPTION
|
|
160
173
|
end
|
|
161
174
|
end
|
|
@@ -33,24 +33,26 @@ module USCoreTestKit
|
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
mismatched_ids = mismatched_resource_ids(found_resources)
|
|
36
|
-
|
|
37
36
|
assert mismatched_ids.empty?,
|
|
38
37
|
'Resources with the following ids were received even though they do not match the ' \
|
|
39
38
|
"granted granular scopes: #{mismatched_ids.join(', ')}"
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
missing_ids = previous_ids - found_ids
|
|
40
|
+
# if the query is in scope or resource were returned, we must check missing and unexpected
|
|
41
|
+
if query_in_scope?(resource_type, params) || found_resources.present?
|
|
44
42
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"but not when using granular scopes: #{missing_ids.join(', ')}"
|
|
43
|
+
found_ids = found_resources.map(&:id)
|
|
44
|
+
previous_ids = expected_resource_ids(all_previous_resources)
|
|
48
45
|
|
|
49
|
-
|
|
46
|
+
missing_ids = previous_ids - found_ids
|
|
47
|
+
assert missing_ids.empty?,
|
|
48
|
+
'Resources with the following ids were received when using resource-level scopes, ' \
|
|
49
|
+
"but not when using granular scopes: #{missing_ids.join(', ')}"
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
unexpected_ids = found_ids - previous_ids
|
|
52
|
+
assert unexpected_ids.empty?,
|
|
53
|
+
'Resources with the following ids were received when using granular scopes, ' \
|
|
54
|
+
"but not when using resource-level scopes: #{unexpected_ids.join(', ')}"
|
|
55
|
+
end
|
|
54
56
|
end
|
|
55
57
|
end
|
|
56
58
|
|
|
@@ -63,6 +65,29 @@ module USCoreTestKit
|
|
|
63
65
|
.sort_by { |request| request.index }
|
|
64
66
|
end
|
|
65
67
|
|
|
68
|
+
def query_in_scope?(resource_type, params)
|
|
69
|
+
received_scopes.split(' ').each do |scope|
|
|
70
|
+
parsed_scope = URI.parse(scope)
|
|
71
|
+
|
|
72
|
+
# check for resource type, search scope, and matched params
|
|
73
|
+
next unless parsed_scope.path =~ /\/#{resource_type}\./ &&
|
|
74
|
+
parsed_scope.path.split('.')[1].include?('s') &&
|
|
75
|
+
granular_params_present?(parsed_scope.query, params)
|
|
76
|
+
|
|
77
|
+
return true
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
false
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def granular_params_present?(granular_params, search_params)
|
|
84
|
+
CGI.parse(granular_params).each do |param_name, value|
|
|
85
|
+
return false unless search_params.key?(param_name) && value.include?(search_params[param_name])
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
true
|
|
89
|
+
end
|
|
90
|
+
|
|
66
91
|
def previous_resources(params)
|
|
67
92
|
previous_requests(params)
|
|
68
93
|
.flat_map do |request|
|
|
@@ -70,7 +70,7 @@ module USCoreTestKit
|
|
|
70
70
|
of the repository.
|
|
71
71
|
DESCRIPTION
|
|
72
72
|
suite_ids [:us_core_v311, :us_core_v400, :us_core_v501, :us_core_v610, :us_core_v700, :us_core_v800, :us_core_client_v311,
|
|
73
|
-
:us_core_client_v400, :us_core_client_v501, :us_core_client_v610, :us_core_client_v700]
|
|
73
|
+
:us_core_client_v400, :us_core_client_v501, :us_core_client_v610, :us_core_client_v700, :us_core_client_v800]
|
|
74
74
|
tags ['SMART App Launch', 'US Core']
|
|
75
75
|
last_updated LAST_UPDATED
|
|
76
76
|
version VERSION
|