FHIR Chat · Constrain non-choice element to two profiles · implementers

Stream: implementers

Topic: Constrain non-choice element to two profiles


view this post on Zulip Chris Moesel (Feb 06 2017 at 21:21):

Is it possible (in a profile) to constrain an element so it must conform to a choice of profiles? For example, if the element has type Address, can I put two types into the element's type array, both with "Address" as the "code", but each with a different value for "profile"? Since this technically still *narrows* the original type, it seems valid -- but I wanted to confirm since it would increase the length of the element's type array (which some tools might misinterpret as a value[x]).

view this post on Zulip Lloyd McKenzie (Feb 07 2017 at 01:33):

It definitely *should* be allowed. As for tooling support, only way to know is to try . . .

view this post on Zulip Michel Rutten (Feb 07 2017 at 09:58):

@Chris Moesel FYI I've always interpreted the FHIR spec as allowing this. Forge, the FHIR profile editor, tries to validate resource reference constraints. The current validation logic specifically allows multiple element type constraints with identical type code and different profiles.

view this post on Zulip Chris Moesel (Feb 07 2017 at 13:05):

Great! Thank you both for the confirmation!


Last updated: Apr 12 2022 at 19:14 UTC