FHIR Chat · Slicing within slicing · implementers

Stream: implementers

Topic: Slicing within slicing


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

Hallo everyone,
I have a question concerning the slicing within a slicing.
We are trying to profile the wound size, consisting of length, width, area and (optionally) depth. We are profiling this as one observation with many components (see https://simplifier.net/ewundbericht/positherawoundsize).
We sliced the component, our discriminator is code(pattern), so we have a pattern on code of the component.
Now we also want to slice the code in order to allow more than one coding (e.g. one mandatory loinc, one optional snomed). This again we sliced with $this(pattern) as discriminator.

We also have an example for this profile (https://simplifier.net/ewundbericht/observation-example ). When we validate our example against this profile we get the following error:

Invalid : Value does not match pattern
'{"system":"http://loinc.org","code":"39126-8"}'
Observation.component[0].code[0].coding[1]

When we delete the snomed code in our example, everything is fine.

Has anyone an idea how we can change our profile so that different codings are possible?
Thanks in advance to any contributions on this topic.

view this post on Zulip Oliver Egger (Jun 19 2020 at 11:30):

you could setup the first slice with patternCodeableConcept then local codes will be allowed and you don't need to do a slicing within a slicing, see https://github.com/FHIR/fhir-test-cases/blob/master/validator/observation-bp-profile.xml for an example

view this post on Zulip Mareike Przysucha (Jun 19 2020 at 13:42):

Thank you Oliver, that was exactly the problem: I missed the patternCodeableConcepts. Now it works.


Last updated: Apr 12 2022 at 19:14 UTC