HL7-FHIR 接受服务器上的绝对外部引用 [英] HL7-FHIR accepting absolute foreign references on server

查看:99
本文介绍了HL7-FHIR 接受服务器上的绝对外部引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 DSTU1 的 2.6.3 复制资源和重新识别中,有一个描述客户端可能必须如何重新分配从服务器拉出的资源的 id.我的问题是朝相反方向前进时应该允许什么.当不需要重新解释时,我认为接受外部绝对引用没有问题(即您在 POST/PUT 上接受 URI 并在 GET 上返回相同的 URI),但我想知道如果重新识别它们是否应该被接受在服务器端需要(即您接受 POST/PUT 上的 URI,但分配一个新的 id 没有对象,以便后续 GET 返回本地相对 URI).

In 2.6.3 Copying Resources and re-identification of DSTU1 there's a description of how clients may have to re-assign ids on resources pulled from a server. My question is what should be allowed when going in the opposite direction. I see no issue with accepting foreign absolute references when there's no re-interpretation needed (ie you accept the URI on POST/PUT and return the same URI on GET), but I'm wondering if they should be accepted if a re-identification is needed on the server side (ie you accept the URI on POST/PUT but assign a new id no the object such that subsequent GET's return a local relative URI).

DSTU1(甚至 DSTU2)中是否有任何与此相关的指南?

Are there any guidelines in DSTU1 (or even DSTU2) related to this?

客户端发布以下内容:

{
    "resourceType": "Patient",
    "name": [{"text": "Irene"}],
    "careProvider": [{"reference": "https://fhir.example.com/api/Organization/12345"}]
}

客户端然后执行 GET 并接收以下内容:

The client then does a GET and receives the following:

{
    "resourceType": "Patient",
    "id": "abc",
    "name": [{"text": "Irene"}],
    "careProvider": [{"reference": "Organization/987"}]
}

您可以看到服务器将组织重新标识为本地引用.

You can see that the server re-identified the Organization into a local reference.

推荐答案

没有比您已经引用的内容更多的材料了.这些材料并不意味着决定答案,只是建议可能需要的解决方案类型.通常,实际上不可能谈论允许的内容 - 除了您提到的一件事:服务器不允许接受 PUT,然后不通过移动资源来兑现 PUT;它应该拒绝 PUT 并坚持 POST.但总的来说,生态系统中客户端、服务器和中间件的组合,我不知道我们是否可以有效地制定关于应该发生和不应该发生的规则

There's no more material than what you already referenced. The material isn't meant to dictate the answers, only to suggest the kind of solutions that might be needed. Generally, then, it's not really possible to talk about what's allowed - except or one thing you mentioned: the server isn't allowed to accept a PUT and then not honor the PUT by moving the resource; it should reject the PUT and insist on a POST. But generally, the mix of clients, servers and middleware in an eco-system, I don't know that we can usefully make rules about what should and shouldn't happen

这篇关于HL7-FHIR 接受服务器上的绝对外部引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆