Stream: implementers
Topic: ValueCodableConcept in extension
PS (Mar 02 2020 at 06:17):
Hi,
I came across structure definition which contains this:
{
"differential": {
"element": [
{
"id": "AllergyIntolerance",
"path": "AllergyIntolerance"
},
{
"id": "AllergyIntolerance.extension",
"path": "AllergyIntolerance.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "AllergyIntolerance.extension:reasonRefuted",
"path": "AllergyIntolerance.extension",
"sliceName": "reasonRefuted",
"type": [
{
"code": "Extension",
"profile": "http://hl7.org/fhir/StructureDefinition/allergyintolerance-reasonRefuted"
}
]
},
{
"id": "AllergyIntolerance.extension:reasonRefuted.valueCodeableConcept:valueCodeableConcept",
"path": "AllergyIntolerance.extension.valueCodeableConcept",
"sliceName": "valueCodeableConcept"
}
]
}
}
I want to know how the FHIR message Json will look like.
I tried this but it was giving validation error:
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/allergyintolerance-reasonRefuted",
"value": {
"valueCodeableConcept": { "coding": [ { "system": "system", "code": "code" } ] } } }
]
Can I get some example on how the data will look like?
Abel Stolz (Mar 02 2020 at 08:27):
This fixes your json. Is this what you intended?
{
"resourceType": "Extension",
"url": "http://hl7.org/fhir/StructureDefinition/allergyintolerance-reasonRefuted",
"valueCodeableConcept": {
"coding": [
{
"system": "system",
"code": "code"
}
]
}
}
PS (Mar 02 2020 at 08:37):
In the structure definition which I have shared there are two ids-
AllergyIntolerance.extension:reasonRefuted and AllergyIntolerance.extension:reasonRefuted.valueCodeableConcept:valueCodeableConcept.
AllergyIntolerance.extension:reasonRefuted profile is that of reason refuted which is codeable concept.
So from the json I want to know how both of the IDs are fitting into the structure definition ?
In the json which you have shared there is only one codeable concept.
Abel Stolz (Mar 02 2020 at 09:17):
I am not sure, what you mean by two IDs, but let me guess:
One ID (reasonRefuted) is given by the unique url provided in the extension. The second ID (CodeableConcept) is given by the system and code, which you would have to specify in a real life example instead of "system" and "code". In your example there are both IDs present, as they are in the corrected json.
Am I missing something?
PS (Mar 02 2020 at 09:49):
If you see structure definition ReasonRefuted has url which is of the type CodeableConcept and Inside reason refuted there is valueCodableConcept which is also of the type Codeable Concept. I am not sure but the example which you gave doesn't contains both codeableConcept. I am still confuse why in the structure definition there is need of putting nested structures as this can be just implemented by giving reasonRefuted and its URL.
Is my understanding correct?
Abel Stolz (Mar 02 2020 at 11:52):
Ok, I think now I understand your question. The url of reasonRefuted is the ID of the extension. That is, it stands for the concept of of "reasonRefuted" in the context of allergy intolerances. The codeable concept still has to be specified, because there might be more than one reason! So the specific reason is coded in the codeable concept and thus needs it's own ID.
I don't know about your extension in the example, but in general this reasoning applies for many extensions.
In conclusion: One ID to specify the concept itself (a class in object oriented programming), one ID to specify the concrete example of the concept (the instance in OO.)
Hope this helps...
Lloyd McKenzie (Mar 02 2020 at 15:59):
Expressed another way, the URL for the extension defines the element. The URL for the code defines the namespace for the concept. The code might well be from SNOMED - which covers all sorts of things. You'd need to know the meaning of the 'element' in order to interpret the meaning of the concept appropriately
PS (Mar 03 2020 at 06:29):
@Abel Stolz @Lloyd McKenzie
Thanks for the explanation. I understood what you have explained but I have seen other examples of structure definitions where there ID was not given. I see only here that separate IDs have been given to extension and the included element.
Is this redundant/given separate ID for more clarity?
Even if separate ID was not given it would have worked as expected ?
Abel Stolz (Mar 03 2020 at 06:41):
No, the IDs are not redundant.
No, it would not work without separate IDs.
PS (Mar 03 2020 at 07:42):
@Abel Stolz
Sorry just one more question. There is a structure definition which has following in its differential in extension:
{
"id" : "AllergyIntolerance.extension:RefutedSign",
"path" : "AllergyIntolerance.extension",
"sliceName" : "RefutedSign",
"max" : "1",
"type" : [
{
"code" : "Extension",
"profile" : "https://somesignatureprofile.com"
}
}
Here RefutedSign is of the type Signature but here there separate signature is not present.
That's why I was confuse.
Can you tell here why its not required just like in codeableConcept case.
Thanks.
Abel Stolz (Mar 03 2020 at 07:57):
Sorry, I can't tell you. But I don't know the RefutedSign extension. You should look for an explanation in the documentation of the extension...
PS (Mar 03 2020 at 08:00):
Okay Thanks
Last updated: Apr 12 2022 at 19:14 UTC