您是否查看过batch/transaction 互动?
batch 和 transaction 交互提交一组操作,以在单个 HTTP 请求/响应中在服务器上执行。这些操作可以作为“批处理”独立执行,也可以作为单个原子“事务”执行,其中整个更改集作为单个实体成功或失败。
batch 或 transaction 交互由 HTTP POST 命令执行,如下所示:
POST [base] {?_format=[mime-type]}
这是一个 POST 请求 meds and allergies 的示例:
{
"resourceType": "Bundle",
"id": "bundle-request-medsallergies",
"type": "batch",
"entry": [
{
"request": {
"method": "GET",
"url": "/Patient/example"
}
},
{
"request": {
"method": "GET",
"url": "/MedicationStatement?patient=example&_list=$current-medications"
}
},
{
"request": {
"method": "GET",
"url": "/AllergyIntolerance?patient=example&_list=$current-allergies"
}
},
{
"request": {
"method": "GET",
"url": "/Condition?patient=example&_list=$current-problems"
}
},
{
"request": {
"method": "GET",
"url": "/MedicationStatement?patient=example¬given:not=true"
}
}
]
}