fhir.executeBundle 替换资源 ID...如何防止这种情况发生?

fhir.executeBundle replacing resource id...How to prevent this?

我正在使用此 Java code 将资源上传到 FHIRstore。 资源如下

{
  "resourceType": "Bundle",
  "id": "bundle-transaction",
  "meta": {
    "lastUpdated": "2018-03-11T11:22:16Z"
  },
  "type": "transaction",
  "entry": [
    {
      "resource": {
        "resourceType": "Patient", "id" : 123456,
        "name": [
          {
            "family": "Smith",
            "given": [
              "Darcy"
            ]
          }
        ],
        "gender": "female",
        "address": [
          {
            "line": [
              "123 Main St."
            ],
            "city": "Anycity",
            "state": "CA",
            "postalCode": "12345"
          }
        ]
      },
      "request": {
        "method": "POST",
    "url": "Patient"
      }
    }
  ]
}

但是我使用的 ID(123456) 正在被十六进制数替换。

使用 fhirstores.import method 时不会发生这种情况 有什么方法可以阻止 executeBundle 方法替换我的 ID...因为我想在我的资源中使用自定义 ID?

如有任何帮助,我们将不胜感激。 谢谢

当您执行事务时,效果将与您 POST 单独处理资源相同。在 POST 上, 服务器 确定资源 ID。在常规 POST 上,id 会被忽略或引发错误。在事务中,id 用于管理跨事务的引用解析,但服务器仍然选择持久化资源的 id(并相应地更新所有引用)。如果要在事务中控制资源 ID 值,请使用 PUT 而不是 POST。 (请注意,并非所有服务器都允许 'upsert' - 即在特定资源位置执行创建的 PUT。)有关详细信息,请参阅 http://hl7.org/fhir/http.html#upsert