GraphQL filter by _lastUpdated

Hi all, I’ve been trying to utilize graphQL recently to pull patients with filtered results, and have been trying to do so by using the Patient meta _lastUpdated tag. However, I’ve seen some issues with my results, and I’m curious if I’m making a mistake here or graphQL is producing unexpected output.

When filtering by birthDate, I have no issues pulling a patientList, e.g.:

“`PatientList(_filter: “birthDate ge 1970-01-01)“`

produces a list as expected, however something like

“`…_lastUpdated ge 1970-01-01…“`

provides 0 results, despite many results having been created since the aforementioned date. I’ve tested `…le, ge…` any the other supported numerical operations, as well as additional dates for testing purposes. Not a single query returns the expected output.

I know that data has been produced after this date, for instance, I have this particular field in one of my patients:

“`

“meta”: {

“lastUpdated”: “2023-02-06T21:09:42.174+00:00”

},

“`

Yet both `le` and `ge` produce empty datasets, causing me to believe the meta.lastUpdated tag is either a different value from _lastUpdated, or the filter is not functioning as I expect. Has anyone been able to query by lastUpdated, or simply even filter graphQL results by date creation in Fhir?

Read more here: Source link