FHIR Chat · Difference between 'Profile' and 'Target profile' in Forge · implementers

Stream: implementers

Topic: Difference between 'Profile' and 'Target profile' in Forge


view this post on Zulip Jakob Lindblad (Nov 05 2018 at 13:35):

Hi,

What is the difference between 'Profile' and 'Target profile' on type 'Reference' in Forge, and how do i use this correctly?

If i create a new profile based on the resource 'Location' i can see that 'managingOrganization' is of type 'Reference(Organization)' and has a 'Target profile' -> http://hl7.org/fhir/StructureDefinition/Organization. The field 'Profile' is by default empty. I get this since this is just a reference to a basic profile on 'Organization'.

But what is the approach if i want to reference my own profile of 'Organization'?
My guess was that i point 'Target profile' to my Organization profile(like http://absoluteUri/myOrganization) and in the 'Profile' field i reference the basic profile for Organization(http://hl7.org/fhir/StructureDefinition/Organization). However Forge is giving me an Error when i open the profile again sayin "... The target represent a profile on 'Location' which is incompatible with the element type 'Reference' ", so im obviously doing something wrong.

If i hoover over 'Target profile' and 'Profile' the help dialog is exactly the same. So what is the difference and when do i use what?

view this post on Zulip Michel Rutten (Nov 05 2018 at 13:38):

ElementDefinition.type.targetProfile only applies when ElementDefinition.type.code equals 'Reference'. In that case, the targetProfile property allows you to constrain the target resource of the reference, whereas ElementDefinition.type.profile would constrain the Reference itself - which FHIR allows, but is usually not what you need/want.

view this post on Zulip Lloyd McKenzie (Nov 05 2018 at 13:39):

Profile is a profile on the "Reference" data type itself. You could use it to mandate that "display" is present or to prohibit Reference.identifier

view this post on Zulip Michel Rutten (Nov 05 2018 at 13:39):

Exactly!

view this post on Zulip Lloyd McKenzie (Nov 05 2018 at 13:39):

Actually @Michel Rutten, targetProfile is also allowed if the type is Resource.

view this post on Zulip Michel Rutten (Nov 05 2018 at 13:39):

Today I learned...

view this post on Zulip Michel Rutten (Nov 05 2018 at 13:41):

@Lloyd McKenzie could you explain when this applies and what it means?

view this post on Zulip Lloyd McKenzie (Nov 05 2018 at 13:50):

It would apply for something like Bundle.entry.resource

view this post on Zulip Lloyd McKenzie (Nov 05 2018 at 13:50):

At least that's my understanding

view this post on Zulip Brian Postlethwaite (Nov 05 2018 at 22:19):

Or in the parameters resource.

view this post on Zulip Grahame Grieve (Nov 09 2018 at 01:04):

Actually @Michel Rutten, targetProfile is also allowed if the type is Resource.

really? why?

view this post on Zulip Lloyd McKenzie (Nov 09 2018 at 01:14):

Can you just change the type to a specialization when slicing?

view this post on Zulip Grahame Grieve (Nov 09 2018 at 01:20):

no but you'd use profile, not targetProfile

view this post on Zulip Lloyd McKenzie (Nov 09 2018 at 01:36):

Ok. Then I stand corrected. And @Michel Rutten will have to unlearn what I mis-taught him...

view this post on Zulip Michel Rutten (Nov 09 2018 at 10:02):

Clear, thanks!


Last updated: Apr 12 2022 at 19:14 UTC