本頁說明如何將 DICOM 資料去識別化,並將有關去識別化作業的相關中繼資料,以及已將哪些內容去識別化,寫入 FHIR 儲存庫。中繼資料會儲存在 FHIR 儲存庫中的 FHIR Provenance 資源中。接著,您可以使用 FHIR 自訂搜尋查詢資料,回答下列問題:
- 哪些資訊已去識別化?
- 資料去識別化的方式和原因為何?
- 去識別化作業發生的時間和所需時間為何?
事前準備
使用 FHIR 取代註解
Cloud Healthcare API 提供註解 API,可用來註解去識別化資料。
將去識別化作業中繼資料寫入 FHIR 儲存庫的運作方式類似,且具有下列優點:
- 您不需要使用註解 API,這是另一個 API。
- 您不需要建立及管理註解儲存庫和註解記錄。
- 您可以繼續使用 FHIR 標準和 Cloud Healthcare API FHIR API。
- 您可以將 FHIR 資源匯出至 BigQuery,進行探索和分析。產生的資料僅與
LOSSLESS
或ANALYTICS_V2
SchemaType
相容。- 您可以將 FHIR 資源變更串流至 BigQuery,以近乎即時的方式將 FHIR 儲存庫中的資料與 BigQuery 資料集同步。
- 我們會提供更多關於去識別化作業中繼資料的資訊。
需求條件
儲存去識別作業中繼資料的 FHIR 儲存庫必須符合下列規定:
- 必須已存在。
- 必須是 R4 版本的 FHIR 儲存庫。
- 必須將
enableUpdateCreate
設為true
。
作業中繼資料 FHIR 存放區中的來源資源
執行 DICOM 去識別化作業時,系統會將下列來源資源寫入作業中繼資料 FHIR 儲存庫:
摘要列出去識別化作業的來源資源,例如長時間執行作業的名稱、作業發生的時間,以及使用的設定。如需此來源資源的欄位清單,請參閱「在來源資源中去識別作業中繼資料」。
每個已去識別的 DICOM 例項的來源資源。如要查看這個來源資源中的欄位清單,請參閱「來源資源中的 DICOM 去識別化中繼資料」。
- 這項資源包含去識別化資訊,例如 DICOM 標記或 DICOM 影像的部分,以及所採取的動作,例如資訊是否已刪除、轉換或忽略。
資源可能包含經由光學字元辨識 (OCR) 處理的去識別化資料,且該資料屬於受保護的健康資訊 (PHI) 範圍。
去識別化文字 (
quote
) 會隨附資訊類型 (infoType
) 和資訊找到的可能性 (confidence
)。舉例來說,如果 DICOM 影像包含已燒入的文字John Doe
,且已完成去識別化,Provenance 資源就會包含quote
設為John Doe
、infoType
設為PERSON_NAME
,以及介於 0 和 1 之間的confidence
值。只有在呼叫
dicomStores.deidentify
方法時,將ImageConfig.textRedactionMode
設為REDACT_SENSITIVE_TEXT
或REDACT_SENSITIVE_TEXT_CLEAN_DESCRIPTORS
,才會產生 DICOM 去識別化中繼資料。如果您設定REDACT_ALL_TEXT
,方法會在extracted-text
欄位中產生去識別化文字,做為單一字串。字串不含分割符號。符記之間以空格分隔。
在來源資源中將作業中繼資料去識別化
下表說明去識別化作業中的中繼資料,以及中繼資料中可在來源資源中找到的對應欄位。「來源資源欄位」儲存格包含示範用途的值範例。
中繼資料說明 | 來源資源欄位 |
---|---|
來源資源 ID | Provenance.id |
去識別化作業開始的時間 | Provenance.occurredDateTime |
來源資源建立時間戳記 | Provenance.recorded |
去識別化長時間執行作業的名稱 | Provenance.agent.who: { "identifier": { "system": "https://g.co/healthcare/operation" "value": "projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/operations/OPERATION_ID" } } |
來源 DICOM 儲存庫 | Provenance.entity.role: "SOURCE" Provenance.entity.what.identifier.value: "projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/SOURCE_DICOM_STORE_ID" |
目的地 DICOM 儲存庫 | Provenance.target.type.value |
使用的 DeidentifyConfig 值 |
Provenance.entity.extension: [{ url: 'https://g.co/deidentify-config', valueString: 'DEIDENTIFY_CONFIG' // Can be either a JSON configuration or a path to a Cloud Storage URI and timestamp if the configuration was provided using Cloud Storage }] |
Provenance 資源中的 DICOM 去識別化中繼資料
下表說明 DICOM 例項中已去識別化中繼資料,以及中繼資料在來源資源中的對應欄位。「來源資源欄位」儲存格包含示範用途的值範例。
中繼資料說明 | 來源資源欄位 |
---|---|
去識別作業資源的連結 | Provenance.agent.who: {reference: "Provenance/PROVENANCE_RESOURCE_ID"} |
來源資源建立時間戳記 | Provenance.recorded |
來源 DICOM 執行個體 REST 路徑 | Provenance.entity.role: SOURCE Provenance.entity.what.identifier.value |
目標 DICOM 執行個體 REST 路徑 | Provenance.target.type.value |
DICOM 圖片大小 | Provenance.entity.extension: [ { url: 'https://g.co/WIDTH', valueDecimal: WIDTH }, url: 'https://g.co/HEIGHT', valueDecimal: HEIGHT } ] |
結構化大小 | Provenance.entity.extension: [{ url: 'https://g.co/DICOM_STRUCTURED_SIZE', valueDecimal: VALUE, }] |
DICOM 圖像註解 | Provenance.entity.extension: [{ url: 'https://g.co/DICOM_IMAGES', extension: [ { FRAME_0 }, { FRAME_1 }, ... ] }] |
DICOM 影格註解 | Provenance.entity.extension['https://g.co/dicom-images'].extension: [ { url: 'frame-index', valueDecimal: 0, extension: [ { url: 'left', valueDecimal: LEFT_VALUE }, { url: 'right', valueDecimal: RIGHT_VALUE }, { url: 'top', valueDecimal: TOP_VALUE }, { url: 'bottom', valueDecimal: BOTTOM_VALUE }, { url: 'relative-left', valueDecimal: RELATIVE_LEFT_VALUE / WIDTH }, { url: 'relative-right', valueDecimal: RELATIVE_RIGHT_VALUE / HEIGHT }, { url: 'relative-top', valueDecimal: RELATIVE_TOP_VALUE / WIDTH }, { url: 'relative-bottom', valueDecimal: RELATIVE_BOTTOM / HEIGHT } ] } ] |
DICOM 影格註解 | // Only available if the text redaction mode is REDACT_SENSITIVE_TEXT or // REDACT_SENSITIVE_TEXT_CLEAN_DESCRIPTORS Provenance.entity.extension: [ { "url": "quote", // The PHI text de-identified "valueString": "John Doe" }, { "url": "infoType", // The type of the de-identified text "valueString": "PERSON_NAME" }, { "url": "confidence", // The likelihood of finding this quote and its infoType "valueDecimal": 0.7 } ] |
DICOM 影格註解 | // Only available if the text redaction mode is REDACT_ALL_TEXT Provenance.entity.extension: [ { "url": "extracted-text", // The entire PHI text de-identified "valueString": "John Doe 27-Jan-1999 Sex:M" } ] |
所有 DICOM 標記註解 | Provenance.entity.extension: [{ url: 'https://g.co/dicom-tags', extension: [ { // tag (0002,0000) }, { // tag (0002,0001) }, ... ] }] |
DICOM 個別標記符號 | Provenance.entity.extension['https://g.co/dicom-tags'].extension: [ { url: 'tag-id', valueString: '00080012', extension: [ { url: 'byte-start', valueDecimal: 10 }, { url: 'byte-end', valueDecimal: 18 }, { url: 'finding-infotype', valueString: 'PERSON_NAME' }, { url: 'text-original', valueString: 'John Doe' }, { url: 'text-replaced', valueString: 'PERSON_NAME' }, { url: 'deidentify-action', valueString: 'REMOVED' // Possible values are "REMOVED", "DELETED", "REGENERATED UID", // "RESET", "CLEANED", and "RECURSED" }, { url: 'deidentify-reason', valueString: 'Matched VALUE' // Possible values include "ID", "VR", or "Expression", // for example "Matched ID: DICOM_TAG_ID" } ] } ] |
範例
事前準備
請務必先在 FHIR 中繼資料作業上取得 roles/healthcare.fhirResourceEditor
角色,再執行下列任何範例。您需要這個角色才能寫入作業中繼資料 FHIR 存放區。
將 DICOM 資料去識別化、寫入 FHIR 存放區,以及搜尋來源資源
在執行這個範例之前,請先完成下列步驟:
- 建立包含 DICOM 儲存庫的來源資料集,其中至少包含一個要去識別化的 DICOM 例項。
- 建立目的地資料集,其中包含空白 DICOM 儲存庫和空白 FHIR 儲存庫。FHIR 存放區必須符合相關規定。
這個範例會擴充結合標記去識別化和燒入文字遮蓋功能。在這個範例中,去識別化作業會在單一 DICOM 儲存庫上執行,並將去識別化資料寫入新的 DICOM 儲存庫。作業中繼資料 FHIR 儲存庫與新 DICOM 儲存庫位於相同資料集中。
本範例使用兩個 DICOM 例項。我們不會提供這些例項,因此範例回覆可能與去識別化資料不完全相符。
將 DICOM 資料去識別化。
使用任何要求資料之前,請先替換以下項目:
- PROJECT_ID:您的 Google Cloud 專案 ID
- LOCATION:包含來源 DICOM 儲存庫的資料集位置
- SOURCE_DATASET_ID:來源 DICOM 儲存庫的父資料集
- SOURCE_DICOM_STORE_ID:DICOM 儲存庫的 ID,其中包含您要去識別化的資料
- DESTINATION_DATASET_ID:包含中繼資料操作 FHIR 儲存庫的現有資料集,以及將建立去識別化 DICOM 儲存庫的位置
- DESTINATION_DICOM_STORE_ID:DICOM 儲存庫,用於寫入來源 DICOM 儲存庫的去識別化資料
- OPERATION_METADATA_FHIR_STORE_ID:要寫入去識別化作業中繼資料的 FHIR 儲存庫
JSON 要求主體:
{ "destinationStore": "projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/dicomStores/DESTINATION_DICOM_STORE_ID", "config": { "dicom": { "filterProfile": "DEIDENTIFY_TAG_CONTENTS" }, "image": { "textRedactionMode": "REDACT_ALL_TEXT" }, "operationMetadata": { "fhirOutput": { "fhirStore": "projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE" } } } }
如要傳送要求,請選擇以下其中一個選項:
curl
將要求主體儲存在名為
request.json
的檔案中。在終端機中執行下列指令,即可在目前目錄中建立或覆寫此檔案:cat > request.json << 'EOF' { "destinationStore": "projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/dicomStores/DESTINATION_DICOM_STORE_ID", "config": { "dicom": { "filterProfile": "DEIDENTIFY_TAG_CONTENTS" }, "image": { "textRedactionMode": "REDACT_ALL_TEXT" }, "operationMetadata": { "fhirOutput": { "fhirStore": "projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE" } } } } EOF
接著,執行下列指令來傳送 REST 要求:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/dicomStores/SOURCE_DICOM_STORE_ID:deidentify"PowerShell
將要求主體儲存在名為
request.json
的檔案中。在終端機中執行下列指令,即可在目前目錄中建立或覆寫此檔案:@' { "destinationStore": "projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/dicomStores/DESTINATION_DICOM_STORE_ID", "config": { "dicom": { "filterProfile": "DEIDENTIFY_TAG_CONTENTS" }, "image": { "textRedactionMode": "REDACT_ALL_TEXT" }, "operationMetadata": { "fhirOutput": { "fhirStore": "projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE" } } } } '@ | Out-File -FilePath request.json -Encoding utf8
接著,執行下列指令來傳送 REST 要求:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/SOURCE_DATASET_ID/dicomStores/SOURCE_DICOM_STORE_ID:deidentify" | Select-Object -Expand Content取得作業狀態。
使用任何要求資料之前,請先替換以下項目:
- PROJECT_ID:您的 Google Cloud 專案 ID
- LOCATION:資料集的位置
- SOURCE_DATASET_ID:執行去識別化作業的資料集
- OPERATION_ID:去識別化作業的 ID
如要傳送要求,請選擇以下其中一個選項:
curl
執行下列指令:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/operations/OPERATION_ID"PowerShell
執行下列指令:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/operations/OPERATION_ID" | Select-Object -Expand ContentAPIs Explorer
開啟方法參考頁面。系統會在頁面右側開啟 API Explorer 面板。 您可以使用這項工具來傳送要求。完成所有必填欄位,然後按一下「執行」。
您應該會收到如下的 JSON 回應:
成功將 DICOM 資料去識別化,並將作業中繼資料寫入 FHIR 存放區後,您就可以在 FHIR 存放區中查看來源資源。
如要查看來源資源,請使用
fhir.search
方法。使用任何要求資料之前,請先替換以下項目:
- PROJECT_ID:您的 Google Cloud 專案 ID
- LOCATION:父資料集的位置
- DATASET_ID:FHIR 儲存庫的父項資料集
- OPERATION_METADATA_FHIR_STORE_ID:含有中繼資料的 FHIR 儲存庫 ID
如要傳送要求,請選擇以下其中一個選項:
curl
執行下列指令:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance"PowerShell
執行下列指令:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DESTINATION_DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance" | Select-Object -Expand Content- 每個 DICOM 執行個體各有一個來源資源
- 去識別化作業的一個來源資源
儲存範例資料、建立相對 x 座標自訂 FHIR 搜尋作業,以及查詢
執行這個範例之前,請建立目的地資料集,其中包含空白 DICOM 儲存庫和空白 FHIR 儲存庫。FHIR 存放區必須符合相關規定。
以下範例說明如何儲存在「去識別 DICOM 資料、寫入 FHIR 儲存庫,以及搜尋來源資源」中建立的三個來源資源,然後建立自訂搜尋。自訂搜尋會在其中一個去識別化 DICOM 例項中查詢 relative-x-coordinate-bottom-left
。
儲存來源資訊資源。
使用任何要求資料之前,請先替換以下項目:
- PROJECT_ID:您的 Google Cloud 專案 ID
- LOCATION:父資料集的位置
- DATASET_ID:FHIR 儲存庫的父項資料集
- OPERATION_METADATA_FHIR_STORE_ID:含有中繼資料的 FHIR 儲存庫 ID
JSON 要求主體:
{ "resourceType": "Bundle", "type": "transaction", "entry": [ { "request": {"method": "PUT", "url": "Provenance/operation-123"}, "resource": { "resourceType": "Provenance", "id": "operation-123", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store" } } ], "occurredDateTime": "2010-11-08T08:30:00-04:00", "recorded": "2010-11-08T08:30:24-04:00", "agent": [ { "who": { "identifier": { "system": "https://g.co/healthcare/operation", "value": "projects/my-project/locations/us-central1/datasets/my-dataset/operations/123" } } } ], "entity": [ { "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store" } } } ] } }, { "request": {"method": "POST", "url": "Provenance"}, "resource": { "resourceType": "Provenance", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/3" } } ], "recorded": "2010-11-08T08:39:24-04:00", "agent": [ { "who": { "identifier": { "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123" } } } ], "entity": [ { "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/3" } }, "extension": [ { "url": "https://g.co/dicom-images", "extension": [ { "url": "frame-index", "valueDecimal": 0, "extension": [ { "url": "bottom", "valueDecimal": 100 }, { "url": "left", "valueDecimal": 100 }, { "url": "right", "valueDecimal": 200 }, { "url": "top", "valueDecimal": 200 }, { "url": "relative-bottom", "valueDecimal": 0.05 }, { "url": "relative-left", "valueDecimal": 0.05 }, { "url": "relative-right", "valueDecimal": 0.1 }, { "url": "relative-top", "valueDecimal": 0.1 }, { "url": "bottom", "valueDecimal": 900 }, { "url": "left", "valueDecimal": 900 }, { "url": "right", "valueDecimal": 1000 }, { "url": "top", "valueDecimal": 1000 }, { "url": "relative-bottom", "valueDecimal": 0.45 }, { "url": "relative-left", "valueDecimal": 0.45 }, { "url": "relative-right", "valueDecimal": 0.5 }, { "url": "relative-top", "valueDecimal": 0.5 } ] } ] }, { "url": "https://g.co/dicom-tags", "extension": [ { "url": "tag-id", "valueString": "00100021", "extension": [ { "url": "byte-start", "valueDecimal": 10 }, { "url": "byte-end", "valueDecimal": 18 }, { "url": "finding-infotype", "valueString": "PERSON_NAME" }, { "url": "text-original", "valueString": "John Doe" }, { "url": "text-replaced", "valueString": "PERSON_NAME" }, { "url": "byte-start", "valueDecimal": 25 }, { "url": "byte-end", "valueDecimal": 35 }, { "url": "finding-infotype", "valueString": "DATE" }, { "url": "text-original", "valueString": "1900-12-31" }, { "url": "text-replaced", "valueString": "DATE" } ] }, { "url": "tag-id", "valueString": "00102150", "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 2 }, { "url": "finding-infotype", "valueString": "LOCATION" }, { "url": "text-original", "valueString": "US" }, { "url": "text-replaced", "valueString": "LOCATION" } ] } ] } ] } ] } }, { "request": {"method": "POST", "url": "Provenance"}, "resource": { "resourceType": "Provenance", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/4" } } ], "recorded": "2010-11-08T08:39:25-04:00", "agent": [ { "who": { "identifier": { "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123" } } } ], "entity": [ { "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/4" } }, "extension": [ { "url": "https://g.co/dicom-images", "extension": [ { "url": "frame-index", "valueDecimal": 0 }, { "url": "frame-index", "valueDecimal": 1, "extension": [ ] } ] }, { "url": "https://g.co/dicom-tags", "extension": [ { "url": "tag-id", "valueString": "00101010", "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 2 }, { "url": "finding-infotype", "valueString": "AGE" }, { "url": "text-original", "valueString": "30" }, { "url": "text-replaced", "valueString": "AGE" } ] }, { "url": "tag-id", "valueString": "00100020", "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 4 }, { "url": "finding-infotype", "valueString": "GENERIC_ID" }, { "url": "text-original", "valueString": "1234" }, { "url": "text-replaced", "valueString": "GENERIC_ID" } ] } ] } ] } ] } } ] }
如要傳送要求,請選擇以下其中一個選項:
curl
將要求主體儲存在名為
request.json
的檔案中。在終端機中執行下列指令,即可在目前目錄中建立或覆寫此檔案:cat > request.json << 'EOF' { "resourceType": "Bundle", "type": "transaction", "entry": [ { "request": {"method": "PUT", "url": "Provenance/operation-123"}, "resource": { "resourceType": "Provenance", "id": "operation-123", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store" } } ], "occurredDateTime": "2010-11-08T08:30:00-04:00", "recorded": "2010-11-08T08:30:24-04:00", "agent": [ { "who": { "identifier": { "system": "https://g.co/healthcare/operation", "value": "projects/my-project/locations/us-central1/datasets/my-dataset/operations/123" } } } ], "entity": [ { "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store" } } } ] } }, { "request": {"method": "POST", "url": "Provenance"}, "resource": { "resourceType": "Provenance", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/3" } } ], "recorded": "2010-11-08T08:39:24-04:00", "agent": [ { "who": { "identifier": { "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123" } } } ], "entity": [ { "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/3" } }, "extension": [ { "url": "https://g.co/dicom-images", "extension": [ { "url": "frame-index", "valueDecimal": 0, "extension": [ { "url": "bottom", "valueDecimal": 100 }, { "url": "left", "valueDecimal": 100 }, { "url": "right", "valueDecimal": 200 }, { "url": "top", "valueDecimal": 200 }, { "url": "relative-bottom", "valueDecimal": 0.05 }, { "url": "relative-left", "valueDecimal": 0.05 }, { "url": "relative-right", "valueDecimal": 0.1 }, { "url": "relative-top", "valueDecimal": 0.1 }, { "url": "bottom", "valueDecimal": 900 }, { "url": "left", "valueDecimal": 900 }, { "url": "right", "valueDecimal": 1000 }, { "url": "top", "valueDecimal": 1000 }, { "url": "relative-bottom", "valueDecimal": 0.45 }, { "url": "relative-left", "valueDecimal": 0.45 }, { "url": "relative-right", "valueDecimal": 0.5 }, { "url": "relative-top", "valueDecimal": 0.5 } ] } ] }, { "url": "https://g.co/dicom-tags", "extension": [ { "url": "tag-id", "valueString": "00100021", "extension": [ { "url": "byte-start", "valueDecimal": 10 }, { "url": "byte-end", "valueDecimal": 18 }, { "url": "finding-infotype", "valueString": "PERSON_NAME" }, { "url": "text-original", "valueString": "John Doe" }, { "url": "text-replaced", "valueString": "PERSON_NAME" }, { "url": "byte-start", "valueDecimal": 25 }, { "url": "byte-end", "valueDecimal": 35 }, { "url": "finding-infotype", "valueString": "DATE" }, { "url": "text-original", "valueString": "1900-12-31" }, { "url": "text-replaced", "valueString": "DATE" } ] }, { "url": "tag-id", "valueString": "00102150", "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 2 }, { "url": "finding-infotype", "valueString": "LOCATION" }, { "url": "text-original", "valueString": "US" }, { "url": "text-replaced", "valueString": "LOCATION" } ] } ] } ] } ] } }, { "request": {"method": "POST", "url": "Provenance"}, "resource": { "resourceType": "Provenance", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/4" } } ], "recorded": "2010-11-08T08:39:25-04:00", "agent": [ { "who": { "identifier": { "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123" } } } ], "entity": [ { "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/4" } }, "extension": [ { "url": "https://g.co/dicom-images", "extension": [ { "url": "frame-index", "valueDecimal": 0 }, { "url": "frame-index", "valueDecimal": 1, "extension": [ ] } ] }, { "url": "https://g.co/dicom-tags", "extension": [ { "url": "tag-id", "valueString": "00101010", "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 2 }, { "url": "finding-infotype", "valueString": "AGE" }, { "url": "text-original", "valueString": "30" }, { "url": "text-replaced", "valueString": "AGE" } ] }, { "url": "tag-id", "valueString": "00100020", "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 4 }, { "url": "finding-infotype", "valueString": "GENERIC_ID" }, { "url": "text-original", "valueString": "1234" }, { "url": "text-replaced", "valueString": "GENERIC_ID" } ] } ] } ] } ] } } ] } EOF
接著,執行下列指令來傳送 REST 要求:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/fhir+json" \
-d @request.json \
"https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir"PowerShell
將要求主體儲存在名為
request.json
的檔案中。在終端機中執行下列指令,即可在目前目錄中建立或覆寫此檔案:@' { "resourceType": "Bundle", "type": "transaction", "entry": [ { "request": {"method": "PUT", "url": "Provenance/operation-123"}, "resource": { "resourceType": "Provenance", "id": "operation-123", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store" } } ], "occurredDateTime": "2010-11-08T08:30:00-04:00", "recorded": "2010-11-08T08:30:24-04:00", "agent": [ { "who": { "identifier": { "system": "https://g.co/healthcare/operation", "value": "projects/my-project/locations/us-central1/datasets/my-dataset/operations/123" } } } ], "entity": [ { "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store" } } } ] } }, { "request": {"method": "POST", "url": "Provenance"}, "resource": { "resourceType": "Provenance", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/3" } } ], "recorded": "2010-11-08T08:39:24-04:00", "agent": [ { "who": { "identifier": { "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123" } } } ], "entity": [ { "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/3" } }, "extension": [ { "url": "https://g.co/dicom-images", "extension": [ { "url": "frame-index", "valueDecimal": 0, "extension": [ { "url": "bottom", "valueDecimal": 100 }, { "url": "left", "valueDecimal": 100 }, { "url": "right", "valueDecimal": 200 }, { "url": "top", "valueDecimal": 200 }, { "url": "relative-bottom", "valueDecimal": 0.05 }, { "url": "relative-left", "valueDecimal": 0.05 }, { "url": "relative-right", "valueDecimal": 0.1 }, { "url": "relative-top", "valueDecimal": 0.1 }, { "url": "bottom", "valueDecimal": 900 }, { "url": "left", "valueDecimal": 900 }, { "url": "right", "valueDecimal": 1000 }, { "url": "top", "valueDecimal": 1000 }, { "url": "relative-bottom", "valueDecimal": 0.45 }, { "url": "relative-left", "valueDecimal": 0.45 }, { "url": "relative-right", "valueDecimal": 0.5 }, { "url": "relative-top", "valueDecimal": 0.5 } ] } ] }, { "url": "https://g.co/dicom-tags", "extension": [ { "url": "tag-id", "valueString": "00100021", "extension": [ { "url": "byte-start", "valueDecimal": 10 }, { "url": "byte-end", "valueDecimal": 18 }, { "url": "finding-infotype", "valueString": "PERSON_NAME" }, { "url": "text-original", "valueString": "John Doe" }, { "url": "text-replaced", "valueString": "PERSON_NAME" }, { "url": "byte-start", "valueDecimal": 25 }, { "url": "byte-end", "valueDecimal": 35 }, { "url": "finding-infotype", "valueString": "DATE" }, { "url": "text-original", "valueString": "1900-12-31" }, { "url": "text-replaced", "valueString": "DATE" } ] }, { "url": "tag-id", "valueString": "00102150", "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 2 }, { "url": "finding-infotype", "valueString": "LOCATION" }, { "url": "text-original", "valueString": "US" }, { "url": "text-replaced", "valueString": "LOCATION" } ] } ] } ] } ] } }, { "request": {"method": "POST", "url": "Provenance"}, "resource": { "resourceType": "Provenance", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/4" } } ], "recorded": "2010-11-08T08:39:25-04:00", "agent": [ { "who": { "identifier": { "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123" } } } ], "entity": [ { "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/4" } }, "extension": [ { "url": "https://g.co/dicom-images", "extension": [ { "url": "frame-index", "valueDecimal": 0 }, { "url": "frame-index", "valueDecimal": 1, "extension": [ ] } ] }, { "url": "https://g.co/dicom-tags", "extension": [ { "url": "tag-id", "valueString": "00101010", "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 2 }, { "url": "finding-infotype", "valueString": "AGE" }, { "url": "text-original", "valueString": "30" }, { "url": "text-replaced", "valueString": "AGE" } ] }, { "url": "tag-id", "valueString": "00100020", "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 4 }, { "url": "finding-infotype", "valueString": "GENERIC_ID" }, { "url": "text-original", "valueString": "1234" }, { "url": "text-replaced", "valueString": "GENERIC_ID" } ] } ] } ] } ] } } ] } '@ | Out-File -FilePath request.json -Encoding utf8
接著,執行下列指令來傳送 REST 要求:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/fhir+json" `
-InFile request.json `
-Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir" | Select-Object -Expand Content您應該會收到如下的 JSON 回應:
在 DICOM 圖片的相對 X 座標上建立 SearchParameter 資源。
使用任何要求資料之前,請先替換以下項目:
- PROJECT_ID:您的 Google Cloud 專案 ID
- LOCATION:父資料集的位置
- DATASET_ID:FHIR 儲存庫的父項資料集
- OPERATION_METADATA_FHIR_STORE_ID:含有中繼資料的 FHIR 儲存庫 ID
JSON 要求主體:
{ "resourceType": "SearchParameter", "url": "relative-x-coordinate-bottom-left", "base": ["Provenance"], "code": "relative-x-coordinate-bottom-left", "name": "relative x-coordinate of the bottom left corner of the bounding box", "type": "number", "expression": "Provenance.entity.extension('https://g.co/dicom-images').extension('frame-index').extension('relative-bottom').value.as(Decimal)", "status": "active", "description": "A search on bottom left relative x-coordinate of annotations generated from de-identification of a DICOM file" }
如要傳送要求,請選擇以下其中一個選項:
curl
將要求主體儲存在名為
request.json
的檔案中。在終端機中執行下列指令,即可在目前目錄中建立或覆寫此檔案:cat > request.json << 'EOF' { "resourceType": "SearchParameter", "url": "relative-x-coordinate-bottom-left", "base": ["Provenance"], "code": "relative-x-coordinate-bottom-left", "name": "relative x-coordinate of the bottom left corner of the bounding box", "type": "number", "expression": "Provenance.entity.extension('https://g.co/dicom-images').extension('frame-index').extension('relative-bottom').value.as(Decimal)", "status": "active", "description": "A search on bottom left relative x-coordinate of annotations generated from de-identification of a DICOM file" } EOF
接著,執行下列指令來傳送 REST 要求:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/fhir+json" \
-d @request.json \
"https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/SearchParameter"PowerShell
將要求主體儲存在名為
request.json
的檔案中。在終端機中執行下列指令,即可在目前目錄中建立或覆寫此檔案:@' { "resourceType": "SearchParameter", "url": "relative-x-coordinate-bottom-left", "base": ["Provenance"], "code": "relative-x-coordinate-bottom-left", "name": "relative x-coordinate of the bottom left corner of the bounding box", "type": "number", "expression": "Provenance.entity.extension('https://g.co/dicom-images').extension('frame-index').extension('relative-bottom').value.as(Decimal)", "status": "active", "description": "A search on bottom left relative x-coordinate of annotations generated from de-identification of a DICOM file" } '@ | Out-File -FilePath request.json -Encoding utf8
接著,執行下列指令來傳送 REST 要求:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/fhir+json" `
-InFile request.json `
-Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/SearchParameter" | Select-Object -Expand Content您應該會收到如下的 JSON 回應:
在 FHIR 儲存庫中啟用自訂 SearchParameter 資源。
使用任何要求資料之前,請先替換以下項目:
- PROJECT_ID:您的 Google Cloud 專案 ID
- LOCATION:父資料集的位置
- DATASET_ID:FHIR 儲存庫的父項資料集
- OPERATION_METADATA_FHIR_STORE_ID:含有中繼資料的 FHIR 儲存庫 ID
JSON 要求主體:
{ "canonicalUrls": [ "relative-x-coordinate-bottom-left" ] }
如要傳送要求,請選擇以下其中一個選項:
curl
將要求主體儲存在名為
request.json
的檔案中。在終端機中執行下列指令,即可在目前目錄中建立或覆寫此檔案:cat > request.json << 'EOF' { "canonicalUrls": [ "relative-x-coordinate-bottom-left" ] } EOF
接著,執行下列指令來傳送 REST 要求:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/fhir+json" \
-d @request.json \
"https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID:configureSearch"PowerShell
將要求主體儲存在名為
request.json
的檔案中。在終端機中執行下列指令,即可在目前目錄中建立或覆寫此檔案:@' { "canonicalUrls": [ "relative-x-coordinate-bottom-left" ] } '@ | Out-File -FilePath request.json -Encoding utf8
接著,執行下列指令來傳送 REST 要求:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/fhir+json" `
-InFile request.json `
-Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID:configureSearch" | Select-Object -Expand Content取得作業狀態。
使用任何要求資料之前,請先替換以下項目:
- PROJECT_ID:您的 Google Cloud 專案 ID
- LOCATION:資料集的位置
- DATASET_ID:自訂搜尋作業執行的資料集
- OPERATION_ID:自訂搜尋作業的 ID
如要傳送要求,請選擇以下其中一個選項:
curl
執行下列指令:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/operations/OPERATION_ID"PowerShell
執行下列指令:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/operations/OPERATION_ID" | Select-Object -Expand ContentAPIs Explorer
開啟方法參考頁面。系統會在頁面右側開啟 API Explorer 面板。 您可以使用這項工具來傳送要求。完成所有必填欄位,然後按一下「執行」。
您應該會收到如下的 JSON 回應:
使用相對 x 座標搜尋參數查詢來源資源:
使用任何要求資料之前,請先替換以下項目:
- PROJECT_ID:您的 Google Cloud 專案 ID
- LOCATION:父資料集的位置
- DATASET_ID:FHIR 儲存庫的父項資料集
- OPERATION_METADATA_FHIR_STORE_ID:含有中繼資料的 FHIR 儲存庫 ID
如要傳送要求,請選擇以下其中一個選項:
curl
以下範例使用relative-x-coordinate-bottom-left=le0.05
查詢,搜尋圖片邊緣 5% 範圍內的 x 座標。執行下列指令:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance?relative-x-coordinate-bottom-left=le0.05"PowerShell
以下範例使用relative-x-coordinate-bottom-left=le0.05
查詢,搜尋圖片邊緣 5% 範圍內的 x 座標。執行下列指令:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance?relative-x-coordinate-bottom-left=le0.05" | Select-Object -Expand Content{ "entry": [ { "fullUrl": "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance/90062087-8ac2-499c-b952-a04999578bd0", "resource": { "agent": [ { "who": { "identifier": { "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123" } } } ], "entity": [ { "extension": [ { "extension": [ { "extension": [ { "url": "bottom", "valueDecimal": 100 }, { "url": "left", "valueDecimal": 100 }, { "url": "right", "valueDecimal": 200 }, { "url": "top", "valueDecimal": 200 }, { "url": "relative-bottom", "valueDecimal": 0.05 }, { "url": "relative-left", "valueDecimal": 0.05 }, { "url": "relative-right", "valueDecimal": 0.1 }, { "url": "relative-top", "valueDecimal": 0.1 }, { "url": "bottom", "valueDecimal": 900 }, { "url": "left", "valueDecimal": 900 }, { "url": "right", "valueDecimal": 1000 }, { "url": "top", "valueDecimal": 1000 }, { "url": "relative-bottom", "valueDecimal": 0.45 }, { "url": "relative-left", "valueDecimal": 0.45 }, { "url": "relative-right", "valueDecimal": 0.5 }, { "url": "relative-top", "valueDecimal": 0.5 } ], "url": "frame-index", "valueDecimal": 0 } ], "url": "https://g.co/dicom-images" }, { "extension": [ { "extension": [ { "url": "byte-start", "valueDecimal": 10 }, { "url": "byte-end", "valueDecimal": 18 }, { "url": "finding-infotype", "valueString": "PERSON_NAME" }, { "url": "text-original", "valueString": "John Doe" }, { "url": "text-replaced", "valueString": "PERSON_NAME" }, { "url": "byte-start", "valueDecimal": 25 }, { "url": "byte-end", "valueDecimal": 35 }, { "url": "finding-infotype", "valueString": "DATE" }, { "url": "text-original", "valueString": "1900-12-31" }, { "url": "text-replaced", "valueString": "DATE" } ], "url": "tag-id", "valueString": "00100021" }, { "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 2 }, { "url": "finding-infotype", "valueString": "LOCATION" }, { "url": "text-original", "valueString": "US" }, { "url": "text-replaced", "valueString": "LOCATION" } ], "url": "tag-id", "valueString": "00102150" } ], "url": "https://g.co/dicom-tags" } ], "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/3" } } } ], "id": "90062087-8ac2-499c-b952-a04999578bd0", "meta": { "lastUpdated": "LAST_UPDATED", "versionId": "MTY0NjY4NDg4Nzk3MDM2MTAwMA" }, "recorded": "2010-11-08T08:39:24-04:00", "resourceType": "Provenance", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/3" } } ] }, "search": { "mode": "match" } } ], "link": [ { "relation": "search", "url": "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance/?relative-x-coordinate-bottom-left=le0.05" }, { "relation": "first", "url": "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance/?relative-x-coordinate-bottom-left=le0.05" }, { "relation": "self", "url": "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance/?relative-x-coordinate-bottom-left=le0.05" } ], "resourceType": "Bundle", "total": 1, "type": "searchset" }
儲存範例資料、建立來源 DICOM 自訂 FHIR 搜尋作業,以及查詢
執行這個範例之前,請建立目標資料集,其中包含空白 DICOM 儲存庫和空白 FHIR 儲存庫。FHIR 存放區必須符合相關規定。
以下範例說明如何儲存在「去識別 DICOM 資料、寫入 FHIR 儲存庫,以及搜尋來源資源」中建立的三個來源資源,然後建立自訂搜尋。自訂搜尋會查詢兩個來源 DICOM 影像中其中一個的相關資訊。
儲存來源資訊資源。
使用任何要求資料之前,請先替換以下項目:
- PROJECT_ID:您的 Google Cloud 專案 ID
- LOCATION:父資料集的位置
- DATASET_ID:FHIR 儲存庫的父項資料集
- OPERATION_METADATA_FHIR_STORE_ID:含有中繼資料的 FHIR 儲存庫 ID
JSON 要求主體:
{ "resourceType": "Bundle", "type": "transaction", "entry": [ { "request": {"method": "PUT", "url": "Provenance/operation-123"}, "resource": { "resourceType": "Provenance", "id": "operation-123", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store" } } ], "occurredDateTime": "2010-11-08T08:30:00-04:00", "recorded": "2010-11-08T08:30:24-04:00", "agent": [ { "who": { "identifier": { "system": "https://g.co/healthcare/operation", "value": "projects/my-project/locations/us-central1/datasets/my-dataset/operations/123" } } } ], "entity": [ { "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store" } } } ] } }, { "request": {"method": "POST", "url": "Provenance"}, "resource": { "resourceType": "Provenance", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/3" } } ], "recorded": "2010-11-08T08:39:24-04:00", "agent": [ { "who": { "identifier": { "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123" } } } ], "entity": [ { "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/3" } }, "extension": [ { "url": "https://g.co/dicom-images", "extension": [ { "url": "frame-index", "valueDecimal": 0, "extension": [ { "url": "bottom", "valueDecimal": 100 }, { "url": "left", "valueDecimal": 100 }, { "url": "right", "valueDecimal": 200 }, { "url": "top", "valueDecimal": 200 }, { "url": "relative-bottom", "valueDecimal": 0.05 }, { "url": "relative-left", "valueDecimal": 0.05 }, { "url": "relative-right", "valueDecimal": 0.1 }, { "url": "relative-top", "valueDecimal": 0.1 }, { "url": "bottom", "valueDecimal": 900 }, { "url": "left", "valueDecimal": 900 }, { "url": "right", "valueDecimal": 1000 }, { "url": "top", "valueDecimal": 1000 }, { "url": "relative-bottom", "valueDecimal": 0.45 }, { "url": "relative-left", "valueDecimal": 0.45 }, { "url": "relative-right", "valueDecimal": 0.5 }, { "url": "relative-top", "valueDecimal": 0.5 } ] } ] }, { "url": "https://g.co/dicom-tags", "extension": [ { "url": "tag-id", "valueString": "00100021", "extension": [ { "url": "byte-start", "valueDecimal": 10 }, { "url": "byte-end", "valueDecimal": 18 }, { "url": "finding-infotype", "valueString": "PERSON_NAME" }, { "url": "text-original", "valueString": "John Doe" }, { "url": "text-replaced", "valueString": "PERSON_NAME" }, { "url": "byte-start", "valueDecimal": 25 }, { "url": "byte-end", "valueDecimal": 35 }, { "url": "finding-infotype", "valueString": "DATE" }, { "url": "text-original", "valueString": "1900-12-31" }, { "url": "text-replaced", "valueString": "DATE" } ] }, { "url": "tag-id", "valueString": "00102150", "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 2 }, { "url": "finding-infotype", "valueString": "LOCATION" }, { "url": "text-original", "valueString": "US" }, { "url": "text-replaced", "valueString": "LOCATION" } ] } ] } ] } ] } }, { "request": {"method": "POST", "url": "Provenance"}, "resource": { "resourceType": "Provenance", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/4" } } ], "recorded": "2010-11-08T08:39:25-04:00", "agent": [ { "who": { "identifier": { "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123" } } } ], "entity": [ { "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/4" } }, "extension": [ { "url": "https://g.co/dicom-images", "extension": [ { "url": "frame-index", "valueDecimal": 0 }, { "url": "frame-index", "valueDecimal": 1, "extension": [ ] } ] }, { "url": "https://g.co/dicom-tags", "extension": [ { "url": "tag-id", "valueString": "00101010", "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 2 }, { "url": "finding-infotype", "valueString": "AGE" }, { "url": "text-original", "valueString": "30" }, { "url": "text-replaced", "valueString": "AGE" } ] }, { "url": "tag-id", "valueString": "00100020", "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 4 }, { "url": "finding-infotype", "valueString": "GENERIC_ID" }, { "url": "text-original", "valueString": "1234" }, { "url": "text-replaced", "valueString": "GENERIC_ID" } ] } ] } ] } ] } } ] }
如要傳送要求,請選擇以下其中一個選項:
curl
將要求主體儲存在名為
request.json
的檔案中。在終端機中執行下列指令,即可在目前目錄中建立或覆寫此檔案:cat > request.json << 'EOF' { "resourceType": "Bundle", "type": "transaction", "entry": [ { "request": {"method": "PUT", "url": "Provenance/operation-123"}, "resource": { "resourceType": "Provenance", "id": "operation-123", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store" } } ], "occurredDateTime": "2010-11-08T08:30:00-04:00", "recorded": "2010-11-08T08:30:24-04:00", "agent": [ { "who": { "identifier": { "system": "https://g.co/healthcare/operation", "value": "projects/my-project/locations/us-central1/datasets/my-dataset/operations/123" } } } ], "entity": [ { "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store" } } } ] } }, { "request": {"method": "POST", "url": "Provenance"}, "resource": { "resourceType": "Provenance", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/3" } } ], "recorded": "2010-11-08T08:39:24-04:00", "agent": [ { "who": { "identifier": { "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123" } } } ], "entity": [ { "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/3" } }, "extension": [ { "url": "https://g.co/dicom-images", "extension": [ { "url": "frame-index", "valueDecimal": 0, "extension": [ { "url": "bottom", "valueDecimal": 100 }, { "url": "left", "valueDecimal": 100 }, { "url": "right", "valueDecimal": 200 }, { "url": "top", "valueDecimal": 200 }, { "url": "relative-bottom", "valueDecimal": 0.05 }, { "url": "relative-left", "valueDecimal": 0.05 }, { "url": "relative-right", "valueDecimal": 0.1 }, { "url": "relative-top", "valueDecimal": 0.1 }, { "url": "bottom", "valueDecimal": 900 }, { "url": "left", "valueDecimal": 900 }, { "url": "right", "valueDecimal": 1000 }, { "url": "top", "valueDecimal": 1000 }, { "url": "relative-bottom", "valueDecimal": 0.45 }, { "url": "relative-left", "valueDecimal": 0.45 }, { "url": "relative-right", "valueDecimal": 0.5 }, { "url": "relative-top", "valueDecimal": 0.5 } ] } ] }, { "url": "https://g.co/dicom-tags", "extension": [ { "url": "tag-id", "valueString": "00100021", "extension": [ { "url": "byte-start", "valueDecimal": 10 }, { "url": "byte-end", "valueDecimal": 18 }, { "url": "finding-infotype", "valueString": "PERSON_NAME" }, { "url": "text-original", "valueString": "John Doe" }, { "url": "text-replaced", "valueString": "PERSON_NAME" }, { "url": "byte-start", "valueDecimal": 25 }, { "url": "byte-end", "valueDecimal": 35 }, { "url": "finding-infotype", "valueString": "DATE" }, { "url": "text-original", "valueString": "1900-12-31" }, { "url": "text-replaced", "valueString": "DATE" } ] }, { "url": "tag-id", "valueString": "00102150", "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 2 }, { "url": "finding-infotype", "valueString": "LOCATION" }, { "url": "text-original", "valueString": "US" }, { "url": "text-replaced", "valueString": "LOCATION" } ] } ] } ] } ] } }, { "request": {"method": "POST", "url": "Provenance"}, "resource": { "resourceType": "Provenance", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/4" } } ], "recorded": "2010-11-08T08:39:25-04:00", "agent": [ { "who": { "identifier": { "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123" } } } ], "entity": [ { "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/4" } }, "extension": [ { "url": "https://g.co/dicom-images", "extension": [ { "url": "frame-index", "valueDecimal": 0 }, { "url": "frame-index", "valueDecimal": 1, "extension": [ ] } ] }, { "url": "https://g.co/dicom-tags", "extension": [ { "url": "tag-id", "valueString": "00101010", "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 2 }, { "url": "finding-infotype", "valueString": "AGE" }, { "url": "text-original", "valueString": "30" }, { "url": "text-replaced", "valueString": "AGE" } ] }, { "url": "tag-id", "valueString": "00100020", "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 4 }, { "url": "finding-infotype", "valueString": "GENERIC_ID" }, { "url": "text-original", "valueString": "1234" }, { "url": "text-replaced", "valueString": "GENERIC_ID" } ] } ] } ] } ] } } ] } EOF
接著,執行下列指令來傳送 REST 要求:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/fhir+json" \
-d @request.json \
"https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir"PowerShell
將要求主體儲存在名為
request.json
的檔案中。在終端機中執行下列指令,即可在目前目錄中建立或覆寫此檔案:@' { "resourceType": "Bundle", "type": "transaction", "entry": [ { "request": {"method": "PUT", "url": "Provenance/operation-123"}, "resource": { "resourceType": "Provenance", "id": "operation-123", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store" } } ], "occurredDateTime": "2010-11-08T08:30:00-04:00", "recorded": "2010-11-08T08:30:24-04:00", "agent": [ { "who": { "identifier": { "system": "https://g.co/healthcare/operation", "value": "projects/my-project/locations/us-central1/datasets/my-dataset/operations/123" } } } ], "entity": [ { "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store" } } } ] } }, { "request": {"method": "POST", "url": "Provenance"}, "resource": { "resourceType": "Provenance", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/3" } } ], "recorded": "2010-11-08T08:39:24-04:00", "agent": [ { "who": { "identifier": { "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123" } } } ], "entity": [ { "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/3" } }, "extension": [ { "url": "https://g.co/dicom-images", "extension": [ { "url": "frame-index", "valueDecimal": 0, "extension": [ { "url": "bottom", "valueDecimal": 100 }, { "url": "left", "valueDecimal": 100 }, { "url": "right", "valueDecimal": 200 }, { "url": "top", "valueDecimal": 200 }, { "url": "relative-bottom", "valueDecimal": 0.05 }, { "url": "relative-left", "valueDecimal": 0.05 }, { "url": "relative-right", "valueDecimal": 0.1 }, { "url": "relative-top", "valueDecimal": 0.1 }, { "url": "bottom", "valueDecimal": 900 }, { "url": "left", "valueDecimal": 900 }, { "url": "right", "valueDecimal": 1000 }, { "url": "top", "valueDecimal": 1000 }, { "url": "relative-bottom", "valueDecimal": 0.45 }, { "url": "relative-left", "valueDecimal": 0.45 }, { "url": "relative-right", "valueDecimal": 0.5 }, { "url": "relative-top", "valueDecimal": 0.5 } ] } ] }, { "url": "https://g.co/dicom-tags", "extension": [ { "url": "tag-id", "valueString": "00100021", "extension": [ { "url": "byte-start", "valueDecimal": 10 }, { "url": "byte-end", "valueDecimal": 18 }, { "url": "finding-infotype", "valueString": "PERSON_NAME" }, { "url": "text-original", "valueString": "John Doe" }, { "url": "text-replaced", "valueString": "PERSON_NAME" }, { "url": "byte-start", "valueDecimal": 25 }, { "url": "byte-end", "valueDecimal": 35 }, { "url": "finding-infotype", "valueString": "DATE" }, { "url": "text-original", "valueString": "1900-12-31" }, { "url": "text-replaced", "valueString": "DATE" } ] }, { "url": "tag-id", "valueString": "00102150", "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 2 }, { "url": "finding-infotype", "valueString": "LOCATION" }, { "url": "text-original", "valueString": "US" }, { "url": "text-replaced", "valueString": "LOCATION" } ] } ] } ] } ] } }, { "request": {"method": "POST", "url": "Provenance"}, "resource": { "resourceType": "Provenance", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/4" } } ], "recorded": "2010-11-08T08:39:25-04:00", "agent": [ { "who": { "identifier": { "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123" } } } ], "entity": [ { "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/4" } }, "extension": [ { "url": "https://g.co/dicom-images", "extension": [ { "url": "frame-index", "valueDecimal": 0 }, { "url": "frame-index", "valueDecimal": 1, "extension": [ ] } ] }, { "url": "https://g.co/dicom-tags", "extension": [ { "url": "tag-id", "valueString": "00101010", "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 2 }, { "url": "finding-infotype", "valueString": "AGE" }, { "url": "text-original", "valueString": "30" }, { "url": "text-replaced", "valueString": "AGE" } ] }, { "url": "tag-id", "valueString": "00100020", "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 4 }, { "url": "finding-infotype", "valueString": "GENERIC_ID" }, { "url": "text-original", "valueString": "1234" }, { "url": "text-replaced", "valueString": "GENERIC_ID" } ] } ] } ] } ] } } ] } '@ | Out-File -FilePath request.json -Encoding utf8
接著,執行下列指令來傳送 REST 要求:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/fhir+json" `
-InFile request.json `
-Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir" | Select-Object -Expand Content您應該會收到如下的 JSON 回應:
在來源 DICOM 映像檔上建立 SearchParameter 資源。
使用任何要求資料之前,請先替換以下項目:
- PROJECT_ID:您的 Google Cloud 專案 ID
- LOCATION:父資料集的位置
- DATASET_ID:FHIR 儲存庫的父項資料集
- OPERATION_METADATA_FHIR_STORE_ID:含有中繼資料的 FHIR 儲存庫 ID
JSON 要求主體:
{ "resourceType": "SearchParameter", "url": "lookup-source-instance", "base": ["Provenance"], "code": "lookup-source-instance", "name": "look up the source DICOM instance", "type": "string", "expression": "Provenance.entity.what.identifier.value", "status": "active", "description": "A search on the source DICOM instance" }
如要傳送要求,請選擇以下其中一個選項:
curl
將要求主體儲存在名為
request.json
的檔案中。在終端機中執行下列指令,即可在目前目錄中建立或覆寫此檔案:cat > request.json << 'EOF' { "resourceType": "SearchParameter", "url": "lookup-source-instance", "base": ["Provenance"], "code": "lookup-source-instance", "name": "look up the source DICOM instance", "type": "string", "expression": "Provenance.entity.what.identifier.value", "status": "active", "description": "A search on the source DICOM instance" } EOF
接著,執行下列指令來傳送 REST 要求:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/fhir+json" \
-d @request.json \
"https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/SearchParameter"PowerShell
將要求主體儲存在名為
request.json
的檔案中。在終端機中執行下列指令,即可在目前目錄中建立或覆寫此檔案:@' { "resourceType": "SearchParameter", "url": "lookup-source-instance", "base": ["Provenance"], "code": "lookup-source-instance", "name": "look up the source DICOM instance", "type": "string", "expression": "Provenance.entity.what.identifier.value", "status": "active", "description": "A search on the source DICOM instance" } '@ | Out-File -FilePath request.json -Encoding utf8
接著,執行下列指令來傳送 REST 要求:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/fhir+json" `
-InFile request.json `
-Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/SearchParameter" | Select-Object -Expand Content您應該會收到如下的 JSON 回應:
在 FHIR 儲存庫中啟用自訂 SearchParameter 資源。
使用任何要求資料之前,請先替換以下項目:
- PROJECT_ID:您的 Google Cloud 專案 ID
- LOCATION:父資料集的位置
- DATASET_ID:FHIR 儲存庫的父項資料集
- OPERATION_METADATA_FHIR_STORE_ID:含有中繼資料的 FHIR 儲存庫 ID
JSON 要求主體:
{ "canonicalUrls": [ "lookup-source-instance" ] }
如要傳送要求,請選擇以下其中一個選項:
curl
將要求主體儲存在名為
request.json
的檔案中。在終端機中執行下列指令,即可在目前目錄中建立或覆寫此檔案:cat > request.json << 'EOF' { "canonicalUrls": [ "lookup-source-instance" ] } EOF
接著,執行下列指令來傳送 REST 要求:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/fhir+json" \
-d @request.json \
"https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID:configureSearch"PowerShell
將要求主體儲存在名為
request.json
的檔案中。在終端機中執行下列指令,即可在目前目錄中建立或覆寫此檔案:@' { "canonicalUrls": [ "lookup-source-instance" ] } '@ | Out-File -FilePath request.json -Encoding utf8
接著,執行下列指令來傳送 REST 要求:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/fhir+json" `
-InFile request.json `
-Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID:configureSearch" | Select-Object -Expand Content取得作業狀態。
使用任何要求資料之前,請先替換以下項目:
- PROJECT_ID:您的 Google Cloud 專案 ID
- LOCATION:資料集的位置
- DATASET_ID:自訂搜尋作業執行的資料集
- OPERATION_ID:自訂搜尋作業的 ID
如要傳送要求,請選擇以下其中一個選項:
curl
執行下列指令:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/operations/OPERATION_ID"PowerShell
執行下列指令:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/operations/OPERATION_ID" | Select-Object -Expand ContentAPIs Explorer
開啟方法參考頁面。系統會在頁面右側開啟 API Explorer 面板。 您可以使用這項工具來傳送要求。完成所有必填欄位,然後按一下「執行」。
您應該會收到如下的 JSON 回應:
使用來源 DICOM 圖片搜尋參數查詢來源資源。
使用任何要求資料之前,請先替換以下項目:
- PROJECT_ID:您的 Google Cloud 專案 ID
- LOCATION:父資料集的位置
- DATASET_ID:FHIR 儲存庫的父項資料集
- OPERATION_METADATA_FHIR_STORE_ID:含有中繼資料的 FHIR 儲存庫 ID
如要傳送要求,請選擇以下其中一個選項:
curl
以下範例使用lookup-source-instance:contains=studies/1/series/2/instances/4
查詢,該查詢會傳回包含studies/1/series/2/instances/4
在其 ID 中的執行個體相關資訊。執行下列指令:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance?lookup-source-instance:contains=studies/1/series/2/instances/4"PowerShell
以下範例使用lookup-source-instance:contains=studies/1/series/2/instances/4
查詢,該查詢會傳回包含studies/1/series/2/instances/4
在其 ID 中的執行個體相關資訊。執行下列指令:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance?lookup-source-instance:contains=studies/1/series/2/instances/4" | Select-Object -Expand Content{ "entry": [ { "fullUrl": "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance/d82007a1-6481-4793-b17c-ae152051ee9f", "resource": { "agent": [ { "who": { "identifier": { "value": "projects/test-project/locations/us-central1/datasets/test-dataset/fhirStores/test-fhir-store/fhir/Provenance/operation-123" } } } ], "entity": [ { "extension": [ { "extension": [ { "url": "frame-index", "valueDecimal": 0 }, { "url": "frame-index", "valueDecimal": 1 } ], "url": "https://g.co/dicom-images" }, { "extension": [ { "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 2 }, { "url": "finding-infotype", "valueString": "AGE" }, { "url": "text-original", "valueString": "30" }, { "url": "text-replaced", "valueString": "AGE" } ], "url": "tag-id", "valueString": "00101010" }, { "extension": [ { "url": "byte-start", "valueDecimal": 0 }, { "url": "byte-end", "valueDecimal": 4 }, { "url": "finding-infotype", "valueString": "GENERIC_ID" }, { "url": "text-original", "valueString": "1234" }, { "url": "text-replaced", "valueString": "GENERIC_ID" } ], "url": "tag-id", "valueString": "00100020" } ], "url": "https://g.co/dicom-tags" } ], "role": "source", "what": { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/test-dicom-store/dicomWeb/studies/1/series/2/instances/4" } } } ], "id": "d82007a1-6481-4793-b17c-ae152051ee9f", "meta": { "lastUpdated": "2022-03-07T20:28:07.970361+00:00", "versionId": "MTY0NjY4NDg4Nzk3MDM2MTAwMA" }, "recorded": "2010-11-08T08:39:25-04:00", "resourceType": "Provenance", "target": [ { "identifier": { "value": "https://healthcare.googleapis.com/projects/test-project/locations/us-central1/datasets/test-dataset/dicomStores/deid-dicom-store/dicomWeb/studies/1/series/2/instances/4" } } ] }, "search": { "mode": "match" } } ], "link": [ { "relation": "search", "url": "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance/?lookup-source-instance%3Acontains=studies%2F1%2Fseries%2F2%2Finstances%2F4" }, { "relation": "first", "url": "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance/?lookup-source-instance%3Acontains=studies%2F1%2Fseries%2F2%2Finstances%2F4" }, { "relation": "self", "url": "https://healthcare.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/OPERATION_METADATA_FHIR_STORE_ID/fhir/Provenance/?lookup-source-instance%3Acontains=studies%2F1%2Fseries%2F2%2Finstances%2F4" } ], "resourceType": "Bundle", "total": 1, "type": "searchset" }
匯出及查詢作業中繼資料 FHIR 儲存庫
以下範例說明如何將 FHIR 儲存庫中的去識別化作業中繼資料匯出至 BigQuery,並查詢 OCR 處理的個人健康資訊資料。產生的資料僅與 LOSSLESS
或 ANALYTICS_V2
SchemaType
相容。
將 FHIR 儲存庫中的中繼資料匯出至 BigQuery 資料集。
中繼資料會匯出至所選 BigQuery 資料集中名為
Provenance
的資料表。前往「BigQuery」頁面
在「Explorer」窗格中,完成下列步驟:
- 選取 Google Cloud 專案。
- 選取匯出 DICOM 中繼資料的 BigQuery 資料集。
- 選取「Provenance」資料表。
按一下
「Compose new query」(編寫新查詢)。執行以下查詢:
SELECT what.identifier.value AS Source, target[OFFSET(0)].identifier.value AS Destination, `left` AS `Left`, `right` AS `Right`, top AS Top, bottom AS Bottom, quote AS Quote, infoType AS InfoType, confidence AS Confidence FROM `PROJECT_ID.BIGQUERY_DATASET.Provenance`, UNNEST(entity), UNNEST(dicom_images), UNNEST(frame_index) LIMIT 10
更改下列內容:
- PROJECT_ID: Google Cloud 專案的 ID
- BIGQUERY_DATASET:從 FHIR 儲存庫匯出中繼資料的 BigQuery 資料集
按一下
「Run」。查詢結果會以表格格式顯示去識別化 PHI 資料的中繼資料。如未指定目的地資料表,查詢工作會將輸出寫入臨時 (快取) 資料表。
配額
將去識別化作業中繼資料寫入 FHIR 儲存庫時,會在寫入作業中繼資料的專案中消耗 fhir_write_ops
配額。系統會為每個 DICOM 例項建立一個 FHIR 資源,因此去識別作業的傳輸量不得超過 FHIR 配額所允許的數量。
帳單
在操作中繼資料 FHIR 儲存庫中建立的每個來源資源,都會產生呼叫 fhir.update
的費用。fhir.update
的 API 呼叫次數可計算為:Total number of DICOM instances de-identified + 1
。
後續步驟
- 瞭解如何將 FHIR 資源匯出至 BigQuery,進行探索和分析。
- 瞭解如何將 FHIR 資源變更串流至 BigQuery,以便近乎即時同步處理 FHIR 儲存庫中的資料與 BigQuery 資料集。