FHIR Chat · Adding TargetProfiles in derived Profiles · conformance

Stream: conformance

Topic: Adding TargetProfiles in derived Profiles


view this post on Zulip Simone Heckmann (Jun 08 2020 at 16:18):

Just need to check whether my understanding is correct:

If a Profile A requires a Reference to conform to Profile B1 (and B only!),
then an derived Profile A' can add an additional target B2 (not derived from B1) to the ElementDefinition.

Multiple targets on an ElementDefinition means the target has to match any profile,
so an Instance a referencing an Instance b might be valid against A' but not against A,
if b is valid against B2 but not B1.

Is that right? Is that how it is supposed to be? Or are additional targets in derived profiles only allowed if they are also derived from the original target?

view this post on Zulip Lloyd McKenzie (Jun 08 2020 at 16:21):

Profile A` can't add additional options that aren't permitted by the base profile. It can define variants on what A allows, but can't introduce anything that wouldn't be valid against A.

view this post on Zulip Simone Heckmann (Jun 08 2020 at 16:24):

Ok, so I can add additional TargetProfiles, but only if they are constraints of the original TargetProfile, correct?

view this post on Zulip Lloyd McKenzie (Jun 08 2020 at 16:26):

right

view this post on Zulip Simone Heckmann (Jun 08 2020 at 16:29):

Thanks!

view this post on Zulip Grahame Grieve (Jun 08 2020 at 18:41):

they don't have to have the original TargetProfile as their base though.

view this post on Zulip Grahame Grieve (Jun 08 2020 at 18:42):

you could have A that constrains Observation.code, and on Observation.performer constrains it to Practitioner B1 that makes telecom required.

view this post on Zulip Grahame Grieve (Jun 08 2020 at 18:44):

So Profile A' still must restrict Practitioner.performer to B1, but it may also additionally add Practitioner profile C that says that Practitioner must have a name, without any relationship to B1

view this post on Zulip Chris Moesel (Jun 08 2020 at 19:06):

Grahame Grieve said:

So Profile A' still must restrict Practitioner.performer to B1, but it may also additionally add Practitioner profile C that says that Practitioner must have a name, without any relationship to B1

My reading of the spec suggests this is not the case. The definition of targetProfile says:

If any profiles are specified, then the content must conform to at least one of them.

Since Profile A only has one targetProfile on Practitioner (called B1), then references to Practitioner in instances of A must conform to B1. Now if A' adds another targetProfile to Practitioner (called C) that constrains a different part of Practitioner than B1, instances of A' are only required to conform to one of Practitioner profiles, B1 or C. If an instance of A' had a Performer that conformed only to C, then it would be valid against A' but would not be valid against A. Therefore, I don't think it is valid to add additional targetProfiles unless they are strictly a more constrained version of the already existing targetProfiles.

view this post on Zulip Mareike Przysucha (Jun 09 2020 at 09:23):

Which in my reading says: If Practitioner profile C also says that telecom is required, then Grahame's example would work, although C doesn't state it was derived from B1. Correct?

view this post on Zulip Chris Moesel (Jun 09 2020 at 12:40):

Yes, @Mareike Przysucha -- that's my reading of it as well. It doesn't have to be formally related to B1, but it has to have at least the same constraints (or more constrained versions of them).


Last updated: Apr 12 2022 at 19:14 UTC