us_core_test_kit 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/lib/us_core_test_kit/generated/v3.1.1/allergy_intolerance/metadata.yml +1 -24
  3. data/lib/us_core_test_kit/generated/v3.1.1/bodyheight/metadata.yml +0 -52
  4. data/lib/us_core_test_kit/generated/v3.1.1/bodytemp/metadata.yml +0 -52
  5. data/lib/us_core_test_kit/generated/v3.1.1/bodyweight/metadata.yml +0 -52
  6. data/lib/us_core_test_kit/generated/v3.1.1/bp/metadata.yml +0 -76
  7. data/lib/us_core_test_kit/generated/v3.1.1/care_plan/metadata.yml +0 -28
  8. data/lib/us_core_test_kit/generated/v3.1.1/care_team/metadata.yml +0 -16
  9. data/lib/us_core_test_kit/generated/v3.1.1/condition/metadata.yml +1 -39
  10. data/lib/us_core_test_kit/generated/v3.1.1/device/metadata.yml +1 -1013
  11. data/lib/us_core_test_kit/generated/v3.1.1/diagnostic_report_lab/metadata.yml +1 -1021
  12. data/lib/us_core_test_kit/generated/v3.1.1/diagnostic_report_note/metadata.yml +1 -1017
  13. data/lib/us_core_test_kit/generated/v3.1.1/document_reference/metadata.yml +1 -78
  14. data/lib/us_core_test_kit/generated/v3.1.1/encounter/metadata.yml +2 -85
  15. data/lib/us_core_test_kit/generated/v3.1.1/goal/metadata.yml +1 -46
  16. data/lib/us_core_test_kit/generated/v3.1.1/head_circumference/metadata.yml +0 -52
  17. data/lib/us_core_test_kit/generated/v3.1.1/heartrate/metadata.yml +0 -52
  18. data/lib/us_core_test_kit/generated/v3.1.1/immunization/metadata.yml +0 -48
  19. data/lib/us_core_test_kit/generated/v3.1.1/medication_request/metadata.yml +0 -60
  20. data/lib/us_core_test_kit/generated/v3.1.1/metadata.yml +14 -6468
  21. data/lib/us_core_test_kit/generated/v3.1.1/observation_lab/metadata.yml +1 -1053
  22. data/lib/us_core_test_kit/generated/v3.1.1/organization/metadata.yml +0 -20
  23. data/lib/us_core_test_kit/generated/v3.1.1/patient/metadata.yml +1 -29
  24. data/lib/us_core_test_kit/generated/v3.1.1/pediatric_bmi_for_age/metadata.yml +0 -52
  25. data/lib/us_core_test_kit/generated/v3.1.1/pediatric_weight_for_height/metadata.yml +0 -52
  26. data/lib/us_core_test_kit/generated/v3.1.1/practitioner/metadata.yml +0 -16
  27. data/lib/us_core_test_kit/generated/v3.1.1/procedure/metadata.yml +1 -1049
  28. data/lib/us_core_test_kit/generated/v3.1.1/provenance/metadata.yml +0 -36
  29. data/lib/us_core_test_kit/generated/v3.1.1/pulse_oximetry/metadata.yml +0 -76
  30. data/lib/us_core_test_kit/generated/v3.1.1/resprate/metadata.yml +0 -52
  31. data/lib/us_core_test_kit/generated/v3.1.1/smokingstatus/metadata.yml +1 -62
  32. data/lib/us_core_test_kit/generated/v3.1.1/us_core_test_suite.rb +20 -1
  33. data/lib/us_core_test_kit/generated/v4.0.0/allergy_intolerance/metadata.yml +1 -24
  34. data/lib/us_core_test_kit/generated/v4.0.0/blood_pressure/metadata.yml +0 -80
  35. data/lib/us_core_test_kit/generated/v4.0.0/bmi/metadata.yml +0 -56
  36. data/lib/us_core_test_kit/generated/v4.0.0/body_height/metadata.yml +0 -56
  37. data/lib/us_core_test_kit/generated/v4.0.0/body_temperature/metadata.yml +0 -56
  38. data/lib/us_core_test_kit/generated/v4.0.0/body_weight/metadata.yml +0 -56
  39. data/lib/us_core_test_kit/generated/v4.0.0/care_plan/metadata.yml +0 -28
  40. data/lib/us_core_test_kit/generated/v4.0.0/care_team/metadata.yml +0 -16
  41. data/lib/us_core_test_kit/generated/v4.0.0/condition/metadata.yml +1 -39
  42. data/lib/us_core_test_kit/generated/v4.0.0/device/metadata.yml +1 -1013
  43. data/lib/us_core_test_kit/generated/v4.0.0/diagnostic_report_lab/metadata.yml +1 -1021
  44. data/lib/us_core_test_kit/generated/v4.0.0/diagnostic_report_note/metadata.yml +1 -1017
  45. data/lib/us_core_test_kit/generated/v4.0.0/document_reference/metadata.yml +1 -78
  46. data/lib/us_core_test_kit/generated/v4.0.0/encounter/metadata.yml +2 -85
  47. data/lib/us_core_test_kit/generated/v4.0.0/goal/metadata.yml +1 -46
  48. data/lib/us_core_test_kit/generated/v4.0.0/head_circumference/metadata.yml +0 -56
  49. data/lib/us_core_test_kit/generated/v4.0.0/head_circumference_percentile/metadata.yml +0 -56
  50. data/lib/us_core_test_kit/generated/v4.0.0/heart_rate/metadata.yml +0 -56
  51. data/lib/us_core_test_kit/generated/v4.0.0/immunization/metadata.yml +0 -48
  52. data/lib/us_core_test_kit/generated/v4.0.0/medication_request/metadata.yml +0 -60
  53. data/lib/us_core_test_kit/generated/v4.0.0/metadata.yml +13 -6618
  54. data/lib/us_core_test_kit/generated/v4.0.0/observation_lab/metadata.yml +1 -1053
  55. data/lib/us_core_test_kit/generated/v4.0.0/organization/metadata.yml +0 -20
  56. data/lib/us_core_test_kit/generated/v4.0.0/patient/metadata.yml +1 -29
  57. data/lib/us_core_test_kit/generated/v4.0.0/pediatric_bmi_for_age/metadata.yml +0 -56
  58. data/lib/us_core_test_kit/generated/v4.0.0/pediatric_weight_for_height/metadata.yml +0 -56
  59. data/lib/us_core_test_kit/generated/v4.0.0/practitioner/metadata.yml +0 -16
  60. data/lib/us_core_test_kit/generated/v4.0.0/procedure/metadata.yml +1 -1049
  61. data/lib/us_core_test_kit/generated/v4.0.0/provenance/metadata.yml +0 -40
  62. data/lib/us_core_test_kit/generated/v4.0.0/pulse_oximetry/metadata.yml +0 -80
  63. data/lib/us_core_test_kit/generated/v4.0.0/respiratory_rate/metadata.yml +0 -56
  64. data/lib/us_core_test_kit/generated/v4.0.0/smokingstatus/metadata.yml +0 -56
  65. data/lib/us_core_test_kit/generated/v4.0.0/us_core_test_suite.rb +20 -1
  66. data/lib/us_core_test_kit/generated/v5.0.1/allergy_intolerance/metadata.yml +1 -24
  67. data/lib/us_core_test_kit/generated/v5.0.1/blood_pressure/metadata.yml +0 -80
  68. data/lib/us_core_test_kit/generated/v5.0.1/bmi/metadata.yml +0 -56
  69. data/lib/us_core_test_kit/generated/v5.0.1/body_height/metadata.yml +0 -56
  70. data/lib/us_core_test_kit/generated/v5.0.1/body_temperature/metadata.yml +0 -56
  71. data/lib/us_core_test_kit/generated/v5.0.1/body_weight/metadata.yml +0 -56
  72. data/lib/us_core_test_kit/generated/v5.0.1/care_plan/metadata.yml +0 -28
  73. data/lib/us_core_test_kit/generated/v5.0.1/care_team/metadata.yml +0 -16
  74. data/lib/us_core_test_kit/generated/v5.0.1/condition_encounter_diagnosis/metadata.yml +1 -43
  75. data/lib/us_core_test_kit/generated/v5.0.1/condition_problems_health_concerns/metadata.yml +2 -44
  76. data/lib/us_core_test_kit/generated/v5.0.1/device/metadata.yml +1 -1013
  77. data/lib/us_core_test_kit/generated/v5.0.1/diagnostic_report_lab/metadata.yml +1 -1021
  78. data/lib/us_core_test_kit/generated/v5.0.1/diagnostic_report_note/metadata.yml +1 -1021
  79. data/lib/us_core_test_kit/generated/v5.0.1/document_reference/metadata.yml +1 -82
  80. data/lib/us_core_test_kit/generated/v5.0.1/encounter/metadata.yml +2 -85
  81. data/lib/us_core_test_kit/generated/v5.0.1/goal/metadata.yml +2 -1047
  82. data/lib/us_core_test_kit/generated/v5.0.1/head_circumference/metadata.yml +0 -56
  83. data/lib/us_core_test_kit/generated/v5.0.1/head_circumference_percentile/metadata.yml +0 -56
  84. data/lib/us_core_test_kit/generated/v5.0.1/heart_rate/metadata.yml +0 -56
  85. data/lib/us_core_test_kit/generated/v5.0.1/immunization/metadata.yml +0 -48
  86. data/lib/us_core_test_kit/generated/v5.0.1/medication_request/metadata.yml +0 -64
  87. data/lib/us_core_test_kit/generated/v5.0.1/metadata.yml +22 -11040
  88. data/lib/us_core_test_kit/generated/v5.0.1/observation_clinical_test/metadata.yml +0 -52
  89. data/lib/us_core_test_kit/generated/v5.0.1/observation_imaging/metadata.yml +1 -1053
  90. data/lib/us_core_test_kit/generated/v5.0.1/observation_lab/metadata.yml +1 -1053
  91. data/lib/us_core_test_kit/generated/v5.0.1/observation_sdoh_assessment/metadata.yml +0 -57
  92. data/lib/us_core_test_kit/generated/v5.0.1/observation_sexual_orientation/metadata.yml +1 -62
  93. data/lib/us_core_test_kit/generated/v5.0.1/observation_social_history/metadata.yml +1 -1058
  94. data/lib/us_core_test_kit/generated/v5.0.1/organization/metadata.yml +0 -20
  95. data/lib/us_core_test_kit/generated/v5.0.1/patient/metadata.yml +1 -29
  96. data/lib/us_core_test_kit/generated/v5.0.1/pediatric_bmi_for_age/metadata.yml +0 -56
  97. data/lib/us_core_test_kit/generated/v5.0.1/pediatric_weight_for_height/metadata.yml +0 -56
  98. data/lib/us_core_test_kit/generated/v5.0.1/practitioner/metadata.yml +0 -20
  99. data/lib/us_core_test_kit/generated/v5.0.1/procedure/metadata.yml +1 -1049
  100. data/lib/us_core_test_kit/generated/v5.0.1/provenance/metadata.yml +0 -40
  101. data/lib/us_core_test_kit/generated/v5.0.1/pulse_oximetry/metadata.yml +0 -80
  102. data/lib/us_core_test_kit/generated/v5.0.1/questionnaire_response/metadata.yml +0 -20
  103. data/lib/us_core_test_kit/generated/v5.0.1/related_person/metadata.yml +0 -12
  104. data/lib/us_core_test_kit/generated/v5.0.1/respiratory_rate/metadata.yml +0 -56
  105. data/lib/us_core_test_kit/generated/v5.0.1/service_request/metadata.yml +1 -1041
  106. data/lib/us_core_test_kit/generated/v5.0.1/smokingstatus/metadata.yml +0 -56
  107. data/lib/us_core_test_kit/generated/v5.0.1/us_core_test_suite.rb +20 -1
  108. data/lib/us_core_test_kit/generator/must_support_metadata_extractor.rb +1 -1
  109. data/lib/us_core_test_kit/generator/search_definition_metadata_extractor.rb +8 -57
  110. data/lib/us_core_test_kit/generator/suite_generator.rb +11 -0
  111. data/lib/us_core_test_kit/generator/terminology_binding_metadata_extractor.rb +15 -3
  112. data/lib/us_core_test_kit/generator/value_extractor.rb +53 -2
  113. data/lib/us_core_test_kit/provenance_validator.rb +37 -0
  114. data/lib/us_core_test_kit/version.rb +1 -1
  115. metadata +3 -2
@@ -82,46 +82,6 @@
82
82
  - Provenance.entity.role
83
83
  - Provenance.entity.what
84
84
  :bindings:
85
- - :type: code
86
- :strength: preferred
87
- :system: http://hl7.org/fhir/ValueSet/languages
88
- :path: language
89
- - :type: uri
90
- :strength: extensible
91
- :system: http://hl7.org/fhir/ValueSet/resource-types
92
- :path: target.type
93
- - :type: CodeableConcept
94
- :strength: extensible
95
- :system: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse
96
- :path: reason
97
- - :type: CodeableConcept
98
- :strength: extensible
99
- :system: http://hl7.org/fhir/ValueSet/provenance-activity-type
100
- :path: activity
101
- - :type: CodeableConcept
102
- :strength: extensible
103
- :system: http://hl7.org/fhir/us/core/ValueSet/us-core-provenance-participant-type
104
- :path: agent.type
105
- - :type: CodeableConcept
106
- :strength: example
107
- :system: http://hl7.org/fhir/ValueSet/security-role-type
108
- :path: agent.role
109
- - :type: CodeableConcept
110
- :strength: extensible
111
- :system: http://hl7.org/fhir/ValueSet/provenance-agent-type
112
- :path: agent.type
113
- - :type: CodeableConcept
114
- :strength: example
115
- :system: http://hl7.org/fhir/ValueSet/security-role-type
116
- :path: agent.role
117
- - :type: CodeableConcept
118
- :strength: extensible
119
- :system: http://hl7.org/fhir/ValueSet/provenance-agent-type
120
- :path: agent.type
121
- - :type: CodeableConcept
122
- :strength: example
123
- :system: http://hl7.org/fhir/ValueSet/security-role-type
124
- :path: agent.role
125
85
  - :type: code
126
86
  :strength: required
127
87
  :system: http://hl7.org/fhir/ValueSet/provenance-entity-role
@@ -233,98 +233,18 @@
233
233
  - Observation.component.value[x].system
234
234
  - Observation.component.value[x].code
235
235
  :bindings:
236
- - :type: code
237
- :strength: preferred
238
- :system: http://hl7.org/fhir/ValueSet/languages
239
- :path: language
240
236
  - :type: code
241
237
  :strength: required
242
238
  :system: http://hl7.org/fhir/ValueSet/observation-status
243
239
  :path: status
244
- - :type: CodeableConcept
245
- :strength: preferred
246
- :system: http://hl7.org/fhir/ValueSet/observation-category
247
- :path: category
248
- - :type: CodeableConcept
249
- :strength: preferred
250
- :system: http://hl7.org/fhir/ValueSet/observation-category
251
- :path: category
252
- - :type: CodeableConcept
253
- :strength: extensible
254
- :system: http://hl7.org/fhir/us/core/ValueSet/us-core-vital-signs
255
- :path: code
256
- - :type: Quantity
257
- :strength: extensible
258
- :system: http://hl7.org/fhir/ValueSet/ucum-vitals-common
259
- :path: value
260
- - :type: CodeableConcept
261
- :strength: extensible
262
- :system: http://hl7.org/fhir/ValueSet/data-absent-reason
263
- :path: dataAbsentReason
264
- - :type: CodeableConcept
265
- :strength: extensible
266
- :system: http://hl7.org/fhir/ValueSet/observation-interpretation
267
- :path: interpretation
268
- - :type: CodeableConcept
269
- :strength: example
270
- :system: http://hl7.org/fhir/ValueSet/body-site
271
- :path: bodySite
272
- - :type: CodeableConcept
273
- :strength: example
274
- :system: http://hl7.org/fhir/ValueSet/observation-methods
275
- :path: method
276
- - :type: CodeableConcept
277
- :strength: preferred
278
- :system: http://hl7.org/fhir/ValueSet/referencerange-meaning
279
- :path: referenceRange.type
280
- - :type: CodeableConcept
281
- :strength: example
282
- :system: http://hl7.org/fhir/ValueSet/referencerange-appliesto
283
- :path: referenceRange.appliesTo
284
- - :type: CodeableConcept
285
- :strength: extensible
286
- :system: http://hl7.org/fhir/us/core/ValueSet/us-core-vital-signs
287
- :path: component.code
288
- - :type: CodeableConcept
289
- :strength: extensible
290
- :system: http://hl7.org/fhir/ValueSet/data-absent-reason
291
- :path: component.dataAbsentReason
292
- - :type: CodeableConcept
293
- :strength: extensible
294
- :system: http://hl7.org/fhir/ValueSet/observation-interpretation
295
- :path: component.interpretation
296
- - :type: CodeableConcept
297
- :strength: extensible
298
- :system: http://hl7.org/fhir/us/core/ValueSet/us-core-vital-signs
299
- :path: component.code
300
240
  - :type: code
301
241
  :strength: required
302
242
  :system: http://hl7.org/fhir/ValueSet/quantity-comparator
303
243
  :path: component.value.comparator
304
- - :type: CodeableConcept
305
- :strength: extensible
306
- :system: http://hl7.org/fhir/ValueSet/data-absent-reason
307
- :path: component.dataAbsentReason
308
- - :type: CodeableConcept
309
- :strength: extensible
310
- :system: http://hl7.org/fhir/ValueSet/observation-interpretation
311
- :path: component.interpretation
312
- - :type: CodeableConcept
313
- :strength: extensible
314
- :system: http://hl7.org/fhir/us/core/ValueSet/us-core-vital-signs
315
- :path: component.code
316
244
  - :type: code
317
245
  :strength: required
318
246
  :system: http://hl7.org/fhir/ValueSet/quantity-comparator
319
247
  :path: component.value.comparator
320
- - :type: CodeableConcept
321
- :strength: extensible
322
- :system: http://hl7.org/fhir/ValueSet/data-absent-reason
323
- :path: component.dataAbsentReason
324
- - :type: CodeableConcept
325
- :strength: extensible
326
- :system: http://hl7.org/fhir/ValueSet/observation-interpretation
327
- :path: component.interpretation
328
248
  :references:
329
249
  - :path: Observation.basedOn
330
250
  :profiles:
@@ -192,70 +192,14 @@
192
192
  - Observation.value[x].code
193
193
  - Observation.component.code
194
194
  :bindings:
195
- - :type: code
196
- :strength: preferred
197
- :system: http://hl7.org/fhir/ValueSet/languages
198
- :path: language
199
195
  - :type: code
200
196
  :strength: required
201
197
  :system: http://hl7.org/fhir/ValueSet/observation-status
202
198
  :path: status
203
- - :type: CodeableConcept
204
- :strength: preferred
205
- :system: http://hl7.org/fhir/ValueSet/observation-category
206
- :path: category
207
- - :type: CodeableConcept
208
- :strength: preferred
209
- :system: http://hl7.org/fhir/ValueSet/observation-category
210
- :path: category
211
- - :type: CodeableConcept
212
- :strength: extensible
213
- :system: http://hl7.org/fhir/us/core/ValueSet/us-core-vital-signs
214
- :path: code
215
199
  - :type: code
216
200
  :strength: required
217
201
  :system: http://hl7.org/fhir/ValueSet/quantity-comparator
218
202
  :path: value.comparator
219
- - :type: CodeableConcept
220
- :strength: extensible
221
- :system: http://hl7.org/fhir/ValueSet/data-absent-reason
222
- :path: dataAbsentReason
223
- - :type: CodeableConcept
224
- :strength: extensible
225
- :system: http://hl7.org/fhir/ValueSet/observation-interpretation
226
- :path: interpretation
227
- - :type: CodeableConcept
228
- :strength: example
229
- :system: http://hl7.org/fhir/ValueSet/body-site
230
- :path: bodySite
231
- - :type: CodeableConcept
232
- :strength: example
233
- :system: http://hl7.org/fhir/ValueSet/observation-methods
234
- :path: method
235
- - :type: CodeableConcept
236
- :strength: preferred
237
- :system: http://hl7.org/fhir/ValueSet/referencerange-meaning
238
- :path: referenceRange.type
239
- - :type: CodeableConcept
240
- :strength: example
241
- :system: http://hl7.org/fhir/ValueSet/referencerange-appliesto
242
- :path: referenceRange.appliesTo
243
- - :type: CodeableConcept
244
- :strength: extensible
245
- :system: http://hl7.org/fhir/us/core/ValueSet/us-core-vital-signs
246
- :path: component.code
247
- - :type: Quantity
248
- :strength: extensible
249
- :system: http://hl7.org/fhir/ValueSet/ucum-vitals-common
250
- :path: component.value
251
- - :type: CodeableConcept
252
- :strength: extensible
253
- :system: http://hl7.org/fhir/ValueSet/data-absent-reason
254
- :path: component.dataAbsentReason
255
- - :type: CodeableConcept
256
- :strength: extensible
257
- :system: http://hl7.org/fhir/ValueSet/observation-interpretation
258
- :path: component.interpretation
259
203
  :references:
260
204
  - :path: Observation.basedOn
261
205
  :profiles:
@@ -168,66 +168,10 @@
168
168
  - Observation.value[x]
169
169
  - Observation.component.code
170
170
  :bindings:
171
- - :type: code
172
- :strength: preferred
173
- :system: http://hl7.org/fhir/ValueSet/languages
174
- :path: language
175
171
  - :type: code
176
172
  :strength: required
177
173
  :system: http://hl7.org/fhir/us/core/ValueSet/us-core-observation-smoking-status-status
178
174
  :path: status
179
- - :type: CodeableConcept
180
- :strength: preferred
181
- :system: http://hl7.org/fhir/ValueSet/observation-category
182
- :path: category
183
- - :type: CodeableConcept
184
- :strength: preferred
185
- :system: http://hl7.org/fhir/ValueSet/observation-category
186
- :path: category
187
- - :type: CodeableConcept
188
- :strength: extensible
189
- :system: http://hl7.org/fhir/us/core/ValueSet/us-core-smoking-status-observation-codes
190
- :path: code
191
- - :type: CodeableConcept
192
- :strength: preferred
193
- :system: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.11.20.9.38
194
- :path: value
195
- - :type: CodeableConcept
196
- :strength: extensible
197
- :system: http://hl7.org/fhir/ValueSet/data-absent-reason
198
- :path: dataAbsentReason
199
- - :type: CodeableConcept
200
- :strength: extensible
201
- :system: http://hl7.org/fhir/ValueSet/observation-interpretation
202
- :path: interpretation
203
- - :type: CodeableConcept
204
- :strength: example
205
- :system: http://hl7.org/fhir/ValueSet/body-site
206
- :path: bodySite
207
- - :type: CodeableConcept
208
- :strength: example
209
- :system: http://hl7.org/fhir/ValueSet/observation-methods
210
- :path: method
211
- - :type: CodeableConcept
212
- :strength: preferred
213
- :system: http://hl7.org/fhir/ValueSet/referencerange-meaning
214
- :path: referenceRange.type
215
- - :type: CodeableConcept
216
- :strength: example
217
- :system: http://hl7.org/fhir/ValueSet/referencerange-appliesto
218
- :path: referenceRange.appliesTo
219
- - :type: CodeableConcept
220
- :strength: example
221
- :system: http://hl7.org/fhir/ValueSet/observation-codes
222
- :path: component.code
223
- - :type: CodeableConcept
224
- :strength: extensible
225
- :system: http://hl7.org/fhir/ValueSet/data-absent-reason
226
- :path: component.dataAbsentReason
227
- - :type: CodeableConcept
228
- :strength: extensible
229
- :system: http://hl7.org/fhir/ValueSet/observation-interpretation
230
- :path: component.interpretation
231
175
  :references:
232
176
  - :path: Observation.basedOn
233
177
  :profiles:
@@ -3,6 +3,7 @@ require_relative '../../version'
3
3
  require_relative '../../custom_groups/v4.0.0/capability_statement_group'
4
4
  require_relative '../../custom_groups/v4.0.0/clinical_notes_guidance_group'
5
5
  require_relative '../../custom_groups/data_absent_reason_group'
6
+ require_relative '../../provenance_validator'
6
7
  require_relative 'patient_group'
7
8
  require_relative 'allergy_intolerance_group'
8
9
  require_relative 'care_plan_group'
@@ -39,13 +40,27 @@ module USCoreTestKit
39
40
  module USCoreV400
40
41
  class USCoreTestSuite < Inferno::TestSuite
41
42
  title 'US Core v4.0.0'
43
+ description %(
44
+ The US Core Test Kit tests systems for their conformance to the [US Core
45
+ Implementation Guide](http://hl7.org/fhir/us/core/STU4).
46
+
47
+ Resources are validated with the FHIR Java validator using `tx.fhir.org`
48
+ as the terminology server. Users should note that the although the ONC
49
+ Certification (g)(10) Standardized API Test Suite includes tests from
50
+ this suite, [it uses a different method to perform terminology
51
+ validation](https://github.com/onc-healthit/onc-certification-g10-test-kit/wiki/FAQ#q-why-do-some-resources-fail-in-us-core-test-kit-with-terminology-validation-errors).
52
+ As a result, resource validation results may not be consistent between
53
+ the US Core Test Suite and the ONC Certification (g)(10) Standardized
54
+ API Test Suite.
55
+ )
42
56
  version VERSION
43
57
 
44
58
  VALIDATION_MESSAGE_FILTERS = [
45
59
  %r{Sub-extension url 'introspect' is not defined by the Extension http://fhir-registry\.smarthealthit\.org/StructureDefinition/oauth-uris$},
46
60
  %r{Sub-extension url 'revoke' is not defined by the Extension http://fhir-registry\.smarthealthit\.org/StructureDefinition/oauth-uris$},
47
61
  /Observation\.effective\.ofType\(Period\): .*vs-1:/, # Invalid invariant in FHIR v4.0.1
48
- /Observation\.effective\.ofType\(Period\): .*us-core-1:/ # Invalid invariant in US Core v3.1.1
62
+ /Observation\.effective\.ofType\(Period\): .*us-core-1:/, # Invalid invariant in US Core v3.1.1
63
+ /Provenance.agent\[\d*\]: Rule provenance-1/ #Invalid invariant in US Core v5.0.1
49
64
  ].freeze
50
65
 
51
66
  def self.metadata
@@ -59,6 +74,10 @@ module USCoreTestKit
59
74
  exclude_message do |message|
60
75
  VALIDATION_MESSAGE_FILTERS.any? { |filter| filter.match? message.message }
61
76
  end
77
+
78
+ perform_additional_validation do |resource, profile_url|
79
+ ProvenanceValidator.validate(resource) if resource.instance_of?(FHIR::Provenance)
80
+ end
62
81
  end
63
82
 
64
83
  id :us_core_v400
@@ -59,10 +59,7 @@
59
59
  :full_paths:
60
60
  - AllergyIntolerance.clinicalStatus
61
61
  :comparators: {}
62
- :values:
63
- - active
64
- - inactive
65
- - resolved
62
+ :values: []
66
63
  :type: CodeableConcept
67
64
  :contains_multiple: false
68
65
  :multiple_or: MAY
@@ -89,10 +86,6 @@
89
86
  - AllergyIntolerance.patient
90
87
  - AllergyIntolerance.reaction.manifestation
91
88
  :bindings:
92
- - :type: code
93
- :strength: preferred
94
- :system: http://hl7.org/fhir/ValueSet/languages
95
- :path: language
96
89
  - :type: CodeableConcept
97
90
  :strength: required
98
91
  :system: http://hl7.org/fhir/ValueSet/allergyintolerance-clinical
@@ -113,26 +106,10 @@
113
106
  :strength: required
114
107
  :system: http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality
115
108
  :path: criticality
116
- - :type: CodeableConcept
117
- :strength: extensible
118
- :system: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1186.8
119
- :path: code
120
- - :type: CodeableConcept
121
- :strength: example
122
- :system: http://hl7.org/fhir/ValueSet/substance-code
123
- :path: reaction.substance
124
- - :type: CodeableConcept
125
- :strength: extensible
126
- :system: http://hl7.org/fhir/ValueSet/clinical-findings
127
- :path: reaction.manifestation
128
109
  - :type: code
129
110
  :strength: required
130
111
  :system: http://hl7.org/fhir/ValueSet/reaction-event-severity
131
112
  :path: reaction.severity
132
- - :type: CodeableConcept
133
- :strength: example
134
- :system: http://hl7.org/fhir/ValueSet/route-codes
135
- :path: reaction.exposureRoute
136
113
  :references:
137
114
  - :path: AllergyIntolerance.patient
138
115
  :profiles:
@@ -213,98 +213,18 @@
213
213
  - Observation.component.value[x].system
214
214
  - Observation.component.value[x].code
215
215
  :bindings:
216
- - :type: code
217
- :strength: preferred
218
- :system: http://hl7.org/fhir/ValueSet/languages
219
- :path: language
220
216
  - :type: code
221
217
  :strength: required
222
218
  :system: http://hl7.org/fhir/ValueSet/observation-status
223
219
  :path: status
224
- - :type: CodeableConcept
225
- :strength: preferred
226
- :system: http://hl7.org/fhir/ValueSet/observation-category
227
- :path: category
228
- - :type: CodeableConcept
229
- :strength: preferred
230
- :system: http://hl7.org/fhir/ValueSet/observation-category
231
- :path: category
232
- - :type: CodeableConcept
233
- :strength: extensible
234
- :system: http://hl7.org/fhir/us/core/ValueSet/us-core-vital-signs
235
- :path: code
236
- - :type: Quantity
237
- :strength: extensible
238
- :system: http://hl7.org/fhir/ValueSet/ucum-vitals-common
239
- :path: value
240
- - :type: CodeableConcept
241
- :strength: extensible
242
- :system: http://hl7.org/fhir/ValueSet/data-absent-reason
243
- :path: dataAbsentReason
244
- - :type: CodeableConcept
245
- :strength: extensible
246
- :system: http://hl7.org/fhir/ValueSet/observation-interpretation
247
- :path: interpretation
248
- - :type: CodeableConcept
249
- :strength: example
250
- :system: http://hl7.org/fhir/ValueSet/body-site
251
- :path: bodySite
252
- - :type: CodeableConcept
253
- :strength: example
254
- :system: http://hl7.org/fhir/ValueSet/observation-methods
255
- :path: method
256
- - :type: CodeableConcept
257
- :strength: preferred
258
- :system: http://hl7.org/fhir/ValueSet/referencerange-meaning
259
- :path: referenceRange.type
260
- - :type: CodeableConcept
261
- :strength: example
262
- :system: http://hl7.org/fhir/ValueSet/referencerange-appliesto
263
- :path: referenceRange.appliesTo
264
- - :type: CodeableConcept
265
- :strength: extensible
266
- :system: http://hl7.org/fhir/us/core/ValueSet/us-core-vital-signs
267
- :path: component.code
268
- - :type: CodeableConcept
269
- :strength: extensible
270
- :system: http://hl7.org/fhir/ValueSet/data-absent-reason
271
- :path: component.dataAbsentReason
272
- - :type: CodeableConcept
273
- :strength: extensible
274
- :system: http://hl7.org/fhir/ValueSet/observation-interpretation
275
- :path: component.interpretation
276
- - :type: CodeableConcept
277
- :strength: extensible
278
- :system: http://hl7.org/fhir/us/core/ValueSet/us-core-vital-signs
279
- :path: component.code
280
220
  - :type: code
281
221
  :strength: required
282
222
  :system: http://hl7.org/fhir/ValueSet/quantity-comparator
283
223
  :path: component.value.comparator
284
- - :type: CodeableConcept
285
- :strength: extensible
286
- :system: http://hl7.org/fhir/ValueSet/data-absent-reason
287
- :path: component.dataAbsentReason
288
- - :type: CodeableConcept
289
- :strength: extensible
290
- :system: http://hl7.org/fhir/ValueSet/observation-interpretation
291
- :path: component.interpretation
292
- - :type: CodeableConcept
293
- :strength: extensible
294
- :system: http://hl7.org/fhir/us/core/ValueSet/us-core-vital-signs
295
- :path: component.code
296
224
  - :type: code
297
225
  :strength: required
298
226
  :system: http://hl7.org/fhir/ValueSet/quantity-comparator
299
227
  :path: component.value.comparator
300
- - :type: CodeableConcept
301
- :strength: extensible
302
- :system: http://hl7.org/fhir/ValueSet/data-absent-reason
303
- :path: component.dataAbsentReason
304
- - :type: CodeableConcept
305
- :strength: extensible
306
- :system: http://hl7.org/fhir/ValueSet/observation-interpretation
307
- :path: component.interpretation
308
228
  :references:
309
229
  - :path: Observation.basedOn
310
230
  :profiles:
@@ -192,70 +192,14 @@
192
192
  - Observation.value[x].code
193
193
  - Observation.component.code
194
194
  :bindings:
195
- - :type: code
196
- :strength: preferred
197
- :system: http://hl7.org/fhir/ValueSet/languages
198
- :path: language
199
195
  - :type: code
200
196
  :strength: required
201
197
  :system: http://hl7.org/fhir/ValueSet/observation-status
202
198
  :path: status
203
- - :type: CodeableConcept
204
- :strength: preferred
205
- :system: http://hl7.org/fhir/ValueSet/observation-category
206
- :path: category
207
- - :type: CodeableConcept
208
- :strength: preferred
209
- :system: http://hl7.org/fhir/ValueSet/observation-category
210
- :path: category
211
- - :type: CodeableConcept
212
- :strength: extensible
213
- :system: http://hl7.org/fhir/us/core/ValueSet/us-core-vital-signs
214
- :path: code
215
199
  - :type: code
216
200
  :strength: required
217
201
  :system: http://hl7.org/fhir/ValueSet/quantity-comparator
218
202
  :path: value.comparator
219
- - :type: CodeableConcept
220
- :strength: extensible
221
- :system: http://hl7.org/fhir/ValueSet/data-absent-reason
222
- :path: dataAbsentReason
223
- - :type: CodeableConcept
224
- :strength: extensible
225
- :system: http://hl7.org/fhir/ValueSet/observation-interpretation
226
- :path: interpretation
227
- - :type: CodeableConcept
228
- :strength: example
229
- :system: http://hl7.org/fhir/ValueSet/body-site
230
- :path: bodySite
231
- - :type: CodeableConcept
232
- :strength: example
233
- :system: http://hl7.org/fhir/ValueSet/observation-methods
234
- :path: method
235
- - :type: CodeableConcept
236
- :strength: preferred
237
- :system: http://hl7.org/fhir/ValueSet/referencerange-meaning
238
- :path: referenceRange.type
239
- - :type: CodeableConcept
240
- :strength: example
241
- :system: http://hl7.org/fhir/ValueSet/referencerange-appliesto
242
- :path: referenceRange.appliesTo
243
- - :type: CodeableConcept
244
- :strength: extensible
245
- :system: http://hl7.org/fhir/us/core/ValueSet/us-core-vital-signs
246
- :path: component.code
247
- - :type: Quantity
248
- :strength: extensible
249
- :system: http://hl7.org/fhir/ValueSet/ucum-vitals-common
250
- :path: component.value
251
- - :type: CodeableConcept
252
- :strength: extensible
253
- :system: http://hl7.org/fhir/ValueSet/data-absent-reason
254
- :path: component.dataAbsentReason
255
- - :type: CodeableConcept
256
- :strength: extensible
257
- :system: http://hl7.org/fhir/ValueSet/observation-interpretation
258
- :path: component.interpretation
259
203
  :references:
260
204
  - :path: Observation.basedOn
261
205
  :profiles:
@@ -191,26 +191,10 @@
191
191
  - Observation.value[x].code
192
192
  - Observation.component.code
193
193
  :bindings:
194
- - :type: code
195
- :strength: preferred
196
- :system: http://hl7.org/fhir/ValueSet/languages
197
- :path: language
198
194
  - :type: code
199
195
  :strength: required
200
196
  :system: http://hl7.org/fhir/ValueSet/observation-status
201
197
  :path: status
202
- - :type: CodeableConcept
203
- :strength: preferred
204
- :system: http://hl7.org/fhir/ValueSet/observation-category
205
- :path: category
206
- - :type: CodeableConcept
207
- :strength: preferred
208
- :system: http://hl7.org/fhir/ValueSet/observation-category
209
- :path: category
210
- - :type: CodeableConcept
211
- :strength: extensible
212
- :system: http://hl7.org/fhir/us/core/ValueSet/us-core-vital-signs
213
- :path: code
214
198
  - :type: code
215
199
  :strength: required
216
200
  :system: http://hl7.org/fhir/ValueSet/quantity-comparator
@@ -219,46 +203,6 @@
219
203
  :strength: required
220
204
  :system: http://hl7.org/fhir/ValueSet/ucum-bodylength
221
205
  :path: value.code
222
- - :type: CodeableConcept
223
- :strength: extensible
224
- :system: http://hl7.org/fhir/ValueSet/data-absent-reason
225
- :path: dataAbsentReason
226
- - :type: CodeableConcept
227
- :strength: extensible
228
- :system: http://hl7.org/fhir/ValueSet/observation-interpretation
229
- :path: interpretation
230
- - :type: CodeableConcept
231
- :strength: example
232
- :system: http://hl7.org/fhir/ValueSet/body-site
233
- :path: bodySite
234
- - :type: CodeableConcept
235
- :strength: example
236
- :system: http://hl7.org/fhir/ValueSet/observation-methods
237
- :path: method
238
- - :type: CodeableConcept
239
- :strength: preferred
240
- :system: http://hl7.org/fhir/ValueSet/referencerange-meaning
241
- :path: referenceRange.type
242
- - :type: CodeableConcept
243
- :strength: example
244
- :system: http://hl7.org/fhir/ValueSet/referencerange-appliesto
245
- :path: referenceRange.appliesTo
246
- - :type: CodeableConcept
247
- :strength: extensible
248
- :system: http://hl7.org/fhir/us/core/ValueSet/us-core-vital-signs
249
- :path: component.code
250
- - :type: Quantity
251
- :strength: extensible
252
- :system: http://hl7.org/fhir/ValueSet/ucum-vitals-common
253
- :path: component.value
254
- - :type: CodeableConcept
255
- :strength: extensible
256
- :system: http://hl7.org/fhir/ValueSet/data-absent-reason
257
- :path: component.dataAbsentReason
258
- - :type: CodeableConcept
259
- :strength: extensible
260
- :system: http://hl7.org/fhir/ValueSet/observation-interpretation
261
- :path: component.interpretation
262
206
  :references:
263
207
  - :path: Observation.basedOn
264
208
  :profiles: