0

Consider the logical fragment:

Patient (Profile A)
   identifier (sliced on system) 0..*
      myclinicnbr (slice 1) 0..1
      yourclinicnbr (slice 2) 0..*

And then:

Patient (Profile B, base is A)
   identifier (sliced on system) 0..2
      myclinicnbr (slice 1) (no diff)
      yourclinicnbr (slice 2) 0..*

In B, the effective cardinalities are:

  • identifier 0..2 (explicit)
  • myclinicnbr 0..1 (constrained by A::myclinicnbr)
  • yourclinicnbr 0..2 (constrained by B::identifier)

Questions are:

  • Should B validate with B::yourclinicnbr having a cardinality incompatible with B::identifier?
  • Must B::yourclinicnbr override A::yourclinicnbr to bring it into compliance with B::identifier, or could it make no statement?
  • For each part in B, what is the correct snapshot cardinality?
Chris Grenz
  • 161
  • 9
  • Think not just of cardinalities, also of types (for references) - should the effective types in B be the intersection of both A's slice and B's slice base? I suppose all the normal constraint/refinements could apply... – Chris Grenz Nov 19 '15 at 03:26
  • Are you trying to clarify whether B::yourclinicnbr is allowed to be defined as 0..* or merely whether the effective cardinality (taking into account B::identifier) is 0..2? – Lloyd McKenzie Nov 19 '15 at 07:35
  • Mostly wondering what the snapshot for B::yourclinicnbr should be and if the current tooling would agree? Should B validate even with B::yourclinicnbr max=* ? – Chris Grenz Nov 19 '15 at 13:16

1 Answers1

1

I don't think we've said that cardinalities for slices must be proper subsets of the parent. Doing that would require a lot of awkward math each time a new slice got introduced - adding a minOccurs = 1 slice could easily force decreasing the maximum of a bunch of other 0..n slices. The expectation is that the instance must meet the constraints of both the base element and the slices, so if you have a 0..3 element with a bunch of 0..* slices, you can't have an instance that contains more than 3 repetitions, regardless of the fact that the slices might indicate 0..*. So the implementation behavior isn't confusing. It could however be confusing from a documentation perspective, and might in some cases cause confusion for software.

My leaning is to leave it up to the profile designer as to whether the slice cardinalities are struct mathematical subsets of the element cardinality. In some cases it'll be easy and worth it. In other cases, it might be more pain than the effort justifies. If you think we need to be tighter on this, a change proposal with rationale would be welcome.

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10