共用方式為


Deidentify Text - Deidentify Text

取消識別文字。
遠端過程調用 (RPC) 作業。

POST {endpoint}/deid?api-version=2024-11-15

URI 參數

名稱 位於 必要 類型 Description
endpoint
path True

string (uri)

取消識別服務的 URL。

api-version
query True

string

minLength: 1

要用於這項作業的 API 版本。

要求標頭

名稱 必要 類型 Description
x-ms-client-request-id

string (uuid)

要求不透明、全域唯一、用戶端產生的字串標識碼。

要求本文

名稱 必要 類型 Description
inputText True

string

maxLength: 48000

輸入要取消識別的文字。

customizations

DeidentificationCustomizationOptions

用來覆寫預設服務行為的自定義參數。

operation

DeidentificationOperationType

對輸入檔執行的作業。

回應

名稱 類型 Description
200 OK

DeidentificationResult

要求已成功。

標題

x-ms-client-request-id: string

Other Status Codes

Azure.Core.Foundations.ErrorResponse

未預期的錯誤回應。

標題

x-ms-error-code: string

安全性

AadToken

Azure Active Directory OAuth2 流程

類型: oauth2
Flow: accessCode
授權 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
權杖 URL: https://login.microsoftonline.com/common/oauth2/token

範圍

名稱 Description
https://deid.azure.com/.default

範例

De-identify text.

範例要求

POST {endpoint}/deid?api-version=2024-11-15


{
  "inputText": "Hello my name is John Smith.",
  "operation": "Redact",
  "customizations": {
    "redactionFormat": "[{type}]"
  }
}

範例回覆

{
  "outputText": "Hello my name is [name]."
}

定義

名稱 Description
Azure.Core.Foundations.Error

error 物件。

Azure.Core.Foundations.ErrorResponse

包含錯誤詳細數據的回應。

Azure.Core.Foundations.InnerError

物件,包含有關錯誤的更特定資訊。 根據 Azure REST API 準則 - https://aka.ms/AzureRestApiGuidelines#handling-errors

DeidentificationContent

取消識別作業的要求本文。

DeidentificationCustomizationOptions

自訂選項,以覆寫同步使用的預設服務行為。

DeidentificationOperationType

對輸入檔執行的作業。

DeidentificationResult

用於取消識別作業的回應本文。

PhiCategory

PHI 實體清單。

PhiEntity

輸入中的 PHI 實體標籤。

PhiTaggerResult

“Tag” 作業的結果。

StringIndex

字串索引編碼模型。

Azure.Core.Foundations.Error

error 物件。

名稱 類型 Description
code

string

其中一組伺服器定義的錯誤碼。

details

Azure.Core.Foundations.Error[]

導致此錯誤之特定錯誤的詳細數據陣列。

innererror

Azure.Core.Foundations.InnerError

物件,包含與目前對象有關錯誤更具體的資訊。

message

string

錯誤的人類可讀取表示法。

target

string

錯誤的目標。

Azure.Core.Foundations.ErrorResponse

包含錯誤詳細數據的回應。

名稱 類型 Description
error

Azure.Core.Foundations.Error

error 物件。

Azure.Core.Foundations.InnerError

物件,包含有關錯誤的更特定資訊。 根據 Azure REST API 準則 - https://aka.ms/AzureRestApiGuidelines#handling-errors

名稱 類型 Description
code

string

其中一組伺服器定義的錯誤碼。

innererror

Azure.Core.Foundations.InnerError

內部錯誤。

DeidentificationContent

取消識別作業的要求本文。

名稱 類型 預設值 Description
customizations

DeidentificationCustomizationOptions

用來覆寫預設服務行為的自定義參數。

inputText

string

maxLength: 48000

輸入要取消識別的文字。

operation

DeidentificationOperationType

Surrogate

對輸入檔執行的作業。

DeidentificationCustomizationOptions

自訂選項,以覆寫同步使用的預設服務行為。

名稱 類型 預設值 Description
redactionFormat

string

minLength: 1
maxLength: 16

已修訂輸出的格式。 只有在 Operation 為 Redact 時才有效。 如需詳細資訊,請參閱 https://learn.microsoft.com/azure/healthcare-apis/deidentification/redaction-format

surrogateLocale

string

en-US

寫入輸出代理的地區設定。

DeidentificationOperationType

對輸入檔執行的作業。

Description
Redact

修訂作業會移除 PHI 的所有實體,並以佔位元值取代它們。

Surrogate

Surrogation Operation 會將 PHI 的所有實體取代為 Surrogate 值。

Tag

卷標作業會偵測 PHI 的所有實體、其類型,以及傳回檔中的位置。

DeidentificationResult

用於取消識別作業的回應本文。

名稱 類型 Description
outputText

string

取消識別之後輸出文字。 不適用於「標記」作業。

taggerResult

PhiTaggerResult

“Tag” 作業的結果。 僅適用於「標記」作業。

PhiCategory

PHI 實體清單。

Description
Unknown

未知的 PHI 類型。

Account

帳戶號碼。

Age

年齡。

BioID

生物標識碼,例如指紋或視網膜掃描。

City

城市。

CountryOrRegion

國家或地區。

Date

日期。

Device

裝置標識碼或序號。

Doctor

醫生的名字

Email

電子郵件位址。

Fax

傳真編號。

HealthPlan

健康情況方案標識碼。

Hospital

醫院名稱。

IDNum

標識碼,例如護照號碼。

IPAddress

IP位址。

License

授權,例如 駕駛執照或醫療執照。

LocationOther

位置其他,例如 金門公園。

MedicalRecord

醫療記錄號碼。

Organization

組織,例如 Microsoft。

Patient

病患名稱。

Phone

電話號碼。

Profession

職業。

SocialSecurity

社會安全號碼。

State

州。

Street

街。

Url

Web URL。

Username

用戶名稱,例如社交媒體句柄。

Vehicle

車輛標識碼,例如車牌或 VIN 號碼。

Zip

郵遞區號。

PhiEntity

輸入中的 PHI 實體標籤。

名稱 類型 Description
category

PhiCategory

實體的 PHI 類別。

confidenceScore

number (double)

類別比對的信賴分數。

length

StringIndex

輸入文字的長度。

offset

StringIndex

從輸入文字中開始位置的索引。

text

string

實體的文字。

PhiTaggerResult

“Tag” 作業的結果。

名稱 類型 Description
entities

PhiEntity[]

輸入中偵測到的實體清單。

StringIndex

字串索引編碼模型。

名稱 類型 Description
codePoint

integer (int32)

CodePoint 編碼中子字串的位移或長度。

Python 所使用的主要編碼方式。

utf16

integer (int32)

UTF-16 編碼中子字串的位移或長度。

.NET、Java 和 JavaScript 所使用的主要編碼方式。

utf8

integer (int32)

UTF-8 編碼中子字串的位移或長度