Stream: hapi
Topic: filter on $expand
Patrick Werner (Feb 04 2020 at 16:49):
We want to use the expand operation for searching the code of a display value in the front-end (https://chat.fhir.org/#narrow/stream/179166-implementers/topic/Codesystem.3A.20get.20code.20for.20display).
I just tried: https://fhir.molit.eu/r4/ValueSet/$expand?url=http://molit.eu/fhir/ValueSet/tumorboard-cancellation-reason&filter=Sonstiger%20Grund on our server with no success.
Had also a very quick glimpse at the hapi code which looks good.
Patrick Werner (Feb 04 2020 at 16:50):
is this a known issue or a sideffect of the _filter reworking?
Patrick Werner (Feb 04 2020 at 16:52):
I also saw that Enumerations.FilterOperator.EQUAL
was used. It would be nice to also have startswith or regex.
Main use case for us is autocompletion & code for a display lookup. So a starts-with as the Operator would be nice.
Patrick Werner (Feb 04 2020 at 16:57):
Actually the best option for the frontend auto-complete use-case would be a :contains
Yunwei Wang (Feb 04 2020 at 18:43):
I get a ValueSet expansion back which contains 7 items. Also I noticed that the filter in ValueSet definition is the same filter parameter you used in $expand.
Patrick Werner (Feb 04 2020 at 19:16):
Yes, but due to the filter it only should return one
Yunwei Wang (Feb 04 2020 at 19:23):
Does your source value set have display field?
Patrick Werner (Feb 05 2020 at 15:10):
sure: https://fhir.molit.eu/r4/ValueSet?url=http://molit.eu/fhir/ValueSet/tumorboard-cancellation-reason
Marcelo Cabello (Feb 06 2020 at 14:25):
I'd experienced same issue in my local server (hapi-4.0).
In my case I defined several CS and VS separately, 'cause the concepts have properties. In this case the expansion with filter works fine. Have you tried on Grahames's server?
Patrick Werner (Feb 06 2020 at 14:43):
yes, Grahames Server throws an unsupported exception
Patrick Werner (Feb 06 2020 at 14:44):
In my case I defined several CS and VS separately, 'cause the concepts have properties. In this case the expansion with filter works fine. Have you tried on Grahames's server?
could you elaborate? We also defined our own VS and CS, but expand with filter doesn't work
Marcelo Cabello (Feb 06 2020 at 18:58):
it seems a bug could be there. some days ago I got the right expansion. Now I can't do that. Using the ID instead the URL it's possible to get the right expansion <fhirUrl>/ValueSet/[id]/$expand?filter=<searchValue>
Of course, it's not the right solution, but ...
In this thread another user expose the same behavior: https://groups.google.com/forum/#!searchin/hapi-fhir/ValueSet$20contains$20include$20criteria$20with$20no$20system$20defined%7Csort:date/hapi-fhir/NrrMqselTFk/2yaOYELZBwAJ
Alejandro Lopez Osornio (Mar 09 2020 at 18:15):
I see the same bug on the HAPI version in the LOINC fhir server, this request fails:
"severity": "error", "code": "processing", "diagnostics": "ValueSet contains include criteria with no system defined"
Alejandro Lopez Osornio (Apr 06 2020 at 18:05):
@James Agnew , can you shed some light on this? Is that a valid request? Thanks!
Last updated: Apr 12 2022 at 19:14 UTC