FHIR XML补丁操作 - 最小工作示例

发布于 2025-02-12 19:21:56 字数 667 浏览 4 评论 0原文

有人可以在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

伪装你 2025-02-19 19:21:56

您缺少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"?>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文