davinci_pdex_test_kit 0.10.6 → 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_client_postman_preset.json +12 -0
- data/config/presets/pdex_payer_server_fhir_foundry_ri_preset.json +96 -0
- data/config/presets/pdex_payer_server_inferno_ri_preset.json +96 -0
- data/lib/davinci_pdex_test_kit/docs/davinci_pdex_test_kit_description_v200.md +33 -0
- data/lib/davinci_pdex_test_kit/docs/payer_client_suite_description_v200.md +107 -17
- data/lib/davinci_pdex_test_kit/fhir_resource_navigation.rb +5 -1
- data/lib/davinci_pdex_test_kit/group_metadata.rb +5 -1
- data/lib/davinci_pdex_test_kit/igs/davinci-pdex-2.0.0.tgz +0 -0
- data/lib/davinci_pdex_test_kit/igs/us-core-3.1.1.tgz +0 -0
- data/lib/davinci_pdex_test_kit/metadata.rb +16 -0
- data/lib/davinci_pdex_test_kit/must_support_test.rb +3 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_member_match_tests/client_member_match_validation_test.rb +21 -17
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_validation_test.rb +96 -43
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_workflow_interaction_test.rb +50 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/allergyintolerance_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/careplan_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/careteam_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/clinical_data_request_check_test.rb +24 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/condition_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/device_clinical_data_request_test.rb +19 -17
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/diagnosticreport_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/documentreference_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/encounter_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/explanationofbenefit_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/goal_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/immunization_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/location_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/medicationdispense_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/medicationrequest_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/observation_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/organization_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/patient_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/patient_id_search_request_check_test.rb +21 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/practitioner_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/practitionerrole_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/procedure_clinical_data_request_test.rb +18 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_client/collection.rb +46 -44
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/binary_endpoint.rb +26 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/export_endpoint.rb +29 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/export_status_endpoint.rb +38 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/member_match_endpoint.rb +51 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/next_page_endpoint.rb +23 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/patient_endpoint.rb +25 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/patient_everything_endpoint.rb +34 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/proxy_endpoint.rb +178 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/resource_read_endpoint.rb +21 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/resource_search_endpoint.rb +22 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/token_endpoint.rb +27 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server.rb +53 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/tags.rb +15 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/urls.rb +51 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client_suite.rb +99 -144
- data/lib/davinci_pdex_test_kit/pdex_payer_server/coverage_to_link_minimal_data_validation.rb +1 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_server/coverage_to_link_must_support_validation.rb +1 -1
- 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} +16 -13
- 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 +10 -26
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_identifier_search_test.rb +13 -26
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_must_support_test.rb +40 -7
- 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 +13 -28
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_patient_type_search_test.rb +12 -28
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_read_test.rb +1 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_reference_resolution_test.rb +10 -6
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_validation_test.rb +10 -11
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/metadata.yml +285 -273
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit_group.rb +69 -73
- data/lib/davinci_pdex_test_kit/pdex_payer_server/export_patient_group.rb +11 -13
- data/lib/davinci_pdex_test_kit/pdex_payer_server/export_validation_group.rb +3 -8
- 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/member_match_request_local_references_validation.rb +1 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_server/member_match_request_profile_validation.rb +1 -3
- data/lib/davinci_pdex_test_kit/pdex_payer_server/multiple_member_matches_group.rb +36 -37
- data/lib/davinci_pdex_test_kit/pdex_payer_server/no_member_matches_group.rb +30 -31
- data/lib/davinci_pdex_test_kit/pdex_payer_server/patient_operation_in_capability_statement_validation.rb +16 -16
- 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 +25 -16
- data/lib/davinci_pdex_test_kit/pdex_payer_server/workflow_everything_group.rb +21 -10
- data/lib/davinci_pdex_test_kit/pdex_payer_server/workflow_export_group.rb +24 -20
- data/lib/davinci_pdex_test_kit/pdex_payer_server/workflow_member_match_group.rb +56 -38
- data/lib/davinci_pdex_test_kit/pdex_payer_server_suite.rb +124 -112
- 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 -3
- data/lib/davinci_pdex_test_kit.rb +2 -2
- 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 +113 -27
- data/lib/davinci_pdex_test_kit/ext/inferno_core/record_response_route.rb +0 -98
- data/lib/davinci_pdex_test_kit/ext/inferno_core/request.rb +0 -19
- data/lib/davinci_pdex_test_kit/ext/inferno_core/runnable.rb +0 -18
- data/lib/davinci_pdex_test_kit/mock_server.rb +0 -281
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_member_match_tests/client_member_match_submit_test.rb +0 -24
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_must_support_tests/client_member_match_must_support_submit_test.rb +0 -26
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_must_support_tests/client_member_match_must_support_validation_test.rb +0 -32
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_must_support_tests/metadata.yml +0 -61
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/initial_scratch_storing.rb +0 -32
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/initial_wait_test.rb +0 -31
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_patient_last_updated_search_test.rb +0 -63
- data/lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_patient_use_search_test.rb +0 -68
- data/lib/davinci_pdex_test_kit/tags.rb +0 -11
- data/lib/davinci_pdex_test_kit/urls.rb +0 -77
- /data/lib/davinci_pdex_test_kit/{metadata → pdex_payer_client/mock_server/resources}/mock_capability_statement.json +0 -0
- /data/lib/davinci_pdex_test_kit/{metadata → pdex_payer_client/mock_server/resources}/mock_operation_outcome_resource.json +0 -0
@@ -0,0 +1,173 @@
|
|
1
|
+
---
|
2
|
+
:name: pdex_provenance
|
3
|
+
:class_name: PdexProvenanceSequence
|
4
|
+
:version: v2.0.0
|
5
|
+
:reformatted_version: v200
|
6
|
+
:resource: Provenance
|
7
|
+
:profile_url: http://hl7.org/fhir/us/davinci-pdex/StructureDefinition/pdex-provenance
|
8
|
+
:profile_name: PDex Provenance
|
9
|
+
:profile_version: 2.0.0
|
10
|
+
:title: PDex Provenance
|
11
|
+
:short_description: Verify support for the server capabilities required by the PDex
|
12
|
+
Provenance.
|
13
|
+
:is_delayed: true
|
14
|
+
:interactions:
|
15
|
+
- :code: search-type
|
16
|
+
:expectation: MAY
|
17
|
+
- :code: read
|
18
|
+
:expectation: SHALL
|
19
|
+
- :code: vread
|
20
|
+
:expectation: SHOULD
|
21
|
+
- :code: patch
|
22
|
+
:expectation: MAY
|
23
|
+
- :code: history-instance
|
24
|
+
:expectation: SHOULD
|
25
|
+
- :code: history-type
|
26
|
+
:expectation: MAY
|
27
|
+
:operations: []
|
28
|
+
:searches: []
|
29
|
+
:search_definitions: {}
|
30
|
+
:include_params: []
|
31
|
+
:revincludes: []
|
32
|
+
:required_concepts:
|
33
|
+
- agent.type
|
34
|
+
- entity.extension.valueCodeableConcept
|
35
|
+
:must_supports:
|
36
|
+
:extensions:
|
37
|
+
- :id: Provenance.entity.extension:sourceFormat
|
38
|
+
:path: entity.extension
|
39
|
+
:url: http://hl7.org/fhir/us/davinci-pdex/StructureDefinition/ProvenanceSourceFrom
|
40
|
+
:slices:
|
41
|
+
- :slice_id: Provenance.agent:ProvenanceAuthor
|
42
|
+
:slice_name: ProvenanceAuthor
|
43
|
+
:path: agent
|
44
|
+
:discriminator:
|
45
|
+
:type: patternCodeableConcept
|
46
|
+
:path: type
|
47
|
+
:code: author
|
48
|
+
:system: http://terminology.hl7.org/CodeSystem/provenance-participant-type
|
49
|
+
- :slice_id: Provenance.agent:ProvenanceTransmitter
|
50
|
+
:slice_name: ProvenanceTransmitter
|
51
|
+
:path: agent
|
52
|
+
:discriminator:
|
53
|
+
:type: patternCodeableConcept
|
54
|
+
:path: type
|
55
|
+
:code: transmitter
|
56
|
+
:system: http://hl7.org/fhir/us/core/CodeSystem/us-core-provenance-participant-type
|
57
|
+
:elements:
|
58
|
+
- :path: target
|
59
|
+
:types:
|
60
|
+
- Reference
|
61
|
+
- :path: recorded
|
62
|
+
- :path: agent
|
63
|
+
- :path: agent.type
|
64
|
+
- :path: agent.who
|
65
|
+
:types:
|
66
|
+
- Reference
|
67
|
+
:target_profiles:
|
68
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
|
69
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
|
70
|
+
- :path: agent.onBehalfOf
|
71
|
+
:types:
|
72
|
+
- Reference
|
73
|
+
:target_profiles:
|
74
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
|
75
|
+
- :path: agent:ProvenanceAuthor.type
|
76
|
+
- :path: agent:ProvenanceAuthor.who
|
77
|
+
:types:
|
78
|
+
- Reference
|
79
|
+
:target_profiles:
|
80
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
|
81
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
|
82
|
+
- :path: agent:ProvenanceTransmitter.type
|
83
|
+
- :path: agent:ProvenanceTransmitter.who
|
84
|
+
:types:
|
85
|
+
- Reference
|
86
|
+
:target_profiles:
|
87
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
|
88
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
|
89
|
+
:mandatory_elements:
|
90
|
+
- Provenance.target
|
91
|
+
- Provenance.recorded
|
92
|
+
- Provenance.agent
|
93
|
+
- Provenance.agent.who
|
94
|
+
- Provenance.agent.type
|
95
|
+
- Provenance.entity.extension.url
|
96
|
+
- Provenance.entity.role
|
97
|
+
- Provenance.entity.what
|
98
|
+
:bindings:
|
99
|
+
- :type: CodeableConcept
|
100
|
+
:strength: required
|
101
|
+
:system: http://hl7.org/fhir/us/core/ValueSet/us-core-provenance-participant-type
|
102
|
+
:path: agent.type
|
103
|
+
- :type: CodeableConcept
|
104
|
+
:strength: required
|
105
|
+
:system: http://hl7.org/fhir/us/davinci-pdex/ValueSet/ProvenanceAgentType
|
106
|
+
:path: agent:ProvenanceAuthor.type
|
107
|
+
- :type: CodeableConcept
|
108
|
+
:strength: required
|
109
|
+
:system: http://hl7.org/fhir/us/davinci-pdex/ValueSet/ProvenancePayerSourceFormat
|
110
|
+
:path: entity.extension:sourceFormat.value
|
111
|
+
- :type: code
|
112
|
+
:strength: required
|
113
|
+
:system: http://hl7.org/fhir/ValueSet/provenance-entity-role
|
114
|
+
:path: entity.role
|
115
|
+
- :type: CodeableConcept
|
116
|
+
:strength: extensible
|
117
|
+
:system: http://hl7.org/fhir/us/davinci-pdex/ValueSet/ProvenancePayerSourceFormat
|
118
|
+
:path: value
|
119
|
+
:extensions:
|
120
|
+
- http://hl7.org/fhir/us/davinci-pdex/StructureDefinition/ProvenanceSourceFrom
|
121
|
+
:references:
|
122
|
+
- :path: Provenance.target
|
123
|
+
:profiles:
|
124
|
+
- http://hl7.org/fhir/StructureDefinition/Resource
|
125
|
+
- :path: Provenance.location
|
126
|
+
:profiles:
|
127
|
+
- http://hl7.org/fhir/StructureDefinition/Location
|
128
|
+
- :path: Provenance.agent.who
|
129
|
+
:profiles:
|
130
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
|
131
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
|
132
|
+
- :path: Provenance.agent.onBehalfOf
|
133
|
+
:profiles:
|
134
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
|
135
|
+
- :path: Provenance.agent:ProvenanceAuthor.who
|
136
|
+
:profiles:
|
137
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
|
138
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
|
139
|
+
- :path: Provenance.agent:ProvenanceAuthor.onBehalfOf
|
140
|
+
:profiles:
|
141
|
+
- http://hl7.org/fhir/StructureDefinition/Practitioner
|
142
|
+
- http://hl7.org/fhir/StructureDefinition/PractitionerRole
|
143
|
+
- http://hl7.org/fhir/StructureDefinition/RelatedPerson
|
144
|
+
- http://hl7.org/fhir/StructureDefinition/Patient
|
145
|
+
- http://hl7.org/fhir/StructureDefinition/Device
|
146
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
147
|
+
- :path: Provenance.agent:ProvenanceTransmitter.who
|
148
|
+
:profiles:
|
149
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
|
150
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
|
151
|
+
- :path: Provenance.agent:ProvenanceTransmitter.onBehalfOf
|
152
|
+
:profiles:
|
153
|
+
- http://hl7.org/fhir/StructureDefinition/Practitioner
|
154
|
+
- http://hl7.org/fhir/StructureDefinition/PractitionerRole
|
155
|
+
- http://hl7.org/fhir/StructureDefinition/RelatedPerson
|
156
|
+
- http://hl7.org/fhir/StructureDefinition/Patient
|
157
|
+
- http://hl7.org/fhir/StructureDefinition/Device
|
158
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
159
|
+
- :path: Provenance.entity.what
|
160
|
+
:profiles:
|
161
|
+
- http://hl7.org/fhir/StructureDefinition/Resource
|
162
|
+
:tests:
|
163
|
+
- :id: pdex_provenance_read
|
164
|
+
:file_name: provenance_read_test.rb
|
165
|
+
- :id: pdex_provenance_validation
|
166
|
+
:file_name: provenance_validation_test.rb
|
167
|
+
- :id: pdex_provenance_must_support
|
168
|
+
:file_name: provenance_must_support_test.rb
|
169
|
+
- :id: pdex_provenance_ref_resolution
|
170
|
+
:file_name: provenance_reference_resolution_test.rb
|
171
|
+
:id: pdex_provenance
|
172
|
+
:file_name: provenance_group.rb
|
173
|
+
:delayed_references: []
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'us_core_test_kit/must_support_test'
|
2
|
+
require 'us_core_test_kit/generator/group_metadata'
|
3
|
+
|
4
|
+
module DaVinciPDexTestKit
|
5
|
+
module PDexPayerServer
|
6
|
+
class ProvenanceMustSupportTest < Inferno::Test
|
7
|
+
include USCoreTestKit::MustSupportTest
|
8
|
+
|
9
|
+
title 'All must support elements are provided in the Provenance resources returned'
|
10
|
+
description %(
|
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
|
+
Statement. This test will look through the Provenance resources
|
14
|
+
found previously for the following must support elements:
|
15
|
+
|
16
|
+
* Provenance.agent
|
17
|
+
* Provenance.agent.onBehalfOf
|
18
|
+
* Provenance.agent.type
|
19
|
+
* Provenance.agent.who
|
20
|
+
* Provenance.agent:ProvenanceAuthor
|
21
|
+
* Provenance.agent:ProvenanceAuthor.type
|
22
|
+
* Provenance.agent:ProvenanceAuthor.who
|
23
|
+
* Provenance.agent:ProvenanceTransmitter
|
24
|
+
* Provenance.agent:ProvenanceTransmitter.type
|
25
|
+
* Provenance.agent:ProvenanceTransmitter.who
|
26
|
+
* Provenance.entity.extension:sourceFormat
|
27
|
+
* Provenance.recorded
|
28
|
+
* Provenance.target
|
29
|
+
)
|
30
|
+
|
31
|
+
id :pdex_provenance_must_support
|
32
|
+
|
33
|
+
def resource_type
|
34
|
+
'Provenance'
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.metadata
|
38
|
+
@metadata ||= USCoreTestKit::Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'),
|
39
|
+
aliases: true))
|
40
|
+
end
|
41
|
+
|
42
|
+
def scratch_resources
|
43
|
+
scratch[:provenance_resources] ||= {}
|
44
|
+
end
|
45
|
+
|
46
|
+
run do
|
47
|
+
perform_must_support_test(all_scratch_resources)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'us_core_test_kit/read_test'
|
2
|
+
|
3
|
+
module DaVinciPDexTestKit
|
4
|
+
module PDexPayerServer
|
5
|
+
class ProvenanceReadTest < Inferno::Test
|
6
|
+
include USCoreTestKit::ReadTest
|
7
|
+
|
8
|
+
title 'Server returns correct Provenance resource from Provenance read interaction'
|
9
|
+
description 'A server SHALL support the Provenance read interaction.'
|
10
|
+
|
11
|
+
id :pdex_provenance_read
|
12
|
+
|
13
|
+
def resource_type
|
14
|
+
'Provenance'
|
15
|
+
end
|
16
|
+
|
17
|
+
def scratch_resources
|
18
|
+
scratch[:provenance_resources] ||= {}
|
19
|
+
end
|
20
|
+
|
21
|
+
run do
|
22
|
+
perform_read_test(all_scratch_resources)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/davinci_pdex_test_kit/pdex_payer_server/provenance/provenance_reference_resolution_test.rb
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'us_core_test_kit/reference_resolution_test'
|
2
|
+
require 'us_core_test_kit/generator/group_metadata'
|
3
|
+
|
4
|
+
module DaVinciPDexTestKit
|
5
|
+
module PDexPayerServer
|
6
|
+
class ProvenanceReferenceResolutionTest < Inferno::Test
|
7
|
+
include USCoreTestKit::ReferenceResolutionTest
|
8
|
+
|
9
|
+
title 'MustSupport references within Provenance resources are valid'
|
10
|
+
description %(
|
11
|
+
This test will attempt to read external references provided within elements
|
12
|
+
marked as 'MustSupport', if any are available.
|
13
|
+
|
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 PDex profile.
|
16
|
+
|
17
|
+
Elements which may provide external references include:
|
18
|
+
|
19
|
+
* Provenance.agent.onBehalfOf
|
20
|
+
* Provenance.agent.who
|
21
|
+
* Provenance.agent:ProvenanceAuthor.who
|
22
|
+
* Provenance.agent:ProvenanceTransmitter.who
|
23
|
+
* Provenance.target
|
24
|
+
)
|
25
|
+
|
26
|
+
id :pdex_provenance_ref_resolution
|
27
|
+
|
28
|
+
def resource_type
|
29
|
+
'Provenance'
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.metadata
|
33
|
+
@metadata ||= USCoreTestKit::Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'),
|
34
|
+
aliases: true))
|
35
|
+
end
|
36
|
+
|
37
|
+
def scratch_resources
|
38
|
+
scratch[:provenance_resources] ||= {}
|
39
|
+
end
|
40
|
+
|
41
|
+
run do
|
42
|
+
perform_reference_resolution_test(scratch_resources[:all])
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'us_core_test_kit/validation_test'
|
2
|
+
|
3
|
+
module DaVinciPDexTestKit
|
4
|
+
module PDexPayerServer
|
5
|
+
class ProvenanceValidationTest < Inferno::Test
|
6
|
+
include USCoreTestKit::ValidationTest
|
7
|
+
|
8
|
+
id :pdex_provenance_validation
|
9
|
+
title 'Provenance resources returned during previous tests conform to the PDex Provenance'
|
10
|
+
description %(
|
11
|
+
This test verifies resources returned from the first search conform to
|
12
|
+
the [PDex Provenance](http://hl7.org/fhir/us/davinci-pdex/StructureDefinition/pdex-provenance).
|
13
|
+
Systems must demonstrate at least one valid example in order to pass this test.
|
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.
|
20
|
+
)
|
21
|
+
output :dar_code_found, :dar_extension_found
|
22
|
+
|
23
|
+
def resource_type
|
24
|
+
'Provenance'
|
25
|
+
end
|
26
|
+
|
27
|
+
def scratch_resources
|
28
|
+
scratch[:provenance_resources] ||= {}
|
29
|
+
end
|
30
|
+
|
31
|
+
run do
|
32
|
+
perform_validation_test(scratch_resources[:all] || [],
|
33
|
+
'http://hl7.org/fhir/us/davinci-pdex/StructureDefinition/pdex-provenance',
|
34
|
+
'2.0.0',
|
35
|
+
skip_if_empty: true)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require_relative 'provenance/provenance_read_test'
|
2
|
+
require_relative 'provenance/provenance_validation_test'
|
3
|
+
require_relative 'provenance/provenance_must_support_test'
|
4
|
+
require_relative 'provenance/provenance_reference_resolution_test'
|
5
|
+
|
6
|
+
module DaVinciPDexTestKit
|
7
|
+
module PDexPayerServer
|
8
|
+
class ProvenanceGroup < Inferno::TestGroup
|
9
|
+
title 'PDex Provenance Tests'
|
10
|
+
short_description 'Verify support for the server capabilities required by the PDex Provenance.'
|
11
|
+
description %(
|
12
|
+
# Background
|
13
|
+
|
14
|
+
The PDex Provenance sequence verifies that the system under test is
|
15
|
+
able to provide correct responses for Provenance queries. These queries
|
16
|
+
must contain resources conforming to the PDex Provenance as
|
17
|
+
specified in the PDex v2.0.0 Implementation Guide.
|
18
|
+
|
19
|
+
# Testing Methodology
|
20
|
+
|
21
|
+
|
22
|
+
## Must Support
|
23
|
+
Each profile contains elements marked as "must support". This test
|
24
|
+
sequence expects to see each of these elements at least once. If at
|
25
|
+
least one cannot be found, the test will fail. The test will look
|
26
|
+
through the Provenance resources found in the first test for these
|
27
|
+
elements.
|
28
|
+
|
29
|
+
## Profile Validation
|
30
|
+
Each resource returned from the first search is expected to conform to
|
31
|
+
the [PDex Provenance](http://hl7.org/fhir/us/davinci-pdex/StructureDefinition/pdex-provenance). Each element is checked against
|
32
|
+
teminology binding and cardinality requirements.
|
33
|
+
|
34
|
+
Elements with a required binding are validated against their bound
|
35
|
+
ValueSet. If the code/system in the element is not part of the ValueSet,
|
36
|
+
then the test will fail.
|
37
|
+
|
38
|
+
## Reference Validation
|
39
|
+
At least one instance of each external reference in elements marked as
|
40
|
+
"must support" within the resources provided by the system must resolve.
|
41
|
+
The test will attempt to read each reference found and will fail if no
|
42
|
+
read succeeds.
|
43
|
+
)
|
44
|
+
|
45
|
+
id :pdex_provenance
|
46
|
+
run_as_group
|
47
|
+
|
48
|
+
def self.metadata
|
49
|
+
@metadata ||= USCoreTestKit::Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'provenance', 'metadata.yml'),
|
50
|
+
aliases: true))
|
51
|
+
end
|
52
|
+
|
53
|
+
test from: :pdex_provenance_read
|
54
|
+
test from: :pdex_provenance_validation
|
55
|
+
test from: :pdex_provenance_must_support
|
56
|
+
test from: :pdex_provenance_ref_resolution
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -1,9 +1,7 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
1
|
module DaVinciPDexTestKit
|
4
2
|
module PDexPayerServer
|
5
3
|
class WorkflowClinicalDataGroup < Inferno::TestGroup
|
6
|
-
id :
|
4
|
+
id :pdex_workflow_clinical_data
|
7
5
|
title 'Server can respond to search requests for clinical data on the matched patient'
|
8
6
|
short_title 'Clinical data query'
|
9
7
|
description %{
|
@@ -20,35 +18,47 @@ module DaVinciPDexTestKit
|
|
20
18
|
for this test. If neither is available tests are skipped.
|
21
19
|
}
|
22
20
|
|
21
|
+
verifies_requirements 'hl7.fhir.us.davinci-pdex_2.0.0@42'
|
22
|
+
|
23
23
|
input :patient_id,
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
title: 'Patient ID',
|
25
|
+
description: 'Manual Patient ID for testing Clinical Query and $everything without $member-match.',
|
26
|
+
optional: true
|
27
|
+
|
28
|
+
input :smart_auth_info,
|
29
|
+
title: 'OAuth Credentials',
|
30
|
+
type: :auth_info,
|
31
|
+
optional: true
|
32
|
+
|
33
|
+
fhir_client do
|
34
|
+
url :url
|
35
|
+
auth_info :smart_auth_info
|
36
|
+
end
|
27
37
|
|
28
38
|
test do
|
29
|
-
id :
|
39
|
+
id :pdex_workflow_clinical_encounter_query_test
|
30
40
|
title 'Server can provide clinical Encounter data from matched member identifier'
|
31
|
-
description %
|
41
|
+
description %(
|
32
42
|
Server receives request `GET [baseURL]/Encounter?subject=Patient/[id]` and returns 200.
|
33
|
-
|
43
|
+
)
|
34
44
|
|
35
45
|
makes_request :pdex_clinical_query
|
36
46
|
|
37
47
|
run do
|
38
48
|
skip_if !patient_id,
|
39
|
-
|
49
|
+
'No Patient FHIR ID was derived from $member-match response or supplied by user input'
|
40
50
|
|
41
|
-
fhir_search(FHIR::Encounter, params: {patient: "Patient/#{patient_id}"}, name: :pdex_clinical_query)
|
51
|
+
fhir_search(FHIR::Encounter, params: { patient: "Patient/#{patient_id}" }, name: :pdex_clinical_query)
|
42
52
|
assert_response_status(200)
|
43
53
|
end
|
44
54
|
end
|
45
55
|
|
46
56
|
test do
|
47
|
-
id :
|
57
|
+
id :pdex_workflow_clinical_encounter_test
|
48
58
|
title 'Server returned Search bundle with valid Encounter data'
|
49
|
-
description %
|
59
|
+
description %(
|
50
60
|
Server returned search Bundle of Encounters with least 1 resource entry.
|
51
|
-
|
61
|
+
)
|
52
62
|
|
53
63
|
uses_request :pdex_clinical_query
|
54
64
|
|
@@ -56,11 +66,10 @@ module DaVinciPDexTestKit
|
|
56
66
|
assert_valid_resource
|
57
67
|
assert_resource_type('Bundle')
|
58
68
|
assert resource.entry.length > 0, 'Response Bundle must have at least one entry'
|
59
|
-
assert resource.entry.map{|entry| entry.resource}.all? { |res| res.resourceType == 'Encounter' },
|
69
|
+
assert resource.entry.map { |entry| entry.resource }.all? { |res| res.resourceType == 'Encounter' },
|
60
70
|
'Response Bundle must only have Encounter resources'
|
61
71
|
end
|
62
72
|
end
|
63
73
|
end
|
64
74
|
end
|
65
75
|
end
|
66
|
-
|
@@ -1,5 +1,3 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
1
|
require_relative 'patient_operation_in_capability_statement_validation'
|
4
2
|
|
5
3
|
module DaVinciPDexTestKit
|
@@ -7,7 +5,7 @@ module DaVinciPDexTestKit
|
|
7
5
|
class WorkflowEverythingGroup < Inferno::TestGroup
|
8
6
|
title 'Server can respond to $everything requests on matched patient'
|
9
7
|
short_title '$everything'
|
10
|
-
id :
|
8
|
+
id :pdex_workflow_everything
|
11
9
|
optional
|
12
10
|
description %{
|
13
11
|
# Background
|
@@ -21,13 +19,24 @@ module DaVinciPDexTestKit
|
|
21
19
|
This test sequence takes a patient id input and executes the `$everything` FHIR operation on it.
|
22
20
|
}
|
23
21
|
|
22
|
+
verifies_requirements 'hl7.fhir.us.davinci-pdex_2.0.0@42'
|
24
23
|
|
25
24
|
input :patient_id,
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
title: 'Patient ID',
|
26
|
+
description: 'Manual Patient ID for testing Clinical Query and $everything $export without $member-match.',
|
27
|
+
optional: true
|
28
|
+
|
29
|
+
input :smart_auth_info,
|
30
|
+
title: 'OAuth Credentials',
|
31
|
+
type: :auth_info,
|
32
|
+
optional: true
|
33
|
+
|
34
|
+
fhir_client do
|
35
|
+
url :url
|
36
|
+
auth_info :smart_auth_info
|
37
|
+
end
|
29
38
|
|
30
|
-
test from: :
|
39
|
+
test from: :pdex_patient_operation_in_cap_stmt_validation,
|
31
40
|
title: 'Server declares support for Patient everything operation in CapabilityStatement',
|
32
41
|
config: {
|
33
42
|
options: { operation_name: 'everything', operation_url: 'http://hl7.org/fhir/OperationDefinition/Patient-everything' }
|
@@ -36,11 +45,13 @@ module DaVinciPDexTestKit
|
|
36
45
|
test do
|
37
46
|
title 'Server can handle GET /Patient/[ID]/$everything'
|
38
47
|
|
48
|
+
verifies_requirements 'hl7.fhir.us.davinci-pdex_2.0.0@46'
|
49
|
+
|
39
50
|
makes_request :pdex_patient_everything
|
40
51
|
|
41
52
|
run do
|
42
53
|
skip_if !patient_id,
|
43
|
-
|
54
|
+
'No Patient FHIR ID was derived from $member-match response or supplied by user input'
|
44
55
|
|
45
56
|
fhir_operation("/Patient/#{patient_id}/$everything", operation_method: :get, name: :pdex_patient_everything)
|
46
57
|
|
@@ -57,7 +68,7 @@ module DaVinciPDexTestKit
|
|
57
68
|
|
58
69
|
run do
|
59
70
|
skip_if !patient_id
|
60
|
-
|
71
|
+
'No Patient ID was derived from $member-match nor supplied from user input'
|
61
72
|
skip_if response[:status] != 200, 'Skipped because previous test did not pass'
|
62
73
|
|
63
74
|
assert_valid_resource
|
@@ -71,7 +82,7 @@ module DaVinciPDexTestKit
|
|
71
82
|
end
|
72
83
|
end
|
73
84
|
|
74
|
-
# TODO: convert to attestation
|
85
|
+
# TODO: convert to attestation
|
75
86
|
# test do
|
76
87
|
# title %{
|
77
88
|
# The resources returned SHALL include all the data covered by the meaningful use common data elements as
|
@@ -1,14 +1,11 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
1
|
require 'bulk_data_test_kit/v2.0.0/bulk_data_patient_export_test_group'
|
4
|
-
# require 'bulk_data_test_kit/v1.0.1/patient/bulk_data_patient_export_group'
|
5
2
|
require_relative 'export_patient_group'
|
6
3
|
require_relative 'export_validation_group'
|
7
4
|
|
8
5
|
module DaVinciTestKit
|
9
6
|
module PDexPayerServer
|
10
7
|
class WorkflowExportGroup < Inferno::TestGroup
|
11
|
-
id :
|
8
|
+
id :pdex_workflow_export
|
12
9
|
title 'Server can respond to FHIR Bulk $export requests on the matched patient'
|
13
10
|
short_title 'Bulk $export'
|
14
11
|
optional
|
@@ -27,41 +24,48 @@ module DaVinciTestKit
|
|
27
24
|
to be returned by Patient-level export. The tests require a Bulk Data Autthorization Bearer Token.
|
28
25
|
}
|
29
26
|
|
30
|
-
config(
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
27
|
+
config(
|
28
|
+
{
|
29
|
+
inputs: {
|
30
|
+
url: { name: :bulk_server_url },
|
31
|
+
bulk_export_url: { default: 'Patient/$export' },
|
32
|
+
smart_auth_info: {
|
33
|
+
name: :bulk_auth_info,
|
34
|
+
title: 'Bulk Data Authorization',
|
35
|
+
description: "The authorization information for $export access that is scoped to the same patient found by $member-match or entered as patient id. This is not necessarily the same authorization information that allows access to the server's $member-match.",
|
36
|
+
options: {
|
37
|
+
mode: 'access'
|
38
|
+
},
|
39
|
+
optional: true
|
40
|
+
}
|
41
|
+
}
|
36
42
|
}
|
37
|
-
|
43
|
+
)
|
38
44
|
|
39
45
|
input :url # inherit properties from test suite
|
40
46
|
|
41
|
-
input :bearer_token # inherit properties from parent
|
42
|
-
|
43
47
|
input :patient_id,
|
44
|
-
|
45
|
-
|
46
|
-
|
48
|
+
title: 'Patient ID',
|
49
|
+
description: 'Manual Patient ID for testing Clinical Query, $everything, and $export without $member-match.',
|
50
|
+
optional: true
|
47
51
|
|
48
52
|
# Required by Bulk Data tests
|
49
53
|
fhir_client :bulk_server do
|
50
54
|
url :url
|
51
|
-
|
55
|
+
# auth_info :bulk_auth_info # FIXME to respect config, workaround below:
|
56
|
+
headers { 'Authorization' => "Bearer #{bulk_auth_info.access_token}" }
|
52
57
|
end
|
53
58
|
|
54
59
|
http_client :bulk_server do
|
55
60
|
url :url
|
56
|
-
headers {'Authorization' => "Bearer #{
|
61
|
+
headers { 'Authorization' => "Bearer #{bulk_auth_info.access_token}" }
|
57
62
|
end
|
58
63
|
|
59
|
-
group from: :
|
64
|
+
group from: :pdex_patient_export
|
60
65
|
|
61
66
|
group from: :pdex_export_validation,
|
62
67
|
title: 'Patient Export Validation Tests',
|
63
68
|
optional: true
|
64
|
-
|
65
69
|
end
|
66
70
|
end
|
67
71
|
end
|