FHIR Chat · Interpreting slicing on CodeableConcept · implementers

Stream: implementers

Topic: Interpreting slicing on CodeableConcept


view this post on Zulip Elliot Silver (Feb 02 2022 at 19:50):

Looking at http://build.fhir.org/ig/HL7/fhir-ips/StructureDefinition-Immunization-uv-ips.html, I had previously interpreted the slicing on vaccineCode to mean "there must be a single vaccineCode, with at most one value from Vaccines (GPS), at most one from ATC, and at most one from Absent/unknown, and any number of other codes" Thinking about it more carefully though, I'm understanding it as "there must be a single vaccineCode, with at most one value from (GPS, ATC, or absent/unknown) , and any number of other codes." The difference between the two interpretations is that one allows for, e.g., both ATC and GPS values, while the other doesn't. Is my current interpretation correct?

view this post on Zulip Daniel Venton (Feb 02 2022 at 19:58):

I'm not sure the UML says this, but the intent would seem to be, there SHALL be 1 .vaccineCode
.vaccineCode.coding[] can contain up to 1 of value set X, up to 1 of value set Y, up to 1 of data absent + any other vaccine value sets.

view this post on Zulip Richard Townley-O'Neill (Feb 03 2022 at 00:41):

I think your first interpretation is correct, there will be exactly one instance of Immunization.vaccineCode

Reading the XML
Immunization.vaccineCode - 1..1
Immunization.vaccineCode:vaccineGPSCode - 0..1
Immunization.vaccineCode:atcClass - 0..1
Immunization.vaccineCode:absentOrUnknownImmunization - 0..1
And the slicing is open so other values are allowed

view this post on Zulip Elliot Silver (Feb 03 2022 at 03:02):

Richard Townley-O'Neill said:

I think your first interpretation is correct, there will be exactly one instance of Immunization.vaccineCode

Reading the XML
Immunization.vaccineCode - 1..1
Immunization.vaccineCode:vaccineGPSCode - 0..1
Immunization.vaccineCode:atcClass - 0..1
Immunization.vaccineCode:absentOrUnknownImmunization - 0..1
And the slicing is open so other values are allowed

One vaccineCode, agree. But multiple vaccineCode.coding, at most one of which could be GPS, at most one of which could be ATC and at most one of which could be Absent/Unknown.
Or one vaccineCode, multiple vaccineCode.coding, at most one of which could be (GPS, ATC or Absent/Unknown)?

view this post on Zulip Richard Townley-O'Neill (Feb 03 2022 at 04:34):

Elliot Silver said:

One vaccineCode, agree. But multiple vaccineCode.coding, at most one of which could be GPS, at most one of which could be ATC and at most one of which could be Absent/Unknown.

oops! I agree with your new interpretation.
Translations are allowed.
Also, if Immunization.vaccineCode has codings that match more than one slice there will be a slicing error.

view this post on Zulip Elliot Silver (Feb 03 2022 at 04:44):

Richard Townley-O'Neill said:

Also, if Immunization.vaccineCode has codings that match more than one slice there will be a slicing error.

That's what I'm getting at -- I can't say that the vaccineCode is X under GPS and Y under ATC. I'm only allowed to match a single slice. But I can say vaccineCode is X under GPS and Z under MyLocaleCodeSystem.

view this post on Zulip Elliot Silver (Feb 03 2022 at 04:45):

To be able to say the vaccineCode is X under GPS and Y under ATC, I need to slice at the coding level, not at the CodableConcept.

view this post on Zulip Richard Townley-O'Neill (Feb 03 2022 at 05:47):

I missed that, slicing a non-repeating element with only a single data type is sus.
Slicing is designed for things that repeat.
The slicing should be on the Coding.

view this post on Zulip Elliot Silver (Feb 03 2022 at 06:07):

Right, but that's a pattern I'm seeing, due, I think to others having my original interpretation of the situation.

view this post on Zulip Richard Townley-O'Neill (Feb 03 2022 at 06:09):

Test examples are created too late.


Last updated: Apr 12 2022 at 19:14 UTC