提供意見
重新整理醫療照護資料
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
將資料初步匯入 Vertex AI Search 醫療照護資料儲存庫後,您可能已在來源 FHIR 儲存庫中執行下列任何更新:
新增 FHIR 資源
更新現有 FHIR 資源
已刪除的 FHIR 資源
在這種情況下,您可以將來源 FHIR 儲存庫的變更同步 至 Vertex AI Search 醫療照護資料儲存庫。
對帳總覽
重要術語: Vertex AI Search 醫療照護資料儲存庫中的文件,對應於 FHIR 儲存庫中的 FHIR R4 資源。
您可以逐步或完全比對變更。下表比較這兩種模式。
來源 FHIR 儲存庫異動
增量模式
完整模式
新的 FHIR 資源
將新文件新增至 Vertex AI Search 資料儲存庫
將新文件新增至 Vertex AI Search 資料儲存庫
更新 FHIR 資源
取代 Vertex AI Search 資料儲存庫中的現有文件,同時保留文件 ID
取代 Vertex AI Search 資料儲存庫中的現有文件,同時保留文件 ID
已刪除的 FHIR 資源
未對帳
從 Vertex AI Search 資料儲存庫中移除對應的文件
事前準備
查看 Google Cloud 專案的配額與限制 。
每個專案的 Vertex AI Search 醫療照護資料儲存庫最多可包含 100 萬份文件。如果在匯入期間達到配額上限,匯入程序就會停止。
下列範例說明如何使用 documents.import
方法,從 Cloud Healthcare API FHIR 儲存庫匯入增量變更。
這項工作需要的權限
在包含 AI 應用程式資料存放區的專案中,將下列 Identity and Access Management (IAM) 角色授予service-PROJECT_NUMBER @gcp-sa-discoveryengine.iam.gserviceaccount.com
服務帳戶:
在包含 Cloud Healthcare API FHIR R4 資料存放區的專案中,將下列 Identity and Access Management 角色授予服務帳戶:service-PROJECT_NUMBER @gcp-sa-discoveryengine.iam.gserviceaccount.com
目的
角色
從不同專案的 Cloud Healthcare API FHIR 儲存庫,串流匯入 FHIR 資料。 Google Cloud
在包含 Cloud Healthcare API FHIR R4 資料存放區的專案中,將下列 Identity and Access Management 角色授予服務帳戶:service-SOURCE_PROJECT_NUMBER @gcp-sa-healthcare.iam.gserviceaccount.com
REST
執行增量匯入。
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-H "X-Goog-User-Project: PROJECT_ID " \
"https://us-discoveryengine.googleapis.com/v1alpha/projects/PROJECT_ID /locations/us/dataStores/DATA_STORE_ID /branches/0/documents:import" \
-d '{
"reconciliation_mode": "INCREMENTAL",
"fhir_store_source": {"fhir_store": "projects/PROJECT_ID /locations/CLOUD_HEALTHCARE_DATASET_LOCATION /datasets/CLOUD_HEALTHCARE_DATASET_ID /fhirStores/FHIR_STORE_ID "}
}'
更改下列內容:
PROJECT_ID
:您的 Google Cloud 專案 ID。
DATA_STORE_ID
:Vertex AI Search 資料儲存庫的 ID。
CLOUD_HEALTHCARE_DATASET_ID
:包含來源 FHIR 儲存庫的 Cloud Healthcare API 資料集 ID。
CLOUD_HEALTHCARE_DATASET_LOCATION
:包含來源 FHIR 儲存庫的 Cloud Healthcare API 資料集位置。
:Cloud Healthcare API FHIR R4 存放區的 ID。FHIR_STORE_ID
回應
您應該會收到類似如下的 JSON 回應。回應會包含長時間執行作業的 ID。如果方法呼叫可能需要大量時間才能完成,就會傳回長時間執行的作業。請記下 IMPORT_OPERATION_ID 的值。您需要這個值來驗證匯入狀態 。
{
"name": "projects/PROJECT_ID /locations/us/collections/default_collection/dataStores/DATA_STORE_ID /branches/0/operations/IMPORT_OPERATION_ID ",
"metadata": {
"@type": "type.googleapis.com/google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata"
}
}
確認 FHIR 資料匯入作業是否完成。
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://us-discoveryengine.googleapis.com/v1alpha/projects/PROJECT_ID /locations/us/collections/default_collection/dataStores/DATA_STORE_ID /branches/0/operations/IMPORT_OPERATION_ID "
更改下列內容:
PROJECT_ID
:您的 Google Cloud 專案 ID。
DATA_STORE_ID
:Vertex AI Search 資料儲存庫的 ID。
IMPORT_OPERATION_ID
:呼叫 import
方法時傳回的長時間執行作業 ID。
回應
您應該會收到類似如下的 JSON 回應:匯入作業是長時間執行的作業。作業執行期間,回應會包含下列欄位:
successCount
:表示目前成功匯入的 FHIR 資源數量。
failureCount
:表示目前匯入失敗的 FHIR 資源數量。只有在有 FHIR 資源無法匯入時,才會顯示這個欄位。
作業完成後,回應會包含下列欄位:
successCount
:表示成功匯入的 FHIR 資源數量。
failureCount
:表示匯入失敗的 FHIR 資源數量。只有在有 FHIR 資源無法匯入時,才會顯示這個欄位。
totalCount
:表示來源 FHIR 儲存庫中的 FHIR 資源數量。只有在有 FHIR 資源無法匯入時,才會顯示這個欄位。
done
:值為 true
,表示匯入作業已完成
errorSamples
:提供無法匯入的資源相關資訊。只有在有 FHIR 資源無法匯入時,才會顯示這個欄位。
errorConfig
:提供包含錯誤摘要記錄檔的 Cloud Storage 位置路徑。
{
"name": "projects/PROJECT_ID /locations/us/collections/default_collection/dataStores/DATA_STORE_ID /branches/0/operations/IMPORT_OPERATION_ID ",
"metadata": {
"@type": "type.googleapis.com/google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata",
"createTime": "START_TIMESTAMP ",
"updateTime": "END_TIMESTAMP ",
"successCount": "SUCCESS_COUNT ",
"failureCount": "FAILURE_COUNT ",
"totalCount": "TOTAL_COUNT ",
},
"done": true,
"response": {
"@type": "type.googleapis.com/google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse",
"errorSamples": [ERROR_SAMPLE ],
"errorConfig": {
"gcsPrefix": "LOG_FILE_LOCATION "
}
}
}
提供意見
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權 ,程式碼範例則為阿帕契 2.0 授權 。詳情請參閱《Google Developers 網站政策 》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-31 (世界標準時間)。
想進一步說明嗎?
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-31 (世界標準時間)。"],[[["Generative AI Services must not be used for clinical purposes, such as direct diagnosis or treatment, without review by a licensed professional, but can be used for administrative tasks."],["Outputs from Generative AI may be unreliable, containing incorrect or biased information, and should be considered draft content rather than final."],["This product's intended use is to retrieve and summarize existing medical information and not to provide recommendations pertaining to the prevention, diagnosis or treatment of illness or disease."],["You can reconcile changes to your source FHIR store, such as adding, updating, or deleting FHIR resources, into your Vertex AI Search healthcare data store using either incremental or full modes."],["To perform a FHIR data import, you will need to grant specific IAM roles to service accounts, depending on the task and the location of the FHIR data."]]],[]]