us_core_test_kit 0.6.3 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/lib/us_core_test_kit/custom_groups/smart_app_launch_group.rb +2 -2
  3. data/lib/us_core_test_kit/fhir_resource_navigation.rb +3 -3
  4. data/lib/us_core_test_kit/generated/v3.1.1/metadata.yml +10 -0
  5. data/lib/us_core_test_kit/generated/v3.1.1/patient/metadata.yml +10 -0
  6. data/lib/us_core_test_kit/generated/v3.1.1/us_core_test_suite.rb +2 -1
  7. data/lib/us_core_test_kit/generated/v4.0.0/metadata.yml +10 -0
  8. data/lib/us_core_test_kit/generated/v4.0.0/patient/metadata.yml +10 -0
  9. data/lib/us_core_test_kit/generated/v4.0.0/us_core_test_suite.rb +2 -1
  10. data/lib/us_core_test_kit/generated/v5.0.1/metadata.yml +21 -2
  11. data/lib/us_core_test_kit/generated/v5.0.1/patient/metadata.yml +6 -2
  12. data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/metadata.yml +155 -0
  13. data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/practitioner_role_must_support_test.rb +45 -0
  14. data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/practitioner_role_practitioner_search_test.rb +41 -0
  15. data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/practitioner_role_read_test.rb +26 -0
  16. data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/practitioner_role_reference_resolution_test.rb +43 -0
  17. data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/practitioner_role_specialty_search_test.rb +53 -0
  18. data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/practitioner_role_validation_test.rb +40 -0
  19. data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role_group.rb +89 -0
  20. data/lib/us_core_test_kit/generated/v5.0.1/us_core_test_suite.rb +4 -1
  21. data/lib/us_core_test_kit/generated/v6.1.0/metadata.yml +17 -2
  22. data/lib/us_core_test_kit/generated/v6.1.0/patient/metadata.yml +2 -2
  23. data/lib/us_core_test_kit/generated/v6.1.0/patient/patient_must_support_test.rb +0 -2
  24. data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/metadata.yml +155 -0
  25. data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/practitioner_role_must_support_test.rb +45 -0
  26. data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/practitioner_role_practitioner_search_test.rb +41 -0
  27. data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/practitioner_role_read_test.rb +26 -0
  28. data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/practitioner_role_reference_resolution_test.rb +43 -0
  29. data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/practitioner_role_specialty_search_test.rb +53 -0
  30. data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/practitioner_role_validation_test.rb +40 -0
  31. data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role_group.rb +89 -0
  32. data/lib/us_core_test_kit/generated/v6.1.0/us_core_test_suite.rb +4 -1
  33. 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
  34. 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
  35. data/lib/us_core_test_kit/generated/v7.0.0-ballot/location/location_address_search_test.rb +52 -0
  36. data/lib/us_core_test_kit/generated/v7.0.0-ballot/location/location_address_state_search_test.rb +43 -0
  37. 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
  38. 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
  39. data/lib/us_core_test_kit/generated/v7.0.0-ballot/location/location_read_test.rb +26 -0
  40. 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
  41. 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
  42. data/lib/us_core_test_kit/generated/v7.0.0-ballot/location/metadata.yml +194 -0
  43. data/lib/us_core_test_kit/generated/v7.0.0-ballot/location_group.rb +93 -0
  44. data/lib/us_core_test_kit/generated/v7.0.0-ballot/metadata.yml +38 -273
  45. data/lib/us_core_test_kit/generated/v7.0.0-ballot/patient/metadata.yml +2 -2
  46. data/lib/us_core_test_kit/generated/v7.0.0-ballot/patient/patient_must_support_test.rb +0 -2
  47. data/lib/us_core_test_kit/generated/v7.0.0-ballot/practitioner_role/metadata.yml +160 -0
  48. data/lib/us_core_test_kit/generated/v7.0.0-ballot/practitioner_role/practitioner_role_must_support_test.rb +45 -0
  49. 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
  50. data/lib/us_core_test_kit/generated/v7.0.0-ballot/practitioner_role/practitioner_role_read_test.rb +26 -0
  51. data/lib/us_core_test_kit/generated/v7.0.0-ballot/practitioner_role/practitioner_role_reference_resolution_test.rb +43 -0
  52. 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
  53. data/lib/us_core_test_kit/generated/v7.0.0-ballot/practitioner_role/practitioner_role_validation_test.rb +40 -0
  54. data/lib/us_core_test_kit/generated/v7.0.0-ballot/practitioner_role_group.rb +89 -0
  55. data/lib/us_core_test_kit/generated/v7.0.0-ballot/us_core_test_suite.rb +6 -3
  56. data/lib/us_core_test_kit/generator/group_generator.rb +2 -2
  57. data/lib/us_core_test_kit/generator/group_metadata.rb +3 -1
  58. data/lib/us_core_test_kit/generator/ig_metadata_extractor.rb +8 -1
  59. data/lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_3.rb +64 -18
  60. data/lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_4.rb +1 -18
  61. data/lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_5.rb +0 -15
  62. data/lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_6.rb +5 -2
  63. data/lib/us_core_test_kit/generator/special_cases.rb +17 -7
  64. data/lib/us_core_test_kit/granular_scope_checker.rb +1 -1
  65. data/lib/us_core_test_kit/version.rb +1 -1
  66. metadata +40 -94
  67. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_abatement_date_granular_scope_test.rb +0 -45
  68. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_asserted_date_granular_scope_test.rb +0 -45
  69. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_category_clinical_status_granular_scope_test.rb +0 -45
  70. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_category_encounter_granular_scope_test.rb +0 -45
  71. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_category_granular_scope_test.rb +0 -45
  72. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_clinical_status_granular_scope_test.rb +0 -45
  73. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_code_granular_scope_test.rb +0 -45
  74. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_granular_scope_test.rb +0 -45
  75. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_onset_date_granular_scope_test.rb +0 -45
  76. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_recorded_date_granular_scope_test.rb +0 -45
  77. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_granular_scope1_group.rb +0 -38
  78. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_granular_scope2_group.rb +0 -38
  79. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_patient_category_date_granular_scope_test.rb +0 -45
  80. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_patient_category_granular_scope_test.rb +0 -45
  81. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_patient_code_date_granular_scope_test.rb +0 -45
  82. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_patient_code_granular_scope_test.rb +0 -45
  83. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_patient_granular_scope_test.rb +0 -45
  84. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_patient_status_granular_scope_test.rb +0 -45
  85. data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_id_granular_scope_test.rb +0 -41
  86. data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_patient_category_date_granular_scope_test.rb +0 -45
  87. data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_patient_category_granular_scope_test.rb +0 -45
  88. data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_patient_granular_scope_test.rb +0 -45
  89. data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_patient_status_granular_scope_test.rb +0 -45
  90. data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_patient_type_granular_scope_test.rb +0 -45
  91. data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_patient_type_period_granular_scope_test.rb +0 -45
  92. data/lib/us_core_test_kit/generated/v6.1.0/document_reference_granular_scope1_group.rb +0 -39
  93. data/lib/us_core_test_kit/generated/v6.1.0/document_reference_granular_scope2_group.rb +0 -39
  94. data/lib/us_core_test_kit/generated/v6.1.0/observation_lab/observation_patient_category_date_granular_scope_test.rb +0 -45
  95. data/lib/us_core_test_kit/generated/v6.1.0/observation_lab/observation_patient_category_granular_scope_test.rb +0 -45
  96. data/lib/us_core_test_kit/generated/v6.1.0/observation_lab/observation_patient_category_status_granular_scope_test.rb +0 -45
  97. data/lib/us_core_test_kit/generated/v6.1.0/observation_lab/observation_patient_code_date_granular_scope_test.rb +0 -45
  98. data/lib/us_core_test_kit/generated/v6.1.0/observation_lab/observation_patient_code_granular_scope_test.rb +0 -45
  99. data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_id_granular_scope_test.rb +0 -41
  100. data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_patient_category_authored_granular_scope_test.rb +0 -45
  101. data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_patient_category_granular_scope_test.rb +0 -45
  102. data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_patient_code_authored_granular_scope_test.rb +0 -45
  103. data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_patient_code_granular_scope_test.rb +0 -45
  104. data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_patient_granular_scope_test.rb +0 -45
  105. data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_patient_status_granular_scope_test.rb +0 -45
  106. data/lib/us_core_test_kit/generated/v6.1.0/service_request_granular_scope1_group.rb +0 -39
  107. data/lib/us_core_test_kit/generated/v6.1.0/service_request_granular_scope2_group.rb +0 -40
  108. data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_abatement_date_granular_scope_test.rb +0 -45
  109. data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_asserted_date_granular_scope_test.rb +0 -45
  110. 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
  111. data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_category_encounter_granular_scope_test.rb +0 -45
  112. data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_category_granular_scope_test.rb +0 -45
  113. data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_clinical_status_granular_scope_test.rb +0 -45
  114. data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_code_granular_scope_test.rb +0 -45
  115. data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_granular_scope_test.rb +0 -45
  116. data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_onset_date_granular_scope_test.rb +0 -45
  117. data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_recorded_date_granular_scope_test.rb +0 -45
  118. 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
  119. data/lib/us_core_test_kit/generated/v7.0.0-ballot/diagnostic_report_note/diagnostic_report_patient_category_granular_scope_test.rb +0 -45
  120. 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
  121. data/lib/us_core_test_kit/generated/v7.0.0-ballot/diagnostic_report_note/diagnostic_report_patient_code_granular_scope_test.rb +0 -45
  122. data/lib/us_core_test_kit/generated/v7.0.0-ballot/diagnostic_report_note/diagnostic_report_patient_granular_scope_test.rb +0 -45
  123. data/lib/us_core_test_kit/generated/v7.0.0-ballot/diagnostic_report_note/diagnostic_report_patient_status_granular_scope_test.rb +0 -45
  124. data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_id_granular_scope_test.rb +0 -41
  125. data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_patient_category_date_granular_scope_test.rb +0 -45
  126. data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_patient_category_granular_scope_test.rb +0 -45
  127. data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_patient_granular_scope_test.rb +0 -45
  128. data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_patient_status_granular_scope_test.rb +0 -45
  129. data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_patient_type_granular_scope_test.rb +0 -45
  130. data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_patient_type_period_granular_scope_test.rb +0 -45
  131. data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference_granular_scope2_group.rb +0 -39
  132. data/lib/us_core_test_kit/generated/v7.0.0-ballot/observation_lab/observation_patient_category_date_granular_scope_test.rb +0 -45
  133. data/lib/us_core_test_kit/generated/v7.0.0-ballot/observation_lab/observation_patient_category_granular_scope_test.rb +0 -45
  134. data/lib/us_core_test_kit/generated/v7.0.0-ballot/observation_lab/observation_patient_category_status_granular_scope_test.rb +0 -45
  135. data/lib/us_core_test_kit/generated/v7.0.0-ballot/observation_lab/observation_patient_code_date_granular_scope_test.rb +0 -45
  136. data/lib/us_core_test_kit/generated/v7.0.0-ballot/observation_lab/observation_patient_code_granular_scope_test.rb +0 -45
  137. data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_id_granular_scope_test.rb +0 -41
  138. data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_patient_category_authored_granular_scope_test.rb +0 -45
  139. data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_patient_category_granular_scope_test.rb +0 -45
  140. data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_patient_code_authored_granular_scope_test.rb +0 -45
  141. data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_patient_code_granular_scope_test.rb +0 -45
  142. data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_patient_granular_scope_test.rb +0 -45
  143. data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_patient_status_granular_scope_test.rb +0 -45
  144. data/lib/us_core_test_kit/generated/v7.0.0-ballot/vital_signs/metadata.yml +0 -273
  145. data/lib/us_core_test_kit/generated/v7.0.0-ballot/vital_signs/vital_signs_provenance_revinclude_search_test.rb +0 -53
  146. data/lib/us_core_test_kit/generated/v7.0.0-ballot/vital_signs/vital_signs_read_test.rb +0 -26
  147. 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 USCoreV501
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 v5.0.1 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_v501_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_v501_practitioner_role_read_test
82
+ test from: :us_core_v501_practitioner_role_specialty_search_test
83
+ test from: :us_core_v501_practitioner_role_practitioner_search_test
84
+ test from: :us_core_v501_practitioner_role_validation_test
85
+ test from: :us_core_v501_practitioner_role_must_support_test
86
+ test from: :us_core_v501_practitioner_role_reference_resolution_test
87
+ end
88
+ end
89
+ end
@@ -45,6 +45,7 @@ require_relative 'questionnaire_response_group'
45
45
  require_relative 'service_request_group'
46
46
  require_relative 'organization_group'
47
47
  require_relative 'practitioner_group'
48
+ require_relative 'practitioner_role_group'
48
49
  require_relative 'provenance_group'
49
50
  require_relative 'related_person_group'
50
51
 
@@ -75,7 +76,8 @@ module USCoreTestKit
75
76
  /Observation\.effective\.ofType\(Period\): .*us-core-1:/, # Invalid invariant in US Core v3.1.1
76
77
  /Provenance.agent\[\d*\]: Rule provenance-1/, #Invalid invariant in US Core v5.0.1
77
78
  %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
78
- %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
79
+ %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
80
+ %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
79
81
  ].freeze
80
82
 
81
83
  VERSION_SPECIFIC_MESSAGE_FILTERS = [].freeze
@@ -175,6 +177,7 @@ module USCoreTestKit
175
177
  group from: :us_core_v501_service_request
176
178
  group from: :us_core_v501_organization
177
179
  group from: :us_core_v501_practitioner
180
+ group from: :us_core_v501_practitioner_role
178
181
  group from: :us_core_v501_provenance
179
182
  group from: :us_core_v501_related_person
180
183
  group from: :us_core_v400_clinical_notes_guidance
@@ -10396,7 +10396,7 @@
10396
10396
  - :path: name.given
10397
10397
  - :path: name.suffix
10398
10398
  :uscdi_only: true
10399
- - :path: name.period
10399
+ - :path: name.period.end
10400
10400
  :uscdi_only: true
10401
10401
  - :path: telecom
10402
10402
  :uscdi_only: true
@@ -10419,7 +10419,7 @@
10419
10419
  - :path: address.city
10420
10420
  - :path: address.state
10421
10421
  - :path: address.postalCode
10422
- - :path: address.period
10422
+ - :path: address.period.end
10423
10423
  :uscdi_only: true
10424
10424
  - :path: communication
10425
10425
  :uscdi_only: true
@@ -10880,6 +10880,21 @@
10880
10880
  - :path: PractitionerRole.endpoint
10881
10881
  :profiles:
10882
10882
  - http://hl7.org/fhir/StructureDefinition/Endpoint
10883
+ :tests:
10884
+ - :id: us_core_v610_practitioner_role_read_test
10885
+ :file_name: practitioner_role_read_test.rb
10886
+ - :id: us_core_v610_practitioner_role_specialty_search_test
10887
+ :file_name: practitioner_role_specialty_search_test.rb
10888
+ - :id: us_core_v610_practitioner_role_practitioner_search_test
10889
+ :file_name: practitioner_role_practitioner_search_test.rb
10890
+ - :id: us_core_v610_practitioner_role_validation_test
10891
+ :file_name: practitioner_role_validation_test.rb
10892
+ - :id: us_core_v610_practitioner_role_must_support_test
10893
+ :file_name: practitioner_role_must_support_test.rb
10894
+ - :id: us_core_v610_practitioner_role_reference_resolution_test
10895
+ :file_name: practitioner_role_reference_resolution_test.rb
10896
+ :id: us_core_v610_practitioner_role
10897
+ :file_name: practitioner_role_group.rb
10883
10898
  :delayed_references:
10884
10899
  - :path: practitioner
10885
10900
  :resources:
@@ -200,7 +200,7 @@
200
200
  - :path: name.given
201
201
  - :path: name.suffix
202
202
  :uscdi_only: true
203
- - :path: name.period
203
+ - :path: name.period.end
204
204
  :uscdi_only: true
205
205
  - :path: telecom
206
206
  :uscdi_only: true
@@ -223,7 +223,7 @@
223
223
  - :path: address.city
224
224
  - :path: address.state
225
225
  - :path: address.postalCode
226
- - :path: address.period
226
+ - :path: address.period.end
227
227
  :uscdi_only: true
228
228
  - :path: communication
229
229
  :uscdi_only: true
@@ -28,7 +28,6 @@ module USCoreTestKit
28
28
 
29
29
  For ONC USCDI requirements, each Patient must support the following additional elements:
30
30
 
31
- * Patient.address.period
32
31
  * Patient.address.period.end or Patient.address.use
33
32
  * Patient.communication
34
33
  * Patient.communication.language
@@ -38,7 +37,6 @@ module USCoreTestKit
38
37
  * Patient.extension:race
39
38
  * Patient.extension:sex
40
39
  * Patient.extension:tribalAffiliation
41
- * Patient.name.period
42
40
  * Patient.name.period.end or Patient.name.use
43
41
  * Patient.name.suffix
44
42
  * Patient.telecom
@@ -0,0 +1,155 @@
1
+ ---
2
+ :name: us_core_practitionerrole
3
+ :class_name: USCorev610PractitionerroleSequence
4
+ :version: v6.1.0
5
+ :reformatted_version: v610
6
+ :resource: PractitionerRole
7
+ :profile_url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitionerrole
8
+ :profile_name: US Core PractitionerRole Profile
9
+ :profile_version: 6.1.0
10
+ :title: PractitionerRole
11
+ :short_description: Verify support for the server capabilities required by the US
12
+ Core PractitionerRole Profile.
13
+ :is_delayed: true
14
+ :interactions:
15
+ - :code: create
16
+ :expectation: MAY
17
+ - :code: search-type
18
+ :expectation: SHALL
19
+ - :code: read
20
+ :expectation: SHALL
21
+ - :code: vread
22
+ :expectation: SHOULD
23
+ - :code: update
24
+ :expectation: MAY
25
+ - :code: patch
26
+ :expectation: MAY
27
+ - :code: delete
28
+ :expectation: MAY
29
+ - :code: history-instance
30
+ :expectation: SHOULD
31
+ - :code: history-type
32
+ :expectation: MAY
33
+ :operations: []
34
+ :searches:
35
+ - :names:
36
+ - specialty
37
+ :expectation: SHALL
38
+ :names_not_must_support_or_mandatory: []
39
+ :must_support_or_mandatory: true
40
+ - :names:
41
+ - practitioner
42
+ :expectation: SHALL
43
+ :names_not_must_support_or_mandatory: []
44
+ :must_support_or_mandatory: true
45
+ :search_definitions:
46
+ :specialty:
47
+ :paths:
48
+ - specialty
49
+ :full_paths:
50
+ - PractitionerRole.specialty
51
+ :comparators: {}
52
+ :values: []
53
+ :type: CodeableConcept
54
+ :contains_multiple: true
55
+ :multiple_or: MAY
56
+ :practitioner:
57
+ :paths:
58
+ - practitioner
59
+ :full_paths:
60
+ - PractitionerRole.practitioner
61
+ :comparators: {}
62
+ :values: []
63
+ :type: Reference
64
+ :contains_multiple: false
65
+ :multiple_or: MAY
66
+ :chain:
67
+ - :chain: identifier
68
+ :expectation: SHALL
69
+ - :chain: name
70
+ :expectation: SHALL
71
+ :include_params:
72
+ - PractitionerRole:endpoint
73
+ - PractitionerRole:practitioner
74
+ :revincludes: []
75
+ :required_concepts: []
76
+ :must_supports:
77
+ :extensions: []
78
+ :slices: []
79
+ :elements:
80
+ - :path: practitioner
81
+ :types:
82
+ - Reference
83
+ :target_profiles:
84
+ - http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
85
+ - :path: organization
86
+ :types:
87
+ - Reference
88
+ :target_profiles:
89
+ - http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
90
+ - :path: code
91
+ - :path: specialty
92
+ - :path: location
93
+ :types:
94
+ - Reference
95
+ - :path: telecom
96
+ - :path: telecom.system
97
+ - :path: telecom.value
98
+ - :path: endpoint
99
+ :types:
100
+ - Reference
101
+ :mandatory_elements:
102
+ - PractitionerRole.telecom.system
103
+ - PractitionerRole.telecom.value
104
+ - PractitionerRole.notAvailable.description
105
+ :bindings:
106
+ - :type: code
107
+ :strength: required
108
+ :system: http://hl7.org/fhir/ValueSet/contact-point-system
109
+ :path: telecom.system
110
+ - :type: code
111
+ :strength: required
112
+ :system: http://hl7.org/fhir/ValueSet/contact-point-use
113
+ :path: telecom.use
114
+ - :type: code
115
+ :strength: required
116
+ :system: http://hl7.org/fhir/ValueSet/days-of-week
117
+ :path: availableTime.daysOfWeek
118
+ :references:
119
+ - :path: PractitionerRole.practitioner
120
+ :profiles:
121
+ - http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
122
+ - :path: PractitionerRole.organization
123
+ :profiles:
124
+ - http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
125
+ - :path: PractitionerRole.location
126
+ :profiles:
127
+ - http://hl7.org/fhir/StructureDefinition/Location
128
+ - :path: PractitionerRole.healthcareService
129
+ :profiles:
130
+ - http://hl7.org/fhir/StructureDefinition/HealthcareService
131
+ - :path: PractitionerRole.endpoint
132
+ :profiles:
133
+ - http://hl7.org/fhir/StructureDefinition/Endpoint
134
+ :tests:
135
+ - :id: us_core_v610_practitioner_role_read_test
136
+ :file_name: practitioner_role_read_test.rb
137
+ - :id: us_core_v610_practitioner_role_specialty_search_test
138
+ :file_name: practitioner_role_specialty_search_test.rb
139
+ - :id: us_core_v610_practitioner_role_practitioner_search_test
140
+ :file_name: practitioner_role_practitioner_search_test.rb
141
+ - :id: us_core_v610_practitioner_role_validation_test
142
+ :file_name: practitioner_role_validation_test.rb
143
+ - :id: us_core_v610_practitioner_role_must_support_test
144
+ :file_name: practitioner_role_must_support_test.rb
145
+ - :id: us_core_v610_practitioner_role_reference_resolution_test
146
+ :file_name: practitioner_role_reference_resolution_test.rb
147
+ :id: us_core_v610_practitioner_role
148
+ :file_name: practitioner_role_group.rb
149
+ :delayed_references:
150
+ - :path: practitioner
151
+ :resources:
152
+ - Practitioner
153
+ - :path: organization
154
+ :resources:
155
+ - Organization
@@ -0,0 +1,45 @@
1
+ require_relative '../../../must_support_test'
2
+
3
+ module USCoreTestKit
4
+ module USCoreV610
5
+ class PractitionerRoleMustSupportTest < Inferno::Test
6
+ include USCoreTestKit::MustSupportTest
7
+
8
+ title 'All must support elements are provided in the PractitionerRole resources returned'
9
+ description %(
10
+ US Core Responders SHALL be capable of populating all data elements as
11
+ part of the query results as specified by the US Core Server Capability
12
+ Statement. This test will look through the PractitionerRole resources
13
+ found previously for the following must support elements:
14
+
15
+ * PractitionerRole.code
16
+ * PractitionerRole.endpoint
17
+ * PractitionerRole.location
18
+ * PractitionerRole.organization
19
+ * PractitionerRole.practitioner
20
+ * PractitionerRole.specialty
21
+ * PractitionerRole.telecom
22
+ * PractitionerRole.telecom.system
23
+ * PractitionerRole.telecom.value
24
+ )
25
+
26
+ id :us_core_v610_practitioner_role_must_support_test
27
+
28
+ def resource_type
29
+ 'PractitionerRole'
30
+ end
31
+
32
+ def self.metadata
33
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
34
+ end
35
+
36
+ def scratch_resources
37
+ scratch[:practitioner_role_resources] ||= {}
38
+ end
39
+
40
+ run do
41
+ perform_must_support_test(all_scratch_resources)
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,41 @@
1
+ require_relative '../../../search_test'
2
+ require_relative '../../../generator/group_metadata'
3
+
4
+ module USCoreTestKit
5
+ module USCoreV610
6
+ class PractitionerRolePractitionerSearchTest < Inferno::Test
7
+ include USCoreTestKit::SearchTest
8
+
9
+ title 'Server returns valid results for PractitionerRole search by practitioner'
10
+ description %(
11
+ A server SHALL support searching by
12
+ practitioner on the PractitionerRole 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_v610_practitioner_role_practitioner_search_test
21
+ def self.properties
22
+ @properties ||= SearchTestProperties.new(
23
+ resource_type: 'PractitionerRole',
24
+ search_param_names: ['practitioner']
25
+ )
26
+ end
27
+
28
+ def self.metadata
29
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
30
+ end
31
+
32
+ def scratch_resources
33
+ scratch[:practitioner_role_resources] ||= {}
34
+ end
35
+
36
+ run do
37
+ run_search_test
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,26 @@
1
+ require_relative '../../../read_test'
2
+
3
+ module USCoreTestKit
4
+ module USCoreV610
5
+ class PractitionerRoleReadTest < Inferno::Test
6
+ include USCoreTestKit::ReadTest
7
+
8
+ title 'Server returns correct PractitionerRole resource from PractitionerRole read interaction'
9
+ description 'A server SHALL support the PractitionerRole read interaction.'
10
+
11
+ id :us_core_v610_practitioner_role_read_test
12
+
13
+ def resource_type
14
+ 'PractitionerRole'
15
+ end
16
+
17
+ def scratch_resources
18
+ scratch[:practitioner_role_resources] ||= {}
19
+ end
20
+
21
+ run do
22
+ perform_read_test(scratch.dig(:references, 'PractitionerRole'))
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,43 @@
1
+ require_relative '../../../reference_resolution_test'
2
+
3
+ module USCoreTestKit
4
+ module USCoreV610
5
+ class PractitionerRoleReferenceResolutionTest < Inferno::Test
6
+ include USCoreTestKit::ReferenceResolutionTest
7
+
8
+ title 'MustSupport references within PractitionerRole resources are valid'
9
+ description %(
10
+ This test will attempt to read external references provided within elements
11
+ marked as 'MustSupport', if any are available.
12
+
13
+ It verifies that at least one external reference for each MustSupport Reference element
14
+ can be accessed by the test client, and conforms to corresponding US Core profile.
15
+
16
+ Elements which may provide external references include:
17
+
18
+ * PractitionerRole.endpoint
19
+ * PractitionerRole.location
20
+ * PractitionerRole.organization
21
+ * PractitionerRole.practitioner
22
+ )
23
+
24
+ id :us_core_v610_practitioner_role_reference_resolution_test
25
+
26
+ def resource_type
27
+ 'PractitionerRole'
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[:practitioner_role_resources] ||= {}
36
+ end
37
+
38
+ run do
39
+ perform_reference_resolution_test(scratch_resources[:all])
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,53 @@
1
+ require_relative '../../../search_test'
2
+ require_relative '../../../generator/group_metadata'
3
+
4
+ module USCoreTestKit
5
+ module USCoreV610
6
+ class PractitionerRoleSpecialtySearchTest < Inferno::Test
7
+ include USCoreTestKit::SearchTest
8
+
9
+ title 'Server returns valid results for PractitionerRole search by specialty'
10
+ description %(
11
+ A server SHALL support searching by
12
+ specialty on the PractitionerRole 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 v6.1.0.
23
+
24
+ [US Core Server CapabilityStatement](http://hl7.org/fhir/us/core//CapabilityStatement-us-core-server.html)
25
+
26
+ )
27
+
28
+ id :us_core_v610_practitioner_role_specialty_search_test
29
+ def self.properties
30
+ @properties ||= SearchTestProperties.new(
31
+ first_search: true,
32
+ resource_type: 'PractitionerRole',
33
+ search_param_names: ['specialty'],
34
+ saves_delayed_references: true,
35
+ token_search_params: ['specialty'],
36
+ test_post_search: true
37
+ )
38
+ end
39
+
40
+ def self.metadata
41
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
42
+ end
43
+
44
+ def scratch_resources
45
+ scratch[:practitioner_role_resources] ||= {}
46
+ end
47
+
48
+ run do
49
+ run_search_test
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,40 @@
1
+ require_relative '../../../validation_test'
2
+
3
+ module USCoreTestKit
4
+ module USCoreV610
5
+ class PractitionerRoleValidationTest < Inferno::Test
6
+ include USCoreTestKit::ValidationTest
7
+
8
+ id :us_core_v610_practitioner_role_validation_test
9
+ title 'PractitionerRole resources returned during previous tests conform to the US Core PractitionerRole Profile'
10
+ description %(
11
+ This test verifies resources returned from the first search conform to
12
+ the [US Core PractitionerRole Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitionerrole).
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
+ )
22
+ output :dar_code_found, :dar_extension_found
23
+
24
+ def resource_type
25
+ 'PractitionerRole'
26
+ end
27
+
28
+ def scratch_resources
29
+ scratch[:practitioner_role_resources] ||= {}
30
+ end
31
+
32
+ run do
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitionerrole',
35
+ '6.1.0',
36
+ skip_if_empty: true)
37
+ end
38
+ end
39
+ end
40
+ end