us_core_test_kit 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) 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/generated/v3.1.1/metadata.yml +10 -0
  4. data/lib/us_core_test_kit/generated/v3.1.1/patient/metadata.yml +10 -0
  5. data/lib/us_core_test_kit/generated/v4.0.0/metadata.yml +10 -0
  6. data/lib/us_core_test_kit/generated/v4.0.0/patient/metadata.yml +10 -0
  7. data/lib/us_core_test_kit/generated/v5.0.1/metadata.yml +21 -2
  8. data/lib/us_core_test_kit/generated/v5.0.1/patient/metadata.yml +6 -2
  9. data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/metadata.yml +155 -0
  10. data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/practitioner_role_must_support_test.rb +45 -0
  11. data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/practitioner_role_practitioner_search_test.rb +41 -0
  12. data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/practitioner_role_read_test.rb +26 -0
  13. data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/practitioner_role_reference_resolution_test.rb +43 -0
  14. data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/practitioner_role_specialty_search_test.rb +53 -0
  15. data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role/practitioner_role_validation_test.rb +40 -0
  16. data/lib/us_core_test_kit/generated/v5.0.1/practitioner_role_group.rb +89 -0
  17. data/lib/us_core_test_kit/generated/v5.0.1/us_core_test_suite.rb +2 -0
  18. data/lib/us_core_test_kit/generated/v6.1.0/metadata.yml +17 -2
  19. data/lib/us_core_test_kit/generated/v6.1.0/patient/metadata.yml +2 -2
  20. data/lib/us_core_test_kit/generated/v6.1.0/patient/patient_must_support_test.rb +0 -2
  21. data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/metadata.yml +155 -0
  22. data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/practitioner_role_must_support_test.rb +45 -0
  23. data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/practitioner_role_practitioner_search_test.rb +41 -0
  24. data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/practitioner_role_read_test.rb +26 -0
  25. data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/practitioner_role_reference_resolution_test.rb +43 -0
  26. data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/practitioner_role_specialty_search_test.rb +53 -0
  27. data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role/practitioner_role_validation_test.rb +40 -0
  28. data/lib/us_core_test_kit/generated/v6.1.0/practitioner_role_group.rb +89 -0
  29. data/lib/us_core_test_kit/generated/v6.1.0/us_core_test_suite.rb +2 -0
  30. 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
  31. 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
  32. data/lib/us_core_test_kit/generated/v7.0.0-ballot/location/location_address_search_test.rb +52 -0
  33. data/lib/us_core_test_kit/generated/v7.0.0-ballot/location/location_address_state_search_test.rb +43 -0
  34. 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
  35. 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
  36. data/lib/us_core_test_kit/generated/v7.0.0-ballot/location/location_read_test.rb +26 -0
  37. 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
  38. 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
  39. data/lib/us_core_test_kit/generated/v7.0.0-ballot/location/metadata.yml +194 -0
  40. data/lib/us_core_test_kit/generated/v7.0.0-ballot/location_group.rb +93 -0
  41. data/lib/us_core_test_kit/generated/v7.0.0-ballot/metadata.yml +38 -273
  42. data/lib/us_core_test_kit/generated/v7.0.0-ballot/patient/metadata.yml +2 -2
  43. data/lib/us_core_test_kit/generated/v7.0.0-ballot/patient/patient_must_support_test.rb +0 -2
  44. data/lib/us_core_test_kit/generated/v7.0.0-ballot/practitioner_role/metadata.yml +160 -0
  45. data/lib/us_core_test_kit/generated/v7.0.0-ballot/practitioner_role/practitioner_role_must_support_test.rb +45 -0
  46. 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
  47. data/lib/us_core_test_kit/generated/v7.0.0-ballot/practitioner_role/practitioner_role_read_test.rb +26 -0
  48. data/lib/us_core_test_kit/generated/v7.0.0-ballot/practitioner_role/practitioner_role_reference_resolution_test.rb +43 -0
  49. 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
  50. data/lib/us_core_test_kit/generated/v7.0.0-ballot/practitioner_role/practitioner_role_validation_test.rb +40 -0
  51. data/lib/us_core_test_kit/generated/v7.0.0-ballot/practitioner_role_group.rb +89 -0
  52. data/lib/us_core_test_kit/generated/v7.0.0-ballot/us_core_test_suite.rb +4 -2
  53. data/lib/us_core_test_kit/generator/group_generator.rb +2 -2
  54. data/lib/us_core_test_kit/generator/group_metadata.rb +3 -1
  55. data/lib/us_core_test_kit/generator/ig_metadata_extractor.rb +8 -1
  56. data/lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_3.rb +64 -18
  57. data/lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_4.rb +1 -18
  58. data/lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_5.rb +0 -15
  59. data/lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_6.rb +5 -2
  60. data/lib/us_core_test_kit/generator/special_cases.rb +17 -7
  61. data/lib/us_core_test_kit/granular_scope_checker.rb +1 -1
  62. data/lib/us_core_test_kit/version.rb +1 -1
  63. metadata +37 -91
  64. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_abatement_date_granular_scope_test.rb +0 -45
  65. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_asserted_date_granular_scope_test.rb +0 -45
  66. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_category_clinical_status_granular_scope_test.rb +0 -45
  67. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_category_encounter_granular_scope_test.rb +0 -45
  68. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_category_granular_scope_test.rb +0 -45
  69. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_clinical_status_granular_scope_test.rb +0 -45
  70. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_code_granular_scope_test.rb +0 -45
  71. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_granular_scope_test.rb +0 -45
  72. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_onset_date_granular_scope_test.rb +0 -45
  73. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_patient_recorded_date_granular_scope_test.rb +0 -45
  74. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_granular_scope1_group.rb +0 -38
  75. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_granular_scope2_group.rb +0 -38
  76. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_patient_category_date_granular_scope_test.rb +0 -45
  77. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_patient_category_granular_scope_test.rb +0 -45
  78. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_patient_code_date_granular_scope_test.rb +0 -45
  79. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_patient_code_granular_scope_test.rb +0 -45
  80. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_patient_granular_scope_test.rb +0 -45
  81. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_patient_status_granular_scope_test.rb +0 -45
  82. data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_id_granular_scope_test.rb +0 -41
  83. data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_patient_category_date_granular_scope_test.rb +0 -45
  84. data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_patient_category_granular_scope_test.rb +0 -45
  85. data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_patient_granular_scope_test.rb +0 -45
  86. data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_patient_status_granular_scope_test.rb +0 -45
  87. data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_patient_type_granular_scope_test.rb +0 -45
  88. data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_patient_type_period_granular_scope_test.rb +0 -45
  89. data/lib/us_core_test_kit/generated/v6.1.0/document_reference_granular_scope1_group.rb +0 -39
  90. data/lib/us_core_test_kit/generated/v6.1.0/document_reference_granular_scope2_group.rb +0 -39
  91. data/lib/us_core_test_kit/generated/v6.1.0/observation_lab/observation_patient_category_date_granular_scope_test.rb +0 -45
  92. data/lib/us_core_test_kit/generated/v6.1.0/observation_lab/observation_patient_category_granular_scope_test.rb +0 -45
  93. data/lib/us_core_test_kit/generated/v6.1.0/observation_lab/observation_patient_category_status_granular_scope_test.rb +0 -45
  94. data/lib/us_core_test_kit/generated/v6.1.0/observation_lab/observation_patient_code_date_granular_scope_test.rb +0 -45
  95. data/lib/us_core_test_kit/generated/v6.1.0/observation_lab/observation_patient_code_granular_scope_test.rb +0 -45
  96. data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_id_granular_scope_test.rb +0 -41
  97. data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_patient_category_authored_granular_scope_test.rb +0 -45
  98. data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_patient_category_granular_scope_test.rb +0 -45
  99. data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_patient_code_authored_granular_scope_test.rb +0 -45
  100. data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_patient_code_granular_scope_test.rb +0 -45
  101. data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_patient_granular_scope_test.rb +0 -45
  102. data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_patient_status_granular_scope_test.rb +0 -45
  103. data/lib/us_core_test_kit/generated/v6.1.0/service_request_granular_scope1_group.rb +0 -39
  104. data/lib/us_core_test_kit/generated/v6.1.0/service_request_granular_scope2_group.rb +0 -40
  105. data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_abatement_date_granular_scope_test.rb +0 -45
  106. data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_asserted_date_granular_scope_test.rb +0 -45
  107. 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
  108. data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_category_encounter_granular_scope_test.rb +0 -45
  109. data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_category_granular_scope_test.rb +0 -45
  110. data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_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_code_granular_scope_test.rb +0 -45
  112. data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_granular_scope_test.rb +0 -45
  113. data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_onset_date_granular_scope_test.rb +0 -45
  114. data/lib/us_core_test_kit/generated/v7.0.0-ballot/condition_encounter_diagnosis/condition_patient_recorded_date_granular_scope_test.rb +0 -45
  115. 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
  116. data/lib/us_core_test_kit/generated/v7.0.0-ballot/diagnostic_report_note/diagnostic_report_patient_category_granular_scope_test.rb +0 -45
  117. 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
  118. data/lib/us_core_test_kit/generated/v7.0.0-ballot/diagnostic_report_note/diagnostic_report_patient_code_granular_scope_test.rb +0 -45
  119. data/lib/us_core_test_kit/generated/v7.0.0-ballot/diagnostic_report_note/diagnostic_report_patient_granular_scope_test.rb +0 -45
  120. data/lib/us_core_test_kit/generated/v7.0.0-ballot/diagnostic_report_note/diagnostic_report_patient_status_granular_scope_test.rb +0 -45
  121. data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_id_granular_scope_test.rb +0 -41
  122. data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_patient_category_date_granular_scope_test.rb +0 -45
  123. data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_patient_category_granular_scope_test.rb +0 -45
  124. data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_patient_granular_scope_test.rb +0 -45
  125. data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_patient_status_granular_scope_test.rb +0 -45
  126. data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_patient_type_granular_scope_test.rb +0 -45
  127. data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference/document_reference_patient_type_period_granular_scope_test.rb +0 -45
  128. data/lib/us_core_test_kit/generated/v7.0.0-ballot/document_reference_granular_scope2_group.rb +0 -39
  129. data/lib/us_core_test_kit/generated/v7.0.0-ballot/observation_lab/observation_patient_category_date_granular_scope_test.rb +0 -45
  130. data/lib/us_core_test_kit/generated/v7.0.0-ballot/observation_lab/observation_patient_category_granular_scope_test.rb +0 -45
  131. data/lib/us_core_test_kit/generated/v7.0.0-ballot/observation_lab/observation_patient_category_status_granular_scope_test.rb +0 -45
  132. data/lib/us_core_test_kit/generated/v7.0.0-ballot/observation_lab/observation_patient_code_date_granular_scope_test.rb +0 -45
  133. data/lib/us_core_test_kit/generated/v7.0.0-ballot/observation_lab/observation_patient_code_granular_scope_test.rb +0 -45
  134. data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_id_granular_scope_test.rb +0 -41
  135. data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_patient_category_authored_granular_scope_test.rb +0 -45
  136. data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_patient_category_granular_scope_test.rb +0 -45
  137. data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_patient_code_authored_granular_scope_test.rb +0 -45
  138. data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_patient_code_granular_scope_test.rb +0 -45
  139. data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_patient_granular_scope_test.rb +0 -45
  140. data/lib/us_core_test_kit/generated/v7.0.0-ballot/service_request/service_request_patient_status_granular_scope_test.rb +0 -45
  141. data/lib/us_core_test_kit/generated/v7.0.0-ballot/vital_signs/metadata.yml +0 -273
  142. data/lib/us_core_test_kit/generated/v7.0.0-ballot/vital_signs/vital_signs_provenance_revinclude_search_test.rb +0 -53
  143. data/lib/us_core_test_kit/generated/v7.0.0-ballot/vital_signs/vital_signs_read_test.rb +0 -26
  144. data/lib/us_core_test_kit/generated/v7.0.0-ballot/vital_signs_group.rb +0 -96
@@ -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'
@@ -191,6 +192,7 @@ module USCoreTestKit
191
192
  group from: :us_core_v610_service_request
192
193
  group from: :us_core_v610_organization
193
194
  group from: :us_core_v610_practitioner
195
+ group from: :us_core_v610_practitioner_role
194
196
  group from: :us_core_v610_provenance
195
197
  group from: :us_core_v610_related_person
196
198
  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 VitalSignsPatientCategoryStatusSearchTest < Inferno::Test
6
+ class LocationAddressCitySearchTest < Inferno::Test
7
7
  include USCoreTestKit::SearchTest
8
8
 
9
- title 'Server returns valid results for Observation search by patient + category + status'
9
+ title 'Server returns valid results for Location search by address-city'
10
10
  description %(
11
11
  A server SHOULD support searching by
12
- patient + category + status on the Observation resource. This test
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 :us_core_v700_ballot_vital_signs_patient_category_status_search_test
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: 'Observation',
30
- search_param_names: ['patient', 'category', 'status'],
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[:vital_signs_resources] ||= {}
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 VitalSignsPatientCodeDateSearchTest < Inferno::Test
6
+ class LocationAddressPostalcodeSearchTest < Inferno::Test
7
7
  include USCoreTestKit::SearchTest
8
8
 
9
- title 'Server returns valid results for Observation search by patient + code + date'
9
+ title 'Server returns valid results for Location search by address-postalcode'
10
10
  description %(
11
11
  A server SHOULD support searching by
12
- patient + code + date on the Observation resource. This test
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 :us_core_v700_ballot_vital_signs_patient_code_date_search_test
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: 'Observation',
30
- search_param_names: ['patient', 'code', 'date'],
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[:vital_signs_resources] ||= {}
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
@@ -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 VitalSignsMustSupportTest < Inferno::Test
5
+ class LocationMustSupportTest < Inferno::Test
6
6
  include USCoreTestKit::MustSupportTest
7
7
 
8
- title 'All must support elements are provided in the Observation resources returned'
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 Observation resources
12
+ Statement. This test will look through the Location resources
13
13
  found previously for the following must support elements:
14
14
 
15
- * Observation.category
16
- * Observation.category:VSCat
17
- * Observation.category:VSCat.coding
18
- * Observation.category:VSCat.coding.code
19
- * Observation.category:VSCat.coding.system
20
- * Observation.code
21
- * Observation.effectiveDateTime
22
- * Observation.status
23
- * Observation.subject
24
- * Observation.valueQuantity
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 :us_core_v700_ballot_vital_signs_must_support_test
28
+ id :us_core_v700_ballot_location_must_support_test
28
29
 
29
30
  def resource_type
30
- 'Observation'
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[:vital_signs_resources] ||= {}
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 VitalSignsPatientCategorySearchTest < Inferno::Test
6
+ class LocationNameSearchTest < Inferno::Test
7
7
  include USCoreTestKit::SearchTest
8
8
 
9
- title 'Server returns valid results for Observation search by patient + category'
9
+ title 'Server returns valid results for Location search by name'
10
10
  description %(
11
11
  A server SHALL support searching by
12
- patient + category on the Observation resource. This test
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 :us_core_v700_ballot_vital_signs_patient_category_search_test
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: 'Observation',
28
- search_param_names: ['patient', 'category'],
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[:vital_signs_resources] ||= {}
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 VitalSignsReferenceResolutionTest < Inferno::Test
5
+ class LocationReferenceResolutionTest < Inferno::Test
6
6
  include USCoreTestKit::ReferenceResolutionTest
7
7
 
8
- title 'MustSupport references within Observation resources are valid'
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
- * Observation.subject
18
+ * Location.managingOrganization
19
19
  )
20
20
 
21
- id :us_core_v700_ballot_vital_signs_reference_resolution_test
21
+ id :us_core_v700_ballot_location_reference_resolution_test
22
22
 
23
23
  def resource_type
24
- 'Observation'
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[:vital_signs_resources] ||= {}
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 VitalSignsValidationTest < Inferno::Test
5
+ class LocationValidationTest < Inferno::Test
6
6
  include USCoreTestKit::ValidationTest
7
7
 
8
- id :us_core_v700_ballot_vital_signs_validation_test
9
- title 'Observation resources returned during previous tests conform to the US Core Vital Signs Profile'
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 Vital Signs Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-vital-signs).
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
- 'Observation'
25
+ 'Location'
26
26
  end
27
27
 
28
28
  def scratch_resources
29
- scratch[:vital_signs_resources] ||= {}
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-vital-signs',
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
@@ -0,0 +1,194 @@
1
+ ---
2
+ :name: us_core_location
3
+ :class_name: USCorev700_ballotLocationSequence
4
+ :version: v7.0.0-ballot
5
+ :reformatted_version: v700_ballot
6
+ :resource: Location
7
+ :profile_url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-location
8
+ :profile_name: US Core Location Profile
9
+ :profile_version: 7.0.0-ballot
10
+ :title: Location
11
+ :short_description: Verify support for the server capabilities required by the US
12
+ Core Location 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
+ - address
37
+ :expectation: SHALL
38
+ :names_not_must_support_or_mandatory: []
39
+ :must_support_or_mandatory: true
40
+ - :names:
41
+ - address-city
42
+ :expectation: SHOULD
43
+ :names_not_must_support_or_mandatory: []
44
+ :must_support_or_mandatory: true
45
+ - :names:
46
+ - address-postalcode
47
+ :expectation: SHOULD
48
+ :names_not_must_support_or_mandatory: []
49
+ :must_support_or_mandatory: true
50
+ - :names:
51
+ - address-state
52
+ :expectation: SHOULD
53
+ :names_not_must_support_or_mandatory: []
54
+ :must_support_or_mandatory: true
55
+ - :names:
56
+ - name
57
+ :expectation: SHALL
58
+ :names_not_must_support_or_mandatory: []
59
+ :must_support_or_mandatory: true
60
+ :search_definitions:
61
+ :address:
62
+ :paths:
63
+ - address
64
+ :full_paths:
65
+ - Location.address
66
+ :comparators: {}
67
+ :values: []
68
+ :type: Address
69
+ :contains_multiple: false
70
+ :multiple_or: MAY
71
+ :address-city:
72
+ :paths:
73
+ - address.city
74
+ :full_paths:
75
+ - Location.address.city
76
+ :comparators: {}
77
+ :values: []
78
+ :type: string
79
+ :contains_multiple: false
80
+ :multiple_or: MAY
81
+ :address-postalcode:
82
+ :paths:
83
+ - address.postalCode
84
+ :full_paths:
85
+ - Location.address.postalCode
86
+ :comparators: {}
87
+ :values: []
88
+ :type: string
89
+ :contains_multiple: false
90
+ :multiple_or: MAY
91
+ :address-state:
92
+ :paths:
93
+ - address.state
94
+ :full_paths:
95
+ - Location.address.state
96
+ :comparators: {}
97
+ :values: []
98
+ :type: string
99
+ :contains_multiple: false
100
+ :multiple_or: MAY
101
+ :name:
102
+ :paths:
103
+ - name
104
+ - alias
105
+ :full_paths:
106
+ - Location.name
107
+ - Location.alias
108
+ :comparators: {}
109
+ :values: []
110
+ :type: string
111
+ :contains_multiple: false
112
+ :multiple_or: MAY
113
+ :include_params: []
114
+ :revincludes: []
115
+ :required_concepts: []
116
+ :must_supports:
117
+ :extensions: []
118
+ :slices: []
119
+ :elements:
120
+ - :path: identifier
121
+ - :path: status
122
+ - :path: name
123
+ - :path: type
124
+ - :path: telecom
125
+ - :path: address
126
+ - :path: address.line
127
+ - :path: address.city
128
+ - :path: address.state
129
+ - :path: address.postalCode
130
+ - :path: managingOrganization
131
+ :types:
132
+ - Reference
133
+ :target_profiles:
134
+ - http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
135
+ :mandatory_elements:
136
+ - Location.name
137
+ - Location.position.longitude
138
+ - Location.position.latitude
139
+ :bindings:
140
+ - :type: code
141
+ :strength: required
142
+ :system: http://hl7.org/fhir/ValueSet/location-status
143
+ :path: status
144
+ - :type: code
145
+ :strength: required
146
+ :system: http://hl7.org/fhir/ValueSet/location-mode
147
+ :path: mode
148
+ - :type: code
149
+ :strength: required
150
+ :system: http://hl7.org/fhir/ValueSet/address-use
151
+ :path: address.use
152
+ - :type: code
153
+ :strength: required
154
+ :system: http://hl7.org/fhir/ValueSet/address-type
155
+ :path: address.type
156
+ - :type: code
157
+ :strength: required
158
+ :system: http://hl7.org/fhir/ValueSet/days-of-week
159
+ :path: hoursOfOperation.daysOfWeek
160
+ :references:
161
+ - :path: Location.managingOrganization
162
+ :profiles:
163
+ - http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
164
+ - :path: Location.partOf
165
+ :profiles:
166
+ - http://hl7.org/fhir/StructureDefinition/Location
167
+ - :path: Location.endpoint
168
+ :profiles:
169
+ - http://hl7.org/fhir/StructureDefinition/Endpoint
170
+ :tests:
171
+ - :id: us_core_v700_ballot_location_read_test
172
+ :file_name: location_read_test.rb
173
+ - :id: us_core_v700_ballot_location_address_search_test
174
+ :file_name: location_address_search_test.rb
175
+ - :id: us_core_v700_ballot_location_address_city_search_test
176
+ :file_name: location_address_city_search_test.rb
177
+ - :id: us_core_v700_ballot_location_address_postalcode_search_test
178
+ :file_name: location_address_postalcode_search_test.rb
179
+ - :id: us_core_v700_ballot_location_address_state_search_test
180
+ :file_name: location_address_state_search_test.rb
181
+ - :id: us_core_v700_ballot_location_name_search_test
182
+ :file_name: location_name_search_test.rb
183
+ - :id: us_core_v700_ballot_location_validation_test
184
+ :file_name: location_validation_test.rb
185
+ - :id: us_core_v700_ballot_location_must_support_test
186
+ :file_name: location_must_support_test.rb
187
+ - :id: us_core_v700_ballot_location_reference_resolution_test
188
+ :file_name: location_reference_resolution_test.rb
189
+ :id: us_core_v700_ballot_location
190
+ :file_name: location_group.rb
191
+ :delayed_references:
192
+ - :path: managingOrganization
193
+ :resources:
194
+ - Organization