Skip to content

_filter not support "not" keyword #5026

@ibrohimislam

Description

@ibrohimislam

Describe the issue
in https://hl7.org/fhir/search_filter.html, _filter syntax should have feature:

A filter can be a logical one (x or x, or x and x, or not x).

and in formal grammar:

filter        = paramExp / logExp / ("not") "(" filter ")"

To Reproduce

  1. Choose a filter for example code eq I46.9 in resource Condition
  2. Do query using _filter syntax. in test server: https://hapi.fhir.org/baseR4/Condition/?_filter=%28code%20eq%20I46.9%29
  3. Make a not logic to filter, for our example: not(code eq I46.9)
  4. Do logic query to _filter syntax. in test server: https://hapi.fhir.org/baseR4/Condition/?_filter=not%28code%20eq%20I46.9%29

Expected behavior
2nd step should return Condition with code I46.9
4th stem should return Condition without code I46.9. but I got an error

Environment:

  • HAPI FHIR Version: HAPI FHIR 6.7.8-SNAPSHOT/b985091c2c/2023-06-21

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions