From 3f1f282459b3ad567077054d52b2193144ee7253 Mon Sep 17 00:00:00 2001 From: Josiah Vinson <88204686+jovinson-ms@users.noreply.github.com> Date: Wed, 22 Jan 2025 14:07:46 -0800 Subject: [PATCH] Adding back Deid examples (#31802) * Adding back Deid examples * formatting * adding back preview version to README --------- Co-authored-by: Josiah Vinson --- .../examples/CancelJob.json | 41 ++++++++++ .../examples/CreateJob.json | 75 +++++++++++++++++++ .../examples/Deidentify.json | 40 ++++++++++ .../examples/DeleteJob.json | 12 +++ .../2024-07-12-preview/examples/GetJob.json | 41 ++++++++++ .../examples/ListJobDocuments.json | 38 ++++++++++ .../2024-07-12-preview/examples/ListJobs.json | 47 ++++++++++++ .../readme.md | 9 +++ 8 files changed, 303 insertions(+) create mode 100644 specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/CancelJob.json create mode 100644 specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/CreateJob.json create mode 100644 specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/Deidentify.json create mode 100644 specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/DeleteJob.json create mode 100644 specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/GetJob.json create mode 100644 specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/ListJobDocuments.json create mode 100644 specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/ListJobs.json diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/CancelJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/CancelJob.json new file mode 100644 index 000000000000..c70063471c24 --- /dev/null +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/CancelJob.json @@ -0,0 +1,41 @@ +{ + "title": "Cancel a de-identification job.", + "operationId": "CancelJob", + "parameters": { + "api-version": "2024-07-12-preview", + "name": "documents_smith_1", + "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "documents_smith_1", + "sourceLocation": { + "location": "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + "prefix": "/documents", + "extensions": [ + "*" + ] + }, + "targetLocation": { + "location": "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + "prefix": "/documents" + }, + "operation": "Redact", + "dataType": "Plaintext", + "redactionFormat": "[{type}]", + "status": "Canceled", + "lastUpdatedAt": "2024-01-26T01:15:00.009Z", + "createdAt": "2024-01-25T23:27:43.009Z", + "startedAt": "2024-01-25T23:27:43.009Z", + "summary": { + "successful": 10, + "failed": 0, + "canceled": 2, + "total": 12, + "bytesProcessed": 4096 + } + } + } + } +} diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/CreateJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/CreateJob.json new file mode 100644 index 000000000000..87689147cfcf --- /dev/null +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/CreateJob.json @@ -0,0 +1,75 @@ +{ + "title": "Create a de-identification job.", + "operationId": "CreateJob", + "parameters": { + "api-version": "2024-07-12-preview", + "name": "documents_smith_1", + "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", + "resource": { + "sourceLocation": { + "location": "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + "prefix": "/documents", + "extensions": [ + "*" + ] + }, + "targetLocation": { + "location": "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + "prefix": "/documents" + }, + "operation": "Redact", + "dataType": "Plaintext", + "redactionFormat": "[{type}]", + "status": "NotStarted" + } + }, + "responses": { + "200": { + "body": { + "name": "documents_smith_1", + "sourceLocation": { + "location": "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + "prefix": "/documents", + "extensions": [ + "*" + ] + }, + "targetLocation": { + "location": "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + "prefix": "/documents" + }, + "operation": "Redact", + "dataType": "Plaintext", + "redactionFormat": "[{type}]", + "status": "NotStarted", + "lastUpdatedAt": "2024-01-26T01:15:00.009Z", + "createdAt": "2024-01-25T23:27:43.009Z" + } + }, + "201": { + "headers": { + "original-uri": "https://contoso.com/operationstatus" + }, + "body": { + "name": "documents_smith_1", + "sourceLocation": { + "location": "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + "prefix": "/documents", + "extensions": [ + "*" + ] + }, + "targetLocation": { + "location": "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + "prefix": "/documents" + }, + "operation": "Redact", + "dataType": "Plaintext", + "redactionFormat": "[{type}]", + "status": "NotStarted", + "lastUpdatedAt": "2024-01-26T01:15:00.009Z", + "createdAt": "2024-01-25T23:27:43.009Z" + } + } + } +} diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/Deidentify.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/Deidentify.json new file mode 100644 index 000000000000..e2021314bf20 --- /dev/null +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/Deidentify.json @@ -0,0 +1,40 @@ +{ + "title": "De-identify text.", + "operationId": "Deidentify", + "parameters": { + "api-version": "2024-07-12-preview", + "body": { + "inputText": "Hello my name is John Smith.", + "operation": "Redact", + "dataType": "Plaintext", + "redactionFormat": "[{type}]" + } + }, + "responses": { + "200": { + "body": { + "outputText": "Hello my name is [name].", + "taggerResult": { + "entities": [ + { + "category": "Patient", + "offset": { + "utf8": 17, + "utf16": 17, + "codePoint": 17 + }, + "length": { + "utf8": 10, + "utf16": 10, + "codePoint": 10 + }, + "text": "John Smith", + "confidenceScore": 0.83 + } + ], + "etag": "0x000000000000000" + } + } + } + } +} diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/DeleteJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/DeleteJob.json new file mode 100644 index 000000000000..9b49028db92a --- /dev/null +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/DeleteJob.json @@ -0,0 +1,12 @@ +{ + "title": "Delete a de-identification job.", + "operationId": "DeleteJob", + "parameters": { + "api-version": "2024-07-12-preview", + "name": "documents_smith_1", + "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "204": {} + } +} diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/GetJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/GetJob.json new file mode 100644 index 000000000000..41496ff69046 --- /dev/null +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/GetJob.json @@ -0,0 +1,41 @@ +{ + "title": "Get a de-identification job.", + "operationId": "GetJob", + "parameters": { + "api-version": "2024-07-12-preview", + "name": "documents_smith_1", + "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "documents_smith_1", + "sourceLocation": { + "location": "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + "prefix": "/documents", + "extensions": [ + "*" + ] + }, + "targetLocation": { + "location": "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + "prefix": "/documents" + }, + "operation": "Redact", + "dataType": "Plaintext", + "redactionFormat": "[{type}]", + "status": "Succeeded", + "lastUpdatedAt": "2024-01-26T01:15:00.009Z", + "createdAt": "2024-01-25T23:27:43.009Z", + "startedAt": "2024-01-25T23:27:43.009Z", + "summary": { + "successful": 10, + "failed": 0, + "canceled": 0, + "total": 10, + "bytesProcessed": 4096 + } + } + } + } +} diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/ListJobDocuments.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/ListJobDocuments.json new file mode 100644 index 000000000000..372911afab67 --- /dev/null +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/ListJobDocuments.json @@ -0,0 +1,38 @@ +{ + "title": "List processed documents within a job.", + "operationId": "ListJobDocuments", + "parameters": { + "api-version": "2024-07-12-preview", + "name": "documents_smith_1", + "maxpagesize": 10, + "continuationToken": "K1JJRDpzOEtaQWZabUQrQUNBQUFBQUFBQUFBQT09I1JUOjEjVFJDOjEwI0ZQQzpBZ0VBQUFBTUFDUUFBQUFBQUE9PQ==", + "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "00000000-0000-0000-0000-000000000000", + "input": { + "path": "/documents/patient_doc_1", + "etag": "0x8DB638EEA0CC717" + }, + "output": { + "path": "_output/documents/patient_doc_1", + "etag": "0xAB298APO23099ZL" + }, + "status": "Failed", + "error": { + "code": "FileNotFound", + "message": "File was moved after job started.", + "target": "SourceFile", + "details": [] + } + } + ], + "nextLink": "https://deidtest.api.deid.azure.com/jobs/00000000-0000-0000-0000-000000000000/files?top=10&skip=10&maxpagesize=10" + } + } + } +} diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/ListJobs.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/ListJobs.json new file mode 100644 index 000000000000..43061dc58040 --- /dev/null +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/ListJobs.json @@ -0,0 +1,47 @@ +{ + "title": "List de-identification jobs.", + "operationId": "ListJobs", + "parameters": { + "api-version": "2024-07-12-preview", + "maxpagesize": 10, + "continuationToken": "K1JJRDpzOEtaQWZabUQrQUNBQUFBQUFBQUFBQT09I1JUOjEjVFJDOjEwI0ZQQzpBZ0VBQUFBTUFDUUFBQUFBQUE9PQ==", + "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "documents_smith_1", + "sourceLocation": { + "location": "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + "prefix": "/documents", + "extensions": [ + "*" + ] + }, + "targetLocation": { + "location": "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D", + "prefix": "/documents" + }, + "operation": "Redact", + "dataType": "Plaintext", + "redactionFormat": "[{type}]", + "status": "Succeeded", + "lastUpdatedAt": "2024-01-26T01:15:00.009Z", + "createdAt": "2024-01-25T23:27:43.009Z", + "startedAt": "2024-01-25T23:27:43.009Z", + "summary": { + "successful": 10, + "failed": 0, + "canceled": 0, + "total": 10, + "bytesProcessed": 4096 + } + } + ], + "nextLink": "https://deidtest.api.deid.azure.com/jobs?top=10&skip=10&maxpagesize=10" + } + } + } +} diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/readme.md b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/readme.md index 883a2262edbb..4f7aec4bdb1f 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/readme.md +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/readme.md @@ -42,6 +42,15 @@ input-file: - stable/2024-11-15/HealthDataAIServices.DeidServices.json ``` +### Tag: package-2024-07-12-preview + +These settings apply only when `--tag=package-2024-07-12-preview` is specified on the command line. + +```yaml $(tag) == 'package-2024-07-12-preview' +input-file: + - preview/2024-07-12-preview/HealthDataAIServices.DeidServices.json +``` + --- # Code Generation