us_core_test_kit 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/lib/us_core_test_kit/custom_groups/v4.0.0/device_udi_pi_test.rb +1 -1
  3. data/lib/us_core_test_kit/custom_groups/v4.0.0/document_reference_custodian_test.rb +1 -1
  4. data/lib/us_core_test_kit/generated/v4.0.0/metadata.yml +4 -307
  5. data/lib/us_core_test_kit/generated/v4.0.0/smokingstatus/metadata.yml +4 -6
  6. data/lib/us_core_test_kit/generated/v4.0.0/smokingstatus/smokingstatus_patient_category_date_search_test.rb +0 -2
  7. data/lib/us_core_test_kit/generated/v5.0.1/metadata.yml +1920 -3525
  8. data/lib/us_core_test_kit/generated/v5.0.1/observation_sdoh_assessment/metadata.yml +0 -1
  9. data/lib/us_core_test_kit/generated/v5.0.1/questionnaire_response/metadata.yml +288 -0
  10. data/lib/us_core_test_kit/generated/v5.0.1/questionnaire_response/questionnaire_response_id_search_test.rb +42 -0
  11. data/lib/us_core_test_kit/generated/v5.0.1/questionnaire_response/questionnaire_response_must_support_test.rb +56 -0
  12. data/lib/us_core_test_kit/generated/v5.0.1/questionnaire_response/questionnaire_response_patient_authored_search_test.rb +49 -0
  13. data/lib/us_core_test_kit/generated/v5.0.1/questionnaire_response/questionnaire_response_patient_questionnaire_search_test.rb +48 -0
  14. data/lib/us_core_test_kit/generated/v5.0.1/questionnaire_response/questionnaire_response_patient_search_test.rb +63 -0
  15. data/lib/us_core_test_kit/generated/v5.0.1/questionnaire_response/questionnaire_response_patient_status_search_test.rb +48 -0
  16. data/lib/us_core_test_kit/generated/v5.0.1/questionnaire_response/questionnaire_response_patient_tag_authored_search_test.rb +50 -0
  17. data/lib/us_core_test_kit/generated/v5.0.1/questionnaire_response/questionnaire_response_patient_tag_search_test.rb +49 -0
  18. data/lib/us_core_test_kit/generated/v5.0.1/questionnaire_response/questionnaire_response_provenance_revinclude_search_test.rb +52 -0
  19. data/lib/us_core_test_kit/generated/v5.0.1/questionnaire_response/questionnaire_response_read_test.rb +26 -0
  20. data/lib/us_core_test_kit/generated/v5.0.1/questionnaire_response/questionnaire_response_reference_resolution_test.rb +39 -0
  21. data/lib/us_core_test_kit/generated/v5.0.1/questionnaire_response/questionnaire_response_validation_test.rb +40 -0
  22. data/lib/us_core_test_kit/generated/v5.0.1/questionnaire_response_group.rb +101 -0
  23. data/lib/us_core_test_kit/generated/v5.0.1/smokingstatus/metadata.yml +4 -6
  24. data/lib/us_core_test_kit/generated/v5.0.1/smokingstatus/smokingstatus_patient_category_date_search_test.rb +0 -2
  25. data/lib/us_core_test_kit/generated/v5.0.1/us_core_test_suite.rb +2 -0
  26. data/lib/us_core_test_kit/generator/group_generator.rb +5 -0
  27. data/lib/us_core_test_kit/generator/group_metadata_extractor.rb +5 -1
  28. data/lib/us_core_test_kit/generator/ig_metadata_extractor.rb +9 -0
  29. data/lib/us_core_test_kit/generator/must_support_metadata_extractor.rb +12 -0
  30. data/lib/us_core_test_kit/generator/special_cases.rb +4 -10
  31. data/lib/us_core_test_kit/read_test.rb +1 -1
  32. data/lib/us_core_test_kit/reference_resolution_test.rb +16 -4
  33. data/lib/us_core_test_kit/version.rb +1 -1
  34. metadata +16 -2
@@ -232,7 +232,6 @@
232
232
  - Reference
233
233
  :target_profiles:
234
234
  - http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-survey
235
- - http://hl7.org/fhir/us/core/StructureDefinition/us-core-questionnaireresponse
236
235
  :mandatory_elements:
237
236
  - Observation.status
238
237
  - Observation.category
@@ -0,0 +1,288 @@
1
+ ---
2
+ :name: us_core_questionnaireresponse
3
+ :class_name: USCorev501QuestionnaireresponseSequence
4
+ :version: v5.0.1
5
+ :reformatted_version: v501
6
+ :resource: QuestionnaireResponse
7
+ :profile_url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-questionnaireresponse
8
+ :profile_name: US Core QuestionnaireResponse Profile
9
+ :profile_version: 5.0.1
10
+ :title: QuestionnaireResponse
11
+ :short_description: Verify support for the server capabilities required by the US
12
+ Core QuestionnaireResponse Profile.
13
+ :interactions:
14
+ - :code: create
15
+ :expectation: MAY
16
+ - :code: search-type
17
+ :expectation: SHALL
18
+ - :code: read
19
+ :expectation: SHALL
20
+ - :code: vread
21
+ :expectation: SHOULD
22
+ - :code: update
23
+ :expectation: MAY
24
+ - :code: patch
25
+ :expectation: MAY
26
+ - :code: delete
27
+ :expectation: MAY
28
+ - :code: history-instance
29
+ :expectation: SHOULD
30
+ - :code: history-type
31
+ :expectation: MAY
32
+ :operations: []
33
+ :searches:
34
+ - :names:
35
+ - patient
36
+ :expectation: SHALL
37
+ :names_not_must_support_or_mandatory: []
38
+ :must_support_or_mandatory: true
39
+ - :names:
40
+ - _id
41
+ :expectation: SHALL
42
+ :names_not_must_support_or_mandatory: []
43
+ :must_support_or_mandatory: true
44
+ - :expectation: SHOULD
45
+ :names:
46
+ - patient
47
+ - authored
48
+ :names_not_must_support_or_mandatory: []
49
+ :must_support_or_mandatory: true
50
+ - :expectation: SHOULD
51
+ :names:
52
+ - patient
53
+ - _tag
54
+ - authored
55
+ :names_not_must_support_or_mandatory: []
56
+ :must_support_or_mandatory: true
57
+ - :expectation: SHOULD
58
+ :names:
59
+ - patient
60
+ - status
61
+ :names_not_must_support_or_mandatory: []
62
+ :must_support_or_mandatory: true
63
+ - :expectation: SHOULD
64
+ :names:
65
+ - patient
66
+ - _tag
67
+ :names_not_must_support_or_mandatory: []
68
+ :must_support_or_mandatory: true
69
+ - :expectation: SHOULD
70
+ :names:
71
+ - patient
72
+ - questionnaire
73
+ :names_not_must_support_or_mandatory: []
74
+ :must_support_or_mandatory: true
75
+ :search_definitions:
76
+ :_id:
77
+ :paths:
78
+ - id
79
+ :full_paths:
80
+ - QuestionnaireResponse.id
81
+ :comparators: {}
82
+ :values: []
83
+ :type: http://hl7.org/fhirpath/System.String
84
+ :contains_multiple: false
85
+ :multiple_or: MAY
86
+ :patient:
87
+ :paths:
88
+ - subject
89
+ :full_paths:
90
+ - QuestionnaireResponse.subject
91
+ :comparators: {}
92
+ :values: []
93
+ :type: Reference
94
+ :contains_multiple: false
95
+ :multiple_or: MAY
96
+ :authored:
97
+ :paths:
98
+ - authored
99
+ :full_paths:
100
+ - QuestionnaireResponse.authored
101
+ :comparators:
102
+ :eq: MAY
103
+ :ne: MAY
104
+ :gt: SHALL
105
+ :ge: SHALL
106
+ :lt: SHALL
107
+ :le: SHALL
108
+ :sa: MAY
109
+ :eb: MAY
110
+ :ap: MAY
111
+ :values: []
112
+ :type: dateTime
113
+ :contains_multiple: false
114
+ :multiple_or: MAY
115
+ :_tag:
116
+ :paths:
117
+ - meta.tag
118
+ :full_paths:
119
+ - QuestionnaireResponse.meta.tag
120
+ :comparators: {}
121
+ :values: []
122
+ :type: Coding
123
+ :contains_multiple: true
124
+ :multiple_or: MAY
125
+ :status:
126
+ :paths:
127
+ - status
128
+ :full_paths:
129
+ - QuestionnaireResponse.status
130
+ :comparators: {}
131
+ :values:
132
+ - in-progress
133
+ - completed
134
+ - amended
135
+ - entered-in-error
136
+ - stopped
137
+ :type: code
138
+ :contains_multiple: false
139
+ :multiple_or: SHALL
140
+ :questionnaire:
141
+ :paths:
142
+ - questionnaire
143
+ :full_paths:
144
+ - QuestionnaireResponse.questionnaire
145
+ :comparators: {}
146
+ :values: []
147
+ :type: canonical
148
+ :contains_multiple: false
149
+ :multiple_or: MAY
150
+ :include_params: []
151
+ :revincludes:
152
+ - Provenance:target
153
+ :required_concepts: []
154
+ :must_supports:
155
+ :extensions:
156
+ - :id: QuestionnaireResponse.questionnaire.extension:questionnaireDisplay
157
+ :url: http://hl7.org/fhir/StructureDefinition/display
158
+ - :id: QuestionnaireResponse.questionnaire.extension:url
159
+ :url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-extension-questionnaire-uri
160
+ :slices:
161
+ - :name: QuestionnaireResponse.meta.tag:sdoh
162
+ :path: meta.tag
163
+ :discriminator:
164
+ :type: patternCoding
165
+ :path: ''
166
+ :code: sdoh
167
+ :system: http://hl7.org/fhir/us/core/CodeSystem/us-core-tags
168
+ :elements:
169
+ - :path: meta
170
+ - :path: meta.tag
171
+ - :path: identifier
172
+ - :path: questionnaire
173
+ - :path: status
174
+ - :path: subject
175
+ :types:
176
+ - Reference
177
+ - :path: authored
178
+ - :path: author
179
+ :types:
180
+ - Reference
181
+ :target_profiles:
182
+ - http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
183
+ - :path: item
184
+ - :path: item.linkId
185
+ - :path: item.text
186
+ - :path: item.answer
187
+ - :path: item.answer.valueDecimal
188
+ :original_path: item.answer.value[x]
189
+ - :path: item.answer.valueString
190
+ :original_path: item.answer.value[x]
191
+ - :path: item.answer.valueCoding
192
+ :original_path: item.answer.value[x]
193
+ - :path: item.answer.item
194
+ - :path: item.item
195
+ :mandatory_elements:
196
+ - QuestionnaireResponse.meta.tag.code
197
+ - QuestionnaireResponse.questionnaire
198
+ - QuestionnaireResponse.status
199
+ - QuestionnaireResponse.subject
200
+ - QuestionnaireResponse.authored
201
+ - QuestionnaireResponse.item.linkId
202
+ :bindings:
203
+ - :type: Coding
204
+ :strength: extensible
205
+ :system: http://hl7.org/fhir/ValueSet/security-labels
206
+ :path: meta.security
207
+ - :type: Coding
208
+ :strength: example
209
+ :system: http://hl7.org/fhir/ValueSet/common-tags
210
+ :path: meta.tag
211
+ - :type: Coding
212
+ :strength: required
213
+ :system: http://hl7.org/fhir/us/core/ValueSet/us-core-tags
214
+ :path: meta.tag
215
+ - :type: code
216
+ :strength: preferred
217
+ :system: http://hl7.org/fhir/ValueSet/languages
218
+ :path: language
219
+ - :type: code
220
+ :strength: required
221
+ :system: http://hl7.org/fhir/ValueSet/questionnaire-answers-status
222
+ :path: status
223
+ - :type: boolean
224
+ :strength: example
225
+ :system: http://hl7.org/fhir/ValueSet/questionnaire-answers
226
+ :path: item.answer.value
227
+ :references:
228
+ - :path: QuestionnaireResponse.basedOn
229
+ :profiles:
230
+ - http://hl7.org/fhir/StructureDefinition/CarePlan
231
+ - http://hl7.org/fhir/StructureDefinition/ServiceRequest
232
+ - :path: QuestionnaireResponse.partOf
233
+ :profiles:
234
+ - http://hl7.org/fhir/StructureDefinition/Observation
235
+ - http://hl7.org/fhir/StructureDefinition/Procedure
236
+ - :path: QuestionnaireResponse.subject
237
+ :profiles:
238
+ - http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
239
+ - :path: QuestionnaireResponse.encounter
240
+ :profiles:
241
+ - http://hl7.org/fhir/StructureDefinition/Encounter
242
+ - :path: QuestionnaireResponse.author
243
+ :profiles:
244
+ - http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
245
+ - http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
246
+ - http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
247
+ - http://hl7.org/fhir/StructureDefinition/PractitionerRole
248
+ - http://hl7.org/fhir/StructureDefinition/Device
249
+ - http://hl7.org/fhir/us/core/StructureDefinition/us-core-relatedperson
250
+ - :path: QuestionnaireResponse.source
251
+ :profiles:
252
+ - http://hl7.org/fhir/StructureDefinition/Patient
253
+ - http://hl7.org/fhir/StructureDefinition/Practitioner
254
+ - http://hl7.org/fhir/StructureDefinition/PractitionerRole
255
+ - http://hl7.org/fhir/StructureDefinition/RelatedPerson
256
+ :tests:
257
+ - :id: us_core_v501_questionnaire_response_patient_search_test
258
+ :file_name: questionnaire_response_patient_search_test.rb
259
+ - :id: us_core_v501_questionnaire_response__id_search_test
260
+ :file_name: questionnaire_response_id_search_test.rb
261
+ - :id: us_core_v501_questionnaire_response_patient_authored_search_test
262
+ :file_name: questionnaire_response_patient_authored_search_test.rb
263
+ - :id: us_core_v501_questionnaire_response_patient__tag_authored_search_test
264
+ :file_name: questionnaire_response_patient_tag_authored_search_test.rb
265
+ - :id: us_core_v501_questionnaire_response_patient_status_search_test
266
+ :file_name: questionnaire_response_patient_status_search_test.rb
267
+ - :id: us_core_v501_questionnaire_response_patient__tag_search_test
268
+ :file_name: questionnaire_response_patient_tag_search_test.rb
269
+ - :id: us_core_v501_questionnaire_response_patient_questionnaire_search_test
270
+ :file_name: questionnaire_response_patient_questionnaire_search_test.rb
271
+ - :id: us_core_v501_questionnaire_response_read_test
272
+ :file_name: questionnaire_response_read_test.rb
273
+ - :id: us_core_v501_questionnaire_response_provenance_revinclude_search_test
274
+ :file_name: questionnaire_response_provenance_revinclude_search_test.rb
275
+ - :id: us_core_v501_questionnaire_response_validation_test
276
+ :file_name: questionnaire_response_validation_test.rb
277
+ - :id: us_core_v501_questionnaire_response_must_support_test
278
+ :file_name: questionnaire_response_must_support_test.rb
279
+ - :id: us_core_v501_questionnaire_response_reference_resolution_test
280
+ :file_name: questionnaire_response_reference_resolution_test.rb
281
+ :id: us_core_v501_questionnaire_response
282
+ :file_name: questionnaire_response_group.rb
283
+ :delayed_references:
284
+ - :path: author
285
+ :resources:
286
+ - Practitioner
287
+ - Organization
288
+ - RelatedPerson
@@ -0,0 +1,42 @@
1
+ require_relative '../../../search_test'
2
+ require_relative '../../../generator/group_metadata'
3
+
4
+ module USCoreTestKit
5
+ module USCoreV501
6
+ class QuestionnaireResponseIdSearchTest < Inferno::Test
7
+ include USCoreTestKit::SearchTest
8
+
9
+ title 'Server returns valid results for QuestionnaireResponse search by _id'
10
+ description %(
11
+ A server SHALL support searching by
12
+ _id on the QuestionnaireResponse 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_v501_questionnaire_response__id_search_test
21
+ def self.properties
22
+ @properties ||= SearchTestProperties.new(
23
+ resource_type: 'QuestionnaireResponse',
24
+ search_param_names: ['_id'],
25
+ possible_status_search: true
26
+ )
27
+ end
28
+
29
+ def self.metadata
30
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
31
+ end
32
+
33
+ def scratch_resources
34
+ scratch[:questionnaire_response_resources] ||= {}
35
+ end
36
+
37
+ run do
38
+ run_search_test
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,56 @@
1
+ require_relative '../../../must_support_test'
2
+
3
+ module USCoreTestKit
4
+ module USCoreV501
5
+ class QuestionnaireResponseMustSupportTest < Inferno::Test
6
+ include USCoreTestKit::MustSupportTest
7
+
8
+ title 'All must support elements are provided in the QuestionnaireResponse 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 QuestionnaireResponse resources
13
+ found previously for the following must support elements:
14
+
15
+ * QuestionnaireResponse.author
16
+ * QuestionnaireResponse.authored
17
+ * QuestionnaireResponse.identifier
18
+ * QuestionnaireResponse.item
19
+ * QuestionnaireResponse.item.answer
20
+ * QuestionnaireResponse.item.answer.item
21
+ * QuestionnaireResponse.item.answer.valueCoding
22
+ * QuestionnaireResponse.item.answer.valueDecimal
23
+ * QuestionnaireResponse.item.answer.valueString
24
+ * QuestionnaireResponse.item.item
25
+ * QuestionnaireResponse.item.linkId
26
+ * QuestionnaireResponse.item.text
27
+ * QuestionnaireResponse.meta
28
+ * QuestionnaireResponse.meta.tag
29
+ * QuestionnaireResponse.meta.tag:sdoh
30
+ * QuestionnaireResponse.questionnaire
31
+ * QuestionnaireResponse.questionnaire.extension:questionnaireDisplay
32
+ * QuestionnaireResponse.questionnaire.extension:url
33
+ * QuestionnaireResponse.status
34
+ * QuestionnaireResponse.subject
35
+ )
36
+
37
+ id :us_core_v501_questionnaire_response_must_support_test
38
+
39
+ def resource_type
40
+ 'QuestionnaireResponse'
41
+ end
42
+
43
+ def self.metadata
44
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
45
+ end
46
+
47
+ def scratch_resources
48
+ scratch[:questionnaire_response_resources] ||= {}
49
+ end
50
+
51
+ run do
52
+ perform_must_support_test(all_scratch_resources)
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,49 @@
1
+ require_relative '../../../search_test'
2
+ require_relative '../../../generator/group_metadata'
3
+
4
+ module USCoreTestKit
5
+ module USCoreV501
6
+ class QuestionnaireResponsePatientAuthoredSearchTest < Inferno::Test
7
+ include USCoreTestKit::SearchTest
8
+
9
+ title 'Server returns valid results for QuestionnaireResponse search by patient + authored'
10
+ description %(
11
+ A server SHOULD support searching by
12
+ patient + authored on the QuestionnaireResponse 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_v501_questionnaire_response_patient_authored_search_test
21
+ optional
22
+
23
+ input :patient_ids,
24
+ title: 'Patient IDs',
25
+ description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
26
+
27
+ def self.properties
28
+ @properties ||= SearchTestProperties.new(
29
+ resource_type: 'QuestionnaireResponse',
30
+ search_param_names: ['patient', 'authored'],
31
+ possible_status_search: true,
32
+ params_with_comparators: ['authored']
33
+ )
34
+ end
35
+
36
+ def self.metadata
37
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
38
+ end
39
+
40
+ def scratch_resources
41
+ scratch[:questionnaire_response_resources] ||= {}
42
+ end
43
+
44
+ run do
45
+ run_search_test
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,48 @@
1
+ require_relative '../../../search_test'
2
+ require_relative '../../../generator/group_metadata'
3
+
4
+ module USCoreTestKit
5
+ module USCoreV501
6
+ class QuestionnaireResponsePatientQuestionnaireSearchTest < Inferno::Test
7
+ include USCoreTestKit::SearchTest
8
+
9
+ title 'Server returns valid results for QuestionnaireResponse search by patient + questionnaire'
10
+ description %(
11
+ A server SHOULD support searching by
12
+ patient + questionnaire on the QuestionnaireResponse 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_v501_questionnaire_response_patient_questionnaire_search_test
21
+ optional
22
+
23
+ input :patient_ids,
24
+ title: 'Patient IDs',
25
+ description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
26
+
27
+ def self.properties
28
+ @properties ||= SearchTestProperties.new(
29
+ resource_type: 'QuestionnaireResponse',
30
+ search_param_names: ['patient', 'questionnaire'],
31
+ possible_status_search: true
32
+ )
33
+ end
34
+
35
+ def self.metadata
36
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
37
+ end
38
+
39
+ def scratch_resources
40
+ scratch[:questionnaire_response_resources] ||= {}
41
+ end
42
+
43
+ run do
44
+ run_search_test
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,63 @@
1
+ require_relative '../../../search_test'
2
+ require_relative '../../../generator/group_metadata'
3
+
4
+ module USCoreTestKit
5
+ module USCoreV501
6
+ class QuestionnaireResponsePatientSearchTest < Inferno::Test
7
+ include USCoreTestKit::SearchTest
8
+
9
+ title 'Server returns valid results for QuestionnaireResponse search by patient'
10
+ description %(
11
+ A server SHALL support searching by
12
+ patient on the QuestionnaireResponse 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
+ This test verifies that the server supports searching by reference using
17
+ the form `patient=[id]` as well as `patient=Patient/[id]`. The two
18
+ different forms are expected to return the same number of results. US
19
+ Core requires that both forms are supported by US Core responders.
20
+
21
+ Because this is the first search of the sequence, resources in the
22
+ response will be used for subsequent tests.
23
+
24
+ Additionally, this test will check that GET and POST search methods
25
+ return the same number of results. Search by POST is required by the
26
+ FHIR R4 specification, and these tests interpret search by GET as a
27
+ requirement of US Core v5.0.1.
28
+
29
+ [US Core Server CapabilityStatement](http://hl7.org/fhir/us/core//CapabilityStatement-us-core-server.html)
30
+
31
+ )
32
+
33
+ id :us_core_v501_questionnaire_response_patient_search_test
34
+ input :patient_ids,
35
+ title: 'Patient IDs',
36
+ description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
37
+
38
+ def self.properties
39
+ @properties ||= SearchTestProperties.new(
40
+ first_search: true,
41
+ resource_type: 'QuestionnaireResponse',
42
+ search_param_names: ['patient'],
43
+ saves_delayed_references: true,
44
+ possible_status_search: true,
45
+ test_reference_variants: true,
46
+ test_post_search: true
47
+ )
48
+ end
49
+
50
+ def self.metadata
51
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
52
+ end
53
+
54
+ def scratch_resources
55
+ scratch[:questionnaire_response_resources] ||= {}
56
+ end
57
+
58
+ run do
59
+ run_search_test
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,48 @@
1
+ require_relative '../../../search_test'
2
+ require_relative '../../../generator/group_metadata'
3
+
4
+ module USCoreTestKit
5
+ module USCoreV501
6
+ class QuestionnaireResponsePatientStatusSearchTest < Inferno::Test
7
+ include USCoreTestKit::SearchTest
8
+
9
+ title 'Server returns valid results for QuestionnaireResponse search by patient + status'
10
+ description %(
11
+ A server SHOULD support searching by
12
+ patient + status on the QuestionnaireResponse 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_v501_questionnaire_response_patient_status_search_test
21
+ optional
22
+
23
+ input :patient_ids,
24
+ title: 'Patient IDs',
25
+ description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
26
+
27
+ def self.properties
28
+ @properties ||= SearchTestProperties.new(
29
+ resource_type: 'QuestionnaireResponse',
30
+ search_param_names: ['patient', 'status'],
31
+ multiple_or_search_params: ['status']
32
+ )
33
+ end
34
+
35
+ def self.metadata
36
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
37
+ end
38
+
39
+ def scratch_resources
40
+ scratch[:questionnaire_response_resources] ||= {}
41
+ end
42
+
43
+ run do
44
+ run_search_test
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,50 @@
1
+ require_relative '../../../search_test'
2
+ require_relative '../../../generator/group_metadata'
3
+
4
+ module USCoreTestKit
5
+ module USCoreV501
6
+ class QuestionnaireResponsePatientTagAuthoredSearchTest < Inferno::Test
7
+ include USCoreTestKit::SearchTest
8
+
9
+ title 'Server returns valid results for QuestionnaireResponse search by patient + _tag + authored'
10
+ description %(
11
+ A server SHOULD support searching by
12
+ patient + _tag + authored on the QuestionnaireResponse 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_v501_questionnaire_response_patient__tag_authored_search_test
21
+ optional
22
+
23
+ input :patient_ids,
24
+ title: 'Patient IDs',
25
+ description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
26
+
27
+ def self.properties
28
+ @properties ||= SearchTestProperties.new(
29
+ resource_type: 'QuestionnaireResponse',
30
+ search_param_names: ['patient', '_tag', 'authored'],
31
+ possible_status_search: true,
32
+ token_search_params: ['_tag'],
33
+ params_with_comparators: ['authored']
34
+ )
35
+ end
36
+
37
+ def self.metadata
38
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
39
+ end
40
+
41
+ def scratch_resources
42
+ scratch[:questionnaire_response_resources] ||= {}
43
+ end
44
+
45
+ run do
46
+ run_search_test
47
+ end
48
+ end
49
+ end
50
+ end