Stream: shorthand
Topic: Unnecessary slicing?
Elliot Silver (Oct 07 2021 at 20:29):
I have a simple (well, simplified) profile:
Profile: MyCondition
Parent: Condition
Description: "My Condition"
* onset[x] only dateTime or Period
* onsetDateTime MS
If I comment out either of the constraints, I get a resource with no slicing, but when I have both constraints present, I suddenly get slicing.
To me, it doesn't seem like slicing is needed, but maybe I'm missing something. Is sushi generating unnecessarily complicated profiles?
Lloyd McKenzie (Oct 07 2021 at 20:33):
If you're defining MS on only one of the types for onset, you have to slice
Lloyd McKenzie (Oct 07 2021 at 20:33):
The only 'element' that exists is 'onset'. If you're not making onset MS irrespective of type, then you must slice by type.
Elliot Silver (Oct 07 2021 at 20:37):
But if all I have is the MS line, then no slice is created -- and that sets MS on only one of the types.
Elliot Silver (Oct 07 2021 at 21:19):
So, this is the expected rendering then?
It seems funny to me to show the base element and a separate slice for it.
Patrick Werner (Oct 11 2021 at 11:58):
onsetDateTime creates an implicit slicing. If you don't want it:
Profile: MyCondition
Parent: Condition
Description: "My Condition"
* onset[x] only dateTime or Period
* onset[x] MS
Patrick Werner (Oct 11 2021 at 12:00):
expressing only MS for a single datatype and not both needs slicing.
Elliot Silver (Oct 11 2021 at 17:18):
What I was finding odd was that onset[x] only dateTime or Period
didn't create a slice, and onsetDateTime MS
didn't create a slice, but putting them both in did. If onsetDateTime MS
always forced a slice, that would make more sense.
Chris Moesel (Oct 12 2021 at 21:32):
Hi @Elliot Silver -- It is, in fact, creating a slice even when you do only onsetDateTime MS
. What you're seeing is a difference in rendering of the differential view. When you add the type constraint, it forces the onset[x]
element to be rendered in the differential view, so you see the slicing. When you don't add the type constraint, onset[x]
doesn't get rendered in the differential view, so you don't see the slicing. But it is there. If you look at the snapshot view or the underlying JSON/XML, you'll see the slicing and onsetDateTime slice.
Last updated: Apr 12 2022 at 19:14 UTC