I am trying to use the FHIR validator (.jar) to validate some resources against a custom profile. Is there a way (a parameter?) to make it ignore the value set bindings that are defined in the profile?
I am getting a “can’t fetch” value set url error. I suppose it is normal since I have not created the ValueSet resources yet. But can I make it ignore the bindings for the moment and validate all the other stuff?
I started creating the value sets. It seems that the validator does not accept an OID as a value set URI (example: “urn:oid:1.2.250.1.213.1.6.1.146”). I know that it is not really user friendly but that is our terminology identitification system for now.
I thought it was allowed tu use OIDs.
How can I perform the validation without creating fake URLs that we can’t maintain?
Where is the value set defined? And where are you referencing it from? The value set needs to be available in the same IG as the artifact referencing it or in one declared as an explicit dependency.
As an aside, try to avoid OIDs if at all possible. Making conversion from v3 easier is not worth the long-term expense of the non-human readability and learning curve that OIDs will impose down the road. Human-readable (and ideally resolvable) URLs are much easier for humans to work with and with NamingSystem, converting between OIDs and URLs is quite manageable. (Plus you have to do that for all of the code systems HL7 has defined URLs for anyhow.)
The value set json files are in a separate folder (terminologies). The artifacts (profiles and extensions) are in the “validation_V03-url” folder. Both are loaded at the validation:
“-jar org.hl7.fhir.validator.jar -tx n/a -ig ./validation_V03-url
-ig ./terminologies ./exemples/PP15_correct.json -version 4.0.0”
It seems to work well using URLs. Not the case with OIDs, I get the can’t fetch error.
About the use of URLs rather than OIDs, I agree with you. However, I am working with a national agency that publishes local terminologies identfied with OIDs for now. I don’t really have the choice.
Actually, with URLs, the validator runs (no more “cant’t fetch” errors) but I get a java.lang.NullPointerException in the validation result for all the bindings. Example:
I was having the last error because the CodeSystems were missing. Once created the validator runs well.
To summarize, in order to run the validator on custom profiles with custom bindings, I had to create all the FHIR terminology files (ValueSet and CodeSystem). I was able to use OIDs for CodeSystems but not for ValueSets.
I had an issue with a slicing of a CodeableConcept. The discriminator is of type “value” of “coding.system”. Not all slices have fixed values for “coding.system”. For one of the slices I defined a binding for this element. I thought I could do that as it is mentioned in the specification :
If the type is value , or pattern , then the element definition must use either:
if the element has a terminology binding, a required binding with a Value Set that enumerates the list of possible codes in the value set (“extensional definition”)
However, the validator was expecting a fixed value for all the slices.
Thank you for your comments. Hope this helps the community.