Stream: hapi
Topic: FHIR server and mandatory items
Sufyan Patel (Mar 13 2018 at 12:00):
Just been on the HAPI FHIR Server (http://fhirtest.uhn.ca/home?encoding=null&pretty=true) and searched for ReferralRequest. There are 3 results each missing the mandatory elements.(subject and intent) . If I try to HTTP POST an entry with the mandatory items missing, I get the error that it is expecting the elements ("minimum required = 1, but only found 0") but it still creates the record. Is this meant to happen?
James Agnew (Mar 13 2018 at 20:20):
Hi Sufyan,
The public FHIR server is fairly tolerant of errors in order to help people developing things. It does validate your POST (and you'll note that the OperationOutcome that is returned includes these validation failures) but the create isn't actually blocked.
In a real system this can be tightened of course (most easily by changing the failure mode settings in RequestValidationInterceptor) but the public test server is lenient.
Last updated: Apr 12 2022 at 19:14 UTC