Skip validation of references in resource using request header
Skip validation of references in resource using request header
aidbox-validation-skip
header allows to skip resource reference validations. It allows creating and updating resources containing references to non-existent target resources. Useful for staged data loading or systems with eventual consistency but may compromise referential integrity and generally is not recommended to use in production installations.
The header functionality can be enabled with BOX_FHIR_VALIDATION_SKIP_REFERENCE
env. Check the settings reference for more details.
BOX_FHIR_VALIDATION_SKIP_REFERENCE=true
Usage
Request without aidbox-validation-skip
request header causes an error.
PUT /fhir/Observation/f001
content-type: text/yaml
resourceType: Observation
id: f001
subject:
reference: Patient/id-does-not-exist
status: final
code:
coding:
- system: http://loinc.org
code: 15074-8
The request is successful when aidbox-validation-skip
request header is provided.
PUT /fhir/Observation/f001
content-type: text/yaml
aidbox-validation-skip: reference
resourceType: Observation
id: f001
subject:
reference: Patient/id-does-not-exist
status: final
code:
coding:
- system: http://loinc.org
code: 15074-8
Last updated
Was this helpful?