FHIR Chat · US Core references · united states

Stream: united states

Topic: US Core references


view this post on Zulip Craig Newman (Mar 05 2020 at 13:36):

If I write an IG that includes a Patient profile built on the US Core Patient Profile (let's say I change the cardinality of birthDate from 0..1 in the US Core profile to 1..1 in my profile) and then want to use the US Core Encounter profile as is (no additional constraints), does an instance of the Patient resource conforming to my IG need to list both the US Core Patient profile and my IG profile in Patient.meta because the US Core Encounter profile constrains Encounter.subject to the US Core Patient profile? Or is it sufficient for the Patient resource to just list my IG's profile because it builds on US Core Patient? Or does my IG also have to create a profile of Encounter (building on US Core Encounter) and restrict Encounter.subject to my IG's profile?

view this post on Zulip Lloyd McKenzie (Mar 05 2020 at 16:58):

There's no requirement to list any profile at all. Declaring profiles is optional. Some servers/IGs may mandate declaration, but that's generally not considered a good practice.

view this post on Zulip Eric Haas (Mar 05 2020 at 17:26):

Or does my IG also have to create a profile of Encounter (building on US Core Encounter) and restrict Encounter.subject to my IG's profile?

yes

does an instance of the Patient resource conforming to my IG need to list both the US Core Patient profile and my IG profile in Patient.meta because the US Core Encounter profile constrains Encounter.subject to the US Core Patient profile?

no only the derived profile is fine all the constraints are inherited.

view this post on Zulip Eric Haas (Mar 05 2020 at 17:28):

There is a way to globally apply profiles in IGs but I don't think its implemented? @Lloyd McKenzie ?

view this post on Zulip Lloyd McKenzie (Mar 05 2020 at 18:38):

If you mean "is it enforced by the validator", I'm not actually sure. @Grahame Grieve

view this post on Zulip Eric Haas (Mar 05 2020 at 19:15):

AFAIK Currently only can say "use this Y profile defined in this Y IG everywhere Y is referenced in a X IG that lists Y IG as a dependency", there is no way to say in an IG, "use this X profile that we just defined in this IG everywhere X is referenced in the same IG". Is that correct? @Lloyd McKenzie

view this post on Zulip Grahame Grieve (Mar 05 2020 at 20:35):

validator doesn't enforce global profiles, no

view this post on Zulip Grahame Grieve (Mar 05 2020 at 20:35):

at least, not yet

view this post on Zulip Lloyd McKenzie (Mar 05 2020 at 21:27):

We haven't defined how global profiles in a derived IG behave with respect to profiles inherited from a referenced (dependency) IG. My assumption had been that global profiles apply everywhere. In principle, if a parent and child IG both defined global profiles for the same IG, then both profiles would have to apply, though we could also say it was an error unless the global profile in the child IG was a constraint on the global profile for that same type in the parent.

view this post on Zulip Lloyd McKenzie (Mar 05 2020 at 21:27):

Do we need a change request to clarify that?

view this post on Zulip Grahame Grieve (Mar 05 2020 at 21:39):

both profiles would have to apply

Yes. Doesn't have to have a direct lineage though

view this post on Zulip Lloyd McKenzie (Mar 05 2020 at 21:51):

"Doesn't have to have direct lineage though" - what does that mean?

view this post on Zulip Grahame Grieve (Mar 05 2020 at 22:04):

baseDefinition doesn't have to point to the logical parent

view this post on Zulip Lloyd McKenzie (Mar 05 2020 at 23:45):

baseDefinition for the global profiles? So essentially all global profiles declared for a given type must hold?

view this post on Zulip Eric Haas (Mar 06 2020 at 03:49):

to clarify, if Craig creates a Patient profile FOO in his IG, he could also declare that FOO is global in his IG and not have to update Encounter to point to FOO? ( assuming the tooling supported this )

view this post on Zulip Grahame Grieve (Mar 06 2020 at 04:09):

yes

view this post on Zulip Craig Newman (Mar 06 2020 at 13:34):

I have to admit I started getting lost at the first mention of "global profiles", but I think it ended with Grahame confirming that if I declare my IG's patient profile as global (within my IG), then all other references to a Patient resource in other profiles my IG uses would default to my Patient profile. DId I get that right? If so, what is the mechanism for declaring a profile to be global? Thanks.

view this post on Zulip Lloyd McKenzie (Mar 06 2020 at 14:58):

ImplementationGuide.global

view this post on Zulip Eric Haas (Mar 08 2020 at 05:55):

@Craig Newman it is not yet implemented in the validation tooling , so don't expect error to be caught by the validator.


Last updated: Apr 12 2022 at 19:14 UTC