public final class FhirCamelValidators extends Object
Factory class for creating validating processors for FHIR resources. For schematron validation you need to have the phloc-schematron library in the classpath.
The FHIR validators are used as processors, e.g.:
... .process(FhirResourceValidators.itiRequestValidator()) ...An instance of
UnprocessableEntityException
is thrown if validation
fails. A FHIR Consumer will automatically process the exception for a 400
response.
Validation is executed depending on the presence of FhirContext
in the message header.
The kind of validation is determined by the integer value in the VALIDATION_MODE
message header, i.e. which of the following bits are set:
OFF
(0) : no validationSCHEMA
(1) : schema validationSCHEMATRON
(2) : schematron validationMODEL
(4) : resource model validationHigher value result in an higher performance impact due to the validation. Model-based validation can slow down processing significantly.
Modifier and Type | Field and Description |
---|---|
static int |
MODEL |
static int |
OFF |
static int |
SCHEMA |
static int |
SCHEMATRON |
static String |
VALIDATION_MODE |
Modifier and Type | Method and Description |
---|---|
static org.apache.camel.Processor |
itiRequestValidator() |
static org.apache.camel.Processor |
itiResponseValidator() |
public static final String VALIDATION_MODE
public static final int MODEL
public static final int SCHEMATRON
public static final int SCHEMA
public static final int OFF
public static org.apache.camel.Processor itiRequestValidator()
public static org.apache.camel.Processor itiResponseValidator()
Copyright © 2018 Open eHealth Foundation. All rights reserved.