FHIR Chat · Slicing - Possible error in example · implementers

Stream: implementers

Topic: Slicing - Possible error in example


view this post on Zulip Joel Francis (Jul 12 2017 at 15:30):

Hi,

Following the example of slicing https://www.hl7.org/fhir/profiling-examples.html. According to the structure definition, the slices are given mandatory names:

<!-- first slice: home phone -->
<element>
<path value="Patient.telecom"/>
<name value="HomePhone"/> <!-- mandatory - gives the slice a name -->
<min value="1"/>
<max value="1"/>
</element>
<element>
<path value="Patient.telecom.system"/>
<min value="1"/>
<fixedCode value="phone"/>
</element>
<element>
<path value="Patient.telecom.value"/>
<min value="1"/>
</element>
<element>
<path value="Patient.telecom.use"/>
<min value="1"/>
<fixedCode value="home"/>
</element>

<!-- second slice: work phone -->
<element>
<path value="Patient.telecom"/>
<name value="WorkPhone"/> <!-- mandatory - gives the slice a name -->
<min value="0"/>
<max value="1"/>
</element>
<element>
<path value="Patient.telecom.system"/>
<min value="1"/>
<fixedCode value="phone"/>
</element>
<element>
<path value="Patient.telecom.value"/>
<min value="1"/>
</element>
<element>
<path value="Patient.telecom.use"/>
<min value="1"/>
<fixedCode value="work"/>
</element>

So should the example of the instance not be:
<Patient>
<HomePhone>
<system value="phone"/>
<value value="5558881212"/>
<use value="home"/>
</HomePhone>
<Email>
<system value="email"/>
<value value="test@fhir.org"/>
</Email>
</Patient

Instead of :
<Patient>
... snip ...
<telecom>
<system value="phone" />
<use value="home" />
<value value="5551234567" />
</telecom>
<telecom>
<system value="email" />
<value value="someone@acme.org" />
</telecom>
... snip ...
</Patient>

view this post on Zulip Michel Rutten (Jul 12 2017 at 15:41):

Hi @Joel Francis, the example is correct. Slice names only appear within StructureDefinitions. They allows derived profiles to further constrain specific slices, referring to them by name.
The slicing discriminator expresses how to identify specific list items in a concrete (example) resource. Matching does not rely on element renaming.

view this post on Zulip Joel Francis (Jul 12 2017 at 15:46):

Thanks @Michel Rutten

view this post on Zulip Michel Rutten (Jul 12 2017 at 15:55):

@Joel Francis You're welcome, and please feel free to ask these questions in here.
Slicing is one of the most complicated aspects of FHIR profiling. However it is often required in order to be able to model real world use cases. We try to ease the pain through user friendly tooling.

view this post on Zulip Joel Francis (Jul 12 2017 at 15:58):

@Michel Rutten thank you. I am currently using the forge editor STU3.0.1 :+1: to follow along withe these examples. It is extremely difficult to do them by hand alone. If you have any more examples of creating extensions or slicing and could share a link it will be appreciated.

view this post on Zulip Michel Rutten (Jul 12 2017 at 16:04):

Your primary source of information is of course the official hl7 fhir specification website. You can also visit the online FHIR profile registry at https://simplifier.net/ and browse for profiles and examples with slicing. There is no search filter for slicing, but it should be fairly easy to find some.

view this post on Zulip Michel Rutten (Jul 12 2017 at 16:07):

@Chris Grenz publishes a set of example profiles that demonstrate the powerful possibilities of FHIR profiling and takes slicing to the extreme. You can find them at https://github.com/chrisgrenz/FHIR-Primer. Not for the faint of heart...

view this post on Zulip Joel Francis (Jul 12 2017 at 16:12):

@Michel Rutten funny that you mentioned that, the reason I asked the question in the first place is to verify the answer to @Chris Grenz example here:https://github.com/chrisgrenz/FHIR-Primer/wiki/Profiled-FHIR where the slice names appear in the instance.

view this post on Zulip Michel Rutten (Jul 12 2017 at 16:32):

@Joel Francis as Chris mentions in the article, this is merely a proposal.
Also see the linked gForge tracker issue (status Triaged) at http://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_item_id=10002.

view this post on Zulip Joel Francis (Jul 12 2017 at 16:35):

Ok I see. Thanks @Michel Rutten



Last updated: Apr 12 2022 at 19:14 UTC