I'm using Google Healthcare API and trying to search a FHIR resource by date with time zone, like example below:
https://healthcare.googleapis.com/v1/projects/project-id/locations/us-central1/datasets/dataset/fhirStores/fhirstore/fhir/Appointment?date=2020-01-23T08:29:00+03:00
And i'm getting this error:
{
"issue": [
{
"code": "value",
"details": {
"text": "invalid_query"
},
"diagnostics": "error parsing date \"2020-01-23T08:29:00 03:00\": invalid dateTime: 2020-01-23T08:29:00 03:00",
"severity": "error"
}
],
"resourceType": "OperationOutcome"
}
According to the documentation both FHIR and Google:
Date searches on any type of date, time, or period. The date parameter format is yyyy-mm-ddThh:mm:ss[Z|(+|-)hh:mm], and the same prefix modifiers used for number also apply here.
It should work, but when the timezone signal is "plus +". It throws an error. When is "minus -" ex: /Appointment?date=2020-01-23T08:29:00-03:00. it works.
Am I missing something? It looks like a bug to me.
Thanks!
Looks like a URL escaping issue - plus is one of the special characters in URLs.
Try date=2020-01-23T08:29:00%2B03:00, this works when I try it.