Stream: implementers
Topic: FHIR Validation Error
gauri raut (Mar 13 2022 at 14:31):
Hi, we have used http://example.org for custom identifiers and code systems as it is reserved for testing and documentation purposes. But we are getting error while validating Patient resource against uscore profile using https://inferno.healthit.gov/validator/. Below is the Patient Resource and respective errors,
{
"resourceType": "Patient",
"id": "1837449",
"meta": {
"versionId": "1",
"lastUpdated": "2021-01-25T07:50:37.288+00:00",
"source": "#8MG5ee4WaxFBLQZG"
},
"active": true,
"name": [
{
"family": "test",
"given": [
"patch"
]
}
],
"gender": "male",
"birthDate": "1932-09-24",
"identifier": [
{
"use": "official",
"system": "http://example.org/v2-to-fhir-converter/Identifier/test",
"value": "12345689",
"type":{
"coding": [
{
"system": "http://example.org/v2-to-fhir-converter/CodeSystem/identifier-type-code",
"code": "MP",
"display": "Medicaid Policy Number"
}
]
}
}
]
}
Validation errors:
Validated the uploaded resource against the http://hl7.org/fhir/StructureDefinition/Patient StructureDefinition
Validation errors:
Patient.identifier[0].system: Example URLs are not allowed in this context (http://example.org/v2-to-fhir-converter/Identifier/test) on line 23. Jump to error.
Patient.identifier[0].type.coding[0].system: Example URLs are not allowed in this context (http://example.org/v2-to-fhir-converter/CodeSystem/identifier-type-code) on line 28. Jump to error.
We tried using our own profile with status="draft" and experimental="true". But still getting same errors. Can someone please help me to understand if it is expected behavior to throw an error? Or as experimental is set to "true", it should be treated as test json and validator should allow example.org
@Aditya Joshi
Lloyd McKenzie (Mar 13 2022 at 14:36):
@Grahame Grieve I would think Identifier.system would be fair game for example values. I agree that Identifier.coding.system generally shouldn't be - there's an extensible binding there, so the only time you shouldn't be drawing from the 'approved' set of codes is if nothing elese applies - and certainly there are approved codes that would cover Medicaid.
Vadim Peretokin (Mar 14 2022 at 10:36):
@gauri raut your type
is incorrect and should be:
"type": {
"coding": [{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MP",
"display": "Medicaid Policy Number"
}]
}
Vadim Peretokin (Mar 14 2022 at 10:38):
as for "system": "http://example.org/v2-to-fhir-converter/Identifier/test",
- you need to create your own URI you'd use in there, don't use example. That won't work in a production system
Lloyd McKenzie (Mar 14 2022 at 14:17):
It's ok to use example if you're creating an example in an IG. (To make clear that implementers SHOULDN'T copy it and use it in production.)
Grahame Grieve (Mar 14 2022 at 21:58):
umm I think this is a question for inferno about example values and how they configure the validator
Last updated: Apr 12 2022 at 19:14 UTC