Skip to content

Commit c5dcf0a

Browse files
author
Graham Thomas
committed
Custom Redaction Format tutorial for Azure Heatlh Deidentification
1 parent 82c992f commit c5dcf0a

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
title: "Use a custom redaction format with the de-identification service"
3+
description: "Learn how to redact using a custom format with the de-identification service."
4+
author: GrahamMThomas
5+
ms.author: gthomas
6+
ms.service: azure-health-data-services
7+
ms.subservice: deidentification-service
8+
ms.topic: tutorial
9+
ms.date: 12/05/2024
10+
---
11+
12+
# Tutorial: Use a custom redaction format with the de-identification service
13+
14+
In this tutorial, you:
15+
16+
> [!div class="checklist"]
17+
> * Learn how to specify a custom redaction format
18+
> * Learn how to create your desired redaction format
19+
20+
## Usage
21+
22+
1. Must select `Redact` as `Operation`. `RedactionFormat` is only supported for `Redact` operation.
23+
2. Pass `RedactionFormat` parameter within the `CustomizationOptions` model to the API or Job parameters.
24+
25+
26+
## Variables
27+
28+
Redaction format variables refer to special placeholders that can be used to create a custom redaction format.
29+
30+
The following variables are supported:
31+
32+
### Type
33+
34+
`{type} => patient`
35+
36+
```text
37+
Text = "Hi my name is John Smith"
38+
RedactionFormat = "<{type}>"
39+
40+
# Output:
41+
Hi my name is <patient>
42+
```
43+
44+
Also supports Upper and Title cases
45+
46+
```text
47+
{Type} => {Patient}
48+
{TYPE} => {PATIENT}
49+
```
50+
51+
### Length
52+
53+
`*{len} => ******(length of entity)`
54+
55+
This will allow you to create a string matching the length of the PHI.
56+
57+
It will duplicate the previous character to match the length of the tagged entity.
58+
59+
```text
60+
Text = "Hi my name is John Smith"
61+
RedactionFormat = "*{len}"
62+
63+
# Output:
64+
Hi my name is **********
65+
```
66+
67+
## Limits
68+
69+
1. RedactionFormat supports up to 16 characters.
70+
2. Each variable type can only be used once in the format.

articles/healthcare-apis/deidentification/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ items:
3232
items:
3333
- name: Configure Azure Storage to de-identify documents
3434
href: configure-storage.md
35+
- name: Custom redaction format with the de-identification service
36+
href: redaction-format.md
3537
- name: How-to
3638
expanded: true
3739
items:

0 commit comments

Comments
 (0)