HL7-FHIR accepting absolute foreign references on server

会有一股神秘感。 提交于 2020-01-07 03:24:06

问题


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).

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

Example

The client POSTs the following:

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

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.


回答1:


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



来源:https://stackoverflow.com/questions/31944275/hl7-fhir-accepting-absolute-foreign-references-on-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!