Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Empty Results in Certain Reverse Chaining FHIR Search Queries #1215

Closed
alexanderkiel opened this issue Oct 16, 2023 · 0 comments
Closed
Assignees
Labels
bug Something isn't working module:db
Milestone

Comments

@alexanderkiel
Copy link
Member

alexanderkiel commented Oct 16, 2023

For FHIR search queries like Patient?gender=male&_has:Encounter:patient:class=IMP were the reverse chaining parameter _has follows a normal parameter like gender, it can happen that the result is either empty or much less than expected.

The core problem is that the RocksDB iterator for the SearchParamValueResource index is used concurrently for finding the male patients and the inpatient encounters. In this situation, we have to use a second iterator here.

Normally the second search parameter uses only iterators over the ResourceSearchParamValue index. So this issue only happens on reverse chaining as second parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module:db
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant