Stream: snomed
Topic: findings by qualifiers
Jose Costa Teixeira (Aug 31 2020 at 10:09):
Hi (and apologies if I'm not using the right terms):
Can I query a server for all findings that have a given qualifier? How?
The case at hand: I want to see all findings that have a qualifier "Perinatal" or "Neonatal"
Cora Drenkhahn (Aug 31 2020 at 13:32):
If I understand this correctly you'll probably need to query using the Expression Constraint Language (ECL). Like this, you can limit your results to concepts that adhere to a given definition.
For your example the ECL expression would be something like this:
<< 404684003|Clinical finding| : << 246454002|Occurrence| = (
(<< 371578004|Perinatal period| OR << 255407002|Neonatal|)
)
Your server needs to be able to handle ECL but quite a few do.
Then, you can use the $expand
operation to query an implicit ValueSet defined by ECL (see the last of the five possibilities).
Michael Lawley (Sep 03 2020 at 05:29):
You _should_ also be able to use ValueSet.compose.include.filter
, since all properties should have a corresponding filter that supports the =
and in
operators (https://www.hl7.org/fhir/codesystem.html#filters). In this case, where you want to test << 255407002|Neonatal|
it is unclear whether SNOMED's redefinition of the in
operator to take a ValueSet URI as its parameter value applies, or whether the default comma-separated list of codes should be used.
If the ValueSet approach does apply, then you'd have
{
"include": [{
"system": "http://snomed.info/sct",
"filter": [{
"property": "concept",
"op": "is-a",
"value": "404684003"
}, {
"property": "246454002",
"op": "in",
"value": "http://snomed.info/sct?fhir_vs=isa/371578004"
}]
}, {
"system": "http://snomed.info/sct",
"filter": [{
"property": "concept",
"op": "is-a",
"value": "404684003"
}, {
"property": "246454002",
"op": "in",
"value": "http://snomed.info/sct?fhir_vs=isa/255407002"
}]
}]
}
Note, this is quite the same semantics because it doesn't capture the descendants or self of << 246454002|Occurrence|
but since Occurrence has no descendants this is not likely to be an issue.
Last updated: Apr 12 2022 at 19:14 UTC