简体   繁体   English

导出调用后查询复制状态 - fhir azure

[英]Querying copy status after export call - fhir azure

Using the export api, i am able to export the data out to the container inside storage account.使用导出 api,我可以将数据导出到存储帐户内的容器中。

import requests

url = "https://<fhir-server>.azurehealthcareapis.com/$export"

payload = {}
headers = {
  'Accept': 'application/fhir+json',
  'Prefer': 'respond-async',
  'Authorization': 'Bearer <token>'
}

response = requests.request("GET", url, headers=headers, data = payload)

print(response.text.encode('utf8'))

In my case, the Observation.ndjson is around 700 MB in size and it takes a while to get exported to storage account.就我而言,Observation.ndjson 的大小约为 700 MB,需要一段时间才能导出到存储帐户。

Using rest api or by querying storage account is there any way check if the export has been completed or not?使用 rest api 或通过查询存储帐户有没有办法检查导出是否已完成? I need to perform series of tasks once the data is copied completely to the storage container.将数据完全复制到存储容器后,我需要执行一系列任务。

As indicated in the spec ( https://hl7.org/fhir/uv/bulkdata/export/index.html#bulk-data-status-request ) you should store the Content-Location return header of the $export request.如规范( https://hl7.org/fhir/uv/bulkdata/export/index.html#bulk-data-status-request )中所示,您应该存储$export请求的Content-Location返回 header。 That is the location where you can check status of the export and see the URLs of the resulting files.这是您可以检查导出状态并查看生成文件的 URL 的位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM