Stream: terminology
Topic: filters
Kirstine Rosenbeck Gøeg (Sep 22 2020 at 10:43):
I am looking for a FHIR terminology server that can expand a Value Set based on a filter (descendants of a concept). The Code system is not SNOMED or LOINC, but a complete FHIR CodeSystem. I realize that "filters" are server specific, but I wonder if anyone have implemented this? or plan to do so? It would decrease the maintenance burden significantly, because additions to the CodeSystem in most cases, would not require a manual update of the related ValueSets.
Suggestions for alternative implementations are also welcome :-)
I have tried using a hapi fhir server. I can implement the CodeSystem and ValueSet, but not use the expand operator (naturally), since the server does not implement the filter.
(If you have seen this post before, it is because I have also posted it in the Implementers-stream. They suggested that I posted it here instead :-))
Grahame Grieve (Sep 22 2020 at 11:07):
I think the server running at tx.fhir.org does, but if HAPI does not, you can make a PR to it so that it does
Rob Hausam (Sep 22 2020 at 17:25):
@Kirstine Rosenbeck Gøeg Which version(s) of HAPI have you tried? I believe at least the latest versions (e.g. 5.1.0) should be able to do this. If you can share an example, that could help.
Michael Lawley (Sep 22 2020 at 21:30):
Ontoserver does this. In fact it supports use of a ValueSet of any filter defined in the FHIR CodeSystem. https://ontoserver.csiro.au
Kirstine Rosenbeck Gøeg (Sep 23 2020 at 07:51):
Thanks for the suggestion @Rob Hausam
The hapi server version is 5.0.0. Here is an example of my ValueSet expansion that fails:
{
"resourceType": "ValueSet",
"status": "active",
"compose": {
"include": [ {
"system": "http://kl.dk/fhir/common/caresocial/CodeSystem/KLCommonCareSocialCodes",
"filter": [ {
"property": "descendants",
"op": "descendent-of",
"value": "940f37e6-8a3d-483b-adac-be8af3268a5b"
} ]
} ]
},
"expansion": {
"identifier": "61bfd0bc-dd62-45e2-8964-0564fda8ada1",
"timestamp": "2020-09-23T07:42:44+00:00",
"total": 0
}
}
Which uses the CodeSystem that you can see here: http://build.fhir.org/ig/Kirstinerosenbeck/FKInfo/branches/master/CodeSystem-KLCommomCareSocialCodes.html
It is not a referencing problem. The CodeSystem is also on the hapi server, and everything works as it should for explicitly defined ValueSets.
Kirstine Rosenbeck Gøeg (Sep 23 2020 at 08:44):
@Michael Lawley That is great. To be honest, I have already looked in the Ontoserver documentation. I could only find descriptions of the use of filters for LOINC and SNOMED CT - not FHIR CodeSystem, and that is the reason I didn't explored this option further at first. Is it described in the documentation?
Jim Steel (Sep 24 2020 at 07:20):
It probably isn't. The intention is to follow http://hl7.org/fhir/codesystem.html#properties, but it does differ somewhat (the Ontoserver implementation predates that section). The built-in filters we support for any FHIR CodeSystem that you upload (whether or not you declare them) are:
concept
(with operators =, in, not-in, isa, is-not-a, regex, generalizes and descendent-of)parent
andchild
(=, in, not-in, exists)inactive
anddefinition
(=, exists)
Also, you can declare a CodeSystem filter with the same name as a property, and the server will evaluate those as well. The set of filter operators that will be accepted is dependent on the type of the property (e.g. is-a or generalizes are only available for code- or coding-typed properties)
Michael Lawley (Sep 24 2020 at 07:49):
Additionally, any declared property implicitly defines a filter of the same name with operators =
and in
as per http://hl7.org/fhir/codesystem.html#filters
Last updated: Apr 12 2022 at 19:14 UTC