So the DAF schema already exists in the validation-min.xml.zip file that you download from hl7.org. But, I have my own StructureDefinition. For example, consider the StructureDefinition at the end of this post. This is my customized definition of the patient that I have generated using Trifolia. I am trying to validate resources against the StructureDefinition below. I’m not sure how to do that.
“You’d just use your own profile instead.” How would I do that?
Thanks.
{
“resourceType”: “StructureDefinition”,
“url”: “https://www.fhir.ca/api/test/FHIR2/patient”,
“name”: “Patient”,
“status”: “draft”,
“publisher”: “publisher”,
“contact”: [
{
“name”: “borna”,
“telecom”: [
{
“system”: “phone”,
“value”: “44444444444”,
“use”: “work”
},
{
“system”: “email”,
“value”: “xyz@abc.ca”,
“use”: “work”
}
]
}
],
“description”: "this is the patient resource for EHO’s ",
“kind”: “resource”,
“constrainedType”: “Patient”,
“abstract”: false,
“base”: “http://hl7.org/fhir/StructureDefinition/Patient”,
“differential”: {
“element”: [
{
“path”: “Patient”
},
{
“path”: “Patient.id”,
“short”: “id”,
“definition”: “MAY contain exactly one [1…1] id (CONF:3248-1).”,
“min”: 1,
“max”: “1”
},
{
“path”: “Patient.gender”,
“short”: “gender”,
“definition”: “SHOULD contain exactly one [1…1] gender, which SHALL be selected from ValueSet FHIR AdministrativeGender http://hl7.org/fhir/v3/vs/AdministrativeGender (CONF:3248-4).”,
“min”: 1,
“max”: “1”,
“type”: [
{
“code”: “code”
}
],
“binding”: {
“strength”: “required”,
“valueSetReference”: {
“reference”: “ValueSet/2905”,
“display”: “FHIR AdministrativeGender”
}
}
},
{
“path”: “Patient.address”,
“short”: “address”,
“definition”: “MAY contain zero or more [0…] address (CONF:3248-2).",
“min”: 0,
“max”: "”
},
{
“path”: “Patient.address.type”,
“short”: “type”,
“definition”: “The address, if present, MAY contain zero or one [0…1] type (CONF:3248-3).”,
“min”: 0,
“max”: “1”
}
]
}
}{
“resourceType”: “StructureDefinition”,
“url”: “https://www.ehealthontario.on.ca/api/eConsult/FHIR2/patient”,
“name”: “EHO FHIR eConsult Patient”,
“status”: “draft”,
“publisher”: “eHealth Ontario”,
“description”: "this is the patient resource for EHO’s ",
“kind”: “resource”,
“constrainedType”: “Patient”,
“abstract”: false,
“base”: “http://hl7.org/fhir/StructureDefinition/Patient”,
“differential”: {
“element”: [
{
“path”: “Patient”
},
{
“path”: “Patient.id”,
“short”: “id”,
“definition”: “MAY contain exactly one [1…1] id (CONF:3248-1).”,
“min”: 1,
“max”: “1”
},
{
“path”: “Patient.gender”,
“short”: “gender”,
“definition”: “SHOULD contain exactly one [1…1] gender, which SHALL be selected from ValueSet FHIR AdministrativeGender http://hl7.org/fhir/v3/vs/AdministrativeGender (CONF:3248-4).”,
“min”: 1,
“max”: “1”,
“type”: [
{
“code”: “code”
}
],
“binding”: {
“strength”: “required”,
“valueSetReference”: {
“reference”: “ValueSet/2905”,
“display”: “FHIR AdministrativeGender”
}
}
},
{
“path”: “Patient.address”,
“short”: “address”,
“definition”: “MAY contain zero or more [0…] address (CONF:3248-2).",
“min”: 0,
“max”: "”
},
{
“path”: “Patient.address.type”,
“short”: “type”,
“definition”: “The address, if present, MAY contain zero or one [0…1] type (CONF:3248-3).”,
“min”: 0,
“max”: “1”
}
]
}
}