Stream: IPS
Topic: Errors in extension slicing?
Elliot Silver (Nov 17 2021 at 19:25):
Looking at some of the IPS profiles, I think many of the slicing on extensions is wrong. For example, in MedicationStatement:
{
"id" : "MedicationStatement.effective[x]",
"path" : "MedicationStatement.effective[x]",
"min" : 1,
"max" : "1",
"mustSupport" : true
},
{
"id" : "MedicationStatement.effective[x].extension",
"path" : "MedicationStatement.effective[x].extension",
"short" : "effective[x] absence reason",
"definition" : "Provides a reason why the effectiveTime is missing.",
"max" : "1",
"type" : [
{
"code" : "Extension",
"profile" : [
"http://hl7.org/fhir/StructureDefinition/data-absent-reason"
]
}
],
"mustSupport" : true
},
To me, this says "the only permitted extension on effective[x] is DAR, and only one occurrence is permitted."
Compare this to AllergyIntolerance, which because of the slice, says "there shall be at most one extension of type DAR":
{
"id" : "AllergyIntolerance.extension:abatement-datetime",
"path" : "AllergyIntolerance.extension",
"sliceName" : "abatement-datetime",
"short" : "Abatement datetime",
"definition" : "The date or estimated date that the condition resolved or went into remission.",
"max" : "1",
"type" : [
{
"code" : "Extension",
"profile" : [
"http://hl7.org/fhir/uv/ips/StructureDefinition/abatement-dateTime-uv-ips"
]
}
],
"mustSupport" : true
},
Am I misreading this?
Elliot Silver (Nov 19 2021 at 02:43):
@Rob Hausam any thoughts?
Rob Hausam (Nov 19 2021 at 15:56):
HI, @Elliot Silver. I've looked at this, and yes, I think your analysis is correct. That's a great pickup - thanks! I finally located the relevant documentation in 5.1.0.15.1 Using Extensions in Profiles:
To prescribe the use of an extension in an instance, the extension list on the resource needs to be sliced.
I will fix this instance, and will look for any others that may be like it. If you or anyone else are already aware of other instances, let me know.
Elliot Silver (Nov 19 2021 at 17:10):
In IPS master:
- MedicationRequest.dispenseRequest.validityPeriod.extension
However, I'm not sure if we need to include the discriminator definition or if that is inherited. If we need it, then it is missing from:
- AllergyIntolerance.extension:abatement-datetime
- DeviceUseStatement.timing[x]:data-absent-reason
- DiagnosticReport.effective[x]:data-absent-reason
- Immunization.occurrence[x]:data-absent-reason
- MedicationRequest.dispenseRequest.validityPeriod.extension
- MedicationStatement.effective[x]:data-absent-reason
- Observation.effective[x]:data-absent-reason (all profiles)
- Procedure.performed[x]:data-absent-reason
(i.e., all extensions except Coding.display.extension)
Rob Hausam (Nov 19 2021 at 18:59):
Thanks for that. Yes. I think the the discriminator is implicit as the url for slicing on 'extension'. But I don't know if that it is documented (or for certain if it's actually true).
Elliot Silver (Nov 19 2021 at 19:05):
Rob Hausam said:
But I don't know if that it is documented (or for certain if it's actually true).
That was my question too.
Last updated: Apr 12 2022 at 19:14 UTC