Skip to content

Commit

Permalink
Merge b6fd5ea into 4567a94
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamMThomas committed May 13, 2024
2 parents 4567a94 + b6fd5ea commit 2d49d29
Show file tree
Hide file tree
Showing 22 changed files with 2,543 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,14 @@
"timerange"
]
},
{
"filename": "**/specification/healthdataaiservices/**/*.json",
"words": [
"deidentification",
"deidentify",
"surrogation"
]
},
{
"filename": "**/specification/search/data-plane/Azure.Search/**/*.json",
"words": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* PLACEHOLDER
* Add readme and sample
*/
import "./main.tsp";

// using Azure.ClientGenerator.Core;
//
// @client({
// name: "FaceClient",
// service: Face,
// })
// interface FaceClient {
// findSimilar is FaceRecognitionOperations.findSimilar;
// }
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"title": "Cancel a De-Identify Job",
"operationId": "Deidentification_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": {
"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"
},
"dataType": "PlainText",
"operation": "Redact",
"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
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"title": "Create a De-Identify Job",
"operationId": "Deidentification_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"
},
"dataType": "PlainText",
"operation": "Redact",
"redactionFormat": "[{type}]"
}
},
"responses": {
"200": {
"body": {
"name": "documents_smith_1",
"sourceLocation": {
"location": "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D",
"prefix": "/documents",
"extensions": [
"*"
]
},
"targetLocation": {
"location": "https://blobtest.blob.core.windows.net/container?sp=r&st=2024-01-24T18:11:10Z&se=2024-01-25T02:11:10Z&spr=https&sv=2022-11-02&sr=c&sig=signature%3D",
"prefix": "/documents"
},
"dataType": "PlainText",
"operation": "Redact",
"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": {
"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"
},
"dataType": "PlainText",
"operation": "Redact",
"redactionFormat": "[{type}]",
"status": "NotStarted",
"createdAt": "2024-01-25T23:27:43.009Z",
"lastUpdatedAt": "2024-01-26T01:15:00.009Z"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"title": "Realtime Synchronous Deidentification.",
"operationId": "Deidentification_Deidentify",
"parameters": {
"api-version": "2024-01-16-preview",
"body": {
"inputText": "Hello my name is John Smith.",
"dataType": "PlainText",
"operation": "Redact",
"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"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"title": "Delete a De-Identify Job",
"operationId": "Deidentification_DeleteJob",
"parameters": {
"api-version": "2024-01-16-preview",
"name": "documents_smith_1",
"x-ms-client-request-id": "00000000-0000-0000-0000-000000000000"
},
"responses": {
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"title": "Get a De-Identify Job",
"operationId": "Deidentification_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": {
"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"
},
"dataType": "PlainText",
"operation": "Redact",
"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
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"title": "List processed files within a Job",
"operationId": "Deidentification_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"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"title": "List De-Identify Jobs",
"operationId": "Deidentification_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": {
"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"
},
"dataType": "PlainText",
"operation": "Redact",
"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"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import "@typespec/rest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "./routes.tsp";

using TypeSpec.Http;
using TypeSpec.Rest;
using TypeSpec.Versioning;
using Azure.Core;
using Azure.Core.Traits;

#suppress "@azure-tools/typespec-azure-core/casing-style"
@useAuth(AadToken)
@service({
title: "HealthDataAIServices.Deidentification Service",
})
@server(
"https://{endpoint}",
"Azure Health Deidentification Service",
{
@doc("Url of your Deid Service.")
endpoint: string,
}
)
@versioned(HealthDataAIServices.Deidentification.Versions)
namespace HealthDataAIServices.Deidentification;

@doc("The Azure Active Directory OAuth2 Flow")
model AadToken
is OAuth2Auth<[
{
type: OAuth2FlowType.authorizationCode;
authorizationUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize";
tokenUrl: "https://login.microsoftonline.com/common/oauth2/token";
scopes: ["https://deid.azure.com/.default"];
}
]>;

#suppress "@azure-tools/typespec-azure-core/documentation-required"
@doc("The HealthDataAIServices.Deidentification service versions.")
enum Versions {
@useDependency(Azure.Core.Versions.v1_0_Preview_2)
v2024_01_16_preview: "2024-01-16-preview",
}

0 comments on commit 2d49d29

Please sign in to comment.