From 5c05cbf7b9c0fcc52a9d931c3901128c56f82a21 Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Mon, 8 Jul 2024 20:44:42 -0700 Subject: [PATCH 01/19] 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 * 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 * 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 * Updates parameter validators/defaults/nullability; Replaces checksum with etag (#28528) * Updates minor tweaks * Updates examples --------- Co-authored-by: Graham Thomas * 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 Co-authored-by: Daniel Szaniszlo --- cSpell.json | 8 + .../client.tsp | 13 + .../2024-01-16-preview/CancelJob.json | 40 + .../2024-01-16-preview/CreateJob.json | 73 + .../2024-01-16-preview/Deidentify.json | 34 + .../2024-01-16-preview/DeleteJob.json | 12 + .../examples/2024-01-16-preview/GetJob.json | 40 + .../2024-01-16-preview/ListJobFiles.json | 38 + .../examples/2024-01-16-preview/ListJobs.json | 46 + .../main.tsp | 44 + .../models.tsp | 373 +++++ .../routes.tsp | 74 + .../tspconfig.yaml | 42 + ...HealthDataAIServices.Deidentification.json | 1376 +++++++++++++++++ .../examples/CancelJob.json | 40 + .../examples/CreateJob.json | 73 + .../examples/Deidentify.json | 34 + .../examples/DeleteJob.json | 12 + .../2024-01-16-preview/examples/GetJob.json | 40 + .../examples/ListJobFiles.json | 38 + .../2024-01-16-preview/examples/ListJobs.json | 46 + .../readme.md | 78 + 22 files changed, 2574 insertions(+) create mode 100644 specification/healthdataaiservices/HealthDataAIServices.Deidentification/client.tsp create mode 100644 specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CancelJob.json create mode 100644 specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CreateJob.json create mode 100644 specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/Deidentify.json create mode 100644 specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/DeleteJob.json create mode 100644 specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/GetJob.json create mode 100644 specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/ListJobFiles.json create mode 100644 specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/ListJobs.json create mode 100644 specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp create mode 100644 specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp create mode 100644 specification/healthdataaiservices/HealthDataAIServices.Deidentification/routes.tsp create mode 100644 specification/healthdataaiservices/HealthDataAIServices.Deidentification/tspconfig.yaml create mode 100644 specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/HealthDataAIServices.Deidentification.json create mode 100644 specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/CancelJob.json create mode 100644 specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/CreateJob.json create mode 100644 specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/Deidentify.json create mode 100644 specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/DeleteJob.json create mode 100644 specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/GetJob.json create mode 100644 specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/ListJobFiles.json create mode 100644 specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/ListJobs.json create mode 100644 specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/readme.md diff --git a/cSpell.json b/cSpell.json index 17b4394825e6..6a73f41e5f50 100644 --- a/cSpell.json +++ b/cSpell.json @@ -1140,6 +1140,14 @@ "timerange" ] }, + { + "filename": "**/specification/healthdataaiservices/**/*.json", + "words": [ + "deidentification", + "deidentify", + "surrogation" + ] + }, { "filename": "**/specification/search/data-plane/Azure.Search/**/*.json", "words": [ diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/client.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/client.tsp new file mode 100644 index 000000000000..1ea6edc25d3a --- /dev/null +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/client.tsp @@ -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); diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CancelJob.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CancelJob.json new file mode 100644 index 000000000000..a051052a05b1 --- /dev/null +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CancelJob.json @@ -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 + } + } + } + } +} diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CreateJob.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CreateJob.json new file mode 100644 index 000000000000..3a15bd32b163 --- /dev/null +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CreateJob.json @@ -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" + } + } + } +} diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/Deidentify.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/Deidentify.json new file mode 100644 index 000000000000..b973893f09f0 --- /dev/null +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/Deidentify.json @@ -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" + } + } + } + } +} diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/DeleteJob.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/DeleteJob.json new file mode 100644 index 000000000000..0f91d9fc3e6e --- /dev/null +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/DeleteJob.json @@ -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": {} + } +} diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/GetJob.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/GetJob.json new file mode 100644 index 000000000000..47e9fc3a7ccc --- /dev/null +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/GetJob.json @@ -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 + } + } + } + } +} diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/ListJobFiles.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/ListJobFiles.json new file mode 100644 index 000000000000..b3595c602077 --- /dev/null +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/ListJobFiles.json @@ -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" + } + } + } +} diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/ListJobs.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/ListJobs.json new file mode 100644 index 000000000000..bcdad1d927da --- /dev/null +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/ListJobs.json @@ -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" + } + } + } +} diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp new file mode 100644 index 000000000000..846499477391 --- /dev/null +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp @@ -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", +} diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp new file mode 100644 index 000000000000..dd746c8ba057 --- /dev/null +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp @@ -0,0 +1,373 @@ +import "@typespec/http"; +import "@typespec/rest"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using Azure.Core; + +namespace HealthDataAIServices.Deidentification; + +@doc("A job containing a batch of documents to deidentify.") +@resource("jobs") +model DeidentificationJob { + @key + @doc("The name of a job.") + @visibility("read") + @maxLength(36) + @minLength(3) // Must be 3 to match regex + @pattern("^[a-zA-Z0-9][a-zA-Z0-9-_]+[a-zA-Z0-9]$") + name: string; + + @doc("Storage location to perform the operation on.") + sourceLocation: SourceStorageLocation; + + @doc("Target location to store output of operation.") + targetLocation: TargetStorageLocation; + + @doc("Operation to perform on the input documents.") + operation: OperationType = OperationType.Surrogate; + + @doc("Data type of the input documents.") + dataType: DocumentDataType = DocumentDataType.Plaintext; + + @maxLength(16) + @minLength(1) + @doc("Format of the redacted output. Only valid when Operation is Redact.") + redactionFormat?: string; + + // Readonly Properties + + @doc("Current status of a job.") + @visibility("read") + @pollingOperationParameter + status: JobStatus; + + @doc("Error when job fails in it's entirety.") + @visibility("read") + error?: Azure.Core.Foundations.Error; + + @doc("Date and time when the job was created.") + @visibility("read") + createdAt: utcDateTime; + + @doc("Date and time when the job was started.") + @visibility("read") + startedAt?: utcDateTime; + + @doc(""" + Date and time when the job was completed. + + If the job is canceled, this is the time when the job was canceled. + + If the job failed, this is the time when the job failed. + """) + @visibility("read") + lastUpdatedAt?: utcDateTime; + + @doc("Summary of a job. Exists only when the job is completed.") + @visibility("read") + summary?: JobSummary; +} + +@doc("File report once job has completed.") +@resource("files") +@parentResource(DeidentificationJob) +model HealthFileDetails { + @key + @doc("Id of the file report.") + @visibility("read") + id: string; + + @doc("File Location for the input.") + input: FileLocation; + + @doc("File Location for the output.") + output?: FileLocation; + + @doc("Status of the file.") + status: Azure.Core.Foundations.OperationState; + + @doc("Error when file fails.") + error?: Azure.Core.Foundations.Error; +} + +@doc("Location of a file.") +model FileLocation { + @doc("Absolute path to the file in storage.") + @maxLength(1024) + path: string; + + ...EtagProperty; +} + +@doc("Summary metrics the documents pertaining to a job.") +model JobSummary { + @doc("Number of blobs that have completed.") + successful: int32; + + @doc("Number of blobs that have failed.") + failed: int32; + + @doc("Number of blobs that have been canceled.") + canceled: int32; + + @doc("Number of blobs total.") + total: int32; + + @doc("Number of bytes processed.") + bytesProcessed: int64; +} + +@doc("List of statuses a job can have.") +@lroStatus +union JobStatus { + // Cannot use Azure.Core.Foundations.OperationState. because it is not a union type. + + NotStarted: "NotStarted", + + Running: "Running", + + @lroSucceeded + Succeeded: "Succeeded", + + @lroFailed + @doc("Job has completed with at least 1 file failing.") + PartialFailed: "PartialFailed", + + @lroFailed + Failed: "Failed", + + @lroCanceled + Canceled: "Canceled", + + string, +} + +@doc("Storage location.") +model SourceStorageLocation { + @doc("URL to storage location. Must be a valid Azure Storage SAS URI.") + location: url; + + @doc("Prefix to filter blobs by.") + @minLength(1) + @maxLength(1024) + prefix: string; + + @doc("List of extensions to filter blobs by.") + @minItems(1) + extensions: Array = ["*"]; +} + +@doc("Storage location.") +model TargetStorageLocation { + @doc("URL to storage location. Must be a valid Azure Storage SAS URI.") + @secret + location: url; + + @doc("Prefix to filter blobs by.") + @minLength(1) + @maxLength(1024) + prefix: string; +} + +@doc("Enum of supported Data Types.") +union DocumentDataType { + @doc("Plain text data type.") + Plaintext: "Plaintext", + + string, +} + +@doc("Enum of supported Operation Types.") +union OperationType { + @doc("Redact Operation will remove all entities of PHI and replace them with a placeholder value.") + Redact: "Redact", + + @doc("Surrogation Operation will replace all entities of PHI with a surrogate value.") + Surrogate: "Surrogate", + + @doc("Tag Operation will detect all entities of PHI, their type, and return their locations in the document.") + Tag: "Tag", + + string, +} + +// Source: Text Analytics +@doc("List of supported index encodings.") +union StringIndexType { + @doc("Iterates over graphemes as defined by the Unicode 8.0.0 standard.") + TextElement_v8: "TextElement_v8", + + @doc("Iterates over Unicode Code Points, the default scheme for Python 3.") + UnicodeCodePoint: "UnicodeCodePoint", + + @doc("Iterates over UTF-16 Code Units, the default scheme for JavaScript, Java, and .NET.") + Utf16CodeUnit: "Utf16CodeUnit", + + string, +} + +@doc("Request for synchronous De-Identify operation.") +model DeidentificationContent { + @doc("Input text to deidentify.") + @maxLength(100000) // 100KB + inputText: string; + + @doc("Operation to perform on the input.") + operation: OperationType = OperationType.Surrogate; + + @doc("Data type of the input.") + dataType: DocumentDataType = DocumentDataType.Plaintext; + + // This must be set as optional so it isn't included in sdk constructors. + // SDKs then overwrite it as internal with appropriate default value for that SDK. + @doc("Requested Encoding of the tag response indices.") + stringIndexType?: StringIndexType; + + @maxLength(16) + @doc("Format of the redacted output. Only valid when OperationType is Redact.") + redactionFormat?: string; +} + +@doc("Response for synchronous De-Identify operation.") +model DeidentificationResult { + @doc("Output text after de-identifying. Not available for Tag Operation.") + outputText?: string; + + @doc("Result of the tag operation. Only available for Tag Operation.") + taggerResult?: PhiTaggerResult; +} + +@doc("Result of the tag operation.") +model PhiTaggerResult { + @doc("List of entities detected in the input.") + entities: Array; + + @doc("Requested Encoding of the tag response indices.") + stringIndexType: StringIndexType = StringIndexType.TextElement_v8; + + @doc("Path to the file in the storage container.") + @maxLength(1024) // Max length for Blob Name + path?: string; + + ...EtagProperty; +} + +@doc("List of PHI Entities.") +union PhiCategory { + @doc("Unknown PHI Type.") + Unknown: "Unknown", + + @doc("Account Number.") + Account: "Account", + + @doc("Age.") + Age: "Age", + + @doc("Biological Identifier, such as a fingerprint or retinal scan") + BioID: "BioID", + + @doc("City.") + City: "City", + + @doc("Country or Region.") + CountryOrRegion: "CountryOrRegion", + + @doc("Date.") + Date: "Date", + + @doc("Device ID or serial numbers.") + Device: "Device", + + @doc("Doctor's Name.") + Doctor: "Doctor", + + @doc("Email Addresses.") + Email: "Email", + + @doc("Fax Number.") + Fax: "Fax", + + @doc("Health Plan ID Numbers.") + HealthPlan: "HealthPlan", + + @doc("Hospital Name.") + Hospital: "Hospital", + + @doc("Id Numbers. Such as a passport number.") + IDNum: "IDNum", + + @doc("IP Address.") + IPAddress: "IPAddress", + + @doc("License. Such as a driver's license or medical license") + License: "License", + + @doc("Location Other. Such as Golden Gate Park.") + LocationOther: "LocationOther", + + @doc("Medical Record Number.") + MedicalRecord: "MedicalRecord", + + @doc("Organization. Such as a company name") + Organization: "Organization", + + @doc("Patient Name.") + Patient: "Patient", + + @doc("Phone Number.") + Phone: "Phone", + + @doc("Profession.") + Profession: "Profession", + + @doc("Social Security Numbers in the US.") + SocialSecurity: "SocialSecurity", + + @doc("State") + State: "State", + + @doc("Street.") + Street: "Street", + + @doc("Web URL.") + Url: "Url", + + @doc("Usernames, such as a social media handle") + Username: "Username", + + @doc("Vehicle IDs, such as license plates or VIN numbers") + Vehicle: "Vehicle", + + @doc("Zip Code.") + Zip: "Zip", + + string, +} + +@doc("Phi Entity tag in the input.") +model PhiEntity { + @doc("Phi Category of the entity.") + category: PhiCategory; + + @doc("Starting index of the location from within the input text.") + offset: int32; + + @doc("Length of the input text.") + length: int32; + + @doc("Text of the entity.") + text?: string; + + @doc("Confidence score of the text/type pairing.") + confidenceScore?: float64; +} + +@doc("Query parameters for listing jobs.") +model PaginationByTokenQueryParameters { + ...MaxPageSizeQueryParameter; + + @query + @doc("Token to continue a previous query.") + continuationToken?: string; +} diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/routes.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/routes.tsp new file mode 100644 index 000000000000..534892ff7126 --- /dev/null +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/routes.tsp @@ -0,0 +1,74 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/http"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; +using Azure.Core.Traits; + +namespace HealthDataAIServices.Deidentification; + +alias ServiceTraits = NoRepeatableRequests & + NoConditionalRequests & + SupportsClientRequestId; + +alias DeidentifyOperations = ResourceOperations< + ServiceTraits, + Azure.Core.Foundations.ErrorResponse +>; + +// Text-Deidentification Operations + +@summary("Create a De-Identify Job") +@pollingOperation(getJob) +op createJob is DeidentifyOperations.LongRunningResourceCreateOrReplace; + +@summary("Get a De-Identify Job") +op getJob is DeidentifyOperations.ResourceRead; + +@summary("List De-Identify Jobs") +op listJobs is DeidentifyOperations.ResourceList< + DeidentificationJob, + ListQueryParametersTrait +>; + +@summary("List processed files within a Job") +op listJobFiles is DeidentifyOperations.ResourceList< + HealthFileDetails, + ListQueryParametersTrait +>; + +#suppress "@azure-tools/typespec-azure-core/no-explicit-routes-resource-ops" "" +@summary("Cancel a De-Identify Job") +@doc(""" + Cancels a job that is in progress. + + The job will be marked as canceled and the service will stop processing the job. The service will not delete any files that have already been processed. + + If the job is already complete, this will have no effect. + """) +@action("cancel") +op cancelJob is DeidentifyOperations.ResourceAction< + DeidentificationJob, + {}, + DeidentificationJob +>; + +@summary("Delete a De-Identify Job") +@doc("Removes the record of the job from the service. Does not delete any files.") +op deleteJob is DeidentifyOperations.ResourceDelete; + +@summary("Realtime Synchronous Deidentification.") +@route("/deid") +@post +op deidentify is Azure.Core.RpcOperation< + { + @doc("The request body for realtime deidentification.") + @body + body: DeidentificationContent; + }, + DeidentificationResult +>; diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/tspconfig.yaml b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/tspconfig.yaml new file mode 100644 index 000000000000..71cdb90bd200 --- /dev/null +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/tspconfig.yaml @@ -0,0 +1,42 @@ +parameters: + "service-dir": + default: "sdk/healthdataaiservices" + "dependencies": + "additionalDirectories": [] + default: "" +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples/" + output-file: "{project-root}/../data-plane/{service-name}/{version-status}/{version}/{service-name}.json" + omit-unreachable-types: true + "@azure-tools/typespec-python": + package-dir: "azure-health-deidentification" + package-name: "{package-dir}" + package-mode: dataplane + flavor: azure + "@azure-tools/typespec-csharp": + package-dir: "Azure.Health.Deidentification" + namespace: "{package-dir}" + clear-output-folder: true + model-namespace: false + flavor: azure + "@azure-tools/typespec-ts": + package-dir: "azure-health-deidentification" + generateMetadata: true + generateTest: true + packageDetails: + name: "@azure-rest/health-deidentification" + description: "Health Deidentification Service" + flavor: azure + "@azure-tools/typespec-java": + package-dir: "azure-health-deidentification" + namespace: "com.azure.health.deidentification" + customization-class: customization/src/main/java/HealthDeidentificationSdkCustomization.java + flavor: azure +linter: + extends: + - "@azure-tools/typespec-azure-core/all" diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/HealthDataAIServices.Deidentification.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/HealthDataAIServices.Deidentification.json new file mode 100644 index 000000000000..4596bc80d8a7 --- /dev/null +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/HealthDataAIServices.Deidentification.json @@ -0,0 +1,1376 @@ +{ + "swagger": "2.0", + "info": { + "title": "HealthDataAIServices.Deidentification Service", + "version": "2024-01-16-preview", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "x-ms-parameterized-host": { + "hostTemplate": "https://{endpoint}", + "useSchemePrefix": false, + "parameters": [ + { + "name": "endpoint", + "in": "path", + "description": "Url of your Deid Service.", + "required": true, + "type": "string" + } + ] + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "AadToken": [ + "https://deid.azure.com/.default" + ] + } + ], + "securityDefinitions": { + "AadToken": { + "type": "oauth2", + "description": "The Azure Active Directory OAuth2 Flow", + "flow": "accessCode", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize", + "scopes": { + "https://deid.azure.com/.default": "" + }, + "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token" + } + }, + "tags": [], + "paths": { + "/deid": { + "post": { + "operationId": "Deidentify", + "summary": "Realtime Synchronous Deidentification.", + "description": "A remote procedure call (RPC) operation.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "body", + "in": "body", + "description": "The request body for realtime deidentification.", + "required": true, + "schema": { + "$ref": "#/definitions/DeidentificationContent" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/DeidentificationResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Realtime Synchronous Deidentification.": { + "$ref": "./examples/Deidentify.json" + } + } + } + }, + "/jobs": { + "get": { + "operationId": "ListJobs", + "summary": "List De-Identify Jobs", + "description": "Resource list operation template.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter" + }, + { + "$ref": "#/parameters/PaginationByTokenQueryParameters.continuationToken" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedDeidentificationJob" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "List De-Identify Jobs": { + "$ref": "./examples/ListJobs.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/jobs/{name}": { + "get": { + "operationId": "GetJob", + "summary": "Get a De-Identify Job", + "description": "Resource read operation template.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "description": "The name of a job.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 36, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_]+[a-zA-Z0-9]$" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/DeidentificationJob" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get a De-Identify Job": { + "$ref": "./examples/GetJob.json" + } + } + }, + "put": { + "operationId": "CreateJob", + "summary": "Create a De-Identify Job", + "description": "Long-running resource create or replace operation template.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "description": "The name of a job.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 36, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_]+[a-zA-Z0-9]$" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "name": "resource", + "in": "body", + "description": "The resource instance.", + "required": true, + "schema": { + "$ref": "#/definitions/DeidentificationJob" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/DeidentificationJob" + }, + "headers": { + "Operation-Location": { + "type": "string", + "format": "uri", + "description": "The location for monitoring the operation state." + }, + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "schema": { + "$ref": "#/definitions/DeidentificationJob" + }, + "headers": { + "Operation-Location": { + "type": "string", + "format": "uri", + "description": "The location for monitoring the operation state." + }, + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Create a De-Identify Job": { + "$ref": "./examples/CreateJob.json" + } + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "DeleteJob", + "summary": "Delete a De-Identify Job", + "description": "Removes the record of the job from the service. Does not delete any files.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "description": "The name of a job.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 36, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_]+[a-zA-Z0-9]$" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful. ", + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Delete a De-Identify Job": { + "$ref": "./examples/DeleteJob.json" + } + } + } + }, + "/jobs/{name}:cancel": { + "post": { + "operationId": "CancelJob", + "summary": "Cancel a De-Identify Job", + "description": "Cancels a job that is in progress. \n\nThe job will be marked as canceled and the service will stop processing the job. The service will not delete any files that have already been processed.\n\nIf the job is already complete, this will have no effect. ", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "description": "The name of a job.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 36, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_]+[a-zA-Z0-9]$" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/DeidentificationJob" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Cancel a De-Identify Job": { + "$ref": "./examples/CancelJob.json" + } + } + } + }, + "/jobs/{name}/files": { + "get": { + "operationId": "ListJobFiles", + "summary": "List processed files within a Job", + "description": "Resource list operation template.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "description": "The name of a job.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 36, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_]+[a-zA-Z0-9]$" + }, + { + "$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter" + }, + { + "$ref": "#/parameters/PaginationByTokenQueryParameters.continuationToken" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedHealthFileDetails" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "List processed files within a Job": { + "$ref": "./examples/ListJobFiles.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "Azure.Core.Foundations.Error": { + "type": "object", + "description": "The error object.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "description": "An array of details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/Azure.Core.Foundations.Error" + }, + "x-ms-identifiers": [] + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "An object containing more specific information than the current object about the error." + } + }, + "required": [ + "code", + "message" + ] + }, + "Azure.Core.Foundations.ErrorResponse": { + "type": "object", + "description": "A response containing error details.", + "properties": { + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "The error object." + } + }, + "required": [ + "error" + ] + }, + "Azure.Core.Foundations.InnerError": { + "type": "object", + "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "Inner error." + } + } + }, + "Azure.Core.Foundations.OperationState": { + "type": "string", + "description": "Enum describing allowed operation states.", + "enum": [ + "NotStarted", + "Running", + "Succeeded", + "Failed", + "Canceled" + ], + "x-ms-enum": { + "name": "OperationState", + "modelAsString": true, + "values": [ + { + "name": "NotStarted", + "value": "NotStarted", + "description": "The operation has not started." + }, + { + "name": "Running", + "value": "Running", + "description": "The operation is in progress." + }, + { + "name": "Succeeded", + "value": "Succeeded", + "description": "The operation has completed successfully." + }, + { + "name": "Failed", + "value": "Failed", + "description": "The operation has failed." + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "The operation has been canceled by the user." + } + ] + } + }, + "Azure.Core.eTag": { + "type": "string", + "description": "The ETag (or entity tag) HTTP response header is an identifier for a specific version of a resource.\nIt lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content was not changed.\n\nIt is a string of ASCII characters placed between double quotes, like \"675af34563dc-tr34\"." + }, + "DeidentificationContent": { + "type": "object", + "description": "Request for synchronous De-Identify operation.", + "properties": { + "inputText": { + "type": "string", + "description": "Input text to deidentify.", + "maxLength": 100000 + }, + "operation": { + "type": "string", + "description": "Operation to perform on the input.", + "default": "Surrogate", + "enum": [ + "Redact", + "Surrogate", + "Tag" + ], + "x-ms-enum": { + "name": "OperationType", + "modelAsString": true, + "values": [ + { + "name": "Redact", + "value": "Redact", + "description": "Redact Operation will remove all entities of PHI and replace them with a placeholder value." + }, + { + "name": "Surrogate", + "value": "Surrogate", + "description": "Surrogation Operation will replace all entities of PHI with a surrogate value." + }, + { + "name": "Tag", + "value": "Tag", + "description": "Tag Operation will detect all entities of PHI, their type, and return their locations in the document." + } + ] + } + }, + "dataType": { + "type": "string", + "description": "Data type of the input.", + "default": "Plaintext", + "enum": [ + "Plaintext" + ], + "x-ms-enum": { + "name": "DocumentDataType", + "modelAsString": true, + "values": [ + { + "name": "Plaintext", + "value": "Plaintext", + "description": "Plain text data type." + } + ] + } + }, + "stringIndexType": { + "$ref": "#/definitions/StringIndexType", + "description": "Requested Encoding of the tag response indices." + }, + "redactionFormat": { + "type": "string", + "description": "Format of the redacted output. Only valid when OperationType is Redact.", + "maxLength": 16 + } + }, + "required": [ + "inputText", + "operation", + "dataType" + ] + }, + "DeidentificationJob": { + "type": "object", + "description": "A job containing a batch of documents to deidentify.", + "properties": { + "name": { + "type": "string", + "description": "The name of a job.", + "minLength": 3, + "maxLength": 36, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_]+[a-zA-Z0-9]$", + "readOnly": true + }, + "sourceLocation": { + "$ref": "#/definitions/SourceStorageLocation", + "description": "Storage location to perform the operation on." + }, + "targetLocation": { + "$ref": "#/definitions/TargetStorageLocation", + "description": "Target location to store output of operation." + }, + "operation": { + "type": "string", + "description": "Operation to perform on the input documents.", + "default": "Surrogate", + "enum": [ + "Redact", + "Surrogate", + "Tag" + ], + "x-ms-enum": { + "name": "OperationType", + "modelAsString": true, + "values": [ + { + "name": "Redact", + "value": "Redact", + "description": "Redact Operation will remove all entities of PHI and replace them with a placeholder value." + }, + { + "name": "Surrogate", + "value": "Surrogate", + "description": "Surrogation Operation will replace all entities of PHI with a surrogate value." + }, + { + "name": "Tag", + "value": "Tag", + "description": "Tag Operation will detect all entities of PHI, their type, and return their locations in the document." + } + ] + } + }, + "dataType": { + "type": "string", + "description": "Data type of the input documents.", + "default": "Plaintext", + "enum": [ + "Plaintext" + ], + "x-ms-enum": { + "name": "DocumentDataType", + "modelAsString": true, + "values": [ + { + "name": "Plaintext", + "value": "Plaintext", + "description": "Plain text data type." + } + ] + } + }, + "redactionFormat": { + "type": "string", + "description": "Format of the redacted output. Only valid when Operation is Redact.", + "minLength": 1, + "maxLength": 16 + }, + "status": { + "$ref": "#/definitions/JobStatus", + "description": "Current status of a job.", + "readOnly": true + }, + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "Error when job fails in it's entirety.", + "readOnly": true + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Date and time when the job was created.", + "readOnly": true + }, + "startedAt": { + "type": "string", + "format": "date-time", + "description": "Date and time when the job was started.", + "readOnly": true + }, + "lastUpdatedAt": { + "type": "string", + "format": "date-time", + "description": "Date and time when the job was completed.\n\nIf the job is canceled, this is the time when the job was canceled.\n\nIf the job failed, this is the time when the job failed.", + "readOnly": true + }, + "summary": { + "$ref": "#/definitions/JobSummary", + "description": "Summary of a job. Exists only when the job is completed.", + "readOnly": true + } + }, + "required": [ + "name", + "sourceLocation", + "targetLocation", + "operation", + "dataType", + "status", + "createdAt" + ] + }, + "DeidentificationResult": { + "type": "object", + "description": "Response for synchronous De-Identify operation.", + "properties": { + "outputText": { + "type": "string", + "description": "Output text after de-identifying. Not available for Tag Operation." + }, + "taggerResult": { + "$ref": "#/definitions/PhiTaggerResult", + "description": "Result of the tag operation. Only available for Tag Operation." + } + } + }, + "FileLocation": { + "type": "object", + "description": "Location of a file.", + "properties": { + "path": { + "type": "string", + "description": "Absolute path to the file in storage.", + "maxLength": 1024 + }, + "etag": { + "$ref": "#/definitions/Azure.Core.eTag", + "description": "The entity tag for this resource.", + "readOnly": true + } + }, + "required": [ + "path", + "etag" + ] + }, + "HealthFileDetails": { + "type": "object", + "description": "File report once job has completed.", + "properties": { + "id": { + "type": "string", + "description": "Id of the file report.", + "readOnly": true + }, + "input": { + "$ref": "#/definitions/FileLocation", + "description": "File Location for the input." + }, + "output": { + "$ref": "#/definitions/FileLocation", + "description": "File Location for the output." + }, + "status": { + "$ref": "#/definitions/Azure.Core.Foundations.OperationState", + "description": "Status of the file." + }, + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "Error when file fails." + } + }, + "required": [ + "id", + "input", + "status" + ] + }, + "JobStatus": { + "type": "string", + "description": "List of statuses a job can have.", + "enum": [ + "NotStarted", + "Running", + "Succeeded", + "PartialFailed", + "Failed", + "Canceled" + ], + "x-ms-enum": { + "name": "JobStatus", + "modelAsString": true, + "values": [ + { + "name": "NotStarted", + "value": "NotStarted" + }, + { + "name": "Running", + "value": "Running" + }, + { + "name": "Succeeded", + "value": "Succeeded" + }, + { + "name": "PartialFailed", + "value": "PartialFailed", + "description": "Job has completed with at least 1 file failing." + }, + { + "name": "Failed", + "value": "Failed" + }, + { + "name": "Canceled", + "value": "Canceled" + } + ] + } + }, + "JobSummary": { + "type": "object", + "description": "Summary metrics the documents pertaining to a job.", + "properties": { + "successful": { + "type": "integer", + "format": "int32", + "description": "Number of blobs that have completed." + }, + "failed": { + "type": "integer", + "format": "int32", + "description": "Number of blobs that have failed." + }, + "canceled": { + "type": "integer", + "format": "int32", + "description": "Number of blobs that have been canceled." + }, + "total": { + "type": "integer", + "format": "int32", + "description": "Number of blobs total." + }, + "bytesProcessed": { + "type": "integer", + "format": "int64", + "description": "Number of bytes processed." + } + }, + "required": [ + "successful", + "failed", + "canceled", + "total", + "bytesProcessed" + ] + }, + "PagedDeidentificationJob": { + "type": "object", + "description": "Paged collection of DeidentificationJob items", + "properties": { + "value": { + "type": "array", + "description": "The DeidentificationJob items on this page", + "items": { + "$ref": "#/definitions/DeidentificationJob" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "PagedHealthFileDetails": { + "type": "object", + "description": "Paged collection of HealthFileDetails items", + "properties": { + "value": { + "type": "array", + "description": "The HealthFileDetails items on this page", + "items": { + "$ref": "#/definitions/HealthFileDetails" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "PhiCategory": { + "type": "string", + "description": "List of PHI Entities.", + "enum": [ + "Unknown", + "Account", + "Age", + "BioID", + "City", + "CountryOrRegion", + "Date", + "Device", + "Doctor", + "Email", + "Fax", + "HealthPlan", + "Hospital", + "IDNum", + "IPAddress", + "License", + "LocationOther", + "MedicalRecord", + "Organization", + "Patient", + "Phone", + "Profession", + "SocialSecurity", + "State", + "Street", + "Url", + "Username", + "Vehicle", + "Zip" + ], + "x-ms-enum": { + "name": "PhiCategory", + "modelAsString": true, + "values": [ + { + "name": "Unknown", + "value": "Unknown", + "description": "Unknown PHI Type." + }, + { + "name": "Account", + "value": "Account", + "description": "Account Number." + }, + { + "name": "Age", + "value": "Age", + "description": "Age." + }, + { + "name": "BioID", + "value": "BioID", + "description": "Biological Identifier, such as a fingerprint or retinal scan" + }, + { + "name": "City", + "value": "City", + "description": "City." + }, + { + "name": "CountryOrRegion", + "value": "CountryOrRegion", + "description": "Country or Region." + }, + { + "name": "Date", + "value": "Date", + "description": "Date." + }, + { + "name": "Device", + "value": "Device", + "description": "Device ID or serial numbers." + }, + { + "name": "Doctor", + "value": "Doctor", + "description": "Doctor's Name." + }, + { + "name": "Email", + "value": "Email", + "description": "Email Addresses." + }, + { + "name": "Fax", + "value": "Fax", + "description": "Fax Number." + }, + { + "name": "HealthPlan", + "value": "HealthPlan", + "description": "Health Plan ID Numbers." + }, + { + "name": "Hospital", + "value": "Hospital", + "description": "Hospital Name." + }, + { + "name": "IDNum", + "value": "IDNum", + "description": "Id Numbers. Such as a passport number." + }, + { + "name": "IPAddress", + "value": "IPAddress", + "description": "IP Address." + }, + { + "name": "License", + "value": "License", + "description": "License. Such as a driver's license or medical license" + }, + { + "name": "LocationOther", + "value": "LocationOther", + "description": "Location Other. Such as Golden Gate Park." + }, + { + "name": "MedicalRecord", + "value": "MedicalRecord", + "description": "Medical Record Number." + }, + { + "name": "Organization", + "value": "Organization", + "description": "Organization. Such as a company name" + }, + { + "name": "Patient", + "value": "Patient", + "description": "Patient Name." + }, + { + "name": "Phone", + "value": "Phone", + "description": "Phone Number." + }, + { + "name": "Profession", + "value": "Profession", + "description": "Profession." + }, + { + "name": "SocialSecurity", + "value": "SocialSecurity", + "description": "Social Security Numbers in the US." + }, + { + "name": "State", + "value": "State", + "description": "State" + }, + { + "name": "Street", + "value": "Street", + "description": "Street." + }, + { + "name": "Url", + "value": "Url", + "description": "Web URL." + }, + { + "name": "Username", + "value": "Username", + "description": "Usernames, such as a social media handle" + }, + { + "name": "Vehicle", + "value": "Vehicle", + "description": "Vehicle IDs, such as license plates or VIN numbers" + }, + { + "name": "Zip", + "value": "Zip", + "description": "Zip Code." + } + ] + } + }, + "PhiEntity": { + "type": "object", + "description": "Phi Entity tag in the input.", + "properties": { + "category": { + "$ref": "#/definitions/PhiCategory", + "description": "Phi Category of the entity." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Starting index of the location from within the input text." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length of the input text." + }, + "text": { + "type": "string", + "description": "Text of the entity." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Confidence score of the text/type pairing." + } + }, + "required": [ + "category", + "offset", + "length" + ] + }, + "PhiTaggerResult": { + "type": "object", + "description": "Result of the tag operation.", + "properties": { + "entities": { + "type": "array", + "description": "List of entities detected in the input.", + "items": { + "$ref": "#/definitions/PhiEntity" + }, + "x-ms-identifiers": [] + }, + "stringIndexType": { + "type": "string", + "description": "Requested Encoding of the tag response indices.", + "default": "TextElement_v8", + "enum": [ + "TextElement_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElement_v8", + "value": "TextElement_v8", + "description": "Iterates over graphemes as defined by the Unicode 8.0.0 standard." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Iterates over Unicode Code Points, the default scheme for Python 3." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Iterates over UTF-16 Code Units, the default scheme for JavaScript, Java, and .NET." + } + ] + } + }, + "path": { + "type": "string", + "description": "Path to the file in the storage container.", + "maxLength": 1024 + }, + "etag": { + "$ref": "#/definitions/Azure.Core.eTag", + "description": "The entity tag for this resource.", + "readOnly": true + } + }, + "required": [ + "entities", + "stringIndexType", + "etag" + ] + }, + "SourceStorageLocation": { + "type": "object", + "description": "Storage location.", + "properties": { + "location": { + "type": "string", + "format": "uri", + "description": "URL to storage location. Must be a valid Azure Storage SAS URI." + }, + "prefix": { + "type": "string", + "description": "Prefix to filter blobs by.", + "minLength": 1, + "maxLength": 1024 + }, + "extensions": { + "type": "array", + "description": "List of extensions to filter blobs by.", + "default": [ + "*" + ], + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": [ + "location", + "prefix", + "extensions" + ] + }, + "StringIndexType": { + "type": "string", + "description": "List of supported index encodings.", + "enum": [ + "TextElement_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElement_v8", + "value": "TextElement_v8", + "description": "Iterates over graphemes as defined by the Unicode 8.0.0 standard." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Iterates over Unicode Code Points, the default scheme for Python 3." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Iterates over UTF-16 Code Units, the default scheme for JavaScript, Java, and .NET." + } + ] + } + }, + "TargetStorageLocation": { + "type": "object", + "description": "Storage location.", + "properties": { + "location": { + "type": "string", + "format": "password", + "description": "URL to storage location. Must be a valid Azure Storage SAS URI.", + "x-ms-secret": true + }, + "prefix": { + "type": "string", + "description": "Prefix to filter blobs by.", + "minLength": 1, + "maxLength": 1024 + } + }, + "required": [ + "location", + "prefix" + ] + } + }, + "parameters": { + "Azure.Core.ClientRequestIdHeader": { + "name": "x-ms-client-request-id", + "in": "header", + "description": "An opaque, globally-unique, client-generated string identifier for the request.", + "required": false, + "type": "string", + "format": "uuid", + "x-ms-parameter-location": "method", + "x-ms-client-name": "clientRequestId" + }, + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for this operation.", + "required": true, + "type": "string", + "minLength": 1, + "x-ms-parameter-location": "method", + "x-ms-client-name": "apiVersion" + }, + "Azure.Core.MaxPageSizeQueryParameter": { + "name": "maxpagesize", + "in": "query", + "description": "The maximum number of result items per page.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-parameter-location": "method" + }, + "PaginationByTokenQueryParameters.continuationToken": { + "name": "continuationToken", + "in": "query", + "description": "Token to continue a previous query.", + "required": false, + "type": "string", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/CancelJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/CancelJob.json new file mode 100644 index 000000000000..a051052a05b1 --- /dev/null +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/CancelJob.json @@ -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 + } + } + } + } +} diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/CreateJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/CreateJob.json new file mode 100644 index 000000000000..3a15bd32b163 --- /dev/null +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/CreateJob.json @@ -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" + } + } + } +} diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/Deidentify.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/Deidentify.json new file mode 100644 index 000000000000..b973893f09f0 --- /dev/null +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/Deidentify.json @@ -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" + } + } + } + } +} diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/DeleteJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/DeleteJob.json new file mode 100644 index 000000000000..0f91d9fc3e6e --- /dev/null +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/DeleteJob.json @@ -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": {} + } +} diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/GetJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/GetJob.json new file mode 100644 index 000000000000..47e9fc3a7ccc --- /dev/null +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/GetJob.json @@ -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 + } + } + } + } +} diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/ListJobFiles.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/ListJobFiles.json new file mode 100644 index 000000000000..b3595c602077 --- /dev/null +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/ListJobFiles.json @@ -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" + } + } + } +} diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/ListJobs.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/ListJobs.json new file mode 100644 index 000000000000..bcdad1d927da --- /dev/null +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/ListJobs.json @@ -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" + } + } + } +} diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/readme.md b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/readme.md new file mode 100644 index 000000000000..6adecdbfc540 --- /dev/null +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/readme.md @@ -0,0 +1,78 @@ +# HealthDataAIServices.Deidentification + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for HealthDataAIServices.Deidentification. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings for the HealthDataAIServices.Deidentification. + +```yaml +openapi-type: data-plane +tag: package-2024-01-16-preview +title: Health Deidentification Service +security: AADToken +security-scopes: + - "https://deid.azure.com/.default" +``` + +### Tag: package-2024-01-16-preview + +These settings apply only when `--tag=package-2024-01-16-preview` is specified on the command line. + +```yaml $(tag) == 'package-2024-01-16-preview' +input-file: + - preview/2024-01-16-preview/HealthDataAIServices.Deidentification.json +``` + +--- + +# Code Generation + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +```yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-net-track2 + - repo: azure-sdk-for-python-track2 + - repo: azure-sdk-for-java + - repo: azure-sdk-for-js + - repo: azure-cli-extensions + - repo: azure-powershell +``` + +## Az + +See configuration in [readme.az.md](./readme.az.md) + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## TypeScript + +See configuration in [readme.typescript.md](./readme.typescript.md) + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) \ No newline at end of file From 300462e9933653f25df64df948eaca441d6ab141 Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Mon, 8 Jul 2024 21:09:06 -0700 Subject: [PATCH 02/19] Updates linter extends value --- .../HealthDataAIServices.Deidentification/tspconfig.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/tspconfig.yaml b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/tspconfig.yaml index 71cdb90bd200..3e8cbe751ca2 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/tspconfig.yaml +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/tspconfig.yaml @@ -39,4 +39,4 @@ options: flavor: azure linter: extends: - - "@azure-tools/typespec-azure-core/all" + - "@azure-tools/typespec-azure-rulesets/data-plane" From b8a8c58550e7de0e30dc5b9cb7f15ad4be6937b1 Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Mon, 8 Jul 2024 21:32:03 -0700 Subject: [PATCH 03/19] Updates typespec with new validations for 0.57 --- .../HealthDataAIServices.Deidentification/models.tsp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp index dd746c8ba057..9cb0dda5a1d4 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp @@ -122,12 +122,14 @@ model JobSummary { @lroStatus union JobStatus { // Cannot use Azure.Core.Foundations.OperationState. because it is not a union type. - + @doc("Job has been submitted and is waiting to be processed.") NotStarted: "NotStarted", + @doc("Job has been started.") Running: "Running", @lroSucceeded + @doc("Job has completed successfully. All files have succeeded.") Succeeded: "Succeeded", @lroFailed @@ -135,9 +137,11 @@ union JobStatus { PartialFailed: "PartialFailed", @lroFailed + @doc("Job has completed with all files failing, or a validation failure.") Failed: "Failed", @lroCanceled + @doc("Job has been canceled after user request.") Canceled: "Canceled", string, @@ -155,7 +159,7 @@ model SourceStorageLocation { @doc("List of extensions to filter blobs by.") @minItems(1) - extensions: Array = ["*"]; + extensions: Array = #["*"]; } @doc("Storage location.") From 37ee8eedcc65dcba9ac10da6533d7063ff91d994 Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Mon, 8 Jul 2024 21:41:23 -0700 Subject: [PATCH 04/19] Fixing namespace suppression --- .../HealthDataAIServices.Deidentification/main.tsp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp index 846499477391..ed37818f8839 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp @@ -9,7 +9,7 @@ using TypeSpec.Versioning; using Azure.Core; using Azure.Core.Traits; -#suppress "@azure-tools/typespec-azure-core/casing-style" +#suppress "@azure-tools/typespec-azure-core/casing-style" "AI Casing style to match OpenAI" @useAuth(AadToken) @service({ title: "HealthDataAIServices.Deidentification Service", @@ -36,7 +36,6 @@ model AadToken } ]>; -#suppress "@azure-tools/typespec-azure-core/documentation-required" @doc("The HealthDataAIServices.Deidentification service versions.") enum Versions { @useDependency(Azure.Core.Versions.v1_0_Preview_2) From 013a24496883492de9e3589948151cda9014ea8c Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Mon, 8 Jul 2024 21:52:43 -0700 Subject: [PATCH 05/19] Fixing namespace suppression 2 --- .../HealthDataAIServices.Deidentification/main.tsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp index ed37818f8839..a8c5444f27e8 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp @@ -9,7 +9,6 @@ using TypeSpec.Versioning; using Azure.Core; using Azure.Core.Traits; -#suppress "@azure-tools/typespec-azure-core/casing-style" "AI Casing style to match OpenAI" @useAuth(AadToken) @service({ title: "HealthDataAIServices.Deidentification Service", @@ -23,6 +22,7 @@ using Azure.Core.Traits; } ) @versioned(HealthDataAIServices.Deidentification.Versions) +#suppress "@azure-tools/typespec-azure-core/casing-style" "AI Casing style to match OpenAI" namespace HealthDataAIServices.Deidentification; @doc("The Azure Active Directory OAuth2 Flow") From 6dde1a494a78dc5073d7f87f966e00bec14996fc Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Mon, 8 Jul 2024 22:10:06 -0700 Subject: [PATCH 06/19] Fixing namespace suppression 3 --- .../HealthDataAIServices.Deidentification/client.tsp | 9 --------- .../HealthDataAIServices.Deidentification/main.tsp | 2 +- .../HealthDataAIServices.Deidentification/models.tsp | 1 + .../HealthDataAIServices.Deidentification/routes.tsp | 1 + 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/client.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/client.tsp index 1ea6edc25d3a..046424f54abc 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/client.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/client.tsp @@ -1,13 +1,4 @@ -/** - * 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); diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp index a8c5444f27e8..ed37818f8839 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp @@ -9,6 +9,7 @@ using TypeSpec.Versioning; using Azure.Core; using Azure.Core.Traits; +#suppress "@azure-tools/typespec-azure-core/casing-style" "AI Casing style to match OpenAI" @useAuth(AadToken) @service({ title: "HealthDataAIServices.Deidentification Service", @@ -22,7 +23,6 @@ using Azure.Core.Traits; } ) @versioned(HealthDataAIServices.Deidentification.Versions) -#suppress "@azure-tools/typespec-azure-core/casing-style" "AI Casing style to match OpenAI" namespace HealthDataAIServices.Deidentification; @doc("The Azure Active Directory OAuth2 Flow") diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp index 9cb0dda5a1d4..6a51891d0c84 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp @@ -5,6 +5,7 @@ using TypeSpec.Http; using TypeSpec.Rest; using Azure.Core; +#suppress "@azure-tools/typespec-azure-core/casing-style" "AI Casing style to match OpenAI" namespace HealthDataAIServices.Deidentification; @doc("A job containing a batch of documents to deidentify.") diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/routes.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/routes.tsp index 534892ff7126..a9b1b579d7fc 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/routes.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/routes.tsp @@ -9,6 +9,7 @@ using TypeSpec.Versioning; using Azure.Core; using Azure.Core.Traits; +#suppress "@azure-tools/typespec-azure-core/casing-style" "AI Casing style to match OpenAI" namespace HealthDataAIServices.Deidentification; alias ServiceTraits = NoRepeatableRequests & From 4aff9ce66b59a7de0c0d6690fd4a3df67aa7fafa Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Mon, 8 Jul 2024 22:36:27 -0700 Subject: [PATCH 07/19] Fixing namespace suppression 4 --- .../examples/2024-01-16-preview/CreateJob.json | 2 +- .../main.tsp | 1 - .../tspconfig.yaml | 2 ++ .../HealthDataAIServices.Deidentification.json | 18 +++++++++++++----- .../2024-01-16-preview/examples/CreateJob.json | 2 +- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CreateJob.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CreateJob.json index 3a15bd32b163..3c433a7d1f16 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CreateJob.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CreateJob.json @@ -47,7 +47,7 @@ }, "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" + "original-uri": "https://contoso.com/operationstatus" }, "body": { "name": "documents_smith_1", diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp index ed37818f8839..0f1a9f94e446 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp @@ -9,7 +9,6 @@ using TypeSpec.Versioning; using Azure.Core; using Azure.Core.Traits; -#suppress "@azure-tools/typespec-azure-core/casing-style" "AI Casing style to match OpenAI" @useAuth(AadToken) @service({ title: "HealthDataAIServices.Deidentification Service", diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/tspconfig.yaml b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/tspconfig.yaml index 3e8cbe751ca2..fe8a6fc329fb 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/tspconfig.yaml +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/tspconfig.yaml @@ -40,3 +40,5 @@ options: linter: extends: - "@azure-tools/typespec-azure-rulesets/data-plane" + disable: + "@azure-tools/typespec-azure-core/casing-style": "Disabling as #suppress not working for namespace" diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/HealthDataAIServices.Deidentification.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/HealthDataAIServices.Deidentification.json index 4596bc80d8a7..b72929faf257 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/HealthDataAIServices.Deidentification.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/HealthDataAIServices.Deidentification.json @@ -296,6 +296,9 @@ "$ref": "./examples/CreateJob.json" } }, + "x-ms-long-running-operation-options": { + "final-state-via": "original-uri" + }, "x-ms-long-running-operation": true }, "delete": { @@ -861,15 +864,18 @@ "values": [ { "name": "NotStarted", - "value": "NotStarted" + "value": "NotStarted", + "description": "Job has been submitted and is waiting to be processed." }, { "name": "Running", - "value": "Running" + "value": "Running", + "description": "Job has been started." }, { "name": "Succeeded", - "value": "Succeeded" + "value": "Succeeded", + "description": "Job has completed successfully. All files have succeeded." }, { "name": "PartialFailed", @@ -878,11 +884,13 @@ }, { "name": "Failed", - "value": "Failed" + "value": "Failed", + "description": "Job has completed with all files failing, or a validation failure." }, { "name": "Canceled", - "value": "Canceled" + "value": "Canceled", + "description": "Job has been canceled after user request." } ] } diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/CreateJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/CreateJob.json index 3a15bd32b163..3c433a7d1f16 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/CreateJob.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/CreateJob.json @@ -47,7 +47,7 @@ }, "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" + "original-uri": "https://contoso.com/operationstatus" }, "body": { "name": "documents_smith_1", From 37474f8ee1d5b296e4094ab94a03392fcb0f82c9 Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Mon, 8 Jul 2024 22:37:32 -0700 Subject: [PATCH 08/19] Fixes formatting --- .../HealthDataAIServices.Deidentification/routes.tsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/routes.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/routes.tsp index a9b1b579d7fc..68b419188191 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/routes.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/routes.tsp @@ -48,7 +48,7 @@ op listJobFiles is DeidentifyOperations.ResourceList< Cancels a job that is in progress. The job will be marked as canceled and the service will stop processing the job. The service will not delete any files that have already been processed. - + If the job is already complete, this will have no effect. """) @action("cancel") From 3694f5bcef1fe3dbbf9bf904bf951d0e788bf7f7 Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Thu, 11 Jul 2024 15:25:42 -0700 Subject: [PATCH 09/19] Updates how StringIndices are handled --- .../CancelJob.json | 2 +- .../CreateJob.json | 2 +- .../2024-07-12-preview}/Deidentify.json | 16 ++- .../2024-07-12-preview}/DeleteJob.json | 2 +- .../GetJob.json | 2 +- .../2024-07-12-preview}/ListJobFiles.json | 2 +- .../ListJobs.json | 2 +- .../main.tsp | 3 +- .../models.tsp | 38 +++---- ...HealthDataAIServices.Deidentification.json | 98 ++++++------------- .../examples/CancelJob.json | 2 +- .../examples/CreateJob.json | 2 +- .../examples}/Deidentify.json | 16 ++- .../examples}/DeleteJob.json | 2 +- .../examples/GetJob.json | 2 +- .../examples}/ListJobFiles.json | 2 +- .../examples/ListJobs.json | 2 +- .../readme.md | 10 +- 18 files changed, 83 insertions(+), 122 deletions(-) rename specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/{2024-01-16-preview => 2024-07-12-preview}/CancelJob.json (96%) rename specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/{2024-01-16-preview => 2024-07-12-preview}/CreateJob.json (98%) rename specification/healthdataaiservices/{data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples => HealthDataAIServices.Deidentification/examples/2024-07-12-preview}/Deidentify.json (67%) rename specification/healthdataaiservices/{data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples => HealthDataAIServices.Deidentification/examples/2024-07-12-preview}/DeleteJob.json (85%) rename specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/{2024-01-16-preview => 2024-07-12-preview}/GetJob.json (96%) rename specification/healthdataaiservices/{data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples => HealthDataAIServices.Deidentification/examples/2024-07-12-preview}/ListJobFiles.json (96%) rename specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/{2024-01-16-preview => 2024-07-12-preview}/ListJobs.json (97%) rename specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/{2024-01-16-preview => 2024-07-12-preview}/HealthDataAIServices.Deidentification.json (94%) rename specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/{2024-01-16-preview => 2024-07-12-preview}/examples/CancelJob.json (96%) rename specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/{2024-01-16-preview => 2024-07-12-preview}/examples/CreateJob.json (98%) rename specification/healthdataaiservices/{HealthDataAIServices.Deidentification/examples/2024-01-16-preview => data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples}/Deidentify.json (67%) rename specification/healthdataaiservices/{HealthDataAIServices.Deidentification/examples/2024-01-16-preview => data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples}/DeleteJob.json (85%) rename specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/{2024-01-16-preview => 2024-07-12-preview}/examples/GetJob.json (96%) rename specification/healthdataaiservices/{HealthDataAIServices.Deidentification/examples/2024-01-16-preview => data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples}/ListJobFiles.json (96%) rename specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/{2024-01-16-preview => 2024-07-12-preview}/examples/ListJobs.json (97%) diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CancelJob.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CancelJob.json similarity index 96% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CancelJob.json rename to specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CancelJob.json index a051052a05b1..a3c9865d6e30 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CancelJob.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CancelJob.json @@ -2,7 +2,7 @@ "title": "Cancel a De-Identify Job", "operationId": "CancelJob", "parameters": { - "api-version": "2024-01-16-preview", + "api-version": "2024-07-12-preview", "name": "documents_smith_1", "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000" }, diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CreateJob.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CreateJob.json similarity index 98% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CreateJob.json rename to specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CreateJob.json index 3c433a7d1f16..f60752401eb9 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/CreateJob.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CreateJob.json @@ -2,7 +2,7 @@ "title": "Create a De-Identify Job", "operationId": "CreateJob", "parameters": { - "api-version": "2024-01-16-preview", + "api-version": "2024-07-12-preview", "name": "documents_smith_1", "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", "resource": { diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/Deidentify.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/Deidentify.json similarity index 67% rename from specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/Deidentify.json rename to specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/Deidentify.json index b973893f09f0..2b3130cc4a46 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/Deidentify.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/Deidentify.json @@ -2,12 +2,11 @@ "title": "Realtime Synchronous Deidentification.", "operationId": "Deidentify", "parameters": { - "api-version": "2024-01-16-preview", + "api-version": "2024-07-12-preview", "body": { "inputText": "Hello my name is John Smith.", "operation": "Redact", "dataType": "Plaintext", - "stringIndexType": "TextElement_v8", "redactionFormat": "[{type}]" } }, @@ -19,13 +18,20 @@ "entities": [ { "category": "Patient", - "offset": 17, - "length": 10, + "offset": { + "utf8": 17, + "utf16": 17, + "codePoint": 17 + }, + "length": { + "utf8": 10, + "utf16": 10, + "codePoint": 10 + }, "text": "John Smith", "confidenceScore": 0.83 } ], - "stringIndexType": "TextElement_v8", "etag": "0x000000000000000" } } diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/DeleteJob.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/DeleteJob.json similarity index 85% rename from specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/DeleteJob.json rename to specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/DeleteJob.json index 0f91d9fc3e6e..1f2367e2029a 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/DeleteJob.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/DeleteJob.json @@ -2,7 +2,7 @@ "title": "Delete a De-Identify Job", "operationId": "DeleteJob", "parameters": { - "api-version": "2024-01-16-preview", + "api-version": "2024-07-12-preview", "name": "documents_smith_1", "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000" }, diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/GetJob.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/GetJob.json similarity index 96% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/GetJob.json rename to specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/GetJob.json index 47e9fc3a7ccc..2d131848eb2a 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/GetJob.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/GetJob.json @@ -2,7 +2,7 @@ "title": "Get a De-Identify Job", "operationId": "GetJob", "parameters": { - "api-version": "2024-01-16-preview", + "api-version": "2024-07-12-preview", "name": "documents_smith_1", "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000" }, diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/ListJobFiles.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobFiles.json similarity index 96% rename from specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/ListJobFiles.json rename to specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobFiles.json index b3595c602077..f8e0de698e26 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/ListJobFiles.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobFiles.json @@ -2,7 +2,7 @@ "title": "List processed files within a Job", "operationId": "ListJobFiles", "parameters": { - "api-version": "2024-01-16-preview", + "api-version": "2024-07-12-preview", "name": "documents_smith_1", "maxpagesize": 10, "continuationToken": "K1JJRDpzOEtaQWZabUQrQUNBQUFBQUFBQUFBQT09I1JUOjEjVFJDOjEwI0ZQQzpBZ0VBQUFBTUFDUUFBQUFBQUE9PQ==", diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/ListJobs.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobs.json similarity index 97% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/ListJobs.json rename to specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobs.json index bcdad1d927da..966e980a5e22 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/ListJobs.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobs.json @@ -2,7 +2,7 @@ "title": "List De-Identify Jobs", "operationId": "ListJobs", "parameters": { - "api-version": "2024-01-16-preview", + "api-version": "2024-07-12-preview", "maxpagesize": 10, "continuationToken": "K1JJRDpzOEtaQWZabUQrQUNBQUFBQUFBQUFBQT09I1JUOjEjVFJDOjEwI0ZQQzpBZ0VBQUFBTUFDUUFBQUFBQUE9PQ==", "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000" diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp index 0f1a9f94e446..814787b75cf9 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp @@ -37,6 +37,7 @@ model AadToken @doc("The HealthDataAIServices.Deidentification service versions.") enum Versions { + @doc("Public preview release version.") @useDependency(Azure.Core.Versions.v1_0_Preview_2) - v2024_01_16_preview: "2024-01-16-preview", + v2024_07_12_preview: "2024-07-12-preview", } diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp index 6a51891d0c84..dbaabd10dfb9 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp @@ -197,21 +197,6 @@ union OperationType { string, } -// Source: Text Analytics -@doc("List of supported index encodings.") -union StringIndexType { - @doc("Iterates over graphemes as defined by the Unicode 8.0.0 standard.") - TextElement_v8: "TextElement_v8", - - @doc("Iterates over Unicode Code Points, the default scheme for Python 3.") - UnicodeCodePoint: "UnicodeCodePoint", - - @doc("Iterates over UTF-16 Code Units, the default scheme for JavaScript, Java, and .NET.") - Utf16CodeUnit: "Utf16CodeUnit", - - string, -} - @doc("Request for synchronous De-Identify operation.") model DeidentificationContent { @doc("Input text to deidentify.") @@ -224,11 +209,6 @@ model DeidentificationContent { @doc("Data type of the input.") dataType: DocumentDataType = DocumentDataType.Plaintext; - // This must be set as optional so it isn't included in sdk constructors. - // SDKs then overwrite it as internal with appropriate default value for that SDK. - @doc("Requested Encoding of the tag response indices.") - stringIndexType?: StringIndexType; - @maxLength(16) @doc("Format of the redacted output. Only valid when OperationType is Redact.") redactionFormat?: string; @@ -248,8 +228,6 @@ model PhiTaggerResult { @doc("List of entities detected in the input.") entities: Array; - @doc("Requested Encoding of the tag response indices.") - stringIndexType: StringIndexType = StringIndexType.TextElement_v8; @doc("Path to the file in the storage container.") @maxLength(1024) // Max length for Blob Name @@ -356,10 +334,10 @@ model PhiEntity { category: PhiCategory; @doc("Starting index of the location from within the input text.") - offset: int32; + offset: StringIndex; @doc("Length of the input text.") - length: int32; + length: StringIndex; @doc("Text of the entity.") text?: string; @@ -376,3 +354,15 @@ model PaginationByTokenQueryParameters { @doc("Token to continue a previous query.") continuationToken?: string; } + +@doc("String Index encoding model.") +model StringIndex{ + @doc("The offset or length of the substring in UTF-8 encoding") + utf8: int32; + + @doc("The offset or length of the substring in UTF-16 encoding") + utf16: int32; + + @doc("The offset or length of the substring in CodePoint encoding") + codePoint: int32; +} \ No newline at end of file diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/HealthDataAIServices.Deidentification.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/HealthDataAIServices.Deidentification.json similarity index 94% rename from specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/HealthDataAIServices.Deidentification.json rename to specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/HealthDataAIServices.Deidentification.json index b72929faf257..8370fc2e4f9a 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/HealthDataAIServices.Deidentification.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/HealthDataAIServices.Deidentification.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "HealthDataAIServices.Deidentification Service", - "version": "2024-01-16-preview", + "version": "2024-07-12-preview", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" @@ -645,10 +645,6 @@ ] } }, - "stringIndexType": { - "$ref": "#/definitions/StringIndexType", - "description": "Requested Encoding of the tag response indices." - }, "redactionFormat": { "type": "string", "description": "Format of the redacted output. Only valid when OperationType is Redact.", @@ -1171,13 +1167,11 @@ "description": "Phi Category of the entity." }, "offset": { - "type": "integer", - "format": "int32", + "$ref": "#/definitions/StringIndex", "description": "Starting index of the location from within the input text." }, "length": { - "type": "integer", - "format": "int32", + "$ref": "#/definitions/StringIndex", "description": "Length of the input text." }, "text": { @@ -1208,37 +1202,6 @@ }, "x-ms-identifiers": [] }, - "stringIndexType": { - "type": "string", - "description": "Requested Encoding of the tag response indices.", - "default": "TextElement_v8", - "enum": [ - "TextElement_v8", - "UnicodeCodePoint", - "Utf16CodeUnit" - ], - "x-ms-enum": { - "name": "StringIndexType", - "modelAsString": true, - "values": [ - { - "name": "TextElement_v8", - "value": "TextElement_v8", - "description": "Iterates over graphemes as defined by the Unicode 8.0.0 standard." - }, - { - "name": "UnicodeCodePoint", - "value": "UnicodeCodePoint", - "description": "Iterates over Unicode Code Points, the default scheme for Python 3." - }, - { - "name": "Utf16CodeUnit", - "value": "Utf16CodeUnit", - "description": "Iterates over UTF-16 Code Units, the default scheme for JavaScript, Java, and .NET." - } - ] - } - }, "path": { "type": "string", "description": "Path to the file in the storage container.", @@ -1252,7 +1215,6 @@ }, "required": [ "entities", - "stringIndexType", "etag" ] }, @@ -1289,35 +1251,31 @@ "extensions" ] }, - "StringIndexType": { - "type": "string", - "description": "List of supported index encodings.", - "enum": [ - "TextElement_v8", - "UnicodeCodePoint", - "Utf16CodeUnit" - ], - "x-ms-enum": { - "name": "StringIndexType", - "modelAsString": true, - "values": [ - { - "name": "TextElement_v8", - "value": "TextElement_v8", - "description": "Iterates over graphemes as defined by the Unicode 8.0.0 standard." - }, - { - "name": "UnicodeCodePoint", - "value": "UnicodeCodePoint", - "description": "Iterates over Unicode Code Points, the default scheme for Python 3." - }, - { - "name": "Utf16CodeUnit", - "value": "Utf16CodeUnit", - "description": "Iterates over UTF-16 Code Units, the default scheme for JavaScript, Java, and .NET." - } - ] - } + "StringIndex": { + "type": "object", + "description": "String Index encoding model.", + "properties": { + "utf8": { + "type": "integer", + "format": "int32", + "description": "The offset or length of the substring in UTF-8 encoding" + }, + "utf16": { + "type": "integer", + "format": "int32", + "description": "The offset or length of the substring in UTF-16 encoding" + }, + "codePoint": { + "type": "integer", + "format": "int32", + "description": "The offset or length of the substring in CodePoint encoding" + } + }, + "required": [ + "utf8", + "utf16", + "codePoint" + ] }, "TargetStorageLocation": { "type": "object", diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/CancelJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CancelJob.json similarity index 96% rename from specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/CancelJob.json rename to specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CancelJob.json index a051052a05b1..a3c9865d6e30 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/CancelJob.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CancelJob.json @@ -2,7 +2,7 @@ "title": "Cancel a De-Identify Job", "operationId": "CancelJob", "parameters": { - "api-version": "2024-01-16-preview", + "api-version": "2024-07-12-preview", "name": "documents_smith_1", "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000" }, diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/CreateJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CreateJob.json similarity index 98% rename from specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/CreateJob.json rename to specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CreateJob.json index 3c433a7d1f16..f60752401eb9 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/CreateJob.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CreateJob.json @@ -2,7 +2,7 @@ "title": "Create a De-Identify Job", "operationId": "CreateJob", "parameters": { - "api-version": "2024-01-16-preview", + "api-version": "2024-07-12-preview", "name": "documents_smith_1", "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", "resource": { diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/Deidentify.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/Deidentify.json similarity index 67% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/Deidentify.json rename to specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/Deidentify.json index b973893f09f0..2b3130cc4a46 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/Deidentify.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/Deidentify.json @@ -2,12 +2,11 @@ "title": "Realtime Synchronous Deidentification.", "operationId": "Deidentify", "parameters": { - "api-version": "2024-01-16-preview", + "api-version": "2024-07-12-preview", "body": { "inputText": "Hello my name is John Smith.", "operation": "Redact", "dataType": "Plaintext", - "stringIndexType": "TextElement_v8", "redactionFormat": "[{type}]" } }, @@ -19,13 +18,20 @@ "entities": [ { "category": "Patient", - "offset": 17, - "length": 10, + "offset": { + "utf8": 17, + "utf16": 17, + "codePoint": 17 + }, + "length": { + "utf8": 10, + "utf16": 10, + "codePoint": 10 + }, "text": "John Smith", "confidenceScore": 0.83 } ], - "stringIndexType": "TextElement_v8", "etag": "0x000000000000000" } } diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/DeleteJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/DeleteJob.json similarity index 85% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/DeleteJob.json rename to specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/DeleteJob.json index 0f91d9fc3e6e..1f2367e2029a 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/DeleteJob.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/DeleteJob.json @@ -2,7 +2,7 @@ "title": "Delete a De-Identify Job", "operationId": "DeleteJob", "parameters": { - "api-version": "2024-01-16-preview", + "api-version": "2024-07-12-preview", "name": "documents_smith_1", "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000" }, diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/GetJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/GetJob.json similarity index 96% rename from specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/GetJob.json rename to specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/GetJob.json index 47e9fc3a7ccc..2d131848eb2a 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/GetJob.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/GetJob.json @@ -2,7 +2,7 @@ "title": "Get a De-Identify Job", "operationId": "GetJob", "parameters": { - "api-version": "2024-01-16-preview", + "api-version": "2024-07-12-preview", "name": "documents_smith_1", "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000" }, diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/ListJobFiles.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/ListJobFiles.json similarity index 96% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/ListJobFiles.json rename to specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/ListJobFiles.json index b3595c602077..f8e0de698e26 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-01-16-preview/ListJobFiles.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/ListJobFiles.json @@ -2,7 +2,7 @@ "title": "List processed files within a Job", "operationId": "ListJobFiles", "parameters": { - "api-version": "2024-01-16-preview", + "api-version": "2024-07-12-preview", "name": "documents_smith_1", "maxpagesize": 10, "continuationToken": "K1JJRDpzOEtaQWZabUQrQUNBQUFBQUFBQUFBQT09I1JUOjEjVFJDOjEwI0ZQQzpBZ0VBQUFBTUFDUUFBQUFBQUE9PQ==", diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/ListJobs.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/ListJobs.json similarity index 97% rename from specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/ListJobs.json rename to specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/ListJobs.json index bcdad1d927da..966e980a5e22 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-01-16-preview/examples/ListJobs.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/ListJobs.json @@ -2,7 +2,7 @@ "title": "List De-Identify Jobs", "operationId": "ListJobs", "parameters": { - "api-version": "2024-01-16-preview", + "api-version": "2024-07-12-preview", "maxpagesize": 10, "continuationToken": "K1JJRDpzOEtaQWZabUQrQUNBQUFBQUFBQUFBQT09I1JUOjEjVFJDOjEwI0ZQQzpBZ0VBQUFBTUFDUUFBQUFBQUE9PQ==", "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000" diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/readme.md b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/readme.md index 6adecdbfc540..c84e6d008e57 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/readme.md +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/readme.md @@ -26,20 +26,20 @@ These are the global settings for the HealthDataAIServices.Deidentification. ```yaml openapi-type: data-plane -tag: package-2024-01-16-preview +tag: package-2024-07-12-preview title: Health Deidentification Service security: AADToken security-scopes: - "https://deid.azure.com/.default" ``` -### Tag: package-2024-01-16-preview +### Tag: package-2024-07-12-preview -These settings apply only when `--tag=package-2024-01-16-preview` is specified on the command line. +These settings apply only when `--tag=package-2024-07-12-preview` is specified on the command line. -```yaml $(tag) == 'package-2024-01-16-preview' +```yaml $(tag) == 'package-2024-07-12-preview' input-file: - - preview/2024-01-16-preview/HealthDataAIServices.Deidentification.json + - preview/2024-07-12-preview/HealthDataAIServices.Deidentification.json ``` --- From 21470035415677cfaca866bf85177104cbdf2829 Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Thu, 11 Jul 2024 16:10:25 -0700 Subject: [PATCH 10/19] Update docstring to contain languages --- .../HealthDataAIServices.Deidentification/models.tsp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp index dbaabd10dfb9..66b9c79c3fdd 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp @@ -360,9 +360,17 @@ model StringIndex{ @doc("The offset or length of the substring in UTF-8 encoding") utf8: int32; - @doc("The offset or length of the substring in UTF-16 encoding") + @doc(""" + The offset or length of the substring in UTF-16 encoding. + + Used in .NET, Java, and JavaScript. + """) utf16: int32; - @doc("The offset or length of the substring in CodePoint encoding") + @doc(""" + The offset or length of the substring in UTF-16 encoding. + + Used in Python. + """) codePoint: int32; } \ No newline at end of file From ffbc1efa2a65d6930c6bb31551a070e1d00eba42 Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Fri, 12 Jul 2024 17:18:51 -0700 Subject: [PATCH 11/19] Makes etag optional for PhiTaggerResult on realtime requests --- .../HealthDataAIServices.Deidentification/models.tsp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp index 66b9c79c3fdd..4be8af9bec90 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp @@ -233,7 +233,11 @@ model PhiTaggerResult { @maxLength(1024) // Max length for Blob Name path?: string; - ...EtagProperty; + // Source: ...EtagProperty; + // Needs to be optional + @visibility("read") + @doc("The entity tag for this resource.") + etag?: eTag; } @doc("List of PHI Entities.") From 4f8962b656c5ea906efbd36a4027c64669d246f3 Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Fri, 12 Jul 2024 17:21:14 -0700 Subject: [PATCH 12/19] Removes redundant read decorator on etag --- .../HealthDataAIServices.Deidentification/models.tsp | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp index 4be8af9bec90..0a3b8cf82acb 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp @@ -235,7 +235,6 @@ model PhiTaggerResult { // Source: ...EtagProperty; // Needs to be optional - @visibility("read") @doc("The entity tag for this resource.") etag?: eTag; } From d83df7d8c83473320ceb32d55e7cd66859843d4f Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Mon, 15 Jul 2024 10:41:25 -0700 Subject: [PATCH 13/19] Regenerates with new docs --- .../HealthDataAIServices.Deidentification.json | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/HealthDataAIServices.Deidentification.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/HealthDataAIServices.Deidentification.json index 8370fc2e4f9a..513f372aad9c 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/HealthDataAIServices.Deidentification.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/HealthDataAIServices.Deidentification.json @@ -1209,13 +1209,11 @@ }, "etag": { "$ref": "#/definitions/Azure.Core.eTag", - "description": "The entity tag for this resource.", - "readOnly": true + "description": "The entity tag for this resource." } }, "required": [ - "entities", - "etag" + "entities" ] }, "SourceStorageLocation": { @@ -1263,12 +1261,12 @@ "utf16": { "type": "integer", "format": "int32", - "description": "The offset or length of the substring in UTF-16 encoding" + "description": "The offset or length of the substring in UTF-16 encoding.\n\nUsed in .NET, Java, and JavaScript." }, "codePoint": { "type": "integer", "format": "int32", - "description": "The offset or length of the substring in CodePoint encoding" + "description": "The offset or length of the substring in UTF-16 encoding.\n\nUsed in Python." } }, "required": [ From 5604271c7fc40992399df57ff7374a7b7f3dba8e Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Mon, 15 Jul 2024 13:03:43 -0700 Subject: [PATCH 14/19] Fixes formatting --- .../models.tsp | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp index 0a3b8cf82acb..9173210351ae 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp @@ -228,7 +228,6 @@ model PhiTaggerResult { @doc("List of entities detected in the input.") entities: Array; - @doc("Path to the file in the storage container.") @maxLength(1024) // Max length for Blob Name path?: string; @@ -359,21 +358,21 @@ model PaginationByTokenQueryParameters { } @doc("String Index encoding model.") -model StringIndex{ +model StringIndex { @doc("The offset or length of the substring in UTF-8 encoding") utf8: int32; @doc(""" - The offset or length of the substring in UTF-16 encoding. - - Used in .NET, Java, and JavaScript. - """) + The offset or length of the substring in UTF-16 encoding. + + Used in .NET, Java, and JavaScript. + """) utf16: int32; @doc(""" - The offset or length of the substring in UTF-16 encoding. - - Used in Python. - """) + The offset or length of the substring in UTF-16 encoding. + + Used in Python. + """) codePoint: int32; -} \ No newline at end of file +} From c4a3e67364ad45d6e56e9c70a043df343ff4d914 Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Mon, 15 Jul 2024 13:20:36 -0700 Subject: [PATCH 15/19] Removes @secret on location --- .../examples/2024-07-12-preview/CancelJob.json | 1 + .../examples/2024-07-12-preview/CreateJob.json | 2 ++ .../examples/2024-07-12-preview/GetJob.json | 1 + .../examples/2024-07-12-preview/ListJobs.json | 1 + .../HealthDataAIServices.Deidentification/models.tsp | 1 - .../HealthDataAIServices.Deidentification.json | 5 ++--- .../preview/2024-07-12-preview/examples/CancelJob.json | 1 + .../preview/2024-07-12-preview/examples/CreateJob.json | 2 ++ .../preview/2024-07-12-preview/examples/GetJob.json | 1 + .../preview/2024-07-12-preview/examples/ListJobs.json | 1 + 10 files changed, 12 insertions(+), 4 deletions(-) diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CancelJob.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CancelJob.json index a3c9865d6e30..d0bd8c5c3705 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CancelJob.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CancelJob.json @@ -18,6 +18,7 @@ ] }, "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", diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CreateJob.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CreateJob.json index f60752401eb9..9915316788bd 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CreateJob.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CreateJob.json @@ -35,6 +35,7 @@ ] }, "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", @@ -59,6 +60,7 @@ ] }, "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", diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/GetJob.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/GetJob.json index 2d131848eb2a..519ad06c3c31 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/GetJob.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/GetJob.json @@ -18,6 +18,7 @@ ] }, "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", diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobs.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobs.json index 966e980a5e22..b0a99b2d3cce 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobs.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobs.json @@ -21,6 +21,7 @@ ] }, "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", diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp index 9173210351ae..11400b4f523d 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp @@ -166,7 +166,6 @@ model SourceStorageLocation { @doc("Storage location.") model TargetStorageLocation { @doc("URL to storage location. Must be a valid Azure Storage SAS URI.") - @secret location: url; @doc("Prefix to filter blobs by.") diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/HealthDataAIServices.Deidentification.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/HealthDataAIServices.Deidentification.json index 513f372aad9c..ef3be9ea8fd9 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/HealthDataAIServices.Deidentification.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/HealthDataAIServices.Deidentification.json @@ -1281,9 +1281,8 @@ "properties": { "location": { "type": "string", - "format": "password", - "description": "URL to storage location. Must be a valid Azure Storage SAS URI.", - "x-ms-secret": true + "format": "uri", + "description": "URL to storage location. Must be a valid Azure Storage SAS URI." }, "prefix": { "type": "string", diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CancelJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CancelJob.json index a3c9865d6e30..d0bd8c5c3705 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CancelJob.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CancelJob.json @@ -18,6 +18,7 @@ ] }, "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", diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CreateJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CreateJob.json index f60752401eb9..9915316788bd 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CreateJob.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CreateJob.json @@ -35,6 +35,7 @@ ] }, "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", @@ -59,6 +60,7 @@ ] }, "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", diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/GetJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/GetJob.json index 2d131848eb2a..519ad06c3c31 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/GetJob.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/GetJob.json @@ -18,6 +18,7 @@ ] }, "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", diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/ListJobs.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/ListJobs.json index 966e980a5e22..b0a99b2d3cce 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/ListJobs.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/ListJobs.json @@ -21,6 +21,7 @@ ] }, "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", From e9da6b648bc1e404e9e5308c570cd050738bcb71 Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Mon, 15 Jul 2024 15:49:24 -0700 Subject: [PATCH 16/19] Team review updates --- .../2024-07-12-preview/CancelJob.json | 4 +- .../2024-07-12-preview/CreateJob.json | 10 +- .../2024-07-12-preview/Deidentify.json | 2 +- .../2024-07-12-preview/DeleteJob.json | 2 +- .../examples/2024-07-12-preview/GetJob.json | 4 +- ...istJobFiles.json => ListJobDocuments.json} | 4 +- .../examples/2024-07-12-preview/ListJobs.json | 4 +- .../main.tsp | 13 +- .../models.tsp | 160 +++++++------- .../routes.tsp | 26 +-- .../HealthDataAIServices.DeidServices.json} | 199 +++++++++--------- .../examples/CancelJob.json | 4 +- .../examples/CreateJob.json | 10 +- .../examples/Deidentify.json | 2 +- .../examples/DeleteJob.json | 2 +- .../2024-07-12-preview/examples/GetJob.json | 4 +- .../examples/ListJobDocuments.json} | 4 +- .../2024-07-12-preview/examples/ListJobs.json | 4 +- 18 files changed, 230 insertions(+), 228 deletions(-) rename specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/{ListJobFiles.json => ListJobDocuments.json} (92%) rename specification/healthdataaiservices/data-plane/{HealthDataAIServices.Deidentification/preview/2024-07-12-preview/HealthDataAIServices.Deidentification.json => HealthDataAIServices.DeidServices/preview/2024-07-12-preview/HealthDataAIServices.DeidServices.json} (89%) rename specification/healthdataaiservices/data-plane/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/preview/2024-07-12-preview/examples/CancelJob.json (96%) rename specification/healthdataaiservices/data-plane/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/preview/2024-07-12-preview/examples/CreateJob.json (90%) rename specification/healthdataaiservices/data-plane/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/preview/2024-07-12-preview/examples/Deidentify.json (94%) rename specification/healthdataaiservices/data-plane/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/preview/2024-07-12-preview/examples/DeleteJob.json (83%) rename specification/healthdataaiservices/data-plane/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/preview/2024-07-12-preview/examples/GetJob.json (96%) rename specification/healthdataaiservices/data-plane/{HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/ListJobFiles.json => HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/ListJobDocuments.json} (92%) rename specification/healthdataaiservices/data-plane/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/preview/2024-07-12-preview/examples/ListJobs.json (97%) diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CancelJob.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CancelJob.json index d0bd8c5c3705..c70063471c24 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CancelJob.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CancelJob.json @@ -1,5 +1,5 @@ { - "title": "Cancel a De-Identify Job", + "title": "Cancel a de-identification job.", "operationId": "CancelJob", "parameters": { "api-version": "2024-07-12-preview", @@ -25,9 +25,9 @@ "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", - "lastUpdatedAt": "2024-01-26T01:15:00.009Z", "summary": { "successful": 10, "failed": 0, diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CreateJob.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CreateJob.json index 9915316788bd..87689147cfcf 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CreateJob.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CreateJob.json @@ -1,5 +1,5 @@ { - "title": "Create a De-Identify Job", + "title": "Create a de-identification job.", "operationId": "CreateJob", "parameters": { "api-version": "2024-07-12-preview", @@ -42,8 +42,8 @@ "dataType": "Plaintext", "redactionFormat": "[{type}]", "status": "NotStarted", - "createdAt": "2024-01-25T23:27:43.009Z", - "lastUpdatedAt": "2024-01-26T01:15:00.009Z" + "lastUpdatedAt": "2024-01-26T01:15:00.009Z", + "createdAt": "2024-01-25T23:27:43.009Z" } }, "201": { @@ -67,8 +67,8 @@ "dataType": "Plaintext", "redactionFormat": "[{type}]", "status": "NotStarted", - "createdAt": "2024-01-25T23:27:43.009Z", - "lastUpdatedAt": "2024-01-26T01:15:00.009Z" + "lastUpdatedAt": "2024-01-26T01:15:00.009Z", + "createdAt": "2024-01-25T23:27:43.009Z" } } } diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/Deidentify.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/Deidentify.json index 2b3130cc4a46..e2021314bf20 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/Deidentify.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/Deidentify.json @@ -1,5 +1,5 @@ { - "title": "Realtime Synchronous Deidentification.", + "title": "De-identify text.", "operationId": "Deidentify", "parameters": { "api-version": "2024-07-12-preview", diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/DeleteJob.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/DeleteJob.json index 1f2367e2029a..9b49028db92a 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/DeleteJob.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/DeleteJob.json @@ -1,5 +1,5 @@ { - "title": "Delete a De-Identify Job", + "title": "Delete a de-identification job.", "operationId": "DeleteJob", "parameters": { "api-version": "2024-07-12-preview", diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/GetJob.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/GetJob.json index 519ad06c3c31..41496ff69046 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/GetJob.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/GetJob.json @@ -1,5 +1,5 @@ { - "title": "Get a De-Identify Job", + "title": "Get a de-identification job.", "operationId": "GetJob", "parameters": { "api-version": "2024-07-12-preview", @@ -25,9 +25,9 @@ "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", - "lastUpdatedAt": "2024-01-26T01:15:00.009Z", "summary": { "successful": 10, "failed": 0, diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobFiles.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobDocuments.json similarity index 92% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobFiles.json rename to specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobDocuments.json index f8e0de698e26..372911afab67 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobFiles.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobDocuments.json @@ -1,6 +1,6 @@ { - "title": "List processed files within a Job", - "operationId": "ListJobFiles", + "title": "List processed documents within a job.", + "operationId": "ListJobDocuments", "parameters": { "api-version": "2024-07-12-preview", "name": "documents_smith_1", diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobs.json b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobs.json index b0a99b2d3cce..43061dc58040 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobs.json +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobs.json @@ -1,5 +1,5 @@ { - "title": "List De-Identify Jobs", + "title": "List de-identification jobs.", "operationId": "ListJobs", "parameters": { "api-version": "2024-07-12-preview", @@ -28,9 +28,9 @@ "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", - "lastUpdatedAt": "2024-01-26T01:15:00.009Z", "summary": { "successful": 10, "failed": 0, diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp index 814787b75cf9..8a77f88ed379 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp @@ -9,20 +9,21 @@ using TypeSpec.Versioning; using Azure.Core; using Azure.Core.Traits; +// Official Name: Azure Health Data Services de-identification service @useAuth(AadToken) @service({ - title: "HealthDataAIServices.Deidentification Service", + title: "Azure Health Data Services de-identification service", }) @server( "https://{endpoint}", - "Azure Health Deidentification Service", + "De-identification Service service endpoint", { - @doc("Url of your Deid Service.") + @doc("Url of your De-identification Service.") endpoint: string, } ) -@versioned(HealthDataAIServices.Deidentification.Versions) -namespace HealthDataAIServices.Deidentification; +@versioned(HealthDataAIServices.DeidServices.Versions) +namespace HealthDataAIServices.DeidServices; @doc("The Azure Active Directory OAuth2 Flow") model AadToken @@ -35,7 +36,7 @@ model AadToken } ]>; -@doc("The HealthDataAIServices.Deidentification service versions.") +@doc("Azure Health Data Services de-identification service versions.") enum Versions { @doc("Public preview release version.") @useDependency(Azure.Core.Versions.v1_0_Preview_2) diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp index 11400b4f523d..7f850db0fc0a 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp @@ -6,9 +6,9 @@ using TypeSpec.Rest; using Azure.Core; #suppress "@azure-tools/typespec-azure-core/casing-style" "AI Casing style to match OpenAI" -namespace HealthDataAIServices.Deidentification; +namespace HealthDataAIServices.DeidServices; -@doc("A job containing a batch of documents to deidentify.") +@doc("A job containing a batch of documents to de-identify.") @resource("jobs") model DeidentificationJob { @key @@ -47,14 +47,6 @@ model DeidentificationJob { @visibility("read") error?: Azure.Core.Foundations.Error; - @doc("Date and time when the job was created.") - @visibility("read") - createdAt: utcDateTime; - - @doc("Date and time when the job was started.") - @visibility("read") - startedAt?: utcDateTime; - @doc(""" Date and time when the job was completed. @@ -63,56 +55,33 @@ model DeidentificationJob { If the job failed, this is the time when the job failed. """) @visibility("read") - lastUpdatedAt?: utcDateTime; + lastUpdatedAt: utcDateTime; - @doc("Summary of a job. Exists only when the job is completed.") + @doc("Date and time when the job was created.") @visibility("read") - summary?: JobSummary; -} + createdAt: utcDateTime; -@doc("File report once job has completed.") -@resource("files") -@parentResource(DeidentificationJob) -model HealthFileDetails { - @key - @doc("Id of the file report.") + @doc("Date and time when the job was started.") @visibility("read") - id: string; - - @doc("File Location for the input.") - input: FileLocation; - - @doc("File Location for the output.") - output?: FileLocation; - - @doc("Status of the file.") - status: Azure.Core.Foundations.OperationState; - - @doc("Error when file fails.") - error?: Azure.Core.Foundations.Error; -} - -@doc("Location of a file.") -model FileLocation { - @doc("Absolute path to the file in storage.") - @maxLength(1024) - path: string; + startedAt?: utcDateTime; - ...EtagProperty; + @doc("Summary of a job. Exists only when the job is completed.") + @visibility("read") + summary?: JobSummary; } -@doc("Summary metrics the documents pertaining to a job.") +@doc("Summary metrics of a job.") model JobSummary { - @doc("Number of blobs that have completed.") + @doc("Number of documents that have completed.") successful: int32; - @doc("Number of blobs that have failed.") + @doc("Number of documents that have failed.") failed: int32; - @doc("Number of blobs that have been canceled.") + @doc("Number of documents that have been canceled.") canceled: int32; - @doc("Number of blobs total.") + @doc("Number of documents total.") total: int32; @doc("Number of bytes processed.") @@ -130,15 +99,15 @@ union JobStatus { Running: "Running", @lroSucceeded - @doc("Job has completed successfully. All files have succeeded.") + @doc("Job has completed successfully. All documents have succeeded.") Succeeded: "Succeeded", @lroFailed - @doc("Job has completed with at least 1 file failing.") + @doc("Job has completed with at least a single document failing.") PartialFailed: "PartialFailed", @lroFailed - @doc("Job has completed with all files failing, or a validation failure.") + @doc("Job has completed with all documents failing, or a validation failure.") Failed: "Failed", @lroCanceled @@ -150,30 +119,61 @@ union JobStatus { @doc("Storage location.") model SourceStorageLocation { - @doc("URL to storage location. Must be a valid Azure Storage SAS URI.") + @doc("URL to storage location.") location: url; - @doc("Prefix to filter blobs by.") + @doc("Prefix to filter path by.") @minLength(1) @maxLength(1024) prefix: string; - @doc("List of extensions to filter blobs by.") + @doc("List of extensions to filter path by.") @minItems(1) extensions: Array = #["*"]; } @doc("Storage location.") model TargetStorageLocation { - @doc("URL to storage location. Must be a valid Azure Storage SAS URI.") + @doc("URL to storage location.") location: url; - @doc("Prefix to filter blobs by.") + @doc("Prefix to filter path by.") @minLength(1) @maxLength(1024) prefix: string; } +@doc("Details of a single document in a job.") +@resource("documents") +@parentResource(DeidentificationJob) +model DocumentDetails { + @key + @doc("Id of the document details.") + @visibility("read") + id: string; + + @doc("Location for the input.") + input: DocumentLocation; + + @doc("Location for the output.") + output?: DocumentLocation; + + @doc("Status of the document.") + status: Azure.Core.Foundations.OperationState; + + @doc("Error when document fails.") + error?: Azure.Core.Foundations.Error; +} + +@doc("Location of a document.") +model DocumentLocation { + @doc("Path of document in storage.") + @maxLength(1024) + path: string; + + ...EtagProperty; +} + @doc("Enum of supported Data Types.") union DocumentDataType { @doc("Plain text data type.") @@ -196,9 +196,9 @@ union OperationType { string, } -@doc("Request for synchronous De-Identify operation.") +@doc("Request body for de-identification operation.") model DeidentificationContent { - @doc("Input text to deidentify.") + @doc("Input text to de-identify.") @maxLength(100000) // 100KB inputText: string; @@ -209,26 +209,26 @@ model DeidentificationContent { dataType: DocumentDataType = DocumentDataType.Plaintext; @maxLength(16) - @doc("Format of the redacted output. Only valid when OperationType is Redact.") + @doc("Format of the redacted output. Only valid when OperationType is \"Redact\".") redactionFormat?: string; } -@doc("Response for synchronous De-Identify operation.") +@doc("Response body for de-identification operation.") model DeidentificationResult { - @doc("Output text after de-identifying. Not available for Tag Operation.") + @doc("Output text after de-identification. Not available for \"Tag\" operation.") outputText?: string; - @doc("Result of the tag operation. Only available for Tag Operation.") + @doc("Result of the \"Tag\" operation. Only available for \"Tag\" Operation.") taggerResult?: PhiTaggerResult; } -@doc("Result of the tag operation.") +@doc("Result of the \"Tag\" operation.") model PhiTaggerResult { @doc("List of entities detected in the input.") entities: Array; - @doc("Path to the file in the storage container.") - @maxLength(1024) // Max length for Blob Name + @doc("Path to the document in storage.") + @maxLength(1024) // Max length for path Name path?: string; // Source: ...EtagProperty; @@ -248,7 +248,7 @@ union PhiCategory { @doc("Age.") Age: "Age", - @doc("Biological Identifier, such as a fingerprint or retinal scan") + @doc("Biological Identifier, such as a fingerprint or retinal scan.") BioID: "BioID", @doc("City.") @@ -278,22 +278,22 @@ union PhiCategory { @doc("Hospital Name.") Hospital: "Hospital", - @doc("Id Numbers. Such as a passport number.") + @doc("Id Number, eg. passport number.") IDNum: "IDNum", @doc("IP Address.") IPAddress: "IPAddress", - @doc("License. Such as a driver's license or medical license") + @doc("License, eg. Driver's license or medical license.") License: "License", - @doc("Location Other. Such as Golden Gate Park.") + @doc("Location Other, eg. Golden Gate Park.") LocationOther: "LocationOther", @doc("Medical Record Number.") MedicalRecord: "MedicalRecord", - @doc("Organization. Such as a company name") + @doc("Organization, eg. Microsoft.") Organization: "Organization", @doc("Patient Name.") @@ -305,10 +305,10 @@ union PhiCategory { @doc("Profession.") Profession: "Profession", - @doc("Social Security Numbers in the US.") + @doc("Social Security Number.") SocialSecurity: "SocialSecurity", - @doc("State") + @doc("State.") State: "State", @doc("Street.") @@ -317,10 +317,10 @@ union PhiCategory { @doc("Web URL.") Url: "Url", - @doc("Usernames, such as a social media handle") + @doc("Usernames, eg. a social media handle.") Username: "Username", - @doc("Vehicle IDs, such as license plates or VIN numbers") + @doc("Vehicle IDs, eg. license plate or VIN number.") Vehicle: "Vehicle", @doc("Zip Code.") @@ -329,9 +329,9 @@ union PhiCategory { string, } -@doc("Phi Entity tag in the input.") +@doc("PHI Entity tag in the input.") model PhiEntity { - @doc("Phi Category of the entity.") + @doc("PHI Category of the entity.") category: PhiCategory; @doc("Starting index of the location from within the input text.") @@ -343,11 +343,11 @@ model PhiEntity { @doc("Text of the entity.") text?: string; - @doc("Confidence score of the text/type pairing.") + @doc("Confidence score of the category match.") confidenceScore?: float64; } -@doc("Query parameters for listing jobs.") +@doc("Query parameters for list operation.") model PaginationByTokenQueryParameters { ...MaxPageSizeQueryParameter; @@ -356,7 +356,7 @@ model PaginationByTokenQueryParameters { continuationToken?: string; } -@doc("String Index encoding model.") +@doc("String index encoding model.") model StringIndex { @doc("The offset or length of the substring in UTF-8 encoding") utf8: int32; @@ -364,14 +364,14 @@ model StringIndex { @doc(""" The offset or length of the substring in UTF-16 encoding. - Used in .NET, Java, and JavaScript. + Primary encoding used by .NET, Java, and JavaScript. """) utf16: int32; @doc(""" - The offset or length of the substring in UTF-16 encoding. + The offset or length of the substring in CodePoint encoding. - Used in Python. + Primary encoding used by Python. """) codePoint: int32; } diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/routes.tsp b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/routes.tsp index 68b419188191..03ea857b167a 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/routes.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.Deidentification/routes.tsp @@ -10,7 +10,7 @@ using Azure.Core; using Azure.Core.Traits; #suppress "@azure-tools/typespec-azure-core/casing-style" "AI Casing style to match OpenAI" -namespace HealthDataAIServices.Deidentification; +namespace HealthDataAIServices.DeidServices; alias ServiceTraits = NoRepeatableRequests & NoConditionalRequests & @@ -23,31 +23,31 @@ alias DeidentifyOperations = ResourceOperations< // Text-Deidentification Operations -@summary("Create a De-Identify Job") +@summary("Create a de-identification job.") @pollingOperation(getJob) op createJob is DeidentifyOperations.LongRunningResourceCreateOrReplace; -@summary("Get a De-Identify Job") +@summary("Get a de-identification job.") op getJob is DeidentifyOperations.ResourceRead; -@summary("List De-Identify Jobs") +@summary("List de-identification jobs.") op listJobs is DeidentifyOperations.ResourceList< DeidentificationJob, ListQueryParametersTrait >; -@summary("List processed files within a Job") -op listJobFiles is DeidentifyOperations.ResourceList< - HealthFileDetails, +@summary("List processed documents within a job.") +op listJobDocuments is DeidentifyOperations.ResourceList< + DocumentDetails, ListQueryParametersTrait >; #suppress "@azure-tools/typespec-azure-core/no-explicit-routes-resource-ops" "" -@summary("Cancel a De-Identify Job") +@summary("Cancel a de-identification job.") @doc(""" Cancels a job that is in progress. - The job will be marked as canceled and the service will stop processing the job. The service will not delete any files that have already been processed. + The job will be marked as canceled and the service will stop processing the job. The service will not delete any documents that have already been processed. If the job is already complete, this will have no effect. """) @@ -58,16 +58,16 @@ op cancelJob is DeidentifyOperations.ResourceAction< DeidentificationJob >; -@summary("Delete a De-Identify Job") -@doc("Removes the record of the job from the service. Does not delete any files.") +@summary("Delete a de-identification job.") +@doc("Removes the record of the job from the service. Does not delete any documents.") op deleteJob is DeidentifyOperations.ResourceDelete; -@summary("Realtime Synchronous Deidentification.") +@summary("De-identify text.") @route("/deid") @post op deidentify is Azure.Core.RpcOperation< { - @doc("The request body for realtime deidentification.") + @doc("Request body for de-identification operation.") @body body: DeidentificationContent; }, diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/HealthDataAIServices.Deidentification.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/HealthDataAIServices.DeidServices.json similarity index 89% rename from specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/HealthDataAIServices.Deidentification.json rename to specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/HealthDataAIServices.DeidServices.json index ef3be9ea8fd9..a7e9726e7931 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/HealthDataAIServices.Deidentification.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/HealthDataAIServices.DeidServices.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "HealthDataAIServices.Deidentification Service", + "title": "Azure Health Data Services de-identification service", "version": "2024-07-12-preview", "x-typespec-generated": [ { @@ -19,7 +19,7 @@ { "name": "endpoint", "in": "path", - "description": "Url of your Deid Service.", + "description": "Url of your De-identification Service.", "required": true, "type": "string" } @@ -55,7 +55,7 @@ "/deid": { "post": { "operationId": "Deidentify", - "summary": "Realtime Synchronous Deidentification.", + "summary": "De-identify text.", "description": "A remote procedure call (RPC) operation.", "parameters": [ { @@ -64,7 +64,7 @@ { "name": "body", "in": "body", - "description": "The request body for realtime deidentification.", + "description": "Request body for de-identification operation.", "required": true, "schema": { "$ref": "#/definitions/DeidentificationContent" @@ -92,7 +92,7 @@ } }, "x-ms-examples": { - "Realtime Synchronous Deidentification.": { + "De-identify text.": { "$ref": "./examples/Deidentify.json" } } @@ -101,7 +101,7 @@ "/jobs": { "get": { "operationId": "ListJobs", - "summary": "List De-Identify Jobs", + "summary": "List de-identification jobs.", "description": "Resource list operation template.", "parameters": [ { @@ -145,7 +145,7 @@ } }, "x-ms-examples": { - "List De-Identify Jobs": { + "List de-identification jobs.": { "$ref": "./examples/ListJobs.json" } }, @@ -157,7 +157,7 @@ "/jobs/{name}": { "get": { "operationId": "GetJob", - "summary": "Get a De-Identify Job", + "summary": "Get a de-identification job.", "description": "Resource read operation template.", "parameters": [ { @@ -205,14 +205,14 @@ } }, "x-ms-examples": { - "Get a De-Identify Job": { + "Get a de-identification job.": { "$ref": "./examples/GetJob.json" } } }, "put": { "operationId": "CreateJob", - "summary": "Create a De-Identify Job", + "summary": "Create a de-identification job.", "description": "Long-running resource create or replace operation template.", "parameters": [ { @@ -292,7 +292,7 @@ } }, "x-ms-examples": { - "Create a De-Identify Job": { + "Create a de-identification job.": { "$ref": "./examples/CreateJob.json" } }, @@ -303,8 +303,8 @@ }, "delete": { "operationId": "DeleteJob", - "summary": "Delete a De-Identify Job", - "description": "Removes the record of the job from the service. Does not delete any files.", + "summary": "Delete a de-identification job.", + "description": "Removes the record of the job from the service. Does not delete any documents.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -348,7 +348,7 @@ } }, "x-ms-examples": { - "Delete a De-Identify Job": { + "Delete a de-identification job.": { "$ref": "./examples/DeleteJob.json" } } @@ -357,8 +357,8 @@ "/jobs/{name}:cancel": { "post": { "operationId": "CancelJob", - "summary": "Cancel a De-Identify Job", - "description": "Cancels a job that is in progress. \n\nThe job will be marked as canceled and the service will stop processing the job. The service will not delete any files that have already been processed.\n\nIf the job is already complete, this will have no effect. ", + "summary": "Cancel a de-identification job.", + "description": "Cancels a job that is in progress. \n\nThe job will be marked as canceled and the service will stop processing the job. The service will not delete any documents that have already been processed.\n\nIf the job is already complete, this will have no effect. ", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -405,16 +405,16 @@ } }, "x-ms-examples": { - "Cancel a De-Identify Job": { + "Cancel a de-identification job.": { "$ref": "./examples/CancelJob.json" } } } }, - "/jobs/{name}/files": { + "/jobs/{name}/documents": { "get": { - "operationId": "ListJobFiles", - "summary": "List processed files within a Job", + "operationId": "ListJobDocuments", + "summary": "List processed documents within a job.", "description": "Resource list operation template.", "parameters": [ { @@ -444,7 +444,7 @@ "200": { "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/PagedHealthFileDetails" + "$ref": "#/definitions/PagedDocumentDetails" }, "headers": { "x-ms-client-request-id": { @@ -468,8 +468,8 @@ } }, "x-ms-examples": { - "List processed files within a Job": { - "$ref": "./examples/ListJobFiles.json" + "List processed documents within a job.": { + "$ref": "./examples/ListJobDocuments.json" } }, "x-ms-pageable": { @@ -588,11 +588,11 @@ }, "DeidentificationContent": { "type": "object", - "description": "Request for synchronous De-Identify operation.", + "description": "Request body for de-identification operation.", "properties": { "inputText": { "type": "string", - "description": "Input text to deidentify.", + "description": "Input text to de-identify.", "maxLength": 100000 }, "operation": { @@ -647,7 +647,7 @@ }, "redactionFormat": { "type": "string", - "description": "Format of the redacted output. Only valid when OperationType is Redact.", + "description": "Format of the redacted output. Only valid when OperationType is \"Redact\".", "maxLength": 16 } }, @@ -659,7 +659,7 @@ }, "DeidentificationJob": { "type": "object", - "description": "A job containing a batch of documents to deidentify.", + "description": "A job containing a batch of documents to de-identify.", "properties": { "name": { "type": "string", @@ -743,22 +743,22 @@ "description": "Error when job fails in it's entirety.", "readOnly": true }, - "createdAt": { + "lastUpdatedAt": { "type": "string", "format": "date-time", - "description": "Date and time when the job was created.", + "description": "Date and time when the job was completed.\n\nIf the job is canceled, this is the time when the job was canceled.\n\nIf the job failed, this is the time when the job failed.", "readOnly": true }, - "startedAt": { + "createdAt": { "type": "string", "format": "date-time", - "description": "Date and time when the job was started.", + "description": "Date and time when the job was created.", "readOnly": true }, - "lastUpdatedAt": { + "startedAt": { "type": "string", "format": "date-time", - "description": "Date and time when the job was completed.\n\nIf the job is canceled, this is the time when the job was canceled.\n\nIf the job failed, this is the time when the job failed.", + "description": "Date and time when the job was started.", "readOnly": true }, "summary": { @@ -774,67 +774,48 @@ "operation", "dataType", "status", + "lastUpdatedAt", "createdAt" ] }, "DeidentificationResult": { "type": "object", - "description": "Response for synchronous De-Identify operation.", + "description": "Response body for de-identification operation.", "properties": { "outputText": { "type": "string", - "description": "Output text after de-identifying. Not available for Tag Operation." + "description": "Output text after de-identification. Not available for \"Tag\" operation." }, "taggerResult": { "$ref": "#/definitions/PhiTaggerResult", - "description": "Result of the tag operation. Only available for Tag Operation." + "description": "Result of the \"Tag\" operation. Only available for \"Tag\" Operation." } } }, - "FileLocation": { - "type": "object", - "description": "Location of a file.", - "properties": { - "path": { - "type": "string", - "description": "Absolute path to the file in storage.", - "maxLength": 1024 - }, - "etag": { - "$ref": "#/definitions/Azure.Core.eTag", - "description": "The entity tag for this resource.", - "readOnly": true - } - }, - "required": [ - "path", - "etag" - ] - }, - "HealthFileDetails": { + "DocumentDetails": { "type": "object", - "description": "File report once job has completed.", + "description": "Details of a single document in a job.", "properties": { "id": { "type": "string", - "description": "Id of the file report.", + "description": "Id of the document details.", "readOnly": true }, "input": { - "$ref": "#/definitions/FileLocation", - "description": "File Location for the input." + "$ref": "#/definitions/DocumentLocation", + "description": "Location for the input." }, "output": { - "$ref": "#/definitions/FileLocation", - "description": "File Location for the output." + "$ref": "#/definitions/DocumentLocation", + "description": "Location for the output." }, "status": { "$ref": "#/definitions/Azure.Core.Foundations.OperationState", - "description": "Status of the file." + "description": "Status of the document." }, "error": { "$ref": "#/definitions/Azure.Core.Foundations.Error", - "description": "Error when file fails." + "description": "Error when document fails." } }, "required": [ @@ -843,6 +824,26 @@ "status" ] }, + "DocumentLocation": { + "type": "object", + "description": "Location of a document.", + "properties": { + "path": { + "type": "string", + "description": "Path of document in storage.", + "maxLength": 1024 + }, + "etag": { + "$ref": "#/definitions/Azure.Core.eTag", + "description": "The entity tag for this resource.", + "readOnly": true + } + }, + "required": [ + "path", + "etag" + ] + }, "JobStatus": { "type": "string", "description": "List of statuses a job can have.", @@ -871,17 +872,17 @@ { "name": "Succeeded", "value": "Succeeded", - "description": "Job has completed successfully. All files have succeeded." + "description": "Job has completed successfully. All documents have succeeded." }, { "name": "PartialFailed", "value": "PartialFailed", - "description": "Job has completed with at least 1 file failing." + "description": "Job has completed with at least a single document failing." }, { "name": "Failed", "value": "Failed", - "description": "Job has completed with all files failing, or a validation failure." + "description": "Job has completed with all documents failing, or a validation failure." }, { "name": "Canceled", @@ -893,27 +894,27 @@ }, "JobSummary": { "type": "object", - "description": "Summary metrics the documents pertaining to a job.", + "description": "Summary metrics of a job.", "properties": { "successful": { "type": "integer", "format": "int32", - "description": "Number of blobs that have completed." + "description": "Number of documents that have completed." }, "failed": { "type": "integer", "format": "int32", - "description": "Number of blobs that have failed." + "description": "Number of documents that have failed." }, "canceled": { "type": "integer", "format": "int32", - "description": "Number of blobs that have been canceled." + "description": "Number of documents that have been canceled." }, "total": { "type": "integer", "format": "int32", - "description": "Number of blobs total." + "description": "Number of documents total." }, "bytesProcessed": { "type": "integer", @@ -951,15 +952,15 @@ "value" ] }, - "PagedHealthFileDetails": { + "PagedDocumentDetails": { "type": "object", - "description": "Paged collection of HealthFileDetails items", + "description": "Paged collection of DocumentDetails items", "properties": { "value": { "type": "array", - "description": "The HealthFileDetails items on this page", + "description": "The DocumentDetails items on this page", "items": { - "$ref": "#/definitions/HealthFileDetails" + "$ref": "#/definitions/DocumentDetails" } }, "nextLink": { @@ -1028,7 +1029,7 @@ { "name": "BioID", "value": "BioID", - "description": "Biological Identifier, such as a fingerprint or retinal scan" + "description": "Biological Identifier, such as a fingerprint or retinal scan." }, { "name": "City", @@ -1078,7 +1079,7 @@ { "name": "IDNum", "value": "IDNum", - "description": "Id Numbers. Such as a passport number." + "description": "Id Number, eg. passport number." }, { "name": "IPAddress", @@ -1088,12 +1089,12 @@ { "name": "License", "value": "License", - "description": "License. Such as a driver's license or medical license" + "description": "License, eg. Driver's license or medical license." }, { "name": "LocationOther", "value": "LocationOther", - "description": "Location Other. Such as Golden Gate Park." + "description": "Location Other, eg. Golden Gate Park." }, { "name": "MedicalRecord", @@ -1103,7 +1104,7 @@ { "name": "Organization", "value": "Organization", - "description": "Organization. Such as a company name" + "description": "Organization, eg. Microsoft." }, { "name": "Patient", @@ -1123,12 +1124,12 @@ { "name": "SocialSecurity", "value": "SocialSecurity", - "description": "Social Security Numbers in the US." + "description": "Social Security Number." }, { "name": "State", "value": "State", - "description": "State" + "description": "State." }, { "name": "Street", @@ -1143,12 +1144,12 @@ { "name": "Username", "value": "Username", - "description": "Usernames, such as a social media handle" + "description": "Usernames, eg. a social media handle." }, { "name": "Vehicle", "value": "Vehicle", - "description": "Vehicle IDs, such as license plates or VIN numbers" + "description": "Vehicle IDs, eg. license plate or VIN number." }, { "name": "Zip", @@ -1160,11 +1161,11 @@ }, "PhiEntity": { "type": "object", - "description": "Phi Entity tag in the input.", + "description": "PHI Entity tag in the input.", "properties": { "category": { "$ref": "#/definitions/PhiCategory", - "description": "Phi Category of the entity." + "description": "PHI Category of the entity." }, "offset": { "$ref": "#/definitions/StringIndex", @@ -1181,7 +1182,7 @@ "confidenceScore": { "type": "number", "format": "double", - "description": "Confidence score of the text/type pairing." + "description": "Confidence score of the category match." } }, "required": [ @@ -1192,7 +1193,7 @@ }, "PhiTaggerResult": { "type": "object", - "description": "Result of the tag operation.", + "description": "Result of the \"Tag\" operation.", "properties": { "entities": { "type": "array", @@ -1204,7 +1205,7 @@ }, "path": { "type": "string", - "description": "Path to the file in the storage container.", + "description": "Path to the document in storage.", "maxLength": 1024 }, "etag": { @@ -1223,17 +1224,17 @@ "location": { "type": "string", "format": "uri", - "description": "URL to storage location. Must be a valid Azure Storage SAS URI." + "description": "URL to storage location." }, "prefix": { "type": "string", - "description": "Prefix to filter blobs by.", + "description": "Prefix to filter path by.", "minLength": 1, "maxLength": 1024 }, "extensions": { "type": "array", - "description": "List of extensions to filter blobs by.", + "description": "List of extensions to filter path by.", "default": [ "*" ], @@ -1251,7 +1252,7 @@ }, "StringIndex": { "type": "object", - "description": "String Index encoding model.", + "description": "String index encoding model.", "properties": { "utf8": { "type": "integer", @@ -1261,12 +1262,12 @@ "utf16": { "type": "integer", "format": "int32", - "description": "The offset or length of the substring in UTF-16 encoding.\n\nUsed in .NET, Java, and JavaScript." + "description": "The offset or length of the substring in UTF-16 encoding.\n\nPrimary encoding used by .NET, Java, and JavaScript." }, "codePoint": { "type": "integer", "format": "int32", - "description": "The offset or length of the substring in UTF-16 encoding.\n\nUsed in Python." + "description": "The offset or length of the substring in CodePoint encoding.\n\nPrimary encoding used by Python." } }, "required": [ @@ -1282,11 +1283,11 @@ "location": { "type": "string", "format": "uri", - "description": "URL to storage location. Must be a valid Azure Storage SAS URI." + "description": "URL to storage location." }, "prefix": { "type": "string", - "description": "Prefix to filter blobs by.", + "description": "Prefix to filter path by.", "minLength": 1, "maxLength": 1024 } diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CancelJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/CancelJob.json similarity index 96% rename from specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CancelJob.json rename to specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/CancelJob.json index d0bd8c5c3705..c70063471c24 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CancelJob.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/CancelJob.json @@ -1,5 +1,5 @@ { - "title": "Cancel a De-Identify Job", + "title": "Cancel a de-identification job.", "operationId": "CancelJob", "parameters": { "api-version": "2024-07-12-preview", @@ -25,9 +25,9 @@ "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", - "lastUpdatedAt": "2024-01-26T01:15:00.009Z", "summary": { "successful": 10, "failed": 0, diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CreateJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/CreateJob.json similarity index 90% rename from specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CreateJob.json rename to specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/CreateJob.json index 9915316788bd..87689147cfcf 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/CreateJob.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/CreateJob.json @@ -1,5 +1,5 @@ { - "title": "Create a De-Identify Job", + "title": "Create a de-identification job.", "operationId": "CreateJob", "parameters": { "api-version": "2024-07-12-preview", @@ -42,8 +42,8 @@ "dataType": "Plaintext", "redactionFormat": "[{type}]", "status": "NotStarted", - "createdAt": "2024-01-25T23:27:43.009Z", - "lastUpdatedAt": "2024-01-26T01:15:00.009Z" + "lastUpdatedAt": "2024-01-26T01:15:00.009Z", + "createdAt": "2024-01-25T23:27:43.009Z" } }, "201": { @@ -67,8 +67,8 @@ "dataType": "Plaintext", "redactionFormat": "[{type}]", "status": "NotStarted", - "createdAt": "2024-01-25T23:27:43.009Z", - "lastUpdatedAt": "2024-01-26T01:15:00.009Z" + "lastUpdatedAt": "2024-01-26T01:15:00.009Z", + "createdAt": "2024-01-25T23:27:43.009Z" } } } diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/Deidentify.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/Deidentify.json similarity index 94% rename from specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/Deidentify.json rename to specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/Deidentify.json index 2b3130cc4a46..e2021314bf20 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/Deidentify.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/Deidentify.json @@ -1,5 +1,5 @@ { - "title": "Realtime Synchronous Deidentification.", + "title": "De-identify text.", "operationId": "Deidentify", "parameters": { "api-version": "2024-07-12-preview", diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/DeleteJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/DeleteJob.json similarity index 83% rename from specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/DeleteJob.json rename to specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/DeleteJob.json index 1f2367e2029a..9b49028db92a 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/DeleteJob.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/DeleteJob.json @@ -1,5 +1,5 @@ { - "title": "Delete a De-Identify Job", + "title": "Delete a de-identification job.", "operationId": "DeleteJob", "parameters": { "api-version": "2024-07-12-preview", diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/GetJob.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/GetJob.json similarity index 96% rename from specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/GetJob.json rename to specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/GetJob.json index 519ad06c3c31..41496ff69046 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/GetJob.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/GetJob.json @@ -1,5 +1,5 @@ { - "title": "Get a De-Identify Job", + "title": "Get a de-identification job.", "operationId": "GetJob", "parameters": { "api-version": "2024-07-12-preview", @@ -25,9 +25,9 @@ "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", - "lastUpdatedAt": "2024-01-26T01:15:00.009Z", "summary": { "successful": 10, "failed": 0, diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/ListJobFiles.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/ListJobDocuments.json similarity index 92% rename from specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/ListJobFiles.json rename to specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/ListJobDocuments.json index f8e0de698e26..372911afab67 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/ListJobFiles.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/ListJobDocuments.json @@ -1,6 +1,6 @@ { - "title": "List processed files within a Job", - "operationId": "ListJobFiles", + "title": "List processed documents within a job.", + "operationId": "ListJobDocuments", "parameters": { "api-version": "2024-07-12-preview", "name": "documents_smith_1", diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/ListJobs.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/ListJobs.json similarity index 97% rename from specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/ListJobs.json rename to specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/ListJobs.json index b0a99b2d3cce..43061dc58040 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/preview/2024-07-12-preview/examples/ListJobs.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/examples/ListJobs.json @@ -1,5 +1,5 @@ { - "title": "List De-Identify Jobs", + "title": "List de-identification jobs.", "operationId": "ListJobs", "parameters": { "api-version": "2024-07-12-preview", @@ -28,9 +28,9 @@ "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", - "lastUpdatedAt": "2024-01-26T01:15:00.009Z", "summary": { "successful": 10, "failed": 0, From b42779e5988bb8627fdbedd4f02f1f11f926dd8a Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Mon, 15 Jul 2024 16:44:05 -0700 Subject: [PATCH 17/19] Renames folder to match namespace change --- .../client.tsp | 0 .../examples/2024-07-12-preview/CancelJob.json | 0 .../examples/2024-07-12-preview/CreateJob.json | 0 .../examples/2024-07-12-preview/Deidentify.json | 0 .../examples/2024-07-12-preview/DeleteJob.json | 0 .../examples/2024-07-12-preview/GetJob.json | 0 .../examples/2024-07-12-preview/ListJobDocuments.json | 0 .../examples/2024-07-12-preview/ListJobs.json | 0 .../main.tsp | 0 .../models.tsp | 0 .../routes.tsp | 0 .../tspconfig.yaml | 0 .../readme.md | 10 +++++----- 13 files changed, 5 insertions(+), 5 deletions(-) rename specification/healthdataaiservices/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/client.tsp (100%) rename specification/healthdataaiservices/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/examples/2024-07-12-preview/CancelJob.json (100%) rename specification/healthdataaiservices/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/examples/2024-07-12-preview/CreateJob.json (100%) rename specification/healthdataaiservices/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/examples/2024-07-12-preview/Deidentify.json (100%) rename specification/healthdataaiservices/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/examples/2024-07-12-preview/DeleteJob.json (100%) rename specification/healthdataaiservices/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/examples/2024-07-12-preview/GetJob.json (100%) rename specification/healthdataaiservices/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/examples/2024-07-12-preview/ListJobDocuments.json (100%) rename specification/healthdataaiservices/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/examples/2024-07-12-preview/ListJobs.json (100%) rename specification/healthdataaiservices/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/main.tsp (100%) rename specification/healthdataaiservices/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/models.tsp (100%) rename specification/healthdataaiservices/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/routes.tsp (100%) rename specification/healthdataaiservices/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/tspconfig.yaml (100%) rename specification/healthdataaiservices/data-plane/{HealthDataAIServices.Deidentification => HealthDataAIServices.DeidServices}/readme.md (85%) diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/client.tsp b/specification/healthdataaiservices/HealthDataAIServices.DeidServices/client.tsp similarity index 100% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/client.tsp rename to specification/healthdataaiservices/HealthDataAIServices.DeidServices/client.tsp diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CancelJob.json b/specification/healthdataaiservices/HealthDataAIServices.DeidServices/examples/2024-07-12-preview/CancelJob.json similarity index 100% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CancelJob.json rename to specification/healthdataaiservices/HealthDataAIServices.DeidServices/examples/2024-07-12-preview/CancelJob.json diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CreateJob.json b/specification/healthdataaiservices/HealthDataAIServices.DeidServices/examples/2024-07-12-preview/CreateJob.json similarity index 100% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/CreateJob.json rename to specification/healthdataaiservices/HealthDataAIServices.DeidServices/examples/2024-07-12-preview/CreateJob.json diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/Deidentify.json b/specification/healthdataaiservices/HealthDataAIServices.DeidServices/examples/2024-07-12-preview/Deidentify.json similarity index 100% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/Deidentify.json rename to specification/healthdataaiservices/HealthDataAIServices.DeidServices/examples/2024-07-12-preview/Deidentify.json diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/DeleteJob.json b/specification/healthdataaiservices/HealthDataAIServices.DeidServices/examples/2024-07-12-preview/DeleteJob.json similarity index 100% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/DeleteJob.json rename to specification/healthdataaiservices/HealthDataAIServices.DeidServices/examples/2024-07-12-preview/DeleteJob.json diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/GetJob.json b/specification/healthdataaiservices/HealthDataAIServices.DeidServices/examples/2024-07-12-preview/GetJob.json similarity index 100% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/GetJob.json rename to specification/healthdataaiservices/HealthDataAIServices.DeidServices/examples/2024-07-12-preview/GetJob.json diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobDocuments.json b/specification/healthdataaiservices/HealthDataAIServices.DeidServices/examples/2024-07-12-preview/ListJobDocuments.json similarity index 100% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobDocuments.json rename to specification/healthdataaiservices/HealthDataAIServices.DeidServices/examples/2024-07-12-preview/ListJobDocuments.json diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobs.json b/specification/healthdataaiservices/HealthDataAIServices.DeidServices/examples/2024-07-12-preview/ListJobs.json similarity index 100% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/examples/2024-07-12-preview/ListJobs.json rename to specification/healthdataaiservices/HealthDataAIServices.DeidServices/examples/2024-07-12-preview/ListJobs.json diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp b/specification/healthdataaiservices/HealthDataAIServices.DeidServices/main.tsp similarity index 100% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/main.tsp rename to specification/healthdataaiservices/HealthDataAIServices.DeidServices/main.tsp diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp b/specification/healthdataaiservices/HealthDataAIServices.DeidServices/models.tsp similarity index 100% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/models.tsp rename to specification/healthdataaiservices/HealthDataAIServices.DeidServices/models.tsp diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/routes.tsp b/specification/healthdataaiservices/HealthDataAIServices.DeidServices/routes.tsp similarity index 100% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/routes.tsp rename to specification/healthdataaiservices/HealthDataAIServices.DeidServices/routes.tsp diff --git a/specification/healthdataaiservices/HealthDataAIServices.Deidentification/tspconfig.yaml b/specification/healthdataaiservices/HealthDataAIServices.DeidServices/tspconfig.yaml similarity index 100% rename from specification/healthdataaiservices/HealthDataAIServices.Deidentification/tspconfig.yaml rename to specification/healthdataaiservices/HealthDataAIServices.DeidServices/tspconfig.yaml diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/readme.md b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/readme.md similarity index 85% rename from specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/readme.md rename to specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/readme.md index c84e6d008e57..61c794b02e7a 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/readme.md +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/readme.md @@ -1,8 +1,8 @@ -# HealthDataAIServices.Deidentification +# HealthDataAIServices.DeidServices > see https://aka.ms/autorest -This is the AutoRest configuration file for HealthDataAIServices.Deidentification. +This is the AutoRest configuration file for HealthDataAIServices.DeidServices. ## Getting Started @@ -22,12 +22,12 @@ For other options on installation see [Installing AutoRest](https://aka.ms/autor ### Basic Information -These are the global settings for the HealthDataAIServices.Deidentification. +These are the global settings for the HealthDataAIServices.DeidServices. ```yaml openapi-type: data-plane tag: package-2024-07-12-preview -title: Health Deidentification Service +title: Azure Health Data Services de-identification service security: AADToken security-scopes: - "https://deid.azure.com/.default" @@ -39,7 +39,7 @@ These settings apply only when `--tag=package-2024-07-12-preview` is specified o ```yaml $(tag) == 'package-2024-07-12-preview' input-file: - - preview/2024-07-12-preview/HealthDataAIServices.Deidentification.json + - preview/2024-07-12-preview/HealthDataAIServices.DeidServices.json ``` --- From 48e2b9dd77425b750892d0396c4d74fe84e69c1d Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Tue, 16 Jul 2024 11:39:43 -0700 Subject: [PATCH 18/19] Updates client name after namespace change --- .../HealthDataAIServices.DeidServices/routes.tsp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/specification/healthdataaiservices/HealthDataAIServices.DeidServices/routes.tsp b/specification/healthdataaiservices/HealthDataAIServices.DeidServices/routes.tsp index 03ea857b167a..8413e3191d33 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.DeidServices/routes.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.DeidServices/routes.tsp @@ -1,4 +1,5 @@ import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-client-generator-core"; import "@typespec/http"; import "@typespec/rest"; import "./models.tsp"; @@ -8,8 +9,12 @@ using TypeSpec.Rest; using TypeSpec.Versioning; using Azure.Core; using Azure.Core.Traits; +using Azure.ClientGenerator.Core; #suppress "@azure-tools/typespec-azure-core/casing-style" "AI Casing style to match OpenAI" +@client({ + name: "DeidentificationClient", +}) namespace HealthDataAIServices.DeidServices; alias ServiceTraits = NoRepeatableRequests & From 2272f2e6d1d61f6bba405b407abe9d52f908ed33 Mon Sep 17 00:00:00 2001 From: Graham Thomas Date: Wed, 17 Jul 2024 09:34:24 -0700 Subject: [PATCH 19/19] Makes fields with defaults optional --- .../HealthDataAIServices.DeidServices/models.tsp | 10 +++++----- .../HealthDataAIServices.DeidServices.json | 9 ++------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/specification/healthdataaiservices/HealthDataAIServices.DeidServices/models.tsp b/specification/healthdataaiservices/HealthDataAIServices.DeidServices/models.tsp index 7f850db0fc0a..0073a3813fdf 100644 --- a/specification/healthdataaiservices/HealthDataAIServices.DeidServices/models.tsp +++ b/specification/healthdataaiservices/HealthDataAIServices.DeidServices/models.tsp @@ -26,10 +26,10 @@ model DeidentificationJob { targetLocation: TargetStorageLocation; @doc("Operation to perform on the input documents.") - operation: OperationType = OperationType.Surrogate; + operation?: OperationType = OperationType.Surrogate; @doc("Data type of the input documents.") - dataType: DocumentDataType = DocumentDataType.Plaintext; + dataType?: DocumentDataType = DocumentDataType.Plaintext; @maxLength(16) @minLength(1) @@ -129,7 +129,7 @@ model SourceStorageLocation { @doc("List of extensions to filter path by.") @minItems(1) - extensions: Array = #["*"]; + extensions?: Array = #["*"]; } @doc("Storage location.") @@ -203,10 +203,10 @@ model DeidentificationContent { inputText: string; @doc("Operation to perform on the input.") - operation: OperationType = OperationType.Surrogate; + operation?: OperationType = OperationType.Surrogate; @doc("Data type of the input.") - dataType: DocumentDataType = DocumentDataType.Plaintext; + dataType?: DocumentDataType = DocumentDataType.Plaintext; @maxLength(16) @doc("Format of the redacted output. Only valid when OperationType is \"Redact\".") diff --git a/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/HealthDataAIServices.DeidServices.json b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/HealthDataAIServices.DeidServices.json index a7e9726e7931..d1beef623192 100644 --- a/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/HealthDataAIServices.DeidServices.json +++ b/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/preview/2024-07-12-preview/HealthDataAIServices.DeidServices.json @@ -652,9 +652,7 @@ } }, "required": [ - "inputText", - "operation", - "dataType" + "inputText" ] }, "DeidentificationJob": { @@ -771,8 +769,6 @@ "name", "sourceLocation", "targetLocation", - "operation", - "dataType", "status", "lastUpdatedAt", "createdAt" @@ -1246,8 +1242,7 @@ }, "required": [ "location", - "prefix", - "extensions" + "prefix" ] }, "StringIndex": {