Microsoft Azure’s FHIR servers are forgiving when it comes to non-conforming FHIR data.
This is because validation on Create and Update of resources is switched off by default — something that catches people by surprise.
The ‘surprise’ is because it’s inconsistent. Despite validation being switched off, some validation does still occur. For example, try sending an Encounter without a subject and you will correctly receive an OperationOutcome in response.
But other non-conforming elements can slip through and profile validation does not happen at all — unless you specifically switch on validation in the request.
You do this by adding a header to the request and setting it to true.
x-ms-profile-validation
If your project has been running for months or even longer without this validation request header, you may be in for some surprises when you set it to true.
Not all non-conforming data is obvious and you may find you’ve been creating non-conforming resources for many months without realizing. Any profiles that are specified in the meta sections of these resources will also be applied once you switch validation on.
So be cautious and ensure you test the request header well before rolling it out to production.
---