HL7-Fhir:搜索查询参数区分大小写还是小写?

时间:2015-09-25 08:25:25

标签: case-sensitive camelcasing hl7-fhir hapi-fhir

问题1]
检查参考实施示例时:http://fhirtest.uhn.ca

我看到搜索http://fhirtest.uhn.ca/baseDstu2/Patient?namE=Meier会返回错误消息,如:

{
    "resourceType":"OperationOutcome",
    "issue":[
        {
            "severity":"error",
            "diagnostics":"Invalid request: The FHIR endpoint on this server does not know how to handle GET operation[Patient] with parameters [[namE]]"
        }
    ]
}

这是在Fhir规范中定义的,还是由服务器决定如何处理?

(我在这里找到了一些关于REST API的问题/回复:Should a REST API be case sensitive or non case sensitive?


问题2]
那些像“referencedOrganization”这样的驼峰式属性呢,如果查询参数也是低级的,看起来像:http://fhirtest.uhn.ca/baseDstu2/Patient?referencedorganization=abc

2 个答案:

答案 0 :(得分:1)

  1. 参数被指定为区分大小写,因为服务器可以选择支持自己的附加参数,服务器可以选择不强制区分大小写

  2. 查询参数与属性名称不同。标准中定义的参数名称列表位于资源之后(例如:http://hl7.org/fhir/patient.html#search

答案 1 :(得分:1)

链接在这里:http://hl7.org/fhir/dstu2/search.html#conformance "服务器不需要对参数名称强制区分大小写,但名称区分大小写(并且URL通常区分大小写)。"

可以用破折号分隔更长的名称。