hapifhir / hapi-fhir

🔥 HAPI FHIR - Java API for HL7 FHIR Clients and Servers
http://hapifhir.io
Apache License 2.0
2k stars 1.31k forks source link

HAPI FHIR Validation : OIDs must be valid #5053

Open AgLounes opened 1 year ago

AgLounes commented 1 year ago

Describe the bug

in order to check the input (DocumentReference) of my endpoint we set up fhir validation. Previously with hapi fhir version 5.4.0 everything was fine when calling my endpoint, but after upgrading to hapi fhir 6.4.4 we got this error : OIDs must be valid (1.3.2) see attached screenshot

My urn:oid exist see: http://oid-info.com/cgi-bin/display?oid=urn%3Aoid%3A1.3.2&submit=Display&action=display

Expected behavior is there a regression for versions higher than 5.4.0

Screenshots image

Environment (please complete the following information):

Thank you in advance for your help

SaraMunich-Lantana commented 1 year ago

I believe it to be something in the new validation they have and I had ran into the same issue too. I was able to fix it by replacing the oid value with the url for the fhir resource with the id I wanted to use.

so in your case you would want to change"urn:oid:1.3.2" to be "https://example.com/fhir/Organization/1.3.2" and it should work

jonahermy commented 8 months ago

Any update on this? I am facing the same issue (version 6.8.0) and the workaround is unfortunately not an option for me. This is blocking me from using any validation as this is part of the default validation and I can not turn that specific rule off.