Stream: implementers
Topic: Slice a Device.property element
Brian Reinhold (Sep 13 2018 at 17:42):
Is this a proper slice?
<element id="Device.property"> <path value="Device.property" /> <slicing> <discriminator> <type value="value" /> <path value="type.coding.code" /> </discriminator> <rules value="open" /> </slicing> <short value="The time capabilities entries" /> <min value="1" /> </element>
Note that the field that determines the slice is the code in the type which is a CodeableConcept. However I am confused by the fact the coding element itself is 0..* and it should be alternative codes can be used to express the same concept.
Lloyd McKenzie (Sep 13 2018 at 18:15):
It's a proper slice, but it's probably not doing exactly what you want - it'd run into problems if the same code were present in multiple systems. More typical is to slice on both system and code or, even better, to do a 'pattern' slice on the type, declaring a pattern of "{"coding":{"system":"foo","code":"bar"}}"
Brian Reinhold (Sep 13 2018 at 18:25):
It's a proper slice, but it's probably not doing exactly what you want - it'd run into problems if the same code were present in multiple systems. More typical is to slice on both system and code or, even better, to do a 'pattern' slice on the type, declaring a pattern of "{"coding":{"system":"foo","code":"bar"}}"
@Lloyd McKenzie you can slice on both code and system at the same time? I would like to do that but did not think it was possible. Could you update my example above to show me what that looks like?
Can you also show me how I could do a pattern example using code and system discriminators (in xml; its all I have ... I am using Notepad++)
It would be much appreciated. (I hope its easy syntax!)
Lloyd McKenzie (Sep 13 2018 at 18:33):
Just list multiple discriminators.
Last updated: Apr 12 2022 at 19:14 UTC