When searching with _security:not , deleted resources are included in the search results.
klimkjar opened this issue · 3 comments
Describe the bug
When the _security:not search parameter is specified in a search operation, IDs for soft-deleted resources are included in the search results. I've reproduced the behaviour with a fresh install of version 4.0.160 , but it appears at least as far back as in version 3.4.124 .
FHIR Version?
R4
Data provider?
SQL Server
To Reproduce
Steps to reproduce the behavior:
- POST a Patient resource to the fhir-server instance. The contents are not important, for repro purposes even an empty Patient resource is enough.
- DELETE the resource that was created in step 1.
- SEARCH for resources using the
_security:not
parameter, for instance/Patient?_security:not=V
. It needs to be a generic search, if the ID for the resource is specified with_id=...
the behaviour does not appear, but adding_lastUpdated=...
to limit the results if testing on a server with lots of existing data works.
Expected behavior
The deleted resource does not appear in the list of results.
Actual behavior
The deleted resource appears in the list as an empty resource (containing only the id and meta.lastUpdated fields).
Thank you for the bug report. I have also been able to repro the issue and confirmed it. We'll get it on the list to fix.
@feordin - can this be closed?
Yes, this is resolved.