Stream: terminology
Topic: Inconsistency of $lookup properties from various servers
Michael Lawley (Mar 01 2022 at 05:44):
I have just been looking at the output of $lookup
for various servers I know of & have access to an endpoint (Ontoserver, tx.fhir.org/r4, Terminz, STS Phast, Snowstorm) and I'm seeing a lot of variation in responses. These range from incorrect type of property.code
to returning Coding
rather than code
, and then different interpretations of how to use property.subproperty
Perhaps a topic for the next connectathon.
Here are some selected examples (not all are wrong IMO):
Property as Coding, subproperty is actually a property of the parent concept:
{
"name": "property",
"part": [
{"name": "code", "valueCode": "parent"},
{
"name": "value",
"valueCoding": {
"system": "http://snomed.info/sct",
"code": "18526009",
"display": "Disorder of appendix"
}
},
{"name": "description", "valueString": "Disorder of appendix (disorder)"},
{
"name": "subproperty",
"part": [
{"name": "code", "valueCode": "sufficientlyDefined"},
{"name": "value", "valueBoolean": true}
]
}
]
}
Subproperty is the role-group value from RF2:
{
"name": "property",
"part": [
{"name": "code", "valueCode": "363698007"},
{
"name": "value",
"valueCoding": {
"system": "http://snomed.info/sct",
"code": "66754008",
"display": "Appendix structure"
}
},
{
"name": "description",
"valueString": "Appendix structure (body structure)"
},
{
"name": "subproperty",
"part": [
{"name": "code", "valueCode": "relationshipGroup"},
{"name": "value", "valueString": "1"}
]
}
]
}
Subproperties are each of the properties grouped together (as indicated by the role-group value):
{
"name": "property",
"part": [
{
"name": "subproperty",
"part": [
{"name": "code", "valueCode": "363698007"},
{"name": "valueCode", "valueCode": "66754008"}
]
},
{
"name": "subproperty",
"part": [
{"name": "code", "valueCode": "116676008"},
{"name": "valueCode", "valueCode": "409774005"}
]
}
]
}
Code value has wrong type (should be code, not string), and value has wrong type (should be boolean not string):
{
"name": "property",
"part": [
{"name": "code", "valueString": "inactive"},
{"name": "value", "valueString": "False"}
]
}
Code has wrong type and value is wrong case (should be parent
):
{
"name": "property",
"part": [
{"name": "code", "valueString": "Parent"},
{"name": "value", "valueString": "18526009"},
{"name": "description", "valueString": "Disorder of appendix"}
]
}
Lots of issues:
{
"name": "property",
"part": [
{"name": "code", "valueString": "363698007|Finding site|"},
{"name": "value", "valueString": "1"},
{"name": "description", "valueString": "66754008|Appendix structure|"}
]
}
Peter Jordan (Mar 01 2022 at 06:53):
That's really useful @Michael Lawley , although I have no idea what you mean by "Property as Coding, subproperty is actually a property of the parent concept:". What would be even more helpful would be some examples of what you believe to be the correct renderings. I will hold my hand up and admit that the last snippet isn't compliant, but make no apologies as it's intended to create something readable and usable for my own client app. GOK how one creates anything client-friendly (i.e. including descriptions) for attribute name-value pairs that includes the Role Group?
Michael Lawley (Mar 01 2022 at 06:55):
I've attempted to clarify with my edit. There were actually two separate issues.
Michael Lawley (Mar 01 2022 at 07:45):
As requested by @Peter Jordan , I've followed each example with what I think would be a good alternative.
Note, these were all from a $lookup
of 74400008 |Appendicitis|
Examples follow:
- Property is
Coding
rather thancode
(as per https://www.hl7.org/fhir/codesystem-concept-properties.html#4.3.14.243.2) - "Subproperty" here is actually a property of the parent concept, not a subproperty of Appendicitis:
{
"name": "property",
"part": [
{"name": "code", "valueCode": "parent"},
{
"name": "value",
"valueCoding": {
"system": "http://snomed.info/sct",
"code": "18526009",
"display": "Disorder of appendix"
}
},
{"name": "description", "valueString": "Disorder of appendix (disorder)"},
{
"name": "subproperty",
"part": [
{"name": "code", "valueCode": "sufficientlyDefined"},
{"name": "value", "valueBoolean": true}
]
}
]
}
Alternative - I think it's fair to include additional detail about a property value (here, sufficientlyDefined
) alongside the value itself; this is essentially what description
is. Also, since the FSN is not used as the display
for the concept, I'd probably not be using the FSN as the description here:
{
"name": "property",
"part": [
{"name": "code", "valueCode": "parent"},
{"name": "value", "valueCode": "18526009"},
{"name": "description", "valueString": "Disorder of appendix"},
{"name": "sufficientlyDefined", "valueBoolean": true}
]
}
Subproperty is the role-group value from RF2:
{
"name": "property",
"part": [
{"name": "code", "valueCode": "363698007"},
{
"name": "value",
"valueCoding": {
"system": "http://snomed.info/sct",
"code": "66754008",
"display": "Appendix structure"
}
},
{
"name": "description",
"valueString": "Appendix structure (body structure)"
},
{
"name": "subproperty",
"part": [
{"name": "code", "valueCode": "relationshipGroup"},
{"name": "value", "valueString": "1"}
]
}
]
}
Alternative - I can see the reasoning for making relationshipGroup
a subproperty here (albeit an Integer), but it then leaves things to the client to re-assemble / pair up with the other properties that have the same value and they need to understand the special handling required for a value of 0. Lastly, it exposes the actual values from the RF2 file which are essentially arbitrary since they are internal "plumbing":
{
"name": "property",
"part": [
{"name": "code", "valueCode": "363698007"},
{"name": "value", "valueCode": "66754008"},
{"name": "description", "valueString": "Appendix structure"},
{"name": "relationshipGroup", "valueInteger": 1}
]
}
This is how I think it should be done; subproperties are each of the properties grouped together (as directed by the role-group value). What is missing here is the required property.code
:
{
"name": "property",
"part": [
{
"name": "subproperty",
"part": [
{"name": "code", "valueCode": "363698007"},
{"name": "valueCode", "valueCode": "66754008"}
]
},
{
"name": "subproperty",
"part": [
{"name": "code", "valueCode": "116676008"},
{"name": "valueCode", "valueCode": "409774005"}
]
}
]
}
Alternative - I've been verbose here, adding in the description
detail. If you _really_ must expose the relationshipGroup
value, then I would do it like this since it must be the same for each subproperty:
{
"name": "property",
"part": [
{"name": "code", "valueCode": "609096000"},
{"name": "description", "valueString": "Role group"},
{"name": "relationshipGroup", "valueInteger": 1},
{
"name": "subproperty",
"part": [
{"name": "code", "valueCode": "363698007"},
{"name": "valueCode", "valueCode": "66754008"},
{"name": "description", "valueString": "Appendix structure"}
]
},
{
"name": "subproperty",
"part": [
{"name": "code", "valueCode": "116676008"},
{"name": "valueCode", "valueCode": "409774005"},
{"name": "description", "valueString": "Inflammatory morphology"}
]
}
]
}
Code value has wrong type (should be code, not string), and value has wrong type (should be boolean not string):
{
"name": "property",
"part": [
{"name": "code", "valueString": "inactive"},
{"name": "value", "valueString": "False"}
]
}
Corrected:
{
"name": "property",
"part": [
{"name": "code", "valueCode": "inactive"},
{"name": "value", "valueBoolean": false}
]
}
Code has wrong type and value is wrong case (should be parent
):
{
"name": "property",
"part": [
{"name": "code", "valueString": "Parent"},
{"name": "value", "valueString": "18526009"},
{"name": "description", "valueString": "Disorder of appendix"}
]
}
Corrected:
{
"name": "property",
"part": [
{"name": "code", "valueCode": "parent"},
{"name": "value", "valueCode": "18526009"},
{"name": "description", "valueString": "Disorder of appendix"}
]
}
Lots of issues:
{
"name": "property",
"part": [
{"name": "code", "valueString": "363698007|Finding site|"},
{"name": "value", "valueString": "1"},
{"name": "description", "valueString": "66754008|Appendix structure|"}
]
}
Alternative -- I am guessing about the intent of the "value = 1" above:
{
"name": "property",
"part": [
{"name": "code", "valueCode": "363698007"},
{"name": "codeDescription", "valueString": "Finding site"},
{"name": "value", "valueCode": "66754008"},
{"name": "description", "valueString": "Appendix structure|"},
{"name": "relationshipGroup", "valueInteger": 1}
]
}
Last updated: Apr 12 2022 at 19:14 UTC