0

Is is possible to slice an element by ordinal position (rank)? For instance, to profile the first given element in HumanName differently than the second (and subsequent) instances:

... snip ...
<element>
  <path value="Patient.name.given" />
  <slicing>
    <discriminator value="???" />
    <ordered value="true" />
  </slicing>
</element>
<element>
  <path value="Patient.name.given" />
  <name value="First Name" />
  <fixed?? value="0" />
</element>

I don't see any facility for this? This was the easiest example, but there are many situations where we'd like to differentiate between the first element ("primary") and others.

Chris Grenz
  • 161
  • 9

2 Answers2

1

well, you can say that the slicing is ordered, and set constraints on the first element. This makes everything else ordered too. This is not the same as 'slicing by order' but it does make the first element special

Grahame Grieve
  • 3,538
  • 3
  • 15
  • 17
  • Do you mean using an ElementDefinition.constraint with an [0] xpath predicate? Or are you suggesting there's a way to create a complete ElementDefintion for the first element? – Chris Grenz May 08 '15 at 18:35
0

Note that, unless the base resource assigns a meaning to order, enforcing order in a profile will impede interoperability. Only systems specifically configured for the profile will be able to conform to it.

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