FHIR资源上按时区进行日期的Google Cloud Healthcare API搜索返回错误

问题描述

我正在使用Google Healthcare API并尝试按时区按日期搜索FHIR资源,如下例所示:

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

我收到此错误

{
    "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"
}

根据文档FHIRGoogle

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.

它应该可以工作,但是当时区信号是“ +”时。引发错误。 什么时候是“减号-”,例如:/ Appointment?date = 2020-01-23T08:29:00-03:00。可以。

我错过了什么吗?对我来说似乎是个虫子。

谢谢!

解决方法

看起来像是URL的转义问题-加号是URL中的特殊字符之一。

尝试日期= 2020-01-23T08:29:00%2B03:00,这在我尝试时有效。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...