Stream: implementers
Topic: Extension coding-sctdescid
Declan Kieran (Mar 25 2022 at 15:53):
The definition of this includes an extension with a cardinality of 0..0. Is that correct? Does this mean that using an extension here is explicitly ruled out. For example, it could be useful here to have an extension that included the display, such as
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/coding-sctdescid",
"valueId": "152307010",
"extension": [
{
"url": "https://fhir.nhs.uk/StructureDefinition/Extension-CodingSCTDescDisplay",
"valueString": "Allergy to penicillin (finding)"
}
]
}
],
"system": "http://snomed.info/sct",
"code": "91936005",
"display": "Allergy to penicillin"
}
Lloyd McKenzie (Mar 27 2022 at 04:31):
Where are you seeing the 0..0?
Declan Kieran (Mar 27 2022 at 16:34):
@Lloyd McKenzie
http://hl7.org/fhir/R4/extension-coding-sctdescid.html
For the path Extension.extension, it has a min and max of 0 in the definition. It's also shown on the full structure tab.
Lloyd McKenzie (Mar 27 2022 at 21:25):
Right. The extension isn't allowed to have an extension - because it has a value. However, if you wanted, you could have extensions inside the value.
Declan Kieran (Mar 27 2022 at 23:15):
Ah that makes sense, could also just as easily move the other extension out as another entry in the array, thanks!
"code": {
"coding": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/coding-sctdescid",
"valueId": "152307010",
},
{
"url": "https://fhir.nhs.uk/StructureDefinition/Extension-CodingSCTDescDisplay",
"valueString": "Allergy to penicillin (finding)"
}
],
"system": "http://snomed.info/sct",
"code": "91936005",
"display": "Allergy to penicillin"
}
],
"text": "Penicillin allergy"
}
Declan Kieran (Mar 28 2022 at 10:48):
@Lloyd McKenzie The root extension also has a cardinality of 0..1, so is the first snippet below also invalid? Just wondering what the rationale was for limiting the cardinality of the extension (assuming this is correct), as putting a codableConcept in as the value here adds a couple of layers of extra structure here that doesn't seem to add anything useful (example in second snippet)
"code": {
"coding": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/coding-sctdescid",
"valueId": "152307010"
},
{
"url": "https://fhir.nhs.uk/StructureDefinition/Extension-CodingSCTDescDisplay",
"valueString": "Allergy to penicillin (finding)"
}
],
"system": "http://snomed.info/sct",
"code": "91936005",
"display": "Allergy to penicillin"
}
],
"text": "Penicillin allergy"
}
"code": {
"coding": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/coding-sctdescid",
"valueCodeableConcept": {
"coding": [
{
"extension": [
{
"url": "descriptionId",
"valueIdentifier": {
"system": "http://snomed.info/sct",
"value": "152307010"
}
},
{
"url": "descriptionDisplay",
"valueString": "Allergy to penicillin (finding)"
}
]
}
]
}
}
],
"system": "http://snomed.info/sct",
"code": "91936005",
"display": "Allergy to penicillin"
}
],
"text": "Penicillin allergy"
}
Lloyd McKenzie (Mar 28 2022 at 15:15):
Those look fine. What's not allowed is something like this:
"extension": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/foo",
"valueString": "whatever"
},
],
"url": "http://hl7.org/fhir/StructureDefinition/coding-sctdescid",
"valueId": "152307010"
},
]
Last updated: Apr 12 2022 at 19:14 UTC