Class FhirCamelValidators
java.lang.Object
org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirCamelValidators
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:
- header not present : schema validation
OFF
(0) : no validationSCHEMA
(1) : schema validationSCHEMATRON
(2) : schematron validationMODEL
(4) : resource model validation
Higher value result in an higher performance impact due to the validation. Model-based validation can slow down processing significantly.
- Since:
- 3.2
- Author:
- Christian Ohr
-
Field Details
-
VALIDATION_MODE
- See Also:
-
MODEL
public static final int MODEL- See Also:
-
SCHEMATRON
public static final int SCHEMATRON- See Also:
-
SCHEMA
public static final int SCHEMA- See Also:
-
OFF
public static final int OFF- See Also:
-
-
Method Details
-
itiRequestValidator
- Returns:
- instance of FHIR validator processor that checks the FHIR resource belonging to the request of the FHIR transaction
-
itiResponseValidator
- Returns:
- instance of FHIR validator processor that checks the FHIR resource belonging to the response of the FHIR transaction
-