davinci_pdex_test_kit 0.11.0 → 0.12.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/pdex_payer_server_fhir_foundry_ri_preset.json +2 -2
- data/config/presets/pdex_payer_server_inferno_ri_preset.json +2 -2
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_member_match_tests/client_member_match_validation_test.rb +7 -5
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_workflow_interaction_test.rb +8 -7
- data/lib/davinci_pdex_test_kit/pdex_payer_client_suite.rb +8 -10
- data/lib/davinci_pdex_test_kit/pdex_payer_server/device/device_must_support_test.rb +50 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/device/device_patient_search_test.rb +68 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/device/device_patient_type_search_test.rb +54 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/{explanation_of_benefit/explanation_of_benefit_provenance_revinclude_search_test.rb → device/device_provenance_revinclude_search_test.rb} +7 -7
- data/lib/davinci_pdex_test_kit/pdex_payer_server/device/device_read_test.rb +26 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/device/device_reference_resolution_test.rb +42 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/device/device_validation_test.rb +39 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/device/metadata.yml +154 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/device_group.rb +88 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_id_search_test.rb +7 -24
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_identifier_search_test.rb +10 -24
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_must_support_test.rb +37 -5
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_patient_lastupdated_search_test.rb +48 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_patient_search_test.rb +62 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_patient_service_date_search_test.rb +7 -23
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_patient_type_search_test.rb +6 -23
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_reference_resolution_test.rb +7 -4
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_validation_test.rb +9 -10
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/metadata.yml +276 -264
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit_group.rb +62 -64
- data/lib/davinci_pdex_test_kit/pdex_payer_server/export_patient_group.rb +8 -9
- data/lib/davinci_pdex_test_kit/pdex_payer_server/export_validation_group.rb +1 -2
- data/lib/davinci_pdex_test_kit/pdex_payer_server/medication_dispense/medication_dispense_must_support_test.rb +42 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/medication_dispense/medication_dispense_patient_search_test.rb +64 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/medication_dispense/medication_dispense_patient_status_search_test.rb +54 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/medication_dispense/medication_dispense_patient_status_type_search_test.rb +55 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/medication_dispense/medication_dispense_provenance_revinclude_search_test.rb +54 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/medication_dispense/medication_dispense_read_test.rb +26 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/medication_dispense/medication_dispense_reference_resolution_test.rb +42 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/medication_dispense/medication_dispense_validation_test.rb +39 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/medication_dispense/metadata.yml +206 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/medication_dispense_group.rb +69 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/multiple_member_matches_group.rb +36 -36
- data/lib/davinci_pdex_test_kit/pdex_payer_server/no_member_matches_group.rb +30 -30
- data/lib/davinci_pdex_test_kit/pdex_payer_server/patient_operation_in_capability_statement_validation.rb +15 -13
- data/lib/davinci_pdex_test_kit/pdex_payer_server/provenance/metadata.yml +173 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/provenance/provenance_must_support_test.rb +51 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/provenance/provenance_read_test.rb +26 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/provenance/provenance_reference_resolution_test.rb +46 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/provenance/provenance_validation_test.rb +39 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/provenance_group.rb +59 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server/workflow_clinical_data_group.rb +22 -11
- data/lib/davinci_pdex_test_kit/pdex_payer_server/workflow_everything_group.rb +19 -6
- data/lib/davinci_pdex_test_kit/pdex_payer_server/workflow_export_group.rb +22 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_server/workflow_member_match_group.rb +44 -25
- data/lib/davinci_pdex_test_kit/pdex_payer_server_suite.rb +123 -110
- data/lib/davinci_pdex_test_kit/pdex_provider_client_suite.rb +8 -8
- data/lib/davinci_pdex_test_kit/requirements/davinci-pdex-test-kit_out_of_scope_requirements.csv +1 -0
- data/lib/davinci_pdex_test_kit/requirements/davinci-pdex-test-kit_requirements.csv +64 -0
- data/lib/davinci_pdex_test_kit/requirements/generated/davinci-pdex-test-kit_requirements_coverage.csv +64 -0
- data/lib/davinci_pdex_test_kit/version.rb +2 -2
- data/lib/davinci_pdex_test_kit.rb +1 -0
- data/lib/inferno_requirements_tools/ext/inferno_core/runnable.rb +22 -0
- data/lib/inferno_requirements_tools/rake/rakefile_template +19 -0
- data/lib/inferno_requirements_tools/tasks/requirements_coverage.rb +284 -0
- data/lib/requirements_config.yaml +17 -0
- metadata +56 -11
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_patient_last_updated_search_test.rb +0 -64
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_patient_use_search_test.rb +0 -69
@@ -0,0 +1,88 @@
|
|
1
|
+
require_relative 'device/device_patient_search_test'
|
2
|
+
require_relative 'device/device_patient_type_search_test'
|
3
|
+
require_relative 'device/device_read_test'
|
4
|
+
require_relative 'device/device_provenance_revinclude_search_test'
|
5
|
+
require_relative 'device/device_validation_test'
|
6
|
+
require_relative 'device/device_must_support_test'
|
7
|
+
require_relative 'device/device_reference_resolution_test'
|
8
|
+
|
9
|
+
module DaVinciPDexTestKit
|
10
|
+
module PDexPayerServer
|
11
|
+
class DeviceGroup < Inferno::TestGroup
|
12
|
+
title 'PDex Device Tests'
|
13
|
+
short_description 'Verify support for the server capabilities required by the PDex Device.'
|
14
|
+
description %(
|
15
|
+
# Background
|
16
|
+
|
17
|
+
The PDex Device sequence verifies that the system under test is
|
18
|
+
able to provide correct responses for Device queries. These queries
|
19
|
+
must contain resources conforming to the PDex Device as
|
20
|
+
specified in the PDex v2.0.0 Implementation Guide.
|
21
|
+
|
22
|
+
# Testing Methodology
|
23
|
+
## Searching
|
24
|
+
This test sequence will first perform each required search associated
|
25
|
+
with this resource. This sequence will perform searches with the
|
26
|
+
following parameters:
|
27
|
+
|
28
|
+
* patient
|
29
|
+
|
30
|
+
### Search Parameters
|
31
|
+
The first search uses the selected patient(s) from the prior launch
|
32
|
+
sequence. Any subsequent searches will look for its parameter values
|
33
|
+
from the results of the first search. For example, the `identifier`
|
34
|
+
search in the patient sequence is performed by looking for an existing
|
35
|
+
`Patient.identifier` from any of the resources returned in the `_id`
|
36
|
+
search. If a value cannot be found this way, the search is skipped.
|
37
|
+
|
38
|
+
### Search Validation
|
39
|
+
Inferno will retrieve up to the first 20 bundle pages of the reply for
|
40
|
+
Device resources and save them for subsequent tests. Each of
|
41
|
+
these resources is then checked to see if it matches the searched
|
42
|
+
parameters in accordance with [FHIR search
|
43
|
+
guidelines](https://www.hl7.org/fhir/search.html). The test will fail,
|
44
|
+
for example, if a Patient search for `gender=male` returns a `female`
|
45
|
+
patient.
|
46
|
+
|
47
|
+
|
48
|
+
## Must Support
|
49
|
+
Each profile contains elements marked as "must support". This test
|
50
|
+
sequence expects to see each of these elements at least once. If at
|
51
|
+
least one cannot be found, the test will fail. The test will look
|
52
|
+
through the Device resources found in the first test for these
|
53
|
+
elements.
|
54
|
+
|
55
|
+
## Profile Validation
|
56
|
+
Each resource returned from the first search is expected to conform to
|
57
|
+
the [PDex Device](http://hl7.org/fhir/us/davinci-pdex/StructureDefinition/pdex-device). Each element is checked against
|
58
|
+
teminology binding and cardinality requirements.
|
59
|
+
|
60
|
+
Elements with a required binding are validated against their bound
|
61
|
+
ValueSet. If the code/system in the element is not part of the ValueSet,
|
62
|
+
then the test will fail.
|
63
|
+
|
64
|
+
## Reference Validation
|
65
|
+
At least one instance of each external reference in elements marked as
|
66
|
+
"must support" within the resources provided by the system must resolve.
|
67
|
+
The test will attempt to read each reference found and will fail if no
|
68
|
+
read succeeds.
|
69
|
+
)
|
70
|
+
|
71
|
+
id :pdex_device
|
72
|
+
run_as_group
|
73
|
+
|
74
|
+
def self.metadata
|
75
|
+
@metadata ||= USCoreTestKit::USCoreTestKit::Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'device', 'metadata.yml'),
|
76
|
+
aliases: true))
|
77
|
+
end
|
78
|
+
|
79
|
+
test from: :pdex_device_patient_search
|
80
|
+
test from: :pdex_device_patient_type_search
|
81
|
+
test from: :pdex_device_read
|
82
|
+
test from: :pdex_device_provenance_revinclude_search
|
83
|
+
test from: :pdex_device_validation
|
84
|
+
test from: :pdex_device_must_support
|
85
|
+
test from: :pdex_device_ref_resolution
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -7,38 +7,21 @@ module DaVinciPDexTestKit
|
|
7
7
|
class ExplanationOfBenefitIdSearchTest < Inferno::Test
|
8
8
|
include USCoreTestKit::SearchTest
|
9
9
|
|
10
|
-
title 'Server returns valid results for
|
10
|
+
title 'Server returns valid results for ExplanationOfBenefit search by _id'
|
11
11
|
description %(
|
12
|
-
A server SHALL support searching by
|
13
|
-
_id on the ExplanationOfBenefit resource. This test
|
14
|
-
will pass if resources are returned and match the search criteria. If
|
15
|
-
none are returned, the test is skipped.
|
16
|
-
|
17
|
-
Because this is the first search of the sequence, resources in the
|
18
|
-
response will be used for subsequent tests.
|
19
|
-
|
20
|
-
Additionally, this test will check that GET and POST search methods
|
21
|
-
return the same number of results. Search by POST is required by the
|
22
|
-
FHIR R4 specification, and these tests interpret search by GET as a
|
23
|
-
requirement of DaVinci PDex v2.0.0.
|
24
|
-
|
25
|
-
[PDex Server CapabilityStatement](https://hl7.org/fhir/us/davinci-pdex/STU2/CapabilityStatement-pdex-server.html)
|
12
|
+
A server SHALL support searching by
|
13
|
+
_id on the ExplanationOfBenefit resource. This test
|
14
|
+
will pass if resources are returned and match the search criteria. If
|
15
|
+
none are returned, the test is skipped.
|
26
16
|
|
17
|
+
[PDex Server CapabilityStatement](https://hl7.org/fhir/us/davinci-pdex/STU2/CapabilityStatement-pdex-server.html)
|
27
18
|
)
|
28
19
|
|
29
20
|
id :pdex_eob_id_search
|
30
|
-
|
31
|
-
input :patient_ids,
|
32
|
-
title: 'Patient IDs',
|
33
|
-
description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
|
34
|
-
|
35
|
-
# TODO: test if this test runs
|
36
|
-
|
37
21
|
def self.properties
|
38
22
|
@properties ||= USCoreTestKit::SearchTestProperties.new(
|
39
23
|
resource_type: 'ExplanationOfBenefit',
|
40
24
|
search_param_names: ['_id']
|
41
|
-
# TODO: any more search test properties?
|
42
25
|
)
|
43
26
|
end
|
44
27
|
|
@@ -48,7 +31,7 @@ requirement of DaVinci PDex v2.0.0.
|
|
48
31
|
end
|
49
32
|
|
50
33
|
def scratch_resources
|
51
|
-
scratch[:
|
34
|
+
scratch[:explanation_of_benefit_resources] ||= {}
|
52
35
|
end
|
53
36
|
|
54
37
|
run do
|
@@ -7,38 +7,24 @@ module DaVinciPDexTestKit
|
|
7
7
|
class ExplanationOfBenefitIdentifierSearchTest < Inferno::Test
|
8
8
|
include USCoreTestKit::SearchTest
|
9
9
|
|
10
|
-
title 'Server returns valid results for
|
10
|
+
title 'Server returns valid results for ExplanationOfBenefit search by identifier'
|
11
11
|
description %(
|
12
|
-
A server SHALL support searching by
|
13
|
-
identifier on the ExplanationOfBenefit resource. This test
|
14
|
-
will pass if resources are returned and match the search criteria. If
|
15
|
-
none are returned, the test is skipped.
|
16
|
-
|
17
|
-
Because this is the first search of the sequence, resources in the
|
18
|
-
response will be used for subsequent tests.
|
19
|
-
|
20
|
-
Additionally, this test will check that GET and POST search methods
|
21
|
-
return the same number of results. Search by POST is required by the
|
22
|
-
FHIR R4 specification, and these tests interpret search by GET as a
|
23
|
-
requirement of DaVinci PDex v2.0.0.
|
24
|
-
|
25
|
-
[PDex Server CapabilityStatement](https://hl7.org/fhir/us/davinci-pdex/STU2/CapabilityStatement-pdex-server.html)
|
12
|
+
A server SHALL support searching by
|
13
|
+
identifier on the ExplanationOfBenefit resource. This test
|
14
|
+
will pass if resources are returned and match the search criteria. If
|
15
|
+
none are returned, the test is skipped.
|
26
16
|
|
17
|
+
[PDex Server CapabilityStatement](https://hl7.org/fhir/us/davinci-pdex/STU2/CapabilityStatement-pdex-server.html)
|
27
18
|
)
|
28
19
|
|
29
20
|
id :pdex_eob_identifier_search
|
30
|
-
|
31
|
-
input :patient_ids,
|
32
|
-
title: 'Patient IDs',
|
33
|
-
description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
|
34
|
-
|
35
|
-
# TODO: test if this test runs
|
21
|
+
optional
|
36
22
|
|
37
23
|
def self.properties
|
38
24
|
@properties ||= USCoreTestKit::SearchTestProperties.new(
|
39
25
|
resource_type: 'ExplanationOfBenefit',
|
40
|
-
search_param_names: ['identifier']
|
41
|
-
|
26
|
+
search_param_names: ['identifier'],
|
27
|
+
token_search_params: ['identifier']
|
42
28
|
)
|
43
29
|
end
|
44
30
|
|
@@ -48,7 +34,7 @@ requirement of DaVinci PDex v2.0.0.
|
|
48
34
|
end
|
49
35
|
|
50
36
|
def scratch_resources
|
51
|
-
scratch[:
|
37
|
+
scratch[:explanation_of_benefit_resources] ||= {}
|
52
38
|
end
|
53
39
|
|
54
40
|
run do
|
@@ -8,14 +8,46 @@ module DaVinciPDexTestKit
|
|
8
8
|
|
9
9
|
title 'All must support elements are provided in the ExplanationOfBenefit resources returned'
|
10
10
|
description %(
|
11
|
-
|
12
|
-
part of the query results as specified by the
|
11
|
+
PDex Responders SHALL be capable of populating all data elements as
|
12
|
+
part of the query results as specified by the PDex Server Capability
|
13
13
|
Statement. This test will look through the ExplanationOfBenefit resources
|
14
14
|
found previously for the following must support elements:
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
*
|
16
|
+
* ExplanationOfBenefit.adjudication
|
17
|
+
* ExplanationOfBenefit.adjudication.category
|
18
|
+
* ExplanationOfBenefit.adjudication.extension:reviewAction
|
19
|
+
* ExplanationOfBenefit.adjudication:adjudicationamounttype
|
20
|
+
* ExplanationOfBenefit.adjudication:denialreason
|
21
|
+
* ExplanationOfBenefit.careTeam.provider
|
22
|
+
* ExplanationOfBenefit.enterer
|
23
|
+
* ExplanationOfBenefit.extension:levelOfServiceType
|
24
|
+
* ExplanationOfBenefit.facility
|
25
|
+
* ExplanationOfBenefit.insurer
|
26
|
+
* ExplanationOfBenefit.item.adjudication.extension:reviewAction
|
27
|
+
* ExplanationOfBenefit.item.adjudication:adjudicationamounttype
|
28
|
+
* ExplanationOfBenefit.item.adjudication:adjudicationamounttype.amount
|
29
|
+
* ExplanationOfBenefit.item.adjudication:allowedunits
|
30
|
+
* ExplanationOfBenefit.item.adjudication:allowedunits.value
|
31
|
+
* ExplanationOfBenefit.item.adjudication:consumedunits
|
32
|
+
* ExplanationOfBenefit.item.adjudication:consumedunits.value
|
33
|
+
* ExplanationOfBenefit.item.adjudication:denialreason
|
34
|
+
* ExplanationOfBenefit.item.adjudication:denialreason.reason
|
35
|
+
* ExplanationOfBenefit.item.category
|
36
|
+
* ExplanationOfBenefit.item.extension:administrationReferenceNumber
|
37
|
+
* ExplanationOfBenefit.item.extension:authorizedItemDetail
|
38
|
+
* ExplanationOfBenefit.item.extension:authorizedProvider
|
39
|
+
* ExplanationOfBenefit.item.extension:itemTraceNumber
|
40
|
+
* ExplanationOfBenefit.item.extension:preAuthIssueDate
|
41
|
+
* ExplanationOfBenefit.item.extension:preAuthPeriod
|
42
|
+
* ExplanationOfBenefit.item.extension:previousAuthorizationNumber
|
43
|
+
* ExplanationOfBenefit.patient
|
44
|
+
* ExplanationOfBenefit.preAuthRefPeriod
|
45
|
+
* ExplanationOfBenefit.provider
|
46
|
+
* ExplanationOfBenefit.status
|
47
|
+
* ExplanationOfBenefit.total.category
|
48
|
+
* ExplanationOfBenefit.total.extension:priorauth-utilization
|
49
|
+
* ExplanationOfBenefit.type
|
50
|
+
* ExplanationOfBenefit.use
|
19
51
|
)
|
20
52
|
|
21
53
|
id :pdex_eob_must_support
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'us_core_test_kit/search_test'
|
2
|
+
require 'us_core_test_kit/search_test_properties'
|
3
|
+
require 'us_core_test_kit/generator/group_metadata'
|
4
|
+
|
5
|
+
module DaVinciPDexTestKit
|
6
|
+
module PDexPayerServer
|
7
|
+
class ExplanationOfBenefitPatientLastupdatedSearchTest < Inferno::Test
|
8
|
+
include USCoreTestKit::SearchTest
|
9
|
+
|
10
|
+
title 'Server returns valid results for ExplanationOfBenefit search by patient + _lastUpdated'
|
11
|
+
description %(
|
12
|
+
A server SHALL support searching by
|
13
|
+
patient + _lastUpdated on the ExplanationOfBenefit resource. This test
|
14
|
+
will pass if resources are returned and match the search criteria. If
|
15
|
+
none are returned, the test is skipped.
|
16
|
+
|
17
|
+
[PDex Server CapabilityStatement](https://hl7.org/fhir/us/davinci-pdex/STU2/CapabilityStatement-pdex-server.html)
|
18
|
+
)
|
19
|
+
|
20
|
+
id :pdex_eob_patient_last_updated_search
|
21
|
+
optional
|
22
|
+
|
23
|
+
input :patient_ids,
|
24
|
+
title: 'Patient IDs',
|
25
|
+
description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
|
26
|
+
|
27
|
+
def self.properties
|
28
|
+
@properties ||= USCoreTestKit::SearchTestProperties.new(
|
29
|
+
resource_type: 'ExplanationOfBenefit',
|
30
|
+
search_param_names: ['patient', '_lastUpdated']
|
31
|
+
)
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.metadata
|
35
|
+
@metadata ||= USCoreTestKit::Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'),
|
36
|
+
aliases: true))
|
37
|
+
end
|
38
|
+
|
39
|
+
def scratch_resources
|
40
|
+
scratch[:explanation_of_benefit_resources] ||= {}
|
41
|
+
end
|
42
|
+
|
43
|
+
run do
|
44
|
+
run_search_test
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'us_core_test_kit/search_test'
|
2
|
+
require 'us_core_test_kit/search_test_properties'
|
3
|
+
require 'us_core_test_kit/generator/group_metadata'
|
4
|
+
|
5
|
+
module DaVinciPDexTestKit
|
6
|
+
module PDexPayerServer
|
7
|
+
class ExplanationOfBenefitPatientSearchTest < Inferno::Test
|
8
|
+
include USCoreTestKit::SearchTest
|
9
|
+
|
10
|
+
title 'Server returns valid results for ExplanationOfBenefit search by patient'
|
11
|
+
description %(
|
12
|
+
A server SHALL support searching by
|
13
|
+
patient on the ExplanationOfBenefit resource. This test
|
14
|
+
will pass if resources are returned and match the search criteria. If
|
15
|
+
none are returned, the test is skipped.
|
16
|
+
|
17
|
+
This test verifies that the server supports searching by reference using
|
18
|
+
the form `patient=[id]` as well as `patient=Patient/[id]`. The two
|
19
|
+
different forms are expected to return the same number of results. US
|
20
|
+
Core requires that both forms are supported by PDex responders.
|
21
|
+
|
22
|
+
Because this is the first search of the sequence, resources in the
|
23
|
+
response will be used for subsequent tests.
|
24
|
+
|
25
|
+
Additionally, this test will check that GET and POST search methods
|
26
|
+
return the same number of results. Search by POST is required by the
|
27
|
+
FHIR R4 specification, and these tests interpret search by GET as a
|
28
|
+
requirement of PDex v2.0.0.
|
29
|
+
|
30
|
+
[PDex Server CapabilityStatement](https://hl7.org/fhir/us/davinci-pdex/STU2/CapabilityStatement-pdex-server.html)
|
31
|
+
)
|
32
|
+
|
33
|
+
id :pdex_eob_patient_search
|
34
|
+
input :patient_ids,
|
35
|
+
title: 'Patient IDs',
|
36
|
+
description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
|
37
|
+
|
38
|
+
def self.properties
|
39
|
+
@properties ||= USCoreTestKit::SearchTestProperties.new(
|
40
|
+
first_search: true,
|
41
|
+
resource_type: 'ExplanationOfBenefit',
|
42
|
+
search_param_names: ['patient'],
|
43
|
+
test_reference_variants: true,
|
44
|
+
test_post_search: true
|
45
|
+
)
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.metadata
|
49
|
+
@metadata ||= USCoreTestKit::Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'),
|
50
|
+
aliases: true))
|
51
|
+
end
|
52
|
+
|
53
|
+
def scratch_resources
|
54
|
+
scratch[:explanation_of_benefit_resources] ||= {}
|
55
|
+
end
|
56
|
+
|
57
|
+
run do
|
58
|
+
run_search_test
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -9,30 +9,16 @@ module DaVinciPDexTestKit
|
|
9
9
|
|
10
10
|
title 'Server returns valid results for ExplanationOfBenefit search by patient + service-date'
|
11
11
|
description %(
|
12
|
-
A server SHALL support searching by
|
13
|
-
patient + service-date on the ExplanationOfBenefit resource. This test
|
14
|
-
will pass if resources are returned and match the search criteria. If
|
15
|
-
none are returned, the test is skipped.
|
16
|
-
|
17
|
-
This test verifies that the server supports searching by reference using
|
18
|
-
the form `patient=[id]` as well as `patient=Patient/[id]`. The two
|
19
|
-
different forms are expected to return the same number of results. US
|
20
|
-
Core requires that both forms are supported by US Core responders, and
|
21
|
-
PDex expands upon US Core.
|
22
|
-
|
23
|
-
Because this is the first search of the sequence, resources in the
|
24
|
-
response will be used for subsequent tests.
|
25
|
-
|
26
|
-
Additionally, this test will check that GET and POST search methods
|
27
|
-
return the same number of results. Search by POST is required by the
|
28
|
-
FHIR R4 specification, and these tests interpret search by GET as a
|
29
|
-
requirement of PDex v2.0.0.
|
30
|
-
|
31
|
-
[PDex Server CapabilityStatement](https://hl7.org/fhir/us/davinci-pdex/STU2/CapabilityStatement-pdex-server.html)
|
12
|
+
A server SHALL support searching by
|
13
|
+
patient + service-date on the ExplanationOfBenefit resource. This test
|
14
|
+
will pass if resources are returned and match the search criteria. If
|
15
|
+
none are returned, the test is skipped.
|
32
16
|
|
17
|
+
[PDex Server CapabilityStatement](https://hl7.org/fhir/us/davinci-pdex/STU2/CapabilityStatement-pdex-server.html)
|
33
18
|
)
|
34
19
|
|
35
20
|
id :pdex_eob_patient_service_date_search
|
21
|
+
optional
|
36
22
|
|
37
23
|
input :patient_ids,
|
38
24
|
title: 'Patient IDs',
|
@@ -41,9 +27,7 @@ requirement of PDex v2.0.0.
|
|
41
27
|
def self.properties
|
42
28
|
@properties ||= USCoreTestKit::SearchTestProperties.new(
|
43
29
|
resource_type: 'ExplanationOfBenefit',
|
44
|
-
search_param_names: ['patient', 'service-date']
|
45
|
-
test_post_search: true
|
46
|
-
# TODO: other properties?
|
30
|
+
search_param_names: ['patient', 'service-date']
|
47
31
|
)
|
48
32
|
end
|
49
33
|
|
@@ -9,31 +9,15 @@ module DaVinciPDexTestKit
|
|
9
9
|
|
10
10
|
title 'Server returns valid results for ExplanationOfBenefit search by patient + type'
|
11
11
|
description %(
|
12
|
-
A server SHALL support searching by
|
13
|
-
patient + type on the ExplanationOfBenefit resource. This test
|
14
|
-
will pass if resources are returned and match the search criteria. If
|
15
|
-
none are returned, the test is skipped.
|
16
|
-
|
17
|
-
This test verifies that the server supports searching by reference using
|
18
|
-
the form `patient=[id]` as well as `patient=Patient/[id]`. The two
|
19
|
-
different forms are expected to return the same number of results. US
|
20
|
-
Core requires that both forms are supported by US Core responders, and
|
21
|
-
PDex expands upon US Core.
|
22
|
-
|
23
|
-
Because this is the first search of the sequence, resources in the
|
24
|
-
response will be used for subsequent tests.
|
25
|
-
|
26
|
-
Additionally, this test will check that GET and POST search methods
|
27
|
-
return the same number of results. Search by POST is required by the
|
28
|
-
FHIR R4 specification, and these tests interpret search by GET as a
|
29
|
-
requirement of PDex v2.0.0.
|
30
|
-
|
31
|
-
[PDex Server CapabilityStatement](https://hl7.org/fhir/us/davinci-pdex/STU2/CapabilityStatement-pdex-server.html)
|
12
|
+
A server SHALL support searching by
|
13
|
+
patient + type on the ExplanationOfBenefit resource. This test
|
14
|
+
will pass if resources are returned and match the search criteria. If
|
15
|
+
none are returned, the test is skipped.
|
32
16
|
|
17
|
+
[PDex Server CapabilityStatement](https://hl7.org/fhir/us/davinci-pdex/STU2/CapabilityStatement-pdex-server.html)
|
33
18
|
)
|
34
19
|
|
35
20
|
id :pdex_eob_patient_type_search
|
36
|
-
|
37
21
|
input :patient_ids,
|
38
22
|
title: 'Patient IDs',
|
39
23
|
description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
|
@@ -42,8 +26,7 @@ requirement of PDex v2.0.0.
|
|
42
26
|
@properties ||= USCoreTestKit::SearchTestProperties.new(
|
43
27
|
resource_type: 'ExplanationOfBenefit',
|
44
28
|
search_param_names: ['patient', 'type'],
|
45
|
-
|
46
|
-
# TODO: other properties?
|
29
|
+
token_search_params: ['type']
|
47
30
|
)
|
48
31
|
end
|
49
32
|
|
@@ -12,13 +12,16 @@ module DaVinciPDexTestKit
|
|
12
12
|
marked as 'MustSupport', if any are available.
|
13
13
|
|
14
14
|
It verifies that at least one external reference for each MustSupport Reference element
|
15
|
-
can be accessed by the test client, and conforms to corresponding
|
15
|
+
can be accessed by the test client, and conforms to corresponding PDex profile.
|
16
16
|
|
17
17
|
Elements which may provide external references include:
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
*
|
19
|
+
* ExplanationOfBenefit.careTeam.provider
|
20
|
+
* ExplanationOfBenefit.enterer
|
21
|
+
* ExplanationOfBenefit.facility
|
22
|
+
* ExplanationOfBenefit.insurer
|
23
|
+
* ExplanationOfBenefit.patient
|
24
|
+
* ExplanationOfBenefit.provider
|
22
25
|
)
|
23
26
|
|
24
27
|
id :pdex_eob_ref_resolution
|
@@ -6,19 +6,18 @@ module DaVinciPDexTestKit
|
|
6
6
|
include USCoreTestKit::ValidationTest
|
7
7
|
|
8
8
|
id :pdex_eob_validation
|
9
|
-
title 'ExplanationOfBenefit resources returned during previous tests conform to the
|
9
|
+
title 'ExplanationOfBenefit resources returned during previous tests conform to the PDex Prior Authorization'
|
10
10
|
description %(
|
11
|
-
This test verifies resources returned from the first search conform to
|
12
|
-
the [PDex
|
13
|
-
Systems must demonstrate at least one valid example in order to pass this test.
|
11
|
+
This test verifies resources returned from the first search conform to
|
12
|
+
the [PDex Prior Authorization](http://hl7.org/fhir/us/davinci-pdex/StructureDefinition/pdex-priorauthorization).
|
13
|
+
Systems must demonstrate at least one valid example in order to pass this test.
|
14
14
|
|
15
|
-
It verifies the presence of mandatory elements and that elements with
|
16
|
-
required bindings contain appropriate values. CodeableConcept element
|
17
|
-
bindings will fail if none of their codings have a code/system belonging
|
18
|
-
to the bound ValueSet. Quantity, Coding, and code element bindings will
|
19
|
-
fail if their code/system are not found in the valueset.
|
15
|
+
It verifies the presence of mandatory elements and that elements with
|
16
|
+
required bindings contain appropriate values. CodeableConcept element
|
17
|
+
bindings will fail if none of their codings have a code/system belonging
|
18
|
+
to the bound ValueSet. Quantity, Coding, and code element bindings will
|
19
|
+
fail if their code/system are not found in the valueset.
|
20
20
|
)
|
21
|
-
|
22
21
|
output :dar_code_found, :dar_extension_found
|
23
22
|
|
24
23
|
def resource_type
|