Stream: tooling
Topic: FHIR Validator with local StructureDefinitions
Shamil Nizamov (Aug 04 2021 at 18:53):
Can FHIR Validator validate resource instances against locally located StructureDefinition, CodeSystems and ValueSets?
I.e., the case when the Patient.meta.profile is populated with some dummy http://example.org/StructureDefinition/patient-profile, whereas StructureDefinition and other related artifacts are in the local folder.
Morten Ernebjerg (Aug 05 2021 at 09:20):
Assuming you mean the Java command-line validation tool: Yes, you can do that. Put the StructureDefinition, ValueSet, and CodeSystem files in a folder and then point to that folder by passing the ig
parameter when running the validator (...-ig path/to/folder
). To have the validator actually apply the resource to a given resource instance, you either have to
- fill
meta.profile
in the instance with the canonical URL of the profile (i.e. what is in theurl
field in the associated StructureDefinition), OR - Use the
-profile
parameter to explicitly tell the validator to validate against this profile (passing the canonical URL)
Full instruction for using the validator are here: https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Validator-
Shamil Nizamov (Aug 05 2021 at 14:47):
That's great. I was thinking that -ig
should point to the online version as well. I've just tried and it works. Thank you.
Last updated: Apr 12 2022 at 19:14 UTC