Suppressing Messages
This page describes methods to suppress validation messages or change their severity.
There are times when you want to enable validation and for it to be strict, but due to circumstances you can't control there are messages you want to ignore.
This might be because of problems with an Implementation Guide being implemented, or local business rules that prevent the creation of conformant data.
Any validation message can be suppressed by placing one or more patterns in the Suppress Validation Message Patterns configuration option.
This option is set on the FHIR Storage (RDBMS) module that is being used as a Validation Support Repository. If you are using Endpoint Validation, the Validation Support Repository dependency must be specified on the FHIR Endpoint module in order for this feature to work.
Patterns for this option are specified as Regular Expressions, and one pattern may be specified per line. Patterns may match partially. For example, the pattern 59408-5
will suppress the validation message Unknown code 'http://loinc.org#59408-5'
.
Validation message severity can be modified by adding defining an array of ValidationPostProcessingRuleJson
objects through a file using the Post Processing Message Rules File configuration option or through as a text block using the Post Processing Message Rules Text configuration option.
These options are set on the FHIR Storage (RDBMS) module that is being used as a Validation Support Repository. If you are using Endpoint Validation, the Validation Support Repository dependency must be specified on the FHIR Endpoint module in order for this feature to work.
To modify a validation message severity you have to provide rules indicating what messages to match and the new severity to set in matched messages, which is done by providing a json
array of ValidationPostProcessingRuleJson
objects, as depicted below:
Field | Required | Description |
---|---|---|
msgId | one of msgId and msgIdRegex | Literal message ID to match |
msgIdRegex | one of msgId and msgIdRegex | Regex pattern to match message ID |
oldSeverities | no | Array of ResultSeverityEnum(s) to match message severity (one must match message's to produce rule match) [^1] |
messageFragments | no | Array of literal strings to match message fragments (all must be present in message to produce rule match) |
newSeverity | yes | ResultSeverityEnum value to replace matched message severity |
[^1]: ResultSeverityEnum
values are: INFORMATION
, WARNING
, ERROR
and FATAL
.
[{
"msgId": "Terminology_TX_Error_CodeableConcept",
"oldSeverities": ["WARNING"],
"messageFragments": [
"Failed to parse response from server",
"SocketTimeoutException"
],
"newSeverity": "ERROR"
},
{
"msgIdRegex": "Terminology_TX*",
"oldSeverities": ["INFORMATION", "WARNING"],
"newSeverity": "ERROR"
}]
You are about to leave the Smile Digital Health documentation and navigate to the Open Source HAPI-FHIR Documentation.