FHIR Chat · Slicing & Discriminator · implementers

Stream: implementers

Topic: Slicing & Discriminator


view this post on Zulip Dave Barnet (Nov 12 2018 at 11:38):

Hopefully a quick question. For an element where multiple codes are allowed (for example Condition.bodySite), and we allow multiple codes from the same system (SNOMED in our case) as well as codes from other (undefined) codeSystems, would the following discriminator pattern make sense?
bodySite [0..*]
Slicing: Discriminator: system, Ordering: false, Rules:Open
Slice (SNOMED) [0..*]
system=Fixed Value: http://snomed.info/sct
code
display

So we can have multiple SNOMED codes that conform to the SNOMED slice, as well as allowing multiple other codes. Would this pattern allow 2 LOINC codes, or would that fall foul of the Discriminator rule in this example?

view this post on Zulip Lloyd McKenzie (Nov 12 2018 at 12:22):

Multiple LOINC codes would be fine there. Though unless you had some other constraints on the SNOMED slice there (MustSupport or minOccurs=1 or something), you're not actually setting any constraints beyond what are present in the base resource.

Something else you can do is slice by value for "coding" and declare a value set binding on the coding. That would allow you to assert multiple SNOMED value sets. So long as the value sets don't have overlapping codes, you could require a code from each and say something more useful than "any SNOMED CT code".

view this post on Zulip Dave Barnet (Nov 12 2018 at 12:30):

We do have an extra extension on SNOMED slices around SNOMED description ID, so we need to draw out the SNOMED slice to display the extension. Also, we do normally bind off to a SNOMED refset - in this case (<<442083009 |anatomical or acquired body structure|). I appreciate your point about having the discriminator on code (or system & code) to allow for multiple SNOMED slices.

view this post on Zulip Lloyd McKenzie (Nov 12 2018 at 12:35):

Discriminator on code would mean you'd need to enumerate slices for each code fixed value. That's fine if you're looking for a magic code to make decisions based on, but not so good if you want to allow a code and any specializations of it. For that, specifying a value set is better and that needs to be done at the Coding level.


Last updated: Apr 12 2022 at 19:14 UTC