FHIR Chat · slicing Observation.derivedFrom · IG creation

Stream: IG creation

Topic: slicing Observation.derivedFrom


view this post on Zulip Bob Milius (Apr 10 2020 at 22:36):

I'm creating a profile that creates a slice on Observation.derivedFrom that references another profile. If the referenced profile is another Observation, I can set the discriminator type to pattern and the path to resolve().code. But if the referenced profile is something else (e.g., MolecularSequence) that doesn't have a code, how should the path be set? I tried setting it to resolve().type since MolecularSequence contains a type, but I get this error in the qa.htmlwhen it goes to validate an example.

Unsupported fixed pattern type for discriminator(resolve().type) for slice Observation.derivedFrom

view this post on Zulip Grahame Grieve (Apr 11 2020 at 07:16):

discriminator = type + pattern

view this post on Zulip Patrick Werner (Aug 09 2020 at 13:34):

I just tried to apply this. To me it is unclear where and how to apply the pattern of the targeted observation.coding.
Intuitively i would create a path like: Observation.derivedFrom.resolve().codebut i'm pretty sure this is wrong. When profiling references i can only find examples on how to do it with the target type or profile.
Couldn't find an example using a pattern on data of the targeted resource.

view this post on Zulip Grahame Grieve (Aug 09 2020 at 20:26):

why are you sure this is wrong?

view this post on Zulip Patrick Werner (Aug 10 2020 at 08:18):

Felt/thought that this isn't possible, happy to hear i was probably wrong.

view this post on Zulip Patrick Werner (Aug 10 2020 at 08:31):

Concrete Example: I want to restrict the targets of Compositions.section.entry:

view this post on Zulip Patrick Werner (Aug 10 2020 at 08:34):

do i now just add another ElementDefinition with id: Observation.derivedFrom.resolve().codeand path Observation.derivedFrom.resolve().code including the pattern on Coding into the Composition Profile?

That felt wrong to me.

view this post on Zulip Grahame Grieve (Aug 10 2020 at 10:09):

oh. I think... you have to refer to another profile and that profile has to be on the target resource and it has to profile the value to what you want it to be

view this post on Zulip Grahame Grieve (Aug 10 2020 at 10:09):

it can be a contained profile - I think the validator test cases do that

view this post on Zulip Patrick Werner (Aug 10 2020 at 11:33):

Thats what i thought. Unfortunately the FHIR Endpoint in this project can't do slicing on profiles

view this post on Zulip Grahame Grieve (Aug 10 2020 at 11:35):

Does the end point need to?

view this post on Zulip Patrick Werner (Aug 10 2020 at 14:19):

Yes during validation, to discriminate slices. Thanks for your clarification. As always very helpful.


Last updated: Apr 12 2022 at 19:14 UTC