Search code examples
hl7-fhir

Search Procedure resource by nullable date


Im looking at the documentation for FHIR v1.6 Procedure and it looks like its possible to search by date.

My scenario is this:

  • My Procedure's can have a performedDatetime value (for complete procedures) i.e. status=completed
  • Or my Procedure can have a status of in-progress, in which case it will not have a defined performedDatetime value.

I know how to sort these procedures by performedDatetime using:

https://{{baseUrl}}/fhir/Procedure?_sort:desc=date

But is it possible to search for those procedures that dont have a performedDateTime?

I have been trying it this way:

https://{{baseUrl}}/fhir/Procedure?date:missing=false

But this still returns all results.

https://{{baseUrl}}/fhir/Procedure?date=NULL

Throws an error on the server.

What am I missing here?


Solution

  • https://{{baseUrl}}/fhir/Procedure?date:missing=false
    

    that's the right URL and it should work - guess you're going to have to report a bug on the server (may it not be mine!)