You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/healthdataaiservices/azure-health-deidentification/README.md
+19-11Lines changed: 19 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -48,10 +48,10 @@ Here's an example of setting an environment variable in Bash using Azure CLI:
48
48
49
49
```bash
50
50
# Get the service URL for the resource
51
-
exportAZURE_HEALTH_DEIDENTIFICATION_ENDPOINT=$(az deidservice show --name "<resource-name>" --resource-group "<resource-group-name>" --query "properties.serviceUrl")
51
+
exportHEALTHDATAAISERVICES_DEID_SERVICE_ENDPOINT=$(az deidservice show --name "<resource-name>" --resource-group "<resource-group-name>" --query "properties.serviceUrl")
52
52
```
53
53
54
-
Optionally, save the service URL as an environment variable named `AZURE_HEALTH_DEIDENTIFICATION_ENDPOINT` for the sample client initialization code.
54
+
Optionally, save the service URL as an environment variable named `HEALTHDATAAISERVICES_DEID_SERVICE_ENDPOINT` for the sample client initialization code.
55
55
56
56
Create a client with the endpoint and credential:
57
57
<!-- SNIPPET: examples.create_client -->
@@ -62,7 +62,7 @@ from azure.identity import DefaultAzureCredential
@@ -77,6 +77,12 @@ Given an input text, the de-identification service can perform three main operat
77
77
-`Redact` returns output text where detected PHI entities are replaced with placeholder text. For example `John` replaced with `[name]`.
78
78
-`Surrogate` returns output text where detected PHI entities are replaced with realistic replacement values. For example, `My name is John Smith` could become `My name is Tom Jones`.
79
79
80
+
### String Encoding
81
+
When using the `Tag` operation, the service will return the locations of PHI entities in the input text. These locations will be represented as offsets and lengths, each of which is a [StringIndex][string_index] containing
82
+
three properties corresponding to three different text encodings. **Python applications should use the `code_point` property.**
83
+
84
+
For more on text encoding, see [Character encoding in .NET][character_encoding].
85
+
80
86
### Available endpoints
81
87
There are two ways to interact with the de-identification service. You can send text directly, or you can create jobs
82
88
to de-identify documents in Azure Storage.
@@ -94,7 +100,7 @@ from azure.health.deidentification.models import (
Copy file name to clipboardExpand all lines: sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_documents_async.py
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,8 @@
15
15
python deidentify_documents_async.py
16
16
17
17
Set the environment variables with your own values before running the sample:
18
-
1) AZURE_HEALTH_DEIDENTIFICATION_ENDPOINT - the service URL endpoint for a de-identification service.
19
-
2) AZURE_STORAGE_ACCOUNT_LOCATION - an Azure Storage container endpoint, like "https://<storageaccount>.blob.core.windows.net/<container>".
18
+
1) HEALTHDATAAISERVICES_DEID_SERVICE_ENDPOINT - the service URL endpoint for a de-identification service.
19
+
2) HEALTHDATAAISERVICES_STORAGE_ACCOUNT_LOCATION - an Azure Storage container endpoint, like "https://<storageaccount>.blob.core.windows.net/<container>".
20
20
3) INPUT_PREFIX - the prefix of the input document name(s) in the container.
21
21
For example, providing "folder1" would create a job that would process documents like "https://<storageaccount>.blob.core.windows.net/<container>/folder1/document1.txt".
Copy file name to clipboardExpand all lines: sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_text_redact_async.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@
14
14
python deidentify_text_redact_async.py
15
15
16
16
Set the environment variables with your own values before running the sample:
17
-
1) AZURE_HEALTH_DEIDENTIFICATION_ENDPOINT - the service URL endpoint for a de-identification service.
17
+
1) HEALTHDATAAISERVICES_DEID_SERVICE_ENDPOINT - the service URL endpoint for a de-identification service.
Copy file name to clipboardExpand all lines: sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_text_surrogate_async.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@
14
14
python deidentify_text_surrogate_async.py
15
15
16
16
Set the environment variables with your own values before running the sample:
17
-
1) AZURE_HEALTH_DEIDENTIFICATION_ENDPOINT - the service URL endpoint for a de-identification service.
17
+
1) HEALTHDATAAISERVICES_DEID_SERVICE_ENDPOINT - the service URL endpoint for a de-identification service.
Copy file name to clipboardExpand all lines: sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/list_job_documents_async.py
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,8 @@
14
14
python list_job_documents_async.py
15
15
16
16
Set the environment variables with your own values before running the sample:
17
-
1) AZURE_HEALTH_DEIDENTIFICATION_ENDPOINT - the service URL endpoint for a de-identification service.
18
-
2) AZURE_STORAGE_ACCOUNT_LOCATION - an Azure Storage container endpoint, like "https://<storageaccount>.blob.core.windows.net/<container>".
17
+
1) HEALTHDATAAISERVICES_DEID_SERVICE_ENDPOINT - the service URL endpoint for a de-identification service.
18
+
2) HEALTHDATAAISERVICES_STORAGE_ACCOUNT_LOCATION - an Azure Storage container endpoint, like "https://<storageaccount>.blob.core.windows.net/<container>".
19
19
3) INPUT_PREFIX - the prefix of the input document name(s) in the container.
20
20
For example, providing "folder1" would create a job that would process documents like "https://<storageaccount>.blob.core.windows.net/<container>/folder1/document1.txt".
Copy file name to clipboardExpand all lines: sdk/healthdataaiservices/azure-health-deidentification/samples/deidentify_documents.py
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,8 @@
15
15
python deidentify_documents.py
16
16
17
17
Set the environment variables with your own values before running the sample:
18
-
1) AZURE_HEALTH_DEIDENTIFICATION_ENDPOINT - the service URL endpoint for a de-identification service.
19
-
2) AZURE_STORAGE_ACCOUNT_LOCATION - an Azure Storage container endpoint, like "https://<storageaccount>.blob.core.windows.net/<container>".
18
+
1) HEALTHDATAAISERVICES_DEID_SERVICE_ENDPOINT - the service URL endpoint for a de-identification service.
19
+
2) HEALTHDATAAISERVICES_STORAGE_ACCOUNT_LOCATION - an Azure Storage container endpoint, like "https://<storageaccount>.blob.core.windows.net/<container>".
20
20
3) INPUT_PREFIX - the prefix of the input document name(s) in the container.
21
21
For example, providing "folder1" would create a job that would process documents like "https://<storageaccount>.blob.core.windows.net/<container>/folder1/document1.txt".
22
22
4) OUTPUT_PREFIX - the prefix of the output document name(s) in the container. This will appear as a folder which will be created if it does not exist, and defaults to "_output" if not provided.
0 commit comments