Stream: implementers
Topic: FHIR STU3 create profiles to validate Messages
Filipe Castro (Mar 14 2019 at 11:48):
Hi all,
I'm newest on FHIR theme. i'm trying to create profiles, using Forge STU3 tool, to validate messages. I have a Message Bundle which is composed for 3 entry resources(Message Header, Parameters, Organization). Does it possible to create only one profile to validate this type of FHIR message?
Thanks in advance.
Lloyd McKenzie (Mar 14 2019 at 14:42):
You would typically create profiles for each resource and enforce the profiles of referenced types via the referencing profile. For example, the MessageHeader.focus element would enforce the profile for your Parameters resource.
Filipe Castro (Mar 14 2019 at 16:08):
Hi Lloyd,
Thanks for your help. So, I only need to enforce MessageHeader on MessageBundle profile, right?
In message that i want to validate, I only need to enforce(on meta.profile filed ) the MessageBundle profile, right?
Lloyd McKenzie (Mar 14 2019 at 16:12):
The Bundle should enforce that the first entry is a MessageHeader that matches your profile. The MessageHeader would then enforce the profiles that it references.
Filipe Castro (Mar 15 2019 at 12:33):
Thank you. How can I make the first entry of MessageHeader? I already applied the MessageHeader profile reference in the Entry.resource of the bundle, but at the time of validating a message, all incoming features are being validated based on the MessageHeader profile.
Lloyd McKenzie (Mar 15 2019 at 14:11):
You'll need to either slice entries with ordered slicing or you'll need to use an invariant.
Filipe Castro (Mar 15 2019 at 16:07):
how you configure invariants?
Lloyd McKenzie (Mar 15 2019 at 16:09):
Use the 'constraint' element on the element where the constraint should be applied. In this case, it would be on Bundle.
Last updated: Apr 12 2022 at 19:14 UTC