Stream: implementers
Topic: Slicing of Coding element
Joel Francis (Jun 21 2019 at 16:51):
Is it conformant/possible to slice the "Coding" element of the CodeableConcept so I can make sure I am expecting a certain value as the first instance?
Eric Haas (Jun 21 2019 at 17:16):
yes... see the documentation on Profiling and the ElementDefinition definition. Tools like Forge should handle this
Jean Duteau (Jun 21 2019 at 17:18):
Is it conformant/possible to slice the "Coding" element of the CodeableConcept so I can make sure I am expecting a certain value as the first instance?
Yes, but why would you want to impose an order on the coding elements? As long as the system or value you are looking for is present, wouldn't that be enough?
The problem with imposing order is that if I have two profiles that each impose order but, other than order, I would be compliant, I now have to create two separate instances. You'll be much nicer to the implementer community if you just say "such-and-such value or system must be present" instead of "it must be the first instance".
Joel Francis (Jun 21 2019 at 17:24):
Is it conformant/possible to slice the "Coding" element of the CodeableConcept so I can make sure I am expecting a certain value as the first instance?
Yes, but why would you want to impose an order on the coding elements? As long as the system or value you are looking for is present, wouldn't that be enough?
The problem with imposing order is that if I have two profiles that each impose order but, other than order, I would be compliant, I now have to create two separate instances. You'll be much nicer to the implementer community if you just say "such-and-such value or system must be present" instead of "it must be the first instance".
ahhhhh good point @Jean Duteau
Joel Francis (Jun 21 2019 at 17:25):
yes... see the documentation on Profiling and the ElementDefinition definition. Tools like Forge should handle this
Thanks @Eric Haas
Rob Hausam (Jun 21 2019 at 18:53):
Agree with @Jean Duteau about not making any expectations regarding the order of the Coding repetitions in a CodeableConcept.
John Silva (Jun 21 2019 at 20:17):
I had a situation where there were multiple coding elements that had the same coding system, though I think this was for multiple categories. One 'hack' was to use the text property to differentiate them.
Eric Haas (Jun 21 2019 at 22:49):
Or the value set
Lloyd McKenzie (Jun 22 2019 at 02:38):
@Joel Francis It's actually non-conformant to assert meaning to the order of elements. If you're not asserting meaning, but just saying "put mine first", that's conformant, but it's a very bad practice - because you're essentially saying "please create a custom interface for me (with all the attendant development, testing and ongoing maintenance costs) so that I can avoid the cost of of writing code once that searches through the list to find the coding I need". So please don't make requirements about sort order for anything where order isn't defined as having meaning. (E.g. given names, address lines, etc.)
Joel Francis (Jun 23 2019 at 01:10):
Joel Francis It's actually non-conformant to assert meaning to the order of elements. If you're not asserting meaning, but just saying "put mine first", that's conformant, but it's a very bad practice - because you're essentially saying "please create a custom interface for me (with all the attendant development, testing and ongoing maintenance costs) so that I can avoid the cost of of writing code once that searches through the list to find the coding I need". So please don't make requirements about sort order for anything where order isn't defined as having meaning. (E.g. given names, address lines, etc.)
Thanks @Lloyd McKenzie
Martijn Hermans (Aug 02 2019 at 11:44):
I have a question about the profile : https://simplifier.net/NictizSTU3-Zib2017/ZIB-Product/~overview
It contains a codeable concept: Code (0..1)
Within code there is: Coding (0..*)
And within coding you have 6 Slices (0..1)
So if I'm not crazy, it should be possible to have 1 code, with up to 6 codes, as long as it contains each of the slices only once (or not at all).
But the following xml gives 6 errors in the validator and i don't understand why:
<Medication>
<id value="HCIM-PharmaceuticalProduct--zindex-voorschrift--705155" />
<meta>
<profile value="http://nictiz.nl/fhir/StructureDefinition/zib-Product" />
</meta>
<extension url="http://nictiz.nl/fhir/StructureDefinition/zib-Product-Description">
<valueString value="description" />
</extension>
<code>
<coding>
<system value="urn:oid:2.16.840.1.113883.2.4.4.10" />
<code value="32336" />
<display value="32336" />
</coding>
<coding>
<system value="urn:oid:2.16.840.1.113883.2.4.4.1" />
<code value="82724" />
<display value="82724" />
</coding>
<coding>
<system value="http://www.whocc.no/atc" />
<code value="J02AC02" />
<display value="J02AC02" />
</coding>
<text value="ITRACONAZOL SDZ 100MG CAPS" />
</code>
<status value="active" />
<isBrand value="false" />
</Medication>
Lloyd McKenzie (Aug 02 2019 at 14:22):
What are the errors?
Grahame Grieve (Aug 02 2019 at 22:36):
looks like a bug in the validator.. I'l' investigate
Grahame Grieve (Aug 04 2019 at 23:45):
for follow up, see https://chat.fhir.org/#narrow/stream/179177-conformance/topic/Slicing.20and.20value.20sets
Martijn Hermans (Aug 07 2019 at 11:33):
I'll do just that. Thanks for the effort!
Last updated: Apr 12 2022 at 19:14 UTC