cancer_pathology_data_sharing_test_kit 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +201 -0
- data/config/presets/demo_report.json +14 -0
- data/config/presets/inferno_reference_server_preset.json.erb +39 -0
- data/lib/cancer_pathology_data_sharing_test_kit/bundle_parse.rb +53 -0
- data/lib/cancer_pathology_data_sharing_test_kit/docs/data_access_suite_description.md +83 -0
- data/lib/cancer_pathology_data_sharing_test_kit/docs/report_generation_suite_description.md +118 -0
- data/lib/cancer_pathology_data_sharing_test_kit/fhir_resource_navigation.rb +174 -0
- data/lib/cancer_pathology_data_sharing_test_kit/group_metadata.rb +82 -0
- data/lib/cancer_pathology_data_sharing_test_kit/igs/.keep +0 -0
- data/lib/cancer_pathology_data_sharing_test_kit/igs/README.md +21 -0
- data/lib/cancer_pathology_data_sharing_test_kit/metadata.rb +75 -0
- data/lib/cancer_pathology_data_sharing_test_kit/must_support_test.rb +239 -0
- data/lib/cancer_pathology_data_sharing_test_kit/primitive_type.rb +5 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/data_absent/data_absent_reason_code_system.rb +22 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/data_absent/data_absent_reason_extension.rb +20 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/data_absent/sending_hide_missing.rb +28 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/data_absent_group.rb +27 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/encounter/encounter_must_support_test.rb +53 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/encounter/encounter_validation_test.rb +48 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/encounter/metadata.yml +281 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/patient/metadata.yml +305 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/patient/patient_must_support_test.rb +58 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/patient/patient_validation_test.rb +47 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/practitioner_role/metadata.yml +44 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/practitioner_role/practitioner_role_must_support_test.rb +45 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/practitioner_role/practitioner_role_validation_test.rb +47 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/service_request/metadata.yml +75 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/service_request/service_request_must_support_test.rb +52 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/service_request/service_request_validation_test.rb +47 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/specimen/metadata.yml +51 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/specimen/specimen_must_support_test.rb +53 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/specimen/specimen_validation_test.rb +47 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/us_pathology_diagnostic_report/diagnostic_report_validation_test.rb +47 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/us_pathology_diagnostic_report/metadata.yml +77 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/us_pathology_diagnostic_report/us_pathology_diagnostic_report_must_support_test.rb +51 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/us_pathology_exchange_bundle/exchange_bundle_validation_test.rb +56 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/us_pathology_exchange_bundle/metadata.yml +78 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle/us_pathology_exchange_bundle/us_pathology_exchange_bundle_must_support_test.rb +41 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite/exchange_bundle_group.rb +104 -0
- data/lib/cancer_pathology_data_sharing_test_kit/report_generation_suite.rb +73 -0
- data/lib/cancer_pathology_data_sharing_test_kit/urls.rb +25 -0
- data/lib/cancer_pathology_data_sharing_test_kit/us_core_data_access_suite/us_core_group.rb +72 -0
- data/lib/cancer_pathology_data_sharing_test_kit/us_core_data_access_suite.rb +58 -0
- data/lib/cancer_pathology_data_sharing_test_kit/validation_test.rb +96 -0
- data/lib/cancer_pathology_data_sharing_test_kit/version.rb +4 -0
- data/lib/cancer_pathology_data_sharing_test_kit.rb +3 -0
- metadata +124 -0
@@ -0,0 +1,281 @@
|
|
1
|
+
---
|
2
|
+
:name: us_core_encounter
|
3
|
+
:class_name: USCorev311EncounterSequence
|
4
|
+
:version: v3.1.1
|
5
|
+
:reformatted_version: v311
|
6
|
+
:resource: Encounter
|
7
|
+
:profile_url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter
|
8
|
+
:profile_name: US Core Encounter Profile
|
9
|
+
:profile_version: 3.1.1
|
10
|
+
:title: Encounter
|
11
|
+
:short_description: Verify support for the server capabilities required by the US
|
12
|
+
Core Encounter 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
|
+
- patient
|
37
|
+
:expectation: SHALL
|
38
|
+
:names_not_must_support_or_mandatory: []
|
39
|
+
:must_support_or_mandatory: true
|
40
|
+
- :names:
|
41
|
+
- _id
|
42
|
+
:expectation: SHALL
|
43
|
+
:names_not_must_support_or_mandatory: []
|
44
|
+
:must_support_or_mandatory: true
|
45
|
+
- :names:
|
46
|
+
- identifier
|
47
|
+
:expectation: SHOULD
|
48
|
+
:names_not_must_support_or_mandatory: []
|
49
|
+
:must_support_or_mandatory: true
|
50
|
+
- :expectation: SHOULD
|
51
|
+
:names:
|
52
|
+
- class
|
53
|
+
- patient
|
54
|
+
:names_not_must_support_or_mandatory: []
|
55
|
+
:must_support_or_mandatory: true
|
56
|
+
- :expectation: SHOULD
|
57
|
+
:names:
|
58
|
+
- patient
|
59
|
+
- status
|
60
|
+
:names_not_must_support_or_mandatory: []
|
61
|
+
:must_support_or_mandatory: true
|
62
|
+
- :expectation: SHOULD
|
63
|
+
:names:
|
64
|
+
- patient
|
65
|
+
- type
|
66
|
+
:names_not_must_support_or_mandatory: []
|
67
|
+
:must_support_or_mandatory: true
|
68
|
+
- :expectation: SHALL
|
69
|
+
:names:
|
70
|
+
- date
|
71
|
+
- patient
|
72
|
+
:names_not_must_support_or_mandatory: []
|
73
|
+
:must_support_or_mandatory: true
|
74
|
+
:search_definitions:
|
75
|
+
:_id:
|
76
|
+
:paths:
|
77
|
+
- id
|
78
|
+
:full_paths:
|
79
|
+
- Encounter.id
|
80
|
+
:comparators: {}
|
81
|
+
:values: []
|
82
|
+
:type: http://hl7.org/fhirpath/System.String
|
83
|
+
:contains_multiple: false
|
84
|
+
:multiple_or: MAY
|
85
|
+
:identifier:
|
86
|
+
:paths:
|
87
|
+
- identifier
|
88
|
+
:full_paths:
|
89
|
+
- Encounter.identifier
|
90
|
+
:comparators: {}
|
91
|
+
:values: []
|
92
|
+
:type: Identifier
|
93
|
+
:contains_multiple: true
|
94
|
+
:multiple_or: MAY
|
95
|
+
:patient:
|
96
|
+
:paths:
|
97
|
+
- subject
|
98
|
+
:full_paths:
|
99
|
+
- Encounter.subject
|
100
|
+
:comparators: {}
|
101
|
+
:values: []
|
102
|
+
:type: Reference
|
103
|
+
:contains_multiple: false
|
104
|
+
:multiple_or: MAY
|
105
|
+
:class:
|
106
|
+
:paths:
|
107
|
+
- class
|
108
|
+
:full_paths:
|
109
|
+
- Encounter.class
|
110
|
+
:comparators: {}
|
111
|
+
:values: []
|
112
|
+
:type: Coding
|
113
|
+
:contains_multiple: false
|
114
|
+
:multiple_or: MAY
|
115
|
+
:status:
|
116
|
+
:paths:
|
117
|
+
- status
|
118
|
+
:full_paths:
|
119
|
+
- Encounter.status
|
120
|
+
:comparators: {}
|
121
|
+
:values:
|
122
|
+
- planned
|
123
|
+
- arrived
|
124
|
+
- triaged
|
125
|
+
- in-progress
|
126
|
+
- onleave
|
127
|
+
- finished
|
128
|
+
- cancelled
|
129
|
+
- entered-in-error
|
130
|
+
- unknown
|
131
|
+
:type: code
|
132
|
+
:contains_multiple: false
|
133
|
+
:multiple_or: MAY
|
134
|
+
:type:
|
135
|
+
:paths:
|
136
|
+
- type
|
137
|
+
:full_paths:
|
138
|
+
- Encounter.type
|
139
|
+
:comparators: {}
|
140
|
+
:values: []
|
141
|
+
:type: CodeableConcept
|
142
|
+
:contains_multiple: true
|
143
|
+
:multiple_or: MAY
|
144
|
+
:date:
|
145
|
+
:paths:
|
146
|
+
- period
|
147
|
+
:full_paths:
|
148
|
+
- Encounter.period
|
149
|
+
:comparators:
|
150
|
+
:eq: MAY
|
151
|
+
:ne: MAY
|
152
|
+
:gt: SHALL
|
153
|
+
:ge: SHALL
|
154
|
+
:lt: SHALL
|
155
|
+
:le: SHALL
|
156
|
+
:sa: MAY
|
157
|
+
:eb: MAY
|
158
|
+
:ap: MAY
|
159
|
+
:values: []
|
160
|
+
:type: Period
|
161
|
+
:contains_multiple: false
|
162
|
+
:multiple_or: MAY
|
163
|
+
:include_params: []
|
164
|
+
:revincludes:
|
165
|
+
- Provenance:target
|
166
|
+
:required_concepts: []
|
167
|
+
:must_supports:
|
168
|
+
:extensions: []
|
169
|
+
:slices: []
|
170
|
+
:elements:
|
171
|
+
- :path: identifier
|
172
|
+
- :path: identifier.system
|
173
|
+
- :path: identifier.value
|
174
|
+
- :path: status
|
175
|
+
- :path: class
|
176
|
+
- :path: type
|
177
|
+
- :path: subject
|
178
|
+
:types:
|
179
|
+
- Reference
|
180
|
+
- :path: participant
|
181
|
+
- :path: participant.type
|
182
|
+
- :path: participant.period
|
183
|
+
- :path: participant.individual
|
184
|
+
:types:
|
185
|
+
- Reference
|
186
|
+
- :path: period
|
187
|
+
- :path: reasonCode
|
188
|
+
- :path: hospitalization
|
189
|
+
- :path: hospitalization.dischargeDisposition
|
190
|
+
- :path: location
|
191
|
+
- :path: location.location
|
192
|
+
:types:
|
193
|
+
- Reference
|
194
|
+
:mandatory_elements:
|
195
|
+
- Encounter.identifier.system
|
196
|
+
- Encounter.identifier.value
|
197
|
+
- Encounter.status
|
198
|
+
- Encounter.statusHistory.status
|
199
|
+
- Encounter.statusHistory.period
|
200
|
+
- Encounter.class
|
201
|
+
- Encounter.classHistory.class
|
202
|
+
- Encounter.classHistory.period
|
203
|
+
- Encounter.type
|
204
|
+
- Encounter.subject
|
205
|
+
- Encounter.diagnosis.condition
|
206
|
+
- Encounter.location.location
|
207
|
+
:bindings:
|
208
|
+
- :type: code
|
209
|
+
:strength: required
|
210
|
+
:system: http://hl7.org/fhir/ValueSet/identifier-use
|
211
|
+
:path: identifier.use
|
212
|
+
- :type: code
|
213
|
+
:strength: required
|
214
|
+
:system: http://hl7.org/fhir/ValueSet/encounter-status
|
215
|
+
:path: status
|
216
|
+
- :type: code
|
217
|
+
:strength: required
|
218
|
+
:system: http://hl7.org/fhir/ValueSet/encounter-status
|
219
|
+
:path: statusHistory.status
|
220
|
+
- :type: code
|
221
|
+
:strength: required
|
222
|
+
:system: http://hl7.org/fhir/ValueSet/encounter-location-status
|
223
|
+
:path: location.status
|
224
|
+
:references:
|
225
|
+
- :path: Encounter.identifier.assigner
|
226
|
+
:profiles:
|
227
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
228
|
+
- :path: Encounter.subject
|
229
|
+
:profiles:
|
230
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
|
231
|
+
- :path: Encounter.episodeOfCare
|
232
|
+
:profiles:
|
233
|
+
- http://hl7.org/fhir/StructureDefinition/EpisodeOfCare
|
234
|
+
- :path: Encounter.basedOn
|
235
|
+
:profiles:
|
236
|
+
- http://hl7.org/fhir/StructureDefinition/ServiceRequest
|
237
|
+
- :path: Encounter.participant.individual
|
238
|
+
:profiles:
|
239
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
|
240
|
+
- :path: Encounter.appointment
|
241
|
+
:profiles:
|
242
|
+
- http://hl7.org/fhir/StructureDefinition/Appointment
|
243
|
+
- :path: Encounter.reasonReference
|
244
|
+
:profiles:
|
245
|
+
- http://hl7.org/fhir/StructureDefinition/Condition
|
246
|
+
- http://hl7.org/fhir/StructureDefinition/Procedure
|
247
|
+
- http://hl7.org/fhir/StructureDefinition/Observation
|
248
|
+
- http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation
|
249
|
+
- :path: Encounter.diagnosis.condition
|
250
|
+
:profiles:
|
251
|
+
- http://hl7.org/fhir/StructureDefinition/Condition
|
252
|
+
- http://hl7.org/fhir/StructureDefinition/Procedure
|
253
|
+
- :path: Encounter.account
|
254
|
+
:profiles:
|
255
|
+
- http://hl7.org/fhir/StructureDefinition/Account
|
256
|
+
- :path: Encounter.hospitalization.origin
|
257
|
+
:profiles:
|
258
|
+
- http://hl7.org/fhir/StructureDefinition/Location
|
259
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
260
|
+
- :path: Encounter.hospitalization.destination
|
261
|
+
:profiles:
|
262
|
+
- http://hl7.org/fhir/StructureDefinition/Location
|
263
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
264
|
+
- :path: Encounter.location.location
|
265
|
+
:profiles:
|
266
|
+
- http://hl7.org/fhir/StructureDefinition/Location
|
267
|
+
- :path: Encounter.serviceProvider
|
268
|
+
:profiles:
|
269
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
270
|
+
- :path: Encounter.partOf
|
271
|
+
:profiles:
|
272
|
+
- http://hl7.org/fhir/StructureDefinition/Encounter
|
273
|
+
:tests:
|
274
|
+
- :id: v101_us_core_v311_encounter_must_support_test
|
275
|
+
:file_name: encounter_must_support_test.rb
|
276
|
+
:id: us_core_v311_encounter
|
277
|
+
:file_name: encounter_group.rb
|
278
|
+
:delayed_references:
|
279
|
+
- :path: participant.individual
|
280
|
+
:resources:
|
281
|
+
- Practitioner
|
@@ -0,0 +1,305 @@
|
|
1
|
+
---
|
2
|
+
:name: us_core_patient
|
3
|
+
:class_name: USCorev311PatientSequence
|
4
|
+
:version: v3.1.1
|
5
|
+
:reformatted_version: v311
|
6
|
+
:resource: Patient
|
7
|
+
:profile_url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
|
8
|
+
:profile_name: US Core Patient Profile
|
9
|
+
:profile_version: 3.1.1
|
10
|
+
:title: Patient
|
11
|
+
:short_description: Verify support for the server capabilities required by the US
|
12
|
+
Core Patient Profile.
|
13
|
+
:is_delayed: false
|
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
|
+
- _id
|
37
|
+
:expectation: SHALL
|
38
|
+
:names_not_must_support_or_mandatory: []
|
39
|
+
:must_support_or_mandatory: true
|
40
|
+
- :names:
|
41
|
+
- identifier
|
42
|
+
:expectation: SHALL
|
43
|
+
:names_not_must_support_or_mandatory: []
|
44
|
+
:must_support_or_mandatory: true
|
45
|
+
- :names:
|
46
|
+
- name
|
47
|
+
:expectation: SHALL
|
48
|
+
:names_not_must_support_or_mandatory: []
|
49
|
+
:must_support_or_mandatory: true
|
50
|
+
- :expectation: SHOULD
|
51
|
+
:names:
|
52
|
+
- birthdate
|
53
|
+
- family
|
54
|
+
:names_not_must_support_or_mandatory: []
|
55
|
+
:must_support_or_mandatory: true
|
56
|
+
- :expectation: SHOULD
|
57
|
+
:names:
|
58
|
+
- family
|
59
|
+
- gender
|
60
|
+
:names_not_must_support_or_mandatory: []
|
61
|
+
:must_support_or_mandatory: true
|
62
|
+
- :expectation: SHALL
|
63
|
+
:names:
|
64
|
+
- birthdate
|
65
|
+
- name
|
66
|
+
:names_not_must_support_or_mandatory: []
|
67
|
+
:must_support_or_mandatory: true
|
68
|
+
- :expectation: SHALL
|
69
|
+
:names:
|
70
|
+
- gender
|
71
|
+
- name
|
72
|
+
:names_not_must_support_or_mandatory: []
|
73
|
+
:must_support_or_mandatory: true
|
74
|
+
:search_definitions:
|
75
|
+
:_id:
|
76
|
+
:paths:
|
77
|
+
- id
|
78
|
+
:full_paths:
|
79
|
+
- Patient.id
|
80
|
+
:comparators: {}
|
81
|
+
:values: []
|
82
|
+
:type: http://hl7.org/fhirpath/System.String
|
83
|
+
:contains_multiple: false
|
84
|
+
:multiple_or: MAY
|
85
|
+
:identifier:
|
86
|
+
:paths:
|
87
|
+
- identifier
|
88
|
+
:full_paths:
|
89
|
+
- Patient.identifier
|
90
|
+
:comparators: {}
|
91
|
+
:values: []
|
92
|
+
:type: Identifier
|
93
|
+
:contains_multiple: true
|
94
|
+
:multiple_or: MAY
|
95
|
+
:name:
|
96
|
+
:paths:
|
97
|
+
- name
|
98
|
+
:full_paths:
|
99
|
+
- Patient.name
|
100
|
+
:comparators: {}
|
101
|
+
:values: []
|
102
|
+
:type: HumanName
|
103
|
+
:contains_multiple: true
|
104
|
+
:multiple_or: MAY
|
105
|
+
:birthdate:
|
106
|
+
:paths:
|
107
|
+
- birthDate
|
108
|
+
:full_paths:
|
109
|
+
- Patient.birthDate
|
110
|
+
:comparators:
|
111
|
+
:eq: MAY
|
112
|
+
:ne: MAY
|
113
|
+
:gt: MAY
|
114
|
+
:ge: MAY
|
115
|
+
:lt: MAY
|
116
|
+
:le: MAY
|
117
|
+
:sa: MAY
|
118
|
+
:eb: MAY
|
119
|
+
:ap: MAY
|
120
|
+
:values: []
|
121
|
+
:type: date
|
122
|
+
:contains_multiple: false
|
123
|
+
:multiple_or: MAY
|
124
|
+
:family:
|
125
|
+
:paths:
|
126
|
+
- name.family
|
127
|
+
:full_paths:
|
128
|
+
- Patient.name.family
|
129
|
+
:comparators: {}
|
130
|
+
:values: []
|
131
|
+
:type: string
|
132
|
+
:contains_multiple: false
|
133
|
+
:multiple_or: MAY
|
134
|
+
:gender:
|
135
|
+
:paths:
|
136
|
+
- gender
|
137
|
+
:full_paths:
|
138
|
+
- Patient.gender
|
139
|
+
:comparators: {}
|
140
|
+
:values: []
|
141
|
+
:type: code
|
142
|
+
:contains_multiple: false
|
143
|
+
:multiple_or: MAY
|
144
|
+
:include_params: []
|
145
|
+
:revincludes:
|
146
|
+
- Provenance:target
|
147
|
+
:required_concepts: []
|
148
|
+
:must_supports:
|
149
|
+
:extensions:
|
150
|
+
- :id: Patient.extension:race
|
151
|
+
:path: extension
|
152
|
+
:url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-race
|
153
|
+
- :id: Patient.extension:ethnicity
|
154
|
+
:path: extension
|
155
|
+
:url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity
|
156
|
+
- :id: Patient.extension:birthsex
|
157
|
+
:path: extension
|
158
|
+
:url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex
|
159
|
+
:slices: []
|
160
|
+
:elements:
|
161
|
+
- :path: identifier
|
162
|
+
- :path: identifier.system
|
163
|
+
- :path: identifier.value
|
164
|
+
- :path: name
|
165
|
+
- :path: name.family
|
166
|
+
- :path: name.given
|
167
|
+
- :path: telecom
|
168
|
+
- :path: telecom.system
|
169
|
+
- :path: telecom.value
|
170
|
+
- :path: telecom.use
|
171
|
+
- :path: gender
|
172
|
+
- :path: birthDate
|
173
|
+
- :path: address
|
174
|
+
- :path: address.line
|
175
|
+
- :path: address.city
|
176
|
+
- :path: address.state
|
177
|
+
- :path: address.postalCode
|
178
|
+
- :path: address.period.end
|
179
|
+
:uscdi_only: true
|
180
|
+
- :path: communication
|
181
|
+
- :path: communication.language
|
182
|
+
- :path: name.period.end
|
183
|
+
:uscdi_only: true
|
184
|
+
- :path: name.use
|
185
|
+
:fixed_value: old
|
186
|
+
:uscdi_only: true
|
187
|
+
- :path: address.use
|
188
|
+
:fixed_value: old
|
189
|
+
:uscdi_only: true
|
190
|
+
:choices:
|
191
|
+
- :paths:
|
192
|
+
- address.period.end
|
193
|
+
- address.use
|
194
|
+
:uscdi_only: true
|
195
|
+
- :paths:
|
196
|
+
- name.period.end
|
197
|
+
- name.use
|
198
|
+
:uscdi_only: true
|
199
|
+
:mandatory_elements:
|
200
|
+
- Patient.identifier
|
201
|
+
- Patient.identifier.system
|
202
|
+
- Patient.identifier.value
|
203
|
+
- Patient.name
|
204
|
+
- Patient.telecom.system
|
205
|
+
- Patient.telecom.value
|
206
|
+
- Patient.gender
|
207
|
+
- Patient.communication.language
|
208
|
+
- Patient.link.other
|
209
|
+
- Patient.link.type
|
210
|
+
:bindings:
|
211
|
+
- :type: code
|
212
|
+
:strength: required
|
213
|
+
:system: http://hl7.org/fhir/ValueSet/identifier-use
|
214
|
+
:path: identifier.use
|
215
|
+
- :type: code
|
216
|
+
:strength: required
|
217
|
+
:system: http://hl7.org/fhir/ValueSet/name-use
|
218
|
+
:path: name.use
|
219
|
+
- :type: code
|
220
|
+
:strength: required
|
221
|
+
:system: http://hl7.org/fhir/ValueSet/contact-point-system
|
222
|
+
:path: telecom.system
|
223
|
+
- :type: code
|
224
|
+
:strength: required
|
225
|
+
:system: http://hl7.org/fhir/ValueSet/contact-point-use
|
226
|
+
:path: telecom.use
|
227
|
+
- :type: code
|
228
|
+
:strength: required
|
229
|
+
:system: http://hl7.org/fhir/ValueSet/administrative-gender
|
230
|
+
:path: gender
|
231
|
+
- :type: code
|
232
|
+
:strength: required
|
233
|
+
:system: http://hl7.org/fhir/ValueSet/address-use
|
234
|
+
:path: address.use
|
235
|
+
- :type: code
|
236
|
+
:strength: required
|
237
|
+
:system: http://hl7.org/fhir/ValueSet/address-type
|
238
|
+
:path: address.type
|
239
|
+
- :type: code
|
240
|
+
:strength: required
|
241
|
+
:system: http://hl7.org/fhir/ValueSet/administrative-gender
|
242
|
+
:path: contact.gender
|
243
|
+
- :type: code
|
244
|
+
:strength: required
|
245
|
+
:system: http://hl7.org/fhir/ValueSet/link-type
|
246
|
+
:path: link.type
|
247
|
+
- :type: Coding
|
248
|
+
:strength: required
|
249
|
+
:system: http://hl7.org/fhir/us/core/ValueSet/omb-race-category
|
250
|
+
:path: value
|
251
|
+
:extensions:
|
252
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-race
|
253
|
+
- ombCategory
|
254
|
+
- :type: Coding
|
255
|
+
:strength: required
|
256
|
+
:system: http://hl7.org/fhir/us/core/ValueSet/detailed-race
|
257
|
+
:path: value
|
258
|
+
:extensions:
|
259
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-race
|
260
|
+
- detailed
|
261
|
+
- :type: Coding
|
262
|
+
:strength: required
|
263
|
+
:system: http://hl7.org/fhir/us/core/ValueSet/omb-ethnicity-category
|
264
|
+
:path: value
|
265
|
+
:extensions:
|
266
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity
|
267
|
+
- ombCategory
|
268
|
+
- :type: Coding
|
269
|
+
:strength: required
|
270
|
+
:system: http://hl7.org/fhir/us/core/ValueSet/detailed-ethnicity
|
271
|
+
:path: value
|
272
|
+
:extensions:
|
273
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity
|
274
|
+
- detailed
|
275
|
+
- :type: code
|
276
|
+
:strength: required
|
277
|
+
:system: http://hl7.org/fhir/us/core/ValueSet/birthsex
|
278
|
+
:path: value
|
279
|
+
:extensions:
|
280
|
+
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex
|
281
|
+
:references:
|
282
|
+
- :path: Patient.identifier.assigner
|
283
|
+
:profiles:
|
284
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
285
|
+
- :path: Patient.contact.organization
|
286
|
+
:profiles:
|
287
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
288
|
+
- :path: Patient.generalPractitioner
|
289
|
+
:profiles:
|
290
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
291
|
+
- http://hl7.org/fhir/StructureDefinition/Practitioner
|
292
|
+
- http://hl7.org/fhir/StructureDefinition/PractitionerRole
|
293
|
+
- :path: Patient.managingOrganization
|
294
|
+
:profiles:
|
295
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
296
|
+
- :path: Patient.link.other
|
297
|
+
:profiles:
|
298
|
+
- http://hl7.org/fhir/StructureDefinition/Patient
|
299
|
+
- http://hl7.org/fhir/StructureDefinition/RelatedPerson
|
300
|
+
:tests:
|
301
|
+
- :id: v101_us_core_v311_patient_must_support_test
|
302
|
+
:file_name: patient_must_support_test.rb
|
303
|
+
:id: us_core_v311_patient
|
304
|
+
:file_name: patient_group.rb
|
305
|
+
:delayed_references: []
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require_relative '../../../must_support_test'
|
2
|
+
require_relative '../../../group_metadata'
|
3
|
+
|
4
|
+
module CancerPathologyDataSharingTestKit
|
5
|
+
module V101
|
6
|
+
class PatientMustSupportTest < Inferno::Test
|
7
|
+
include CancerPathologyDataSharingTestKit::MustSupportTest
|
8
|
+
|
9
|
+
title 'All must support elements are provided in the US Core Patient resources'
|
10
|
+
description %(
|
11
|
+
Report generators SHALL be capable of populating all must support data elements
|
12
|
+
defined in the [US Pathology ExchangeBundle profile](https://hl7.org/fhir/us/cancer-reporting/STU1.0.1/StructureDefinition-us-pathology-exchange-bundle.html)
|
13
|
+
and profiles it references. This test will look through the Patient resources
|
14
|
+
found in the provided report Bundles for the following must support elements:
|
15
|
+
|
16
|
+
* Patient.address
|
17
|
+
* Patient.address.city
|
18
|
+
* Patient.address.line
|
19
|
+
* Patient.address.postalCode
|
20
|
+
* Patient.address.state
|
21
|
+
* Patient.birthDate
|
22
|
+
* Patient.communication
|
23
|
+
* Patient.communication.language
|
24
|
+
* Patient.extension:birthsex
|
25
|
+
* Patient.extension:ethnicity
|
26
|
+
* Patient.extension:race
|
27
|
+
* Patient.gender
|
28
|
+
* Patient.identifier
|
29
|
+
* Patient.identifier.system
|
30
|
+
* Patient.identifier.value
|
31
|
+
* Patient.name
|
32
|
+
* Patient.name.family
|
33
|
+
* Patient.name.given
|
34
|
+
* Patient.telecom
|
35
|
+
* Patient.telecom.system
|
36
|
+
* Patient.telecom.use
|
37
|
+
* Patient.telecom.value
|
38
|
+
)
|
39
|
+
|
40
|
+
id :cpds_v101_us_core_v311_patient_must_support_test
|
41
|
+
|
42
|
+
def resource_type
|
43
|
+
'Patient'
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.metadata
|
47
|
+
@metadata ||= GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
48
|
+
end
|
49
|
+
|
50
|
+
run do
|
51
|
+
all_resources = scratch[:cpds_resources]&.values&.map do |bundle_resources|
|
52
|
+
bundle_resources['Patient'] || []
|
53
|
+
end
|
54
|
+
perform_must_support_test(all_resources&.flatten)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require_relative '../../../bundle_parse'
|
2
|
+
require_relative '../../../validation_test'
|
3
|
+
|
4
|
+
module CancerPathologyDataSharingTestKit
|
5
|
+
class PatientValidationTest < Inferno::Test
|
6
|
+
include CancerPathologyDataSharingTestKit::ValidationTest
|
7
|
+
include CancerPathologyDataSharingTestKit::BundleParse
|
8
|
+
|
9
|
+
title 'Patient resource in each bundle conforms to the US Core Patient profile'
|
10
|
+
description %(
|
11
|
+
This test verifies that there is exactly one Patient resource returned from each bundle and that it conforms to
|
12
|
+
the [US Core Patient Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient).
|
13
|
+
|
14
|
+
It verifies the presence of mandatory elements and that elements with
|
15
|
+
required bindings contain appropriate values. CodeableConcept element
|
16
|
+
bindings will fail if none of their codings have a code/system belonging
|
17
|
+
to the bound ValueSet. Quantity, Coding, and code element bindings will
|
18
|
+
fail if their code/system are not found in the valueset.
|
19
|
+
)
|
20
|
+
|
21
|
+
id :cpds_patient_validation_test
|
22
|
+
|
23
|
+
def resource_type
|
24
|
+
'Patient'
|
25
|
+
end
|
26
|
+
|
27
|
+
output :dar_code_found, :dar_extension_found
|
28
|
+
|
29
|
+
run do
|
30
|
+
invalid_bundles = []
|
31
|
+
total_resources = 0
|
32
|
+
scratch[:cpds_resources].each do |bundle_id, bundle_resources|
|
33
|
+
resources = bundle_resources['Patient'] || []
|
34
|
+
total_resources += resources.length
|
35
|
+
|
36
|
+
profile_url = PE_BUNDLE_SLICE_RESOURCES['Patient']
|
37
|
+
invalid_bundles << bundle_id if perform_strict_validation_test('Patient', bundle_id, resources, profile_url, '5.0.1',
|
38
|
+
restriction: 'exactly_one')
|
39
|
+
end
|
40
|
+
|
41
|
+
skip_if total_resources.zero?,
|
42
|
+
"No #{resource_type} resources found in any of the given bundles"
|
43
|
+
|
44
|
+
check_for_errors(invalid_bundles)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|