Profiling and validation overview

This chapter explains how Profiling works in Aidbox

FHIR resources are very loose in requirements which gives FHIR its flexibility. For example, all elements are optional in the Patient resource, and it's possible to create a Patient resource without any data which does not make much sense. So, sometimes there is a need to constraint resources.

In FHIR, you need to create a StructureDefinition resource and describe the requirements for a resource you want to restrict. And it is definitely not an easy task. There are special tools developed specifically for this.

Aidbox implements two ways of working with profiles: using AidboxProfile resource and with zen-lang schemas.

Profiling with zen-langProfiling with AidboxProfile

Skip validation of references in resource using request header

aidbox-validation-skip header allows to skip resource reference validations.

The header functionality can be enabled with box_features_validation_skip_reference env.

Example
box_features_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

#2416:

Change request updated