-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates HealthDataAiService.Deid with feedback from SDK Review Team (#…
…29036) * Generate new Service for deidentification * [data-plane] Initial Creation of HealthDataAiServices.Deid 2 (#27563) Initial Creation of HealthDataAIServices Deid Service Spec. --------- Co-authored-by: Graham Thomas <[email protected]> * Adds errorCode and explanation; Replaces pagination with continuationToken (#28061) * Adds errorCode and explanation; Replaces pagination with continuationToken * Updates to use standard Azure Foundation Error --------- Co-authored-by: Graham Thomas <[email protected]> * Updated CompletedAt to LastUpdatedAt for all terminal states (#28349) * Updated CompletedAt to LastUpdatedAt for all terminal states * Updates examples; Moves error order * Set examples to more realistic value * Updates File model for future expansion * Adds Input FileLocation --------- Co-authored-by: Graham Thomas <[email protected]> * Updates parameter validators/defaults/nullability; Replaces checksum with etag (#28528) * Updates minor tweaks * Updates examples --------- Co-authored-by: Graham Thomas <[email protected]> * Updates HealthDataAiService.Deid with feedback from SDK Review Team * Updates TSPconfig for c# * Adds CSharp special * Updates version to match live version * Updates java package name * Fix java namespace name * Updates python package name * Updates to match version service is currently using * Updates package names * Removes update in cspell * Updates java namespace * Fixes cspell.json * Test1 * Convert to diff long running operation * Adds client config * Attempt base LRO * Updated naming and LRO config * Stash merge * Linter fixes; SDK related Updates * SDK Related Updates * Changes ordering of parameters; Fixes StringIndexType enum values * Removes script update * Updates examples * Don't update vscode settings * Updates examples * Fixes linter issues * Fixes documentDataType enum value to match casing within service * fix documentDataType enum value * change name of js package * changing property continuationToken because of a conflict in java * revert changes for continuationToken * Adding post processing for java --------- Co-authored-by: Graham Thomas <[email protected]> Co-authored-by: Daniel Szaniszlo <[email protected]>
- Loading branch information
1 parent
4567a94
commit 5c05cbf
Showing
22 changed files
with
2,574 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
specification/healthdataaiservices/HealthDataAIServices.Deidentification/client.tsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* PLACEHOLDER | ||
* Add readme and sample | ||
*/ | ||
import "./main.tsp"; | ||
import "@azure-tools/typespec-client-generator-core"; | ||
|
||
using Azure.ClientGenerator.Core; | ||
|
||
// // This model is input only | ||
// @@usage(HealthDataAIServices.Deidentification.DeidentifyOptions, Usage.input); | ||
// // This models is input/output | ||
// @@usage(HealthDataAIServices.Deidentification.DeidentifyJob, Usage.output); |
40 changes: 40 additions & 0 deletions
40
...services/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CancelJob.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"title": "Cancel a De-Identify Job", | ||
"operationId": "CancelJob", | ||
"parameters": { | ||
"api-version": "2024-01-16-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": { | ||
"prefix": "/documents" | ||
}, | ||
"operation": "Redact", | ||
"dataType": "Plaintext", | ||
"redactionFormat": "[{type}]", | ||
"status": "Canceled", | ||
"createdAt": "2024-01-25T23:27:43.009Z", | ||
"startedAt": "2024-01-25T23:27:43.009Z", | ||
"lastUpdatedAt": "2024-01-26T01:15:00.009Z", | ||
"summary": { | ||
"successful": 10, | ||
"failed": 0, | ||
"canceled": 2, | ||
"total": 12, | ||
"bytesProcessed": 4096 | ||
} | ||
} | ||
} | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
...services/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CreateJob.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"title": "Create a De-Identify Job", | ||
"operationId": "CreateJob", | ||
"parameters": { | ||
"api-version": "2024-01-16-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": { | ||
"prefix": "/documents" | ||
}, | ||
"operation": "Redact", | ||
"dataType": "Plaintext", | ||
"redactionFormat": "[{type}]", | ||
"status": "NotStarted", | ||
"createdAt": "2024-01-25T23:27:43.009Z", | ||
"lastUpdatedAt": "2024-01-26T01:15:00.009Z" | ||
} | ||
}, | ||
"201": { | ||
"headers": { | ||
"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" | ||
}, | ||
"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": { | ||
"prefix": "/documents" | ||
}, | ||
"operation": "Redact", | ||
"dataType": "Plaintext", | ||
"redactionFormat": "[{type}]", | ||
"status": "NotStarted", | ||
"createdAt": "2024-01-25T23:27:43.009Z", | ||
"lastUpdatedAt": "2024-01-26T01:15:00.009Z" | ||
} | ||
} | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...ervices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/Deidentify.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"title": "Realtime Synchronous Deidentification.", | ||
"operationId": "Deidentify", | ||
"parameters": { | ||
"api-version": "2024-01-16-preview", | ||
"body": { | ||
"inputText": "Hello my name is John Smith.", | ||
"operation": "Redact", | ||
"dataType": "Plaintext", | ||
"stringIndexType": "TextElement_v8", | ||
"redactionFormat": "[{type}]" | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"outputText": "Hello my name is [name].", | ||
"taggerResult": { | ||
"entities": [ | ||
{ | ||
"category": "Patient", | ||
"offset": 17, | ||
"length": 10, | ||
"text": "John Smith", | ||
"confidenceScore": 0.83 | ||
} | ||
], | ||
"stringIndexType": "TextElement_v8", | ||
"etag": "0x000000000000000" | ||
} | ||
} | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...services/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/DeleteJob.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"title": "Delete a De-Identify Job", | ||
"operationId": "DeleteJob", | ||
"parameters": { | ||
"api-version": "2024-01-16-preview", | ||
"name": "documents_smith_1", | ||
"x-ms-client-request-id": "00000000-0000-0000-0000-000000000000" | ||
}, | ||
"responses": { | ||
"204": {} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
...aaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/GetJob.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"title": "Get a De-Identify Job", | ||
"operationId": "GetJob", | ||
"parameters": { | ||
"api-version": "2024-01-16-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": { | ||
"prefix": "/documents" | ||
}, | ||
"operation": "Redact", | ||
"dataType": "Plaintext", | ||
"redactionFormat": "[{type}]", | ||
"status": "Succeeded", | ||
"createdAt": "2024-01-25T23:27:43.009Z", | ||
"startedAt": "2024-01-25T23:27:43.009Z", | ||
"lastUpdatedAt": "2024-01-26T01:15:00.009Z", | ||
"summary": { | ||
"successful": 10, | ||
"failed": 0, | ||
"canceled": 0, | ||
"total": 10, | ||
"bytesProcessed": 4096 | ||
} | ||
} | ||
} | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
...vices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/ListJobFiles.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"title": "List processed files within a Job", | ||
"operationId": "ListJobFiles", | ||
"parameters": { | ||
"api-version": "2024-01-16-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" | ||
} | ||
} | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
...iservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/ListJobs.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"title": "List De-Identify Jobs", | ||
"operationId": "ListJobs", | ||
"parameters": { | ||
"api-version": "2024-01-16-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": { | ||
"prefix": "/documents" | ||
}, | ||
"operation": "Redact", | ||
"dataType": "Plaintext", | ||
"redactionFormat": "[{type}]", | ||
"status": "Succeeded", | ||
"createdAt": "2024-01-25T23:27:43.009Z", | ||
"startedAt": "2024-01-25T23:27:43.009Z", | ||
"lastUpdatedAt": "2024-01-26T01:15:00.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" | ||
} | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import "@typespec/rest"; | ||
import "@typespec/versioning"; | ||
import "@azure-tools/typespec-azure-core"; | ||
import "./routes.tsp"; | ||
|
||
using TypeSpec.Http; | ||
using TypeSpec.Rest; | ||
using TypeSpec.Versioning; | ||
using Azure.Core; | ||
using Azure.Core.Traits; | ||
|
||
#suppress "@azure-tools/typespec-azure-core/casing-style" | ||
@useAuth(AadToken) | ||
@service({ | ||
title: "HealthDataAIServices.Deidentification Service", | ||
}) | ||
@server( | ||
"https://{endpoint}", | ||
"Azure Health Deidentification Service", | ||
{ | ||
@doc("Url of your Deid Service.") | ||
endpoint: string, | ||
} | ||
) | ||
@versioned(HealthDataAIServices.Deidentification.Versions) | ||
namespace HealthDataAIServices.Deidentification; | ||
|
||
@doc("The Azure Active Directory OAuth2 Flow") | ||
model AadToken | ||
is OAuth2Auth<[ | ||
{ | ||
type: OAuth2FlowType.authorizationCode; | ||
authorizationUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize"; | ||
tokenUrl: "https://login.microsoftonline.com/common/oauth2/token"; | ||
scopes: ["https://deid.azure.com/.default"]; | ||
} | ||
]>; | ||
|
||
#suppress "@azure-tools/typespec-azure-core/documentation-required" | ||
@doc("The HealthDataAIServices.Deidentification service versions.") | ||
enum Versions { | ||
@useDependency(Azure.Core.Versions.v1_0_Preview_2) | ||
v2024_01_16_preview: "2024-01-16-preview", | ||
} |
Oops, something went wrong.