How to exclude Ressources with _has in FHIR Search?

Hello there :smile:

i want to exclude specific Patients with a diagnosis linked by _has:
[base]/Patient?_has:Condition:patient:code=G20.0&_has:Condition:patient:code:not=E70.0

This should give me all patients with diagnosis-code G20.0, which do not have an diagnosis of E70.0.

But :not doesn’t work with referenced resources. Does anyone have an idea how to solve this? How to exclude specific resources. I know i could search for both terms independently and subtract the results but that is not a good solution i think. Thanks in advance.

I think you might have to use _filter for this