16.12.1Validation Message Post-Processing

 

This page describes methods to suppress validation messages or change their severity.

16.12.1.1Suppressing Validation Messages

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'.

16.12.1.2Changing Validation Message Severity

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:

16.12.1.2.1ValidationPostProcessingRuleJson Object Fields

FieldRequiredDescription
msgIdone of msgId and msgIdRegexLiteral message ID to match
msgIdRegexone of msgId and msgIdRegexRegex pattern to match message ID
oldSeveritiesnoArray of ResultSeverityEnum(s) to match message severity (one must match message's to produce rule match) [^1]
messageFragmentsnoArray of literal strings to match message fragments (all must be present in message to produce rule match)
newSeverityyesResultSeverityEnum value to replace matched message severity

[^1]: ResultSeverityEnum values are: INFORMATION, WARNING, ERROR and FATAL.

16.12.1.2.2ValidationPostProcessingRuleJson Example

[{
  "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"
}]