FHIR Chat · MessageHeader vrs MessageDefinition Validation · implementers

Stream: implementers

Topic: MessageHeader vrs MessageDefinition Validation


view this post on Zulip Kevin Mayfield (Nov 13 2020 at 08:21):

Wondering what approaches are being used for validating FHIR Messages?

We've gone for a combination of a base MessageHeader profile and MessageDefinition resources.

When a FHIR Message is received, the MessageHeader is validated against the base profile. The MessageDefinition is retrieved based on eventCoding.
We then check the resources in the MessageHeader.focus follow the correct profile stated in the MessageDefinition.focus.

Example code: https://github.com/NHSDigital/validation-service-fhir-r4/blob/cf9525f16813edaec7c76aad369fcc412bd8346b/src/main/kotlin/com/example/fhirvalidator/service/MessageDefinitionApplier.kt

After looking at other national Messaging IG's e.g. Denmark, Suisse and Da Vinci Alerts
We seem to be the only country going down this route? Thoughts.

view this post on Zulip Lloyd McKenzie (Nov 13 2020 at 13:59):

PrescribeIT just use profiles. Mandatory profile declaration on the Bundle, the MessageHeader and the FocalTask. All other profiles inferred from those. MessageHeader and Task profiles cross-check their associated event code/task code. (They were in production long before MessageDefinition even existed, and I'm not sure it's supported by the Java validator even now.)

view this post on Zulip Eric Haas (Nov 13 2020 at 19:37):

in the ballot of Da Vinci Alerts we had MessageDefinition/GraphDefinition but based on comments it got yanked because not widely implemented yet. But to me that is the best approach.


Last updated: Apr 12 2022 at 19:14 UTC