Stream: IG creation
Topic: Slicing the first element in a Bundle
Lloyd McKenzie (Apr 26 2020 at 03:14):
I thought we'd agreed that it should be possible to slice by position of an element (e.g. so you could define different constraints for the first given name than you have for other repetitions. But I can't see how to do that when I read the profiling page.
Is it allowed? If so, how is it done? Is it documented anywhere?
Rob Hausam (Apr 26 2020 at 03:34):
Does ElementDefinition.slicing.ordered do what you want? The definition is "If the matching elements have to occur in the same order as defined in the profile.". I've never tried it, but it seems like it might fit that use case.
Lloyd McKenzie (Apr 26 2020 at 13:47):
No. That says the slices you specify must be in the order they're declared in, but you still need to define a discriminator to select between them. I want my discriminator to be the order.
Jose Costa Teixeira (Apr 26 2020 at 15:59):
can't you do slicing.discriminator.path = name.given[0] ?
Lloyd McKenzie (Apr 26 2020 at 17:39):
With what type of slicing? (And I don't think you actually can include position in a discriminator - @Grahame Grieve?)
Grahame Grieve (Apr 26 2020 at 20:11):
the definition of a discriminator is ambiguous about whether element index is allowed. It would be good to have a task to clarify. And I'd vote for allowing index.
Grahame Grieve (Apr 26 2020 at 20:11):
we do not currently provide a way to discriminate by order
Lloyd McKenzie (Apr 27 2020 at 04:06):
Last updated: Apr 12 2022 at 19:14 UTC