FHIR XML补丁操作 - 最小工作示例
有人可以在public test.fhir.org测试服务器上为我提供用于XML格式的FHIR补丁操作的MWE。这就是我得到的:
请求:
PATCH http://test.fhir.org/r4/Patient/12345
Content-Type: application/xml-patch+xml
<replace sel="/name/family/@value">Schmidt</replace>
错误:
错误解析资源xml(这似乎不是FHIR元素或资源或资源(错误的名称空间“”) @ /)
i Similiar json操作woks可以很好地:
PATCH http://test.fhir.org/r4/Patient/12345
Content-Type: application/json-patch+json
[{
"op": "replace",
"path": "/name/0/family",
"value": "Meyer"
}]
我已经搜索了很多,找不到用于XML补丁程序的MWE,只有JSON。
最好的 托比亚斯
could someone provide me with a MWE for a FHIR PATCH operation in XML format on the public test.fhir.org test server. This is what I got:
Request:
PATCH http://test.fhir.org/r4/Patient/12345
Content-Type: application/xml-patch+xml
<replace sel="/name/family/@value">Schmidt</replace>
Error:
Error parsing resource Xml (This does not appear to be a FHIR element or resource (wrong namespace "") @ /)
I similiar JSON operation woks fine:
PATCH http://test.fhir.org/r4/Patient/12345
Content-Type: application/json-patch+json
[{
"op": "replace",
"path": "/name/0/family",
"value": "Meyer"
}]
I've searched a lot and couldn't find an MWE for an XML Patch operation, only JSON.
Best
Tobias
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您缺少XML名称空间。如果添加此行以创建有效的XML文档,则应工作:
&lt;?xml版本=“ 1.0” encoding =“ utf-8”?&gt;
You are missing the XML namespace. If you add this line to create a valid XML document, it should work:
<?xml version="1.0" encoding="UTF-8"?>