首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >HL7-Fhir :嵌套(子)资源和从单个资源读取结果中支持/允许的_include

HL7-Fhir :嵌套(子)资源和从单个资源读取结果中支持/允许的_include
EN

Stack Overflow用户
提问于 2015-09-17 22:05:11
回答 1查看 543关注 0票数 1

这个页面描述了简单的读取。

但是,我不清楚是否支持_include (网页) (参见2.2.4.1章包含路径),以及是否还可以返回嵌套资源

以下要求也是如此:

include=MedicationOrder.medication有效吗?

如果json的回应是:

代码语言:javascript
复制
{
  "resourceType": "MedicationOrder",
  "id": "5",
  "detail" : "abc",
  "medication":
  {
      "resourceType": "Medication",
      "id": "example",
      "otherDetails": "xyz"
  }
}
EN

回答 1

Stack Overflow用户

发布于 2015-09-18 07:58:54

仅作为搜索的一部分支持_include。所以

include=MedicationOrder.medication

是无效的。这是:

include=MedicationOrder:medication

如果有MedicationOrder和药物的话,你就可以拿回一包药。

您所称的“嵌套资源”--是指包含资源吗?--如果MedicationOrder中有包含的资源,那么它们总是与它一起返回--它们是它的一部分。但它们不会出现在药物中,正如你在上面的例子中所显示的那样。相反:

代码语言:javascript
复制
{
  "resourceType": "MedicationOrder",
  "id": "5",
  "detail" : "abc",
  "medication": { 
    "reference" : "#m1"
  },
  "contained": [
    {
      "resourceType": "Medication",
      "id": "m1",
      "otherDetails": "xyz"
    }
  ]
}
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32640707

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档