Stream: shorthand
Topic: Minimum cardinality with slicing on resource
Jean Duteau (Aug 17 2020 at 20:01):
I am slicing Bundle.entry on the resource type and I'm getting a cardinality error:
* entry ^slicing.discriminator.type = #type
* entry ^slicing.discriminator.path = "resource"
* entry ^slicing.rules = #open
* entry ^slicing.description = "Slice different resources included in the bundle"
* entry contains Message 1..1 MS
* entry[Message].resource only MessageHeader
That seems to be the right way to do this. But I get the following error on my instance example:
Element Bundle.entry:Message has minimum cardinality 1 but occurs 0 time(s).
Here is my Instance where SampleMessageHeader is of type MessageHeader:
Instance: MinimumBundle
InstanceOf: MyBundle
Title: "Minimum Bundle"
Description: "The Bundle with the minimum set of values."
* identifier.value = "BATCH20200210171800-05006510d41d-281d-7610-cd0d-4b07dcc8f49d"
* timestamp = 2020-02-10T17:18:00.000-05:00
* entry.fullUrl = "Bundle/SampleMessageHeader"
* entry.resource = SampleMessageHeader
Can anyone see what I'm doing wrong?
Jean Duteau (Aug 17 2020 at 20:05):
Nm, as I reviewed what I posted, I see that I need to have entry[Message] in there. Nothing to see here!
Chris Moesel (Aug 20 2020 at 20:47):
Yeah, on one hand it annoys me that you have to explicitly indicate the slice in your instance paths. On the other hand, making SUSHI be able to intuit the slices is a major effort fraught with many intricacies, edge cases, and a dependency on terminology servers, so... indicating slices it is!
Last updated: Apr 12 2022 at 19:14 UTC