Validating a resource
November 12, 2019 4 Comments
It’s often helpful to be able to determine whether a particular resource instance is compliant with a given profile or profiles – including the the core profiles defined in the FHIR specification.
The FHIR project has provided validation functionality that can be used for this. It can be downloaded from the spec and has also been incorporated into a number of the on-line reference servers. This post describes a simple app that acts as an interface to these servers.
There is a separate page that describes the application but briefly it works as follows.
- Start the app (there is a link from the clinFHIR main page – at the bottom on the left)
- Past the resource you want to validate into the text box – or enter a url to the resource and load it from there
- Select the server/s you wish to use to perform the validation. As there can be differences in validate implementation, it is possible to select multiple servers and all will be used to perform the validation
- Click the ‘Validate’ button, and the results will be shown in tabs on the right.
Here’s an image of the app with a validated resource. Details of the errors will be in each server tab.
There’s more detail in the documentation.
I also have a free Mac/Linux/windows app that uses both Java and .net validators: https://github.com/health-validator/Hammer 🙂
Hi David! Thanks for your wonderful tool! Can I ask you how could I do if I want to use my own profile to validate FHIR resources? Thank you very much for your help.
Hi Xiao – thanks for the kind words! Right now, you need to place an entry in the meta.profile element of the instance being validated that refers to the canonical url of your profile and ensure that the profile exists on the validation server – that should work. An alternative is to add the profile to in the validation call (rather than the instance) – which is actually the preferred method. I’m working on supporting that in the tool, but it’s not quite finished yet…
Pingback: Dew Drop – December 4, 2019 (#3085) | Morning Dew