us_core_test_kit 0.6.3 → 0.6.5
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/lib/us_core_test_kit/custom_groups/smart_app_launch_group.rb +2 -2
- data/lib/us_core_test_kit/fhir_resource_navigation.rb +3 -3
- data/lib/us_core_test_kit/generated/v3.1.1/metadata.yml +10 -0
- data/lib/us_core_test_kit/generated/v3.1.1/patient/metadata.yml +10 -0
- data/lib/us_core_test_kit/generated/v3.1.1/us_core_test_suite.rb +2 -1
- data/lib/us_core_test_kit/generated/v4.0.0/metadata.yml +10 -0
- data/lib/us_core_test_kit/generated/v4.0.0/patient/metadata.yml +10 -0
- data/lib/us_core_test_kit/generated/v4.0.0/us_core_test_suite.rb +2 -1
- data/lib/us_core_test_kit/generated/v5.0.1/metadata.yml +21 -2
- data/lib/us_core_test_kit/generated/v5.0.1/patient/metadata.yml +6 -2
- data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/metadata.yml +155 -0
- data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/practitioner_role_must_support_test.rb +45 -0
- data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/practitioner_role_practitioner_search_test.rb +41 -0
- data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/practitioner_role_read_test.rb +26 -0
- data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/practitioner_role_reference_resolution_test.rb +43 -0
- data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/practitioner_role_specialty_search_test.rb +53 -0
- data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/practitioner_role_validation_test.rb +40 -0
- data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role_group.rb +89 -0
- data/lib/us_core_test_kit/generated/v5.0.1/us_core_test_suite.rb +4 -1
- data/lib/us_core_test_kit/generated/v6.1.0/metadata.yml +17 -2
- data/lib/us_core_test_kit/generated/v6.1.0/patient/metadata.yml +2 -2
- data/lib/us_core_test_kit/generated/v6.1.0/patient/patient_must_support_test.rb +0 -2
- data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/metadata.yml +155 -0
- data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/practitioner_role_must_support_test.rb +45 -0
- data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/practitioner_role_practitioner_search_test.rb +41 -0
- data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/practitioner_role_read_test.rb +26 -0
- data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/practitioner_role_reference_resolution_test.rb +43 -0
- data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/practitioner_role_specialty_search_test.rb +53 -0
- data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/practitioner_role_validation_test.rb +40 -0
- data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role_group.rb +89 -0
- data/lib/us_core_test_kit/generated/v6.1.0/us_core_test_suite.rb +4 -1
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/{vital_signs/vital_signs_patient_category_status_search_test.rb → location/location_address_city_search_test.rb} +7 -13
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/{vital_signs/vital_signs_patient_code_date_search_test.rb → location/location_address_postalcode_search_test.rb} +7 -14
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/location/location_address_search_test.rb +52 -0
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/location/location_address_state_search_test.rb +43 -0
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/{vital_signs/vital_signs_must_support_test.rb → location/location_must_support_test.rb} +17 -16
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/{vital_signs/vital_signs_patient_category_search_test.rb → location/location_name_search_test.rb} +7 -13
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/location/location_read_test.rb +26 -0
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/{vital_signs/vital_signs_reference_resolution_test.rb → location/location_reference_resolution_test.rb} +6 -6
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/{vital_signs/vital_signs_validation_test.rb → location/location_validation_test.rb} +7 -7
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/location/metadata.yml +194 -0
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/location_group.rb +93 -0
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/metadata.yml +38 -273
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/patient/metadata.yml +2 -2
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/patient/patient_must_support_test.rb +0 -2
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/practitioner_role/metadata.yml +160 -0
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/practitioner_role/practitioner_role_must_support_test.rb +45 -0
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/{vital_signs/vital_signs_patient_code_search_test.rb → practitioner_role/practitioner_role_practitioner_search_test.rb} +8 -20
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/practitioner_role/practitioner_role_read_test.rb +26 -0
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/practitioner_role/practitioner_role_reference_resolution_test.rb +43 -0
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/{vital_signs/vital_signs_patient_category_date_search_test.rb → practitioner_role/practitioner_role_specialty_search_test.rb} +8 -14
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/practitioner_role/practitioner_role_validation_test.rb +40 -0
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/practitioner_role_group.rb +89 -0
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/us_core_test_suite.rb +6 -3
- data/lib/us_core_test_kit/generator/group_generator.rb +2 -2
- data/lib/us_core_test_kit/generator/group_metadata.rb +3 -1
- data/lib/us_core_test_kit/generator/ig_metadata_extractor.rb +8 -1
- data/lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_3.rb +64 -18
- data/lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_4.rb +1 -18
- data/lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_5.rb +0 -15
- data/lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_6.rb +5 -2
- data/lib/us_core_test_kit/generator/special_cases.rb +17 -7
- data/lib/us_core_test_kit/granular_scope_checker.rb +1 -1
- data/lib/us_core_test_kit/version.rb +1 -1
- metadata +40 -94
- data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_abatement_date_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_asserted_date_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_category_clinical_status_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_category_encounter_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_category_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_clinical_status_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_code_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_onset_date_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_recorded_date_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_granular_scope1_group.rb +0 -38
- data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_granular_scope2_group.rb +0 -38
- data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_patient_category_date_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_patient_category_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_patient_code_date_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_patient_code_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_patient_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_patient_status_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_id_granular_scope_test.rb +0 -41
- data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_patient_category_date_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_patient_category_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_patient_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_patient_status_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_patient_type_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_patient_type_period_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/document_reference_granular_scope1_group.rb +0 -39
- data/lib/us_core_test_kit/generated/v6.1.0/document_reference_granular_scope2_group.rb +0 -39
- data/lib/us_core_test_kit/generated/v6.1.0/observation_lab/observation_patient_category_date_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/observation_lab/observation_patient_category_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/observation_lab/observation_patient_category_status_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/observation_lab/observation_patient_code_date_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/observation_lab/observation_patient_code_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_id_granular_scope_test.rb +0 -41
- data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_patient_category_authored_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_patient_category_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_patient_code_authored_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_patient_code_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_patient_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_patient_status_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v6.1.0/service_request_granular_scope1_group.rb +0 -39
- data/lib/us_core_test_kit/generated/v6.1.0/service_request_granular_scope2_group.rb +0 -40
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_abatement_date_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_asserted_date_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_category_clinical_status_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_category_encounter_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_category_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_clinical_status_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_code_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_onset_date_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_recorded_date_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/diagnostic_report_note/diagnostic_report_patient_category_date_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/diagnostic_report_note/diagnostic_report_patient_category_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/diagnostic_report_note/diagnostic_report_patient_code_date_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/diagnostic_report_note/diagnostic_report_patient_code_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/diagnostic_report_note/diagnostic_report_patient_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/diagnostic_report_note/diagnostic_report_patient_status_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_id_granular_scope_test.rb +0 -41
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_patient_category_date_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_patient_category_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_patient_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_patient_status_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_patient_type_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_patient_type_period_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference_granular_scope2_group.rb +0 -39
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/observation_lab/observation_patient_category_date_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/observation_lab/observation_patient_category_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/observation_lab/observation_patient_category_status_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/observation_lab/observation_patient_code_date_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/observation_lab/observation_patient_code_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_id_granular_scope_test.rb +0 -41
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_patient_category_authored_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_patient_category_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_patient_code_authored_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_patient_code_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_patient_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_patient_status_granular_scope_test.rb +0 -45
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/vital_signs/metadata.yml +0 -273
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/vital_signs/vital_signs_provenance_revinclude_search_test.rb +0 -53
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/vital_signs/vital_signs_read_test.rb +0 -26
- data/lib/us_core_test_kit/generated/v7.0.0-ballot/vital_signs_group.rb +0 -96
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
require_relative 'practitioner_role/practitioner_role_read_test'
|
|
2
|
+
require_relative 'practitioner_role/practitioner_role_specialty_search_test'
|
|
3
|
+
require_relative 'practitioner_role/practitioner_role_practitioner_search_test'
|
|
4
|
+
require_relative 'practitioner_role/practitioner_role_validation_test'
|
|
5
|
+
require_relative 'practitioner_role/practitioner_role_must_support_test'
|
|
6
|
+
require_relative 'practitioner_role/practitioner_role_reference_resolution_test'
|
|
7
|
+
|
|
8
|
+
module USCoreTestKit
|
|
9
|
+
module USCoreV610
|
|
10
|
+
class PractitionerRoleGroup < Inferno::TestGroup
|
|
11
|
+
title 'PractitionerRole Tests'
|
|
12
|
+
short_description 'Verify support for the server capabilities required by the US Core PractitionerRole Profile.'
|
|
13
|
+
description %(
|
|
14
|
+
# Background
|
|
15
|
+
|
|
16
|
+
The US Core PractitionerRole sequence verifies that the system under test is
|
|
17
|
+
able to provide correct responses for PractitionerRole queries. These queries
|
|
18
|
+
must contain resources conforming to the US Core PractitionerRole Profile as
|
|
19
|
+
specified in the US Core v6.1.0 Implementation Guide.
|
|
20
|
+
|
|
21
|
+
# Testing Methodology
|
|
22
|
+
## Searching
|
|
23
|
+
This test sequence will first perform each required search associated
|
|
24
|
+
with this resource. This sequence will perform searches with the
|
|
25
|
+
following parameters:
|
|
26
|
+
|
|
27
|
+
* specialty
|
|
28
|
+
* practitioner
|
|
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
|
+
PractitionerRole 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 PractitionerRole 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 [US Core PractitionerRole Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitionerrole). 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
|
+
|
|
72
|
+
id :us_core_v610_practitioner_role
|
|
73
|
+
run_as_group
|
|
74
|
+
optional
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def self.metadata
|
|
78
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'practitioner_role', 'metadata.yml'), aliases: true))
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
test from: :us_core_v610_practitioner_role_read_test
|
|
82
|
+
test from: :us_core_v610_practitioner_role_specialty_search_test
|
|
83
|
+
test from: :us_core_v610_practitioner_role_practitioner_search_test
|
|
84
|
+
test from: :us_core_v610_practitioner_role_validation_test
|
|
85
|
+
test from: :us_core_v610_practitioner_role_must_support_test
|
|
86
|
+
test from: :us_core_v610_practitioner_role_reference_resolution_test
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
@@ -50,6 +50,7 @@ require_relative 'questionnaire_response_group'
|
|
|
50
50
|
require_relative 'service_request_group'
|
|
51
51
|
require_relative 'organization_group'
|
|
52
52
|
require_relative 'practitioner_group'
|
|
53
|
+
require_relative 'practitioner_role_group'
|
|
53
54
|
require_relative 'provenance_group'
|
|
54
55
|
require_relative 'related_person_group'
|
|
55
56
|
require_relative 'specimen_group'
|
|
@@ -81,7 +82,8 @@ module USCoreTestKit
|
|
|
81
82
|
/Observation\.effective\.ofType\(Period\): .*us-core-1:/, # Invalid invariant in US Core v3.1.1
|
|
82
83
|
/Provenance.agent\[\d*\]: Rule provenance-1/, #Invalid invariant in US Core v5.0.1
|
|
83
84
|
%r{Unknown Code System 'http://hl7.org/fhir/us/core/CodeSystem/us-core-tags'}, # Validator has an issue with this US Core 5 code system in US Core 6 resource
|
|
84
|
-
%r{URL value 'http://hl7.org/fhir/us/core/CodeSystem/us-core-tags' does not resolve} # Validator has an issue with this US Core 5 code system in US Core 6 resource
|
|
85
|
+
%r{URL value 'http://hl7.org/fhir/us/core/CodeSystem/us-core-tags' does not resolve}, # Validator has an issue with this US Core 5 code system in US Core 6 resource
|
|
86
|
+
%r{Observation.component\[\d+\].value.ofType\(Quantity\): The code provided \(http://unitsofmeasure.org#L/min\) was not found in the value set 'Vital Signs Units'} # Known issue with the Pulse Oximetry Profile
|
|
85
87
|
].freeze
|
|
86
88
|
|
|
87
89
|
VERSION_SPECIFIC_MESSAGE_FILTERS = [].freeze
|
|
@@ -191,6 +193,7 @@ module USCoreTestKit
|
|
|
191
193
|
group from: :us_core_v610_service_request
|
|
192
194
|
group from: :us_core_v610_organization
|
|
193
195
|
group from: :us_core_v610_practitioner
|
|
196
|
+
group from: :us_core_v610_practitioner_role
|
|
194
197
|
group from: :us_core_v610_provenance
|
|
195
198
|
group from: :us_core_v610_related_person
|
|
196
199
|
group from: :us_core_v610_specimen
|
|
@@ -3,13 +3,13 @@ require_relative '../../../generator/group_metadata'
|
|
|
3
3
|
|
|
4
4
|
module USCoreTestKit
|
|
5
5
|
module USCoreV700_BALLOT
|
|
6
|
-
class
|
|
6
|
+
class LocationAddressCitySearchTest < Inferno::Test
|
|
7
7
|
include USCoreTestKit::SearchTest
|
|
8
8
|
|
|
9
|
-
title 'Server returns valid results for
|
|
9
|
+
title 'Server returns valid results for Location search by address-city'
|
|
10
10
|
description %(
|
|
11
11
|
A server SHOULD support searching by
|
|
12
|
-
|
|
12
|
+
address-city on the Location resource. This test
|
|
13
13
|
will pass if resources are returned and match the search criteria. If
|
|
14
14
|
none are returned, the test is skipped.
|
|
15
15
|
|
|
@@ -17,19 +17,13 @@ none are returned, the test is skipped.
|
|
|
17
17
|
|
|
18
18
|
)
|
|
19
19
|
|
|
20
|
-
id :
|
|
20
|
+
id :us_core_v700_ballot_location_address_city_search_test
|
|
21
21
|
optional
|
|
22
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
23
|
def self.properties
|
|
28
24
|
@properties ||= SearchTestProperties.new(
|
|
29
|
-
resource_type: '
|
|
30
|
-
search_param_names: ['
|
|
31
|
-
token_search_params: ['category'],
|
|
32
|
-
multiple_or_search_params: ['status']
|
|
25
|
+
resource_type: 'Location',
|
|
26
|
+
search_param_names: ['address-city']
|
|
33
27
|
)
|
|
34
28
|
end
|
|
35
29
|
|
|
@@ -38,7 +32,7 @@ none are returned, the test is skipped.
|
|
|
38
32
|
end
|
|
39
33
|
|
|
40
34
|
def scratch_resources
|
|
41
|
-
scratch[:
|
|
35
|
+
scratch[:location_resources] ||= {}
|
|
42
36
|
end
|
|
43
37
|
|
|
44
38
|
run do
|
|
@@ -3,13 +3,13 @@ require_relative '../../../generator/group_metadata'
|
|
|
3
3
|
|
|
4
4
|
module USCoreTestKit
|
|
5
5
|
module USCoreV700_BALLOT
|
|
6
|
-
class
|
|
6
|
+
class LocationAddressPostalcodeSearchTest < Inferno::Test
|
|
7
7
|
include USCoreTestKit::SearchTest
|
|
8
8
|
|
|
9
|
-
title 'Server returns valid results for
|
|
9
|
+
title 'Server returns valid results for Location search by address-postalcode'
|
|
10
10
|
description %(
|
|
11
11
|
A server SHOULD support searching by
|
|
12
|
-
|
|
12
|
+
address-postalcode on the Location resource. This test
|
|
13
13
|
will pass if resources are returned and match the search criteria. If
|
|
14
14
|
none are returned, the test is skipped.
|
|
15
15
|
|
|
@@ -17,20 +17,13 @@ none are returned, the test is skipped.
|
|
|
17
17
|
|
|
18
18
|
)
|
|
19
19
|
|
|
20
|
-
id :
|
|
20
|
+
id :us_core_v700_ballot_location_address_postalcode_search_test
|
|
21
21
|
optional
|
|
22
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
23
|
def self.properties
|
|
28
24
|
@properties ||= SearchTestProperties.new(
|
|
29
|
-
resource_type: '
|
|
30
|
-
search_param_names: ['
|
|
31
|
-
possible_status_search: true,
|
|
32
|
-
token_search_params: ['code'],
|
|
33
|
-
params_with_comparators: ['date']
|
|
25
|
+
resource_type: 'Location',
|
|
26
|
+
search_param_names: ['address-postalcode']
|
|
34
27
|
)
|
|
35
28
|
end
|
|
36
29
|
|
|
@@ -39,7 +32,7 @@ none are returned, the test is skipped.
|
|
|
39
32
|
end
|
|
40
33
|
|
|
41
34
|
def scratch_resources
|
|
42
|
-
scratch[:
|
|
35
|
+
scratch[:location_resources] ||= {}
|
|
43
36
|
end
|
|
44
37
|
|
|
45
38
|
run do
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
require_relative '../../../search_test'
|
|
2
|
+
require_relative '../../../generator/group_metadata'
|
|
3
|
+
|
|
4
|
+
module USCoreTestKit
|
|
5
|
+
module USCoreV700_BALLOT
|
|
6
|
+
class LocationAddressSearchTest < Inferno::Test
|
|
7
|
+
include USCoreTestKit::SearchTest
|
|
8
|
+
|
|
9
|
+
title 'Server returns valid results for Location search by address'
|
|
10
|
+
description %(
|
|
11
|
+
A server SHALL support searching by
|
|
12
|
+
address on the Location resource. This test
|
|
13
|
+
will pass if resources are returned and match the search criteria. If
|
|
14
|
+
none are returned, the test is skipped.
|
|
15
|
+
|
|
16
|
+
Because this is the first search of the sequence, resources in the
|
|
17
|
+
response will be used for subsequent tests.
|
|
18
|
+
|
|
19
|
+
Additionally, this test will check that GET and POST search methods
|
|
20
|
+
return the same number of results. Search by POST is required by the
|
|
21
|
+
FHIR R4 specification, and these tests interpret search by GET as a
|
|
22
|
+
requirement of US Core v7.0.0-ballot.
|
|
23
|
+
|
|
24
|
+
[US Core Server CapabilityStatement](http://hl7.org/fhir/us/core//CapabilityStatement-us-core-server.html)
|
|
25
|
+
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
id :us_core_v700_ballot_location_address_search_test
|
|
29
|
+
def self.properties
|
|
30
|
+
@properties ||= SearchTestProperties.new(
|
|
31
|
+
first_search: true,
|
|
32
|
+
resource_type: 'Location',
|
|
33
|
+
search_param_names: ['address'],
|
|
34
|
+
saves_delayed_references: true,
|
|
35
|
+
test_post_search: true
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def self.metadata
|
|
40
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def scratch_resources
|
|
44
|
+
scratch[:location_resources] ||= {}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
run do
|
|
48
|
+
run_search_test
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
data/lib/us_core_test_kit/generated/v7.0.0-ballot/location/location_address_state_search_test.rb
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
require_relative '../../../search_test'
|
|
2
|
+
require_relative '../../../generator/group_metadata'
|
|
3
|
+
|
|
4
|
+
module USCoreTestKit
|
|
5
|
+
module USCoreV700_BALLOT
|
|
6
|
+
class LocationAddressStateSearchTest < Inferno::Test
|
|
7
|
+
include USCoreTestKit::SearchTest
|
|
8
|
+
|
|
9
|
+
title 'Server returns valid results for Location search by address-state'
|
|
10
|
+
description %(
|
|
11
|
+
A server SHOULD support searching by
|
|
12
|
+
address-state on the Location resource. This test
|
|
13
|
+
will pass if resources are returned and match the search criteria. If
|
|
14
|
+
none are returned, the test is skipped.
|
|
15
|
+
|
|
16
|
+
[US Core Server CapabilityStatement](http://hl7.org/fhir/us/core//CapabilityStatement-us-core-server.html)
|
|
17
|
+
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
id :us_core_v700_ballot_location_address_state_search_test
|
|
21
|
+
optional
|
|
22
|
+
|
|
23
|
+
def self.properties
|
|
24
|
+
@properties ||= SearchTestProperties.new(
|
|
25
|
+
resource_type: 'Location',
|
|
26
|
+
search_param_names: ['address-state']
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def self.metadata
|
|
31
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def scratch_resources
|
|
35
|
+
scratch[:location_resources] ||= {}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
run do
|
|
39
|
+
run_search_test
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -2,32 +2,33 @@ require_relative '../../../must_support_test'
|
|
|
2
2
|
|
|
3
3
|
module USCoreTestKit
|
|
4
4
|
module USCoreV700_BALLOT
|
|
5
|
-
class
|
|
5
|
+
class LocationMustSupportTest < Inferno::Test
|
|
6
6
|
include USCoreTestKit::MustSupportTest
|
|
7
7
|
|
|
8
|
-
title 'All must support elements are provided in the
|
|
8
|
+
title 'All must support elements are provided in the Location resources returned'
|
|
9
9
|
description %(
|
|
10
10
|
US Core Responders SHALL be capable of populating all data elements as
|
|
11
11
|
part of the query results as specified by the US Core Server Capability
|
|
12
|
-
Statement. This test will look through the
|
|
12
|
+
Statement. This test will look through the Location resources
|
|
13
13
|
found previously for the following must support elements:
|
|
14
14
|
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
15
|
+
* Location.address
|
|
16
|
+
* Location.address.city
|
|
17
|
+
* Location.address.line
|
|
18
|
+
* Location.address.postalCode
|
|
19
|
+
* Location.address.state
|
|
20
|
+
* Location.identifier
|
|
21
|
+
* Location.managingOrganization
|
|
22
|
+
* Location.name
|
|
23
|
+
* Location.status
|
|
24
|
+
* Location.telecom
|
|
25
|
+
* Location.type
|
|
25
26
|
)
|
|
26
27
|
|
|
27
|
-
id :
|
|
28
|
+
id :us_core_v700_ballot_location_must_support_test
|
|
28
29
|
|
|
29
30
|
def resource_type
|
|
30
|
-
'
|
|
31
|
+
'Location'
|
|
31
32
|
end
|
|
32
33
|
|
|
33
34
|
def self.metadata
|
|
@@ -35,7 +36,7 @@ module USCoreTestKit
|
|
|
35
36
|
end
|
|
36
37
|
|
|
37
38
|
def scratch_resources
|
|
38
|
-
scratch[:
|
|
39
|
+
scratch[:location_resources] ||= {}
|
|
39
40
|
end
|
|
40
41
|
|
|
41
42
|
run do
|
|
@@ -3,13 +3,13 @@ require_relative '../../../generator/group_metadata'
|
|
|
3
3
|
|
|
4
4
|
module USCoreTestKit
|
|
5
5
|
module USCoreV700_BALLOT
|
|
6
|
-
class
|
|
6
|
+
class LocationNameSearchTest < Inferno::Test
|
|
7
7
|
include USCoreTestKit::SearchTest
|
|
8
8
|
|
|
9
|
-
title 'Server returns valid results for
|
|
9
|
+
title 'Server returns valid results for Location search by name'
|
|
10
10
|
description %(
|
|
11
11
|
A server SHALL support searching by
|
|
12
|
-
|
|
12
|
+
name on the Location resource. This test
|
|
13
13
|
will pass if resources are returned and match the search criteria. If
|
|
14
14
|
none are returned, the test is skipped.
|
|
15
15
|
|
|
@@ -17,17 +17,11 @@ none are returned, the test is skipped.
|
|
|
17
17
|
|
|
18
18
|
)
|
|
19
19
|
|
|
20
|
-
id :
|
|
21
|
-
input :patient_ids,
|
|
22
|
-
title: 'Patient IDs',
|
|
23
|
-
description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
|
|
24
|
-
|
|
20
|
+
id :us_core_v700_ballot_location_name_search_test
|
|
25
21
|
def self.properties
|
|
26
22
|
@properties ||= SearchTestProperties.new(
|
|
27
|
-
resource_type: '
|
|
28
|
-
search_param_names: ['
|
|
29
|
-
possible_status_search: true,
|
|
30
|
-
token_search_params: ['category']
|
|
23
|
+
resource_type: 'Location',
|
|
24
|
+
search_param_names: ['name']
|
|
31
25
|
)
|
|
32
26
|
end
|
|
33
27
|
|
|
@@ -36,7 +30,7 @@ none are returned, the test is skipped.
|
|
|
36
30
|
end
|
|
37
31
|
|
|
38
32
|
def scratch_resources
|
|
39
|
-
scratch[:
|
|
33
|
+
scratch[:location_resources] ||= {}
|
|
40
34
|
end
|
|
41
35
|
|
|
42
36
|
run do
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
require_relative '../../../read_test'
|
|
2
|
+
|
|
3
|
+
module USCoreTestKit
|
|
4
|
+
module USCoreV700_BALLOT
|
|
5
|
+
class LocationReadTest < Inferno::Test
|
|
6
|
+
include USCoreTestKit::ReadTest
|
|
7
|
+
|
|
8
|
+
title 'Server returns correct Location resource from Location read interaction'
|
|
9
|
+
description 'A server SHALL support the Location read interaction.'
|
|
10
|
+
|
|
11
|
+
id :us_core_v700_ballot_location_read_test
|
|
12
|
+
|
|
13
|
+
def resource_type
|
|
14
|
+
'Location'
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def scratch_resources
|
|
18
|
+
scratch[:location_resources] ||= {}
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
run do
|
|
22
|
+
perform_read_test(scratch.dig(:references, 'Location'))
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -2,10 +2,10 @@ require_relative '../../../reference_resolution_test'
|
|
|
2
2
|
|
|
3
3
|
module USCoreTestKit
|
|
4
4
|
module USCoreV700_BALLOT
|
|
5
|
-
class
|
|
5
|
+
class LocationReferenceResolutionTest < Inferno::Test
|
|
6
6
|
include USCoreTestKit::ReferenceResolutionTest
|
|
7
7
|
|
|
8
|
-
title 'MustSupport references within
|
|
8
|
+
title 'MustSupport references within Location resources are valid'
|
|
9
9
|
description %(
|
|
10
10
|
This test will attempt to read external references provided within elements
|
|
11
11
|
marked as 'MustSupport', if any are available.
|
|
@@ -15,13 +15,13 @@ module USCoreTestKit
|
|
|
15
15
|
|
|
16
16
|
Elements which may provide external references include:
|
|
17
17
|
|
|
18
|
-
*
|
|
18
|
+
* Location.managingOrganization
|
|
19
19
|
)
|
|
20
20
|
|
|
21
|
-
id :
|
|
21
|
+
id :us_core_v700_ballot_location_reference_resolution_test
|
|
22
22
|
|
|
23
23
|
def resource_type
|
|
24
|
-
'
|
|
24
|
+
'Location'
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
def self.metadata
|
|
@@ -29,7 +29,7 @@ module USCoreTestKit
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def scratch_resources
|
|
32
|
-
scratch[:
|
|
32
|
+
scratch[:location_resources] ||= {}
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
run do
|
|
@@ -2,14 +2,14 @@ require_relative '../../../validation_test'
|
|
|
2
2
|
|
|
3
3
|
module USCoreTestKit
|
|
4
4
|
module USCoreV700_BALLOT
|
|
5
|
-
class
|
|
5
|
+
class LocationValidationTest < Inferno::Test
|
|
6
6
|
include USCoreTestKit::ValidationTest
|
|
7
7
|
|
|
8
|
-
id :
|
|
9
|
-
title '
|
|
8
|
+
id :us_core_v700_ballot_location_validation_test
|
|
9
|
+
title 'Location resources returned during previous tests conform to the US Core Location Profile'
|
|
10
10
|
description %(
|
|
11
11
|
This test verifies resources returned from the first search conform to
|
|
12
|
-
the [US Core
|
|
12
|
+
the [US Core Location Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-location).
|
|
13
13
|
Systems must demonstrate at least one valid example in order to pass this test.
|
|
14
14
|
|
|
15
15
|
It verifies the presence of mandatory elements and that elements with
|
|
@@ -22,16 +22,16 @@ fail if their code/system are not found in the valueset.
|
|
|
22
22
|
output :dar_code_found, :dar_extension_found
|
|
23
23
|
|
|
24
24
|
def resource_type
|
|
25
|
-
'
|
|
25
|
+
'Location'
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
def scratch_resources
|
|
29
|
-
scratch[:
|
|
29
|
+
scratch[:location_resources] ||= {}
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
run do
|
|
33
33
|
perform_validation_test(scratch_resources[:all] || [],
|
|
34
|
-
'http://hl7.org/fhir/us/core/StructureDefinition/us-core-
|
|
34
|
+
'http://hl7.org/fhir/us/core/StructureDefinition/us-core-location',
|
|
35
35
|
'7.0.0-ballot',
|
|
36
36
|
skip_if_empty: true)
|
|
37
37
|
end
|