diff --git a/custom-words.txt b/custom-words.txt index 1b6a01c4e03e..69908e02d77d 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -380,6 +380,7 @@ clientaccesspolicy clienterror clientgroup clientlib +clinicaltrials clipart CLIs CLOGFILE @@ -923,6 +924,7 @@ hdinsight Headnode healthbot healthcareapis +healthinsights healthstatus hecto Heatbeat @@ -1008,6 +1010,7 @@ integrationaccount integrationruntimes Intelli intervaled +Interventional Intraorg intset intune @@ -1495,6 +1498,8 @@ OIDC onboarded Onboarding Onboards +Onco +oncophenotype ondemand onedeploy onmachine @@ -1993,6 +1998,7 @@ snapshotset snaptshot SNAT SNMP +SNOMED Sobol softwareplan SOHSV @@ -2231,6 +2237,7 @@ transcriptmoderationresult transferkey translatortext trendingtopics +trialmatcher triggeredwebjobs triggerruns TSVE diff --git a/specification/cognitiveservices/HealthInsights/.gitignore b/specification/cognitiveservices/HealthInsights/.gitignore new file mode 100644 index 000000000000..56312badc4ac --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/.gitignore @@ -0,0 +1,5 @@ +#### linux gitignore + +# Ignore output files +tsp-output +package-lock.json \ No newline at end of file diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.common/model.common.request.tsp b/specification/cognitiveservices/HealthInsights/healthinsights.common/model.common.request.tsp new file mode 100644 index 000000000000..dd0953483cee --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.common/model.common.request.tsp @@ -0,0 +1,121 @@ +import "./model.common.shared.tsp"; + +using TypeSpec.Rest; + +namespace AzureHealthInsights; + +alias Request = { + @doc("The list of patients, including their clinical information and data.") + patients: PatientRecord[]; +}; + +alias ModelConfiguration = { + @doc("An indication whether the model should produce verbose output.") + verbose?: boolean = false; + + @doc("An indication whether the model's output should include evidence for the inferences.") + includeEvidence?: boolean = true; +}; + +@doc("A patient record, including their clinical information and data.") +model PatientRecord { + @doc(""" +A given identifier for the patient. Has to be unique across all patients in a single request. +""") + @minLength(1) + id: string; + + @doc(""" +Patient structured information, including demographics and known structured clinical information. +""") + info?: PatientInfo; + + @doc("Patient unstructured clinical data, given as documents.") + data?: PatientDocument[]; +} + +@doc("Patient structured information, including demographics and known structured clinical information.") +model PatientInfo { + @doc("The patient's sex.") + sex?: PatientInfoSex; + + @doc("The patient's date of birth.") + birthDate?: plainDate; + + @doc("Known clinical information for the patient, structured.") + clinicalInfo?: ClinicalCodedElement[]; +} + +@doc("The patient's sex.") +enum PatientInfoSex { + Female: "female", + Male: "male", + Unspecified: "unspecified", +} + +@doc("The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document).") +enum DocumentType { + Note: "note", + FhirBundle: "fhirBundle", + Dicom: "dicom", + GenomicSequencing: "genomicSequencing", +} + +@doc("The type of the clinical document.") +enum ClinicalDocumentType { + Consultation: "consultation", + DischargeSummary: "dischargeSummary", + HistoryAndPhysical: "historyAndPhysical", + Procedure: "procedure", + Progress: "progress", + Imaging: "imaging", + Laboratory: "laboratory", + Pathology: "pathology", +} + +@doc(""" +The type of the content's source. +In case the source type is 'inline', the content is given as a string (for instance, text). +In case the source type is 'reference', the content is given as a URI. +""") +enum DocumentContentSourceType { + Inline: "inline", + Reference: "reference", +} + +@doc("A clinical document related to a patient. Document here is in the wide sense - not just a text document (note).") +model PatientDocument { + @doc("The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document).") + type: DocumentType; + + @doc("The type of the clinical document.") + clinicalType?: ClinicalDocumentType; + + @doc("A given identifier for the document. Has to be unique across all documents for a single patient.") + @minLength(1) + id: string; + + @doc("A 2 letter ISO 639-1 representation of the language of the document.") + language?: string; + + @doc("The date and time when the document was created.") + createdDateTime?: zonedDateTime; + + @doc("The content of the patient document.") + content: DocumentContent; +} + +@doc("The content of the patient document.") +model DocumentContent { + @doc(""" +The type of the content's source. +In case the source type is 'inline', the content is given as a string (for instance, text). +In case the source type is 'reference', the content is given as a URI. +""") + sourceType: DocumentContentSourceType; + + @doc(""" +The content of the document, given either inline (as a string) or as a reference (URI). +""") + value: string; +} diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.common/model.common.response.tsp b/specification/cognitiveservices/HealthInsights/healthinsights.common/model.common.response.tsp new file mode 100644 index 000000000000..1528706f7463 --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.common/model.common.response.tsp @@ -0,0 +1,101 @@ +import "./model.common.shared.tsp"; + +using TypeSpec.Rest; + +namespace AzureHealthInsights; + +alias Response = { + @doc("A processing job identifier.") + @visibility("read") + @key + @format("uuid") + jobId: string; + + @doc("The date and time when the processing job was created.") + @visibility("read") + createdDateTime: zonedDateTime; + + @doc("The date and time when the processing job is set to expire.") + @visibility("read") + expirationDateTime: zonedDateTime; + + @doc("The date and time when the processing job was last updated.") + @visibility("read") + lastUpdateDateTime: zonedDateTime; + + @doc("The status of the processing job.") + @visibility("read") + status: JobStatus; + + @doc("An array of errors, if any errors occurred during the processing job.") + @visibility("read") + errors?: Azure.Core.Foundations.Error[]; +}; + + +@doc("An inference made by the model regarding a patient.") +model Inference { + @doc("The value of the inference, as relevant for the given inference type.") + value: string; + + @doc("The description corresponding to the inference value.") + description?: string; + + @doc("Confidence score for this inference.") + @minValue(0) + @maxValue(1) + confidenceScore?: float32; +} + +@doc("A piece of evidence from a clinical note (text document).") +model ClinicalNoteEvidence { + @doc("The identifier of the document containing the evidence.") + id: string; + + @doc("The actual text span which is evidence for the inference.") + text?: string; + + @doc("The start index of the evidence text span in the document (0 based).") + @minValue(0) + offset: int32; + + @doc("The length of the evidence text span.") + @minValue(1) + length: int32; +} + +@doc("A piece of evidence corresponding to an inference.") +model InferenceEvidence { + @doc("A piece of evidence from a clinical note (text document).") + patientDataEvidence?: ClinicalNoteEvidence; + + @doc(""" +A piece of clinical information, expressed as a code in a clinical coding +system. +""") + patientInfoEvidence?: ClinicalCodedElement; + + @doc("A value indicating how important this piece of evidence is for the inference.") + @minValue(0) + @maxValue(1) + importance?: float32; +} + +@doc("A piece of evidence corresponding to a Trial Matcher inference.") +model TrialMatcherInferenceEvidence { + @doc("A piece of evidence from the eligibility criteria text of a clinical trial.") + eligibilityCriteriaEvidence?: string; + ...InferenceEvidence; +} + +@doc("The status of the processing job.") +enum JobStatus { + NotStarted: "notStarted", + Running: "running", + Succeeded: "succeeded", + Failed: "failed", + PartiallyCompleted: "partiallyCompleted", +} + +@doc("The version of the model used for inference, expressed as the model date.") +scalar ModelVersion extends string; diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.common/model.common.shared.tsp b/specification/cognitiveservices/HealthInsights/healthinsights.common/model.common.shared.tsp new file mode 100644 index 000000000000..fc0f9e6577ac --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.common/model.common.shared.tsp @@ -0,0 +1,36 @@ +using TypeSpec.Rest; + +namespace AzureHealthInsights; + +@doc(""" +A piece of clinical information, expressed as a code in a clinical coding system. +""") +model ClinicalCodedElement { + @doc("The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS.") + system: string; + + @doc("The code within the given clinical coding system.") + code: string; + + @doc("The name of this coded concept in the coding system.") + name?: string; + + @doc("A value associated with the code within the given clinical coding system.") + value?: string; +} + +@doc(""" +A location given as a combination of city, state and country/region. It could specify a city, a state or a country/region. +In case a city is specified, either state +country/region or country/region (for countries/regions where there are no states) should be added. +In case a state is specified (without a city), country/region should be added. +""") +model GeographicLocation { + @doc("City name.") + city?: string; + + @doc("State name.") + state?: string; + + @doc("Country/region name.") + countryOrRegion: string; +} diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.common/primitives.tsp b/specification/cognitiveservices/HealthInsights/healthinsights.common/primitives.tsp new file mode 100644 index 000000000000..a377638982d9 --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.common/primitives.tsp @@ -0,0 +1,17 @@ +using Azure.Core; +using TypeSpec.Http; +namespace AzureHealthInsights; + +@doc("Long running RPC operation template") +op LongRunningRpcOperation< + TParams extends object, + TResponse extends object, + Traits extends object = {} + > is RpcOperation< + TParams & Traits, + Foundations.AcceptedResponse | TResponse, + Traits + >; diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.oncophenotype/client.tsp b/specification/cognitiveservices/HealthInsights/healthinsights.oncophenotype/client.tsp new file mode 100644 index 000000000000..297048ba09fd --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.oncophenotype/client.tsp @@ -0,0 +1,19 @@ +import "@azure-tools/typespec-client-generator-core"; +import "./route.oncophenotype.tsp"; + +import "@typespec/rest"; +import "@typespec/http"; +import "@typespec/versioning"; +import "../healthinsights.openapi/service.tsp"; + +using Azure.ClientGenerator.Core; + +namespace ClientForAzureHealthInsights; + +@client({ + name: "CancerProfilingClient", + service: AzureHealthInsights +}) + interface CancerProfilingClient { + InferCancerProfile is AzureHealthInsights.OncoPhenotype.CreateJob; +} diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.oncophenotype/model.oncophenotype.tsp b/specification/cognitiveservices/HealthInsights/healthinsights.oncophenotype/model.oncophenotype.tsp new file mode 100644 index 000000000000..072bd432c4c5 --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.oncophenotype/model.oncophenotype.tsp @@ -0,0 +1,87 @@ +import "../healthinsights.common/model.common.request.tsp"; +import "../healthinsights.common/model.common.response.tsp"; +import "../healthinsights.common/model.common.shared.tsp"; + +using TypeSpec.Rest; + +namespace AzureHealthInsights; + +@doc("The body of the Onco Phenotype request.") +model OncoPhenotypeData { + ...Request; + @doc("Configuration affecting the Onco Phenotype model's inference.") + configuration?: OncoPhenotypeModelConfiguration; +} + +@resource("oncophenotype/jobs") +@doc("The response for the Onco Phenotype request.") +model OncoPhenotypeResult { + ...Response; + + @doc("The inference results for the Onco Phenotype request.") + @visibility("read") + results?: OncoPhenotypeResults; +} + +@doc("The inference results for the Onco Phenotype request.") +model OncoPhenotypeResults { + @doc("Results for the patients given in the request.") + patients: OncoPhenotypePatientResult[]; + + @doc("The version of the model used for inference, expressed as the model date.") + modelVersion: ModelVersion; +} + +@doc("The results of the model's work for a single patient.") +model OncoPhenotypePatientResult { + @doc("The identifier given for the patient in the request.") + id: string; + + @doc("The model's inferences for the given patient.") + inferences: OncoPhenotypeInference[]; +} + +@doc("An inference made by the Onco Phenotype model regarding a patient.") +model OncoPhenotypeInference { + @doc("The type of the Onco Phenotype inference") + type: OncoPhenotypeInferenceType; + ...Inference; + + @doc("The evidence corresponding to the inference value.") + evidence?: InferenceEvidence[]; + + @doc(""" +An identifier for a clinical case, if there are multiple clinical cases regarding the same patient. +""") + caseId?: string; +} + +@doc("Configuration affecting the Onco Phenotype model's inference.") +model OncoPhenotypeModelConfiguration { + ...ModelConfiguration; + @doc(""" +A list of inference types to be inferred for the current request. +This could be used if only part of the Onco Phenotype inferences are required. +If this list is omitted or empty, the model will return all the inference types. +""") + inferenceTypes?: OncoPhenotypeInferenceType[]; + + @doc(""" +An indication whether to perform a preliminary step on the patient's documents to determine whether they relate to a Cancer case. +""") + checkForCancerCase?: boolean = false; +} + + + +@doc("The type of the Onco Phenotype inference.") +enum OncoPhenotypeInferenceType { + TumorSite: "tumorSite", + Histology: "histology", + ClinicalStageT: "clinicalStageT", + ClinicalStageN: "clinicalStageN", + ClinicalStageM: "clinicalStageM", + PathologicStageT: "pathologicStageT", + PathologicStageN: "pathologicStageN", + PathologicStageM: "pathologicStageM", +} diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.oncophenotype/route.oncophenotype.tsp b/specification/cognitiveservices/HealthInsights/healthinsights.oncophenotype/route.oncophenotype.tsp new file mode 100644 index 000000000000..b4ac1b2b311b --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.oncophenotype/route.oncophenotype.tsp @@ -0,0 +1,30 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-autorest"; +import "@typespec/rest"; +import "@typespec/http"; + +import "./model.oncophenotype.tsp"; +import "../healthinsights.common/primitives.tsp"; + +using Azure.Core; +using TypeSpec.Rest; +using TypeSpec.Http; +using Autorest; + +namespace AzureHealthInsights; + +interface OncoPhenotype { + @summary("Get Onco Phenotype job details") + @tag("OncoPhenotype") + @doc("Gets the status and details of the Onco Phenotype job.") + @example("./examples/SuccessfulOncoPhenotypeResponse.json", "SuccessfulOncoPhenotypeGetAnalyzeStatus") + GetJob is Azure.Core.ResourceRead; + + @summary("Create Onco Phenotype job") + @tag("OncoPhenotype") + @doc("Creates an Onco Phenotype job with the given request body.") + @pollingOperation(OncoPhenotype.GetJob) + @route("/oncophenotype/jobs") + @example("./examples/SuccessfulOncoPhenotypeRequest.json", "SuccessfulOncoPhenotypeAnalyzeRequest") + CreateJob is LongRunningRpcOperation; +} diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.oncophenotype/tspconfig.yaml b/specification/cognitiveservices/HealthInsights/healthinsights.oncophenotype/tspconfig.yaml new file mode 100644 index 000000000000..f67d15379ddf --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.oncophenotype/tspconfig.yaml @@ -0,0 +1,25 @@ +emit: [ + "@azure-tools/typespec-csharp", + # "@azure-tools/cadl-python", + # "@azure-tools/typespec-java", + # "@azure-tools/cadl-typescript", +] + +options: + "@azure-tools/typespec-csharp": + namespace : "Azure.Health.Insights.CancerProfiling" + clear-output-folder : true + new-project : false + model-namespace : false + # "@azure-tools/typespec-java": + # namespace: "Com.Azure.Health.Insights.CancerProfiling" + # clear-output-folder: true + # new-project: false + # model-namespace: false + # "@azure-tools/cadl-python": + # package-mode: "dataplane" + # package-name: "azure-healthinsights-cancerprofiling" + # "@azure-tools/cadl-typescript": + # packageDetails: + # name: "@azure-rest/health-insights-cancerprofiling" + # description: "Azure Health Insights CancerProfiling" \ No newline at end of file diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.openapi/examples/2023-03-01-preview/SuccessfulOncoPhenotypeRequest.json b/specification/cognitiveservices/HealthInsights/healthinsights.openapi/examples/2023-03-01-preview/SuccessfulOncoPhenotypeRequest.json new file mode 100644 index 000000000000..e30deca3119a --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.openapi/examples/2023-03-01-preview/SuccessfulOncoPhenotypeRequest.json @@ -0,0 +1,60 @@ +{ + "operationId": "OncoPhenotype_CreateJob", + "title": "Creates an Onco Phenotype job with the given request body.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2023-03-01-preview", + "body": { + "patients": [ + { + "id": "Patient ID Example 1", + "info": { + "sex": "female", + "birthDate": "1975-09-27" + }, + "data": [ + { + "type": "note", + "clinicalType": "historyAndPhysical", + "id": "1", + "language": "en", + "createdDateTime": "2021-10-26T16:54:44.739Z", + "content": { + "sourceType": "inline", + "value": "Sample note 1" + } + }, + { + "type": "note", + "clinicalType": "imaging", + "id": "2", + "language": "en", + "createdDateTime": "2020-11-26T16:39:44.739Z", + "content": { + "sourceType": "inline", + "value": "Sample note 2" + } + } + ] + } + ], + "configuration": { + "verbose": true, + "includeEvidence": true, + "inferenceTypes": [ + "histology", + "clinicalStageT" + ], + "checkForCancerCase": false + } + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{endpoint}/healthinsights/oncophenotype/jobs/{jobId}?api-version=2023-03-01-preview", + "Retry-After": "1" + } + } + } +} diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.openapi/examples/2023-03-01-preview/SuccessfulOncoPhenotypeResponse.json b/specification/cognitiveservices/HealthInsights/healthinsights.openapi/examples/2023-03-01-preview/SuccessfulOncoPhenotypeResponse.json new file mode 100644 index 000000000000..7babf7113fe2 --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.openapi/examples/2023-03-01-preview/SuccessfulOncoPhenotypeResponse.json @@ -0,0 +1,65 @@ +{ + "operationId": "OncoPhenotype_GetJob", + "title": "Gets the status and details of the Onco Phenotype job.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2023-03-01-preview", + "jobId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "responses": { + "200": { + "body": { + "jobId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "createdDateTime": "2021-11-26T17:22:27.386Z", + "expirationDateTime": "2021-11-26T17:22:27.386Z", + "lastUpdateDateTime": "2021-11-26T17:22:27.386Z", + "status": "succeeded", + "results": { + "patients": [ + { + "id": "Patient ID Example 1", + "inferences": [ + { + "type": "histology", + "value": "8561", + "description": "Adenolymphoma", + "confidenceScore": 0.85, + "evidence": [ + { + "patientDataEvidence": { + "id": "1", + "text": "string", + "offset": 70, + "length": 135 + }, + "importance": 1 + } + ] + }, + { + "type": "clinicalStageT", + "value": "T3", + "description": "Locally advanced disease at risk for micrometastases", + "confidenceScore": 0.88, + "evidence": [ + { + "patientDataEvidence": { + "id": "2", + "text": "string", + "offset": 12, + "length": 9 + }, + "importance": 1 + } + ], + "caseId": "1" + } + ] + } + ], + "modelVersion": "2021-11-26" + } + } + } + } +} diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.openapi/examples/2023-03-01-preview/SuccessfulTrialMatcherRequest.json b/specification/cognitiveservices/HealthInsights/healthinsights.openapi/examples/2023-03-01-preview/SuccessfulTrialMatcherRequest.json new file mode 100644 index 000000000000..620f0fa8e2a5 --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.openapi/examples/2023-03-01-preview/SuccessfulTrialMatcherRequest.json @@ -0,0 +1,157 @@ +{ + "operationId": "TrialMatcher_CreateJob", + "title": "Creates a Trial Matcher job with the given request body.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2023-03-01-preview", + "body": { + "patients": [ + { + "id": "Patient ID Example 2", + "info": { + "sex": "female", + "birthDate": "1976-09-10", + "clinicalInfo": [ + { + "system": "UMLS", + "code": "C0041296", + "name": "Tuberculosis" + }, + { + "system": "UMLS", + "code": "C0027646", + "name": "Diagnostic Neoplasm Staging", + "value": "3" + } + ] + } + } + ], + "configuration": { + "verbose": true, + "includeEvidence": true, + "clinicalTrials": { + "customTrials": [ + { + "id": "1", + "eligibilityCriteriaText": "Inclusion criteria: In-patients female with acute tuberculosis, suspected tuberculosis or other pulmonary diseases (pneumonia, Bronchitis, COPD)", + "demographics": { + "acceptedSex": "female", + "acceptedAgeRange": { + "minimumAge": { + "unit": "years", + "value": 30 + } + } + }, + "metadata": { + "phases": [ + "phase2" + ], + "studyType": "interventional", + "recruitmentStatus": "recruiting", + "conditions": [ + "tuberculosis" + ], + "sponsors": [ + "University Hospital, Basel, Switzerland" + ], + "contacts": [ + { + "name": "John Doe, PD Dr. Med", + "email": "John@contoso.com", + "phone": "+55-555-5555-55" + } + ], + "facilities": [ + { + "name": "University Hospital, Basel", + "city": "Basel", + "state": "Basel-Stadt", + "countryOrRegion": "Switzerland" + } + ] + } + } + ], + "registryFilters": [ + { + "studyTypes": [ + "interventional", + "observational" + ], + "recruitmentStatuses": [ + "recruiting", + "enrollingByInvitation" + ], + "phases": [ + "phase2", + "phase3" + ], + "purposes": [ + "diagnostic", + "prevention", + "basicScience" + ], + "sources": [ + "clinicaltrials.gov" + ], + "facilityLocations": [ + { + "city": "Basel", + "countryOrRegion": "Switzerland" + }, + { + "city": "Allschwil", + "countryOrRegion": "Switzerland" + } + ] + }, + { + "sponsors": [ + "Janssen" + ], + "sources": [ + "clinicaltrials.gov" + ], + "facilityAreas": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 7.588576, + 47.559601 + ] + }, + "properties": { + "subType": "Circle", + "radius": 80000 + } + } + ] + }, + { + "ids": [ + "NCT04006015", + "NCT04545788", + "NCT04773711" + ], + "sources": [ + "clinicaltrials.gov" + ] + } + ] + } + } + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{endpoint}/healthinsights/trialmatcher/jobs/{jobId}?api-version=2023-03-01-preview", + "Retry-After": "1" + } + } + } +} diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.openapi/examples/2023-03-01-preview/SuccessfulTrialMatcherResponse.json b/specification/cognitiveservices/HealthInsights/healthinsights.openapi/examples/2023-03-01-preview/SuccessfulTrialMatcherResponse.json new file mode 100644 index 000000000000..efbb7199e3a1 --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.openapi/examples/2023-03-01-preview/SuccessfulTrialMatcherResponse.json @@ -0,0 +1,113 @@ +{ + "operationId": "TrialMatcher_GetJob", + "title": "Gets the status and details of the Trial Matcher job.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2023-03-01-preview", + "jobId": "a4d3d73e-2be3-4ca1-bd4f-66a5bdd19754" + }, + "responses": { + "200": { + "body": { + "jobId": "a4d3d73e-2be3-4ca1-bd4f-66a5bdd19754", + "createdDateTime": "2021-11-28T09:13:11.046Z", + "expirationDateTime": "2021-11-28T09:13:11.046Z", + "lastUpdateDateTime": "2021-11-28T09:13:11.046Z", + "status": "succeeded", + "results": { + "patients": [ + { + "id": "Patient ID Example 2", + "inferences": [ + { + "type": "trialEligibility", + "value": "Eligible", + "description": "SwEaTB - Diagnosing of Acute Tuberculosis", + "confidenceScore": 1, + "evidence": [ + { + "eligibilityCriteriaEvidence": "In-patients with acute tuberculosis", + "patientInfoEvidence": { + "system": "UMLS", + "code": "C0019046", + "name": "tuberculosis" + }, + "importance": 1 + } + ], + "id": "NCT03667742", + "source": "clinicaltrials.gov", + "metadata": { + "phases": [ + "phase3" + ], + "studyType": "observational", + "recruitmentStatus": "recruiting", + "conditions": [ + "Tuberculosis" + ], + "sponsors": [ + "University Hospital, Basel, Switzerland" + ], + "contacts": [ + { + "name": "John Doe, PD Dr. Med", + "email": "John@contoso.com", + "phone": "+55-555-5555-55" + } + ], + "facilities": [ + { + "name": "University Hospital, Basel", + "city": "Basel", + "countryOrRegion": "Switzerland" + } + ] + } + }, + { + "type": "trialEligibility", + "value": "Ineligible", + "description": "Design of an Integrative Algorithm for Staging Tuberculosis (STAGE-TB)", + "confidenceScore": 1, + "evidence": [ + { + "eligibilityCriteriaEvidence": "negative for Quantiferon- TB Gold Plus Test or ELISpot", + "patientInfoEvidence": { + "system": "UMLS", + "code": "C0920508", + "name": "Enzyme-Linked Immunospot Assay", + "value": "30,000 PBMC cells per 10ul" + }, + "importance": 1 + } + ], + "id": "NCT03691883", + "source": "clinicaltrials.gov" + } + ], + "neededClinicalInfo": [ + { + "system": "UMLS", + "code": "C4317078", + "name": "Mycobacterium Tuberculosis Measurement ", + "semanticType": "Laboratory Procedure", + "category": "EXAMINATION_NAME" + }, + { + "system": "UMLS", + "code": "C0008031", + "name": "Chest Pain", + "semanticType": "Sign or Symptom", + "category": "SYMPTOM_OR_SIGN" + } + ] + } + ], + "modelVersion": "2021-10-28", + "knowledgeGraphLastUpdateDate": "2021-11-26" + } + } + } + } +} diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.openapi/main.tsp b/specification/cognitiveservices/HealthInsights/healthinsights.openapi/main.tsp new file mode 100644 index 000000000000..a4f86127d012 --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.openapi/main.tsp @@ -0,0 +1,7 @@ +import "../healthinsights.trialmatcher/route.trialmatcher.tsp"; +import "../healthinsights.oncophenotype/route.oncophenotype.tsp"; + +import "@typespec/rest"; +import "@typespec/http"; +import "@typespec/versioning"; +import "./service.tsp"; diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.openapi/service.tsp b/specification/cognitiveservices/HealthInsights/healthinsights.openapi/service.tsp new file mode 100644 index 000000000000..f9809429cac6 --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.openapi/service.tsp @@ -0,0 +1,26 @@ +// imports to rest,http and versioning should be done outside of this file (csharp emitter issue) +using TypeSpec.Rest; +using TypeSpec.Http; +using TypeSpec.Versioning; + + +@service({title: "Azure Health Insights"}) +@versioned(ApiVersion) +@doc("Azure Health Insights provides an API that serves insight models, specific for Health & Life Sciences, that perform analysis and provide inferences to be used by a human.") +@server( + "{endpoint}/healthinsights", + "Azure Health Insights provides an API that serves insight models, specific for Health & Life Sciences, that perform analysis and provide inferences to be used by a human.", + { + @doc("Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).") + endpoint: url, + } +) + +@useAuth(ApiKeyAuth) + +namespace AzureHealthInsights; + +enum ApiVersion { + v2023_03_01_preview: "2023-03-01-preview" +} + diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.openapi/tspconfig.yaml b/specification/cognitiveservices/HealthInsights/healthinsights.openapi/tspconfig.yaml new file mode 100644 index 000000000000..e2d33c67e55f --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.openapi/tspconfig.yaml @@ -0,0 +1,10 @@ +emit: [ + "@azure-tools/typespec-autorest", + # "@azure-tools/cadl-apiview" +] + + +options: + "@azure-tools/typespec-autorest": + output-file: "openapi.json" + examples-directory: "./examples" diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.trialmatcher/client.tsp b/specification/cognitiveservices/HealthInsights/healthinsights.trialmatcher/client.tsp new file mode 100644 index 000000000000..ba35147b5c2d --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.trialmatcher/client.tsp @@ -0,0 +1,19 @@ +import "@azure-tools/typespec-client-generator-core"; +import "./route.trialmatcher.tsp"; + +import "@typespec/rest"; +import "@typespec/http"; +import "@typespec/versioning"; +import "../healthinsights.openapi/service.tsp"; + +using Azure.ClientGenerator.Core; + +namespace ClientForAzureHealthInsights; + +@client({ + name: "ClinicalMatchingClient", + service: AzureHealthInsights +}) + interface ClinicalMatchingClient { + MatchTrials is AzureHealthInsights.TrialMatcher.CreateJob; +} diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.trialmatcher/model.trialmatcher.tsp b/specification/cognitiveservices/HealthInsights/healthinsights.trialmatcher/model.trialmatcher.tsp new file mode 100644 index 000000000000..04230ac744c2 --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.trialmatcher/model.trialmatcher.tsp @@ -0,0 +1,411 @@ +import "../healthinsights.common/model.common.request.tsp"; +import "../healthinsights.common/model.common.response.tsp"; +import "../healthinsights.common/model.common.shared.tsp"; + +using TypeSpec.Rest; + +namespace AzureHealthInsights; + +@doc("The body of the Trial Matcher request.") +model TrialMatcherData { + ...Request; + @doc("Configuration affecting the Trial Matcher model's inference.") + configuration?: TrialMatcherModelConfiguration; +} + +@doc("Configuration affecting the Trial Matcher model's inference.") +model TrialMatcherModelConfiguration { + ...ModelConfiguration; + @doc(""" +The clinical trials that the patient(s) should be matched to.
The trial +selection can be given as a list of custom clinical trials and/or a list of +filters to known clinical trial registries. In case both are given, the +resulting trial set is a union of the two sets. +""") + clinicalTrials: ClinicalTrials; +} + +@resource("trialmatcher/jobs") +@doc("The response for the Trial Matcher request.") +model TrialMatcherResult { + ...Response; + + @doc("The inference results for the Trial Matcher request.") + @visibility("read") + results?: TrialMatcherResults; +} + +@doc("The inference results for the Trial Matcher request.") +model TrialMatcherResults { + @doc("Results for the patients given in the request.") + patients: TrialMatcherPatientResult[]; + + @doc("The version of the model used for inference, expressed as the model date.") + modelVersion: ModelVersion; + + @doc("The date when the clinical trials knowledge graph was last updated.") + knowledgeGraphLastUpdateDate?: plainDate; +} + +@doc("The results of the model's work for a single patient.") +model TrialMatcherPatientResult { + @doc("The identifier given for the patient in the request.") + id: string; + + @doc("The model's inferences for the given patient.") + inferences: TrialMatcherInference[]; + + @doc(""" +Clinical information which is needed to provide better trial matching results for the patient. +""") + neededClinicalInfo?: NeededClinicalInfo; +} + +@doc("Clinical information which is needed to provide better trial matching results for the patient.") +model NeededClinicalInfo is ExtendedClinicalCodedElement[]; + +@doc(""" +A piece of clinical information, expressed as a code in a clinical coding system, extended by semantic information. +""") +model ExtendedClinicalCodedElement { + ...ClinicalCodedElement; + + @doc(""" +The [UMLS semantic type](https://www.nlm.nih.gov/research/umls/META3_current_semantic_types.html) associated with the coded concept. +""") + semanticType?: string; + + @doc(""" +The bio-medical category related to the coded concept, e.g. Diagnosis, Symptom, Medication, Examination. +""") + category?: string; +} + + +@doc("An inference made by the Trial Matcher model regarding a patient.") +model TrialMatcherInference { + @doc("The type of the Trial Matcher inference.") + type: TrialMatcherInferenceType; + ...Inference; + + @doc("The evidence corresponding to the inference value.") + evidence?: TrialMatcherInferenceEvidence[]; + + @doc("The identifier of the clinical trial.") + @minLength(1) + id?: string; + + @doc("Possible sources of a clinical trial.") + source?: ClinicalTrialSource; + + @doc("Trial data which is of interest to the potential participant.") + metadata?: ClinicalTrialMetadata; +} + +@doc(""" +The clinical trials that the patient(s) should be matched to. +The trial selection can be given as a list of custom clinical trials and/or a list of filters to known clinical trial registries. +In case both are given, the resulting trial set is a union of the two sets. +""") +model ClinicalTrials { + @doc("A list of clinical trials.") + @minItems(1) + customTrials?: ClinicalTrialDetails[]; + + @doc(""" +A list of filters, each one creating a selection of trials from a given +clinical trial registry. +""") + @minItems(1) + registryFilters?: ClinicalTrialRegistryFilter[]; +} + +@doc(""" +A filter defining a subset of clinical trials from a given clinical trial registry (e.g. clinicaltrials.gov). +""") +model ClinicalTrialRegistryFilter { + @doc(""" +Trials with any of the given medical conditions will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the medical conditions. +""") + conditions?: string[]; + + @doc(""" +Trials with any of the given study types will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the study types. +""") + studyTypes?: ClinicalTrialStudyType[]; + + @doc(""" +Trials with any of the given recruitment statuses will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the recruitment statuses. +""") + recruitmentStatuses?: ClinicalTrialRecruitmentStatus[]; + + @doc(""" +Trials with any of the given sponsors will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the sponsors. +""") + sponsors?: string[]; + + @doc(""" +Trials with any of the given phases will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the phases. +""") + phases?: ClinicalTrialPhase[]; + + @doc(""" +Trials with any of the given purposes will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the purposes. +""") + purposes?: ClinicalTrialPurpose[]; + + @doc(""" +Trials with any of the given identifiers will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the trial identifiers. +""") + ids?: string[]; + + @doc(""" +Trials with any of the given sources will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the sources. +""") + sources?: ClinicalTrialSource[]; + + @doc(""" +Trials with any of the given facility names will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the trial facility names. +""") + facilityNames?: string[]; + + @doc(""" +Trials with any of the given facility locations will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the trial facility locations. +""") + facilityLocations?: GeographicLocation[]; + + @doc(""" +Trials with any of the given facility area boundaries will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the trial facility area boundaries. +""") + facilityAreas?: GeographicArea[]; +} + +@doc(""" +A geographic area, expressed as a `Circle` geometry represented using a `GeoJSON Feature` (see [GeoJSON spec](https://tools.ietf.org/html/rfc7946)). +""") +model GeographicArea { + @doc("`GeoJSON` type.") + type: GeoJsonType; + + @doc("`GeoJSON` geometry, representing the area circle's center.") + geometry: AreaGeometry; + + @doc("`GeoJSON` object properties.") + properties: AreaProperties; +} + +@doc("`GeoJSON` geometry, representing the area circle's center.") +model AreaGeometry { + @doc("`GeoJSON` geometry type.") + type: GeoJsonGeometryType; + + @doc(""" +Coordinates of the area circle's center, represented according to the `GeoJSON` standard. +This is an array of 2 decimal numbers, longitude and latitude (precisely in this order). +""") + @minItems(2) + @maxItems(2) + coordinates: float32[]; +} + +@doc("`GeoJSON` object properties.") +model AreaProperties { + @doc("`GeoJSON` object sub-type.") + subType: GeoJsonPropertiesSubType; + + @doc("The radius of the area's circle, in meters.") + @minValueExclusive(0.0) + radius: float64; +} + +@doc("A description of a clinical trial.") +model ClinicalTrialDetails { + @doc(""" +A given identifier for the clinical trial. Has to be unique within a list of clinical trials. +""") + @minLength(1) + id: string; + + @doc(""" +The eligibility criteria of the clinical trial (inclusion and exclusion), given as text. +""") + eligibilityCriteriaText?: string; + + @doc("Demographic criteria for a clinical trial.") + demographics?: ClinicalTrialDemographics; + + @doc("Trial data which is of interest to the potential participant.") + metadata: ClinicalTrialMetadata; +} + +@doc("Demographic criteria for a clinical trial.") +model ClinicalTrialDemographics { + @doc("Indication of the sex of people who may participate in the clinical trial.") + acceptedSex?: ClinicalTrialAcceptedSex; + + @doc("A definition of the range of ages accepted by a clinical trial. Contains a minimum age and/or a maximum age.") + acceptedAgeRange?: AcceptedAgeRange; +} + +@doc(""" +A definition of the range of ages accepted by a clinical trial. Contains a minimum age and/or a maximum age. +""") +model AcceptedAgeRange { + @doc("A person's age, given as a number (value) and a unit (e.g. years, months)") + minimumAge?: AcceptedAge; + + @doc("A person's age, given as a number (value) and a unit (e.g. years, months)") + maximumAge?: AcceptedAge; +} + +@doc("A person's age, given as a number (value) and a unit (e.g. years, months)") +model AcceptedAge { + @doc("Possible units for a person's age.") + unit: AgeUnit; + + @doc("The number of years/months/days that represents the person's age.") + @minValueExclusive(0.0) + value: float32; +} + +@doc("Trial data which is of interest to the potential participant.") +model ClinicalTrialMetadata { + @doc(""" +Phases which are relevant for the clinical trial. +Each clinical trial can be in a certain phase or in multiple phases. +""") + phases?: ClinicalTrialPhase[]; + + @doc("Possible study types of a clinical trial.") + studyType?: ClinicalTrialStudyType; + + @doc("Possible recruitment status of a clinical trial.") + recruitmentStatus?: ClinicalTrialRecruitmentStatus; + + @doc(""" +Medical conditions and their synonyms which are relevant for the clinical trial, given as strings. +""") + @minItems(1) + conditions: string[]; + + @doc("Sponsors/collaborators involved with the trial.") + sponsors?: string[]; + + @doc(""" +Contact details of the trial administrators, for patients that want to participate in the trial. +""") + contacts?: ContactDetails[]; + + @doc("Research facilities where the clinical trial is conducted.") + facilities?: ClinicalTrialResearchFacility[]; +} + +@doc("A person's contact details.") +model ContactDetails { + @doc("The person's name.") + name?: string; + + @doc("The person's email.") + email?: string; + + @doc("A person's phone number.") + phone?: string; +} + +@doc("Details of a research facility where a clinical trial is conducted.") +model ClinicalTrialResearchFacility { + @doc("The facility's name.") + name: string; + ...GeographicLocation; +} + +@doc("Possible values for the Sex eligibility criterion as accepted by clinical trials, which indicates the sex of people who may participate in a clinical study.") +enum ClinicalTrialAcceptedSex { + All: "all", + Female: "female", + Male: "male" +} + +@doc("Possible units for a person's age.") +enum AgeUnit { + Years: "years", + Months: "months", + Days: "days", +} + +@doc("Possible phases of a clinical trial.") +enum ClinicalTrialPhase { + NotApplicable: "notApplicable", + EarlyPhase1: "earlyPhase1", + Phase1: "phase1", + Phase2: "phase2", + Phase3: "phase3", + Phase4: "phase4", +} + +@doc("Possible study types of a clinical trial.") +enum ClinicalTrialStudyType { + Interventional: "interventional", + Observational: "observational", + ExpandedAccess: "expandedAccess", + PatientRegistries: "patientRegistries", +} + +@doc("Possible recruitment status of a clinical trial.") +enum ClinicalTrialRecruitmentStatus { + UnknownStatus: "unknownStatus", + NotYetRecruiting: "notYetRecruiting", + Recruiting: "recruiting", + EnrollingByInvitation: "enrollingByInvitation", +} + +@doc("Possible purposes of a clinical trial.") +enum ClinicalTrialPurpose { + NotApplicable: "notApplicable", + Screening: "screening", + Diagnostic: "diagnostic", + Prevention: "prevention", + HealthServicesResearch: "healthServicesResearch", + Treatment: "treatment", + DeviceFeasibility: "deviceFeasibility", + SupportiveCare: "supportiveCare", + BasicScience: "basicScience", + Other: "other", +} + +@doc("Possible sources of a clinical trial.") +enum ClinicalTrialSource { + Custom: "custom", + ClinicaltrialsGov: "clinicaltrials.gov", +} + +@doc("`GeoJSON` type.") +enum GeoJsonType { + Feature: "Feature", +} + +@doc("`GeoJSON` geometry type.") +enum GeoJsonGeometryType { + Point: "Point", +} + +@doc("`GeoJSON` object sub-type.") +enum GeoJsonPropertiesSubType { + Circle: "Circle", +} + +@doc("The type of the Trial Matcher inference.") +enum TrialMatcherInferenceType { + TrialEligibility: "trialEligibility", +} diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.trialmatcher/route.trialmatcher.tsp b/specification/cognitiveservices/HealthInsights/healthinsights.trialmatcher/route.trialmatcher.tsp new file mode 100644 index 000000000000..337120b151ba --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.trialmatcher/route.trialmatcher.tsp @@ -0,0 +1,31 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-autorest"; +import "@typespec/rest"; +import "@typespec/http"; + +import "./model.trialmatcher.tsp"; +import "../healthinsights.common/primitives.tsp"; + +using Azure.Core; +using TypeSpec.Rest; +using TypeSpec.Http; +using Autorest; + +namespace AzureHealthInsights; + +interface TrialMatcher { + @summary("Get Trial Matcher job details") + @tag("TrialMatcher") + @doc("Gets the status and details of the Trial Matcher job.") + @example("./examples/SuccessfulTrialMatcherResponse.json", "SuccessfulTrialMatcherGetAnalyzeStatus") + GetJob is Azure.Core.ResourceRead; + + @summary("Create Trial Matcher job") + @tag("TrialMatcher") + @doc("Creates a Trial Matcher job with the given request body.") + @pollingOperation(TrialMatcher.GetJob) + @route("/trialmatcher/jobs") + @example("./examples/SuccessfulTrialMatcherRequest.json", "SuccessfulTrialMatcherAnalyzeRequest") + CreateJob is LongRunningRpcOperation; +} + diff --git a/specification/cognitiveservices/HealthInsights/healthinsights.trialmatcher/tspconfig.yaml b/specification/cognitiveservices/HealthInsights/healthinsights.trialmatcher/tspconfig.yaml new file mode 100644 index 000000000000..847e368f6952 --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/healthinsights.trialmatcher/tspconfig.yaml @@ -0,0 +1,25 @@ +emit: [ + "@azure-tools/typespec-csharp", + # "@azure-tools/cadl-python", + # "@azure-tools/typespec-java", + # "@azure-tools/cadl-typescript", +] + +options: + "@azure-tools/typespec-csharp": + namespace : "Azure.Health.Insights.ClinicalMatching" + clear-output-folder : true + new-project : false + model-namespace : false + # "@azure-tools/typespec-java": + # namespace: "Com.Azure.Health.Insights.ClinicalMatching" + # clear-output-folder: true + # new-project: false + # model-namespace: false + # "@azure-tools/cadl-python": + # package-mode: "dataplane" + # package-name: "azure-healthinsights-clinicalmatching" + # "@azure-tools/cadl-typescript": + # packageDetails: + # name: "@azure-rest/health-insights-clinicalmatching" + # description: "Azure Health Insights ClinicalMatching" diff --git a/specification/cognitiveservices/HealthInsights/package.json b/specification/cognitiveservices/HealthInsights/package.json new file mode 100644 index 000000000000..7a52f1eed36f --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/package.json @@ -0,0 +1,22 @@ +{ + "name": "@cadl-api-spec/azure-health-insights", + "author": "Microsoft Corporation", + "description": "Azure Health Insights provides an API that serves insight models, specific for Health & Life Sciences, that perform analysis and provide inferences to be used by a human.", + "license": "MIT", + "dependencies": { + "@typespec/compiler": "latest", + "@typespec/rest": "latest", + "@typespec/http": "latest", + "@typespec/versioning": "latest", + "@typespec/prettier-plugin-typespec": "latest", + "@azure-tools/typespec-azure-core": "latest", + "@azure-tools/typespec-autorest": "latest", + "@azure-tools/typespec-apiview": "latest", + "@azure-tools/typespec-client-generator-core": "latest", + "@azure-tools/typespec-csharp": "latest", + "@azure-tools/typespec-java": "latest", + "@azure-tools/cadl-python": "latest", + "prettier": "^2.8.3" + }, + "private": true +} diff --git a/specification/cognitiveservices/HealthInsights/service.tsp b/specification/cognitiveservices/HealthInsights/service.tsp new file mode 100644 index 000000000000..506717c2db41 --- /dev/null +++ b/specification/cognitiveservices/HealthInsights/service.tsp @@ -0,0 +1,26 @@ + +using TypeSpec.Rest; +using TypeSpec.Http; +using TypeSpec.Versioning; + + +@service({title: "Azure Health Insights"}) +@versioned(ApiVersion) +@doc("Azure Health Insights provides an API that serves insight models, specific for Health & Life Sciences, that perform analysis and provide inferences to be used by a human.") +@server( + "{endpoint}/healthinsights", + "Azure Health Insights provides an API that serves insight models, specific for Health & Life Sciences, that perform analysis and provide inferences to be used by a human.", + { + @doc("Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).") + endpoint: url, + } +) + +@useAuth(ApiKeyAuth) + +namespace AzureHealthInsights; + +enum ApiVersion { + v2023_03_01_preview: "2023-03-01-preview" +} + diff --git a/specification/cognitiveservices/data-plane/HealthInsights/preview/2023-03-01-preview/examples/SuccessfulOncoPhenotypeRequest.json b/specification/cognitiveservices/data-plane/HealthInsights/preview/2023-03-01-preview/examples/SuccessfulOncoPhenotypeRequest.json new file mode 100644 index 000000000000..e30deca3119a --- /dev/null +++ b/specification/cognitiveservices/data-plane/HealthInsights/preview/2023-03-01-preview/examples/SuccessfulOncoPhenotypeRequest.json @@ -0,0 +1,60 @@ +{ + "operationId": "OncoPhenotype_CreateJob", + "title": "Creates an Onco Phenotype job with the given request body.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2023-03-01-preview", + "body": { + "patients": [ + { + "id": "Patient ID Example 1", + "info": { + "sex": "female", + "birthDate": "1975-09-27" + }, + "data": [ + { + "type": "note", + "clinicalType": "historyAndPhysical", + "id": "1", + "language": "en", + "createdDateTime": "2021-10-26T16:54:44.739Z", + "content": { + "sourceType": "inline", + "value": "Sample note 1" + } + }, + { + "type": "note", + "clinicalType": "imaging", + "id": "2", + "language": "en", + "createdDateTime": "2020-11-26T16:39:44.739Z", + "content": { + "sourceType": "inline", + "value": "Sample note 2" + } + } + ] + } + ], + "configuration": { + "verbose": true, + "includeEvidence": true, + "inferenceTypes": [ + "histology", + "clinicalStageT" + ], + "checkForCancerCase": false + } + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{endpoint}/healthinsights/oncophenotype/jobs/{jobId}?api-version=2023-03-01-preview", + "Retry-After": "1" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/HealthInsights/preview/2023-03-01-preview/examples/SuccessfulOncoPhenotypeResponse.json b/specification/cognitiveservices/data-plane/HealthInsights/preview/2023-03-01-preview/examples/SuccessfulOncoPhenotypeResponse.json new file mode 100644 index 000000000000..7babf7113fe2 --- /dev/null +++ b/specification/cognitiveservices/data-plane/HealthInsights/preview/2023-03-01-preview/examples/SuccessfulOncoPhenotypeResponse.json @@ -0,0 +1,65 @@ +{ + "operationId": "OncoPhenotype_GetJob", + "title": "Gets the status and details of the Onco Phenotype job.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2023-03-01-preview", + "jobId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "responses": { + "200": { + "body": { + "jobId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "createdDateTime": "2021-11-26T17:22:27.386Z", + "expirationDateTime": "2021-11-26T17:22:27.386Z", + "lastUpdateDateTime": "2021-11-26T17:22:27.386Z", + "status": "succeeded", + "results": { + "patients": [ + { + "id": "Patient ID Example 1", + "inferences": [ + { + "type": "histology", + "value": "8561", + "description": "Adenolymphoma", + "confidenceScore": 0.85, + "evidence": [ + { + "patientDataEvidence": { + "id": "1", + "text": "string", + "offset": 70, + "length": 135 + }, + "importance": 1 + } + ] + }, + { + "type": "clinicalStageT", + "value": "T3", + "description": "Locally advanced disease at risk for micrometastases", + "confidenceScore": 0.88, + "evidence": [ + { + "patientDataEvidence": { + "id": "2", + "text": "string", + "offset": 12, + "length": 9 + }, + "importance": 1 + } + ], + "caseId": "1" + } + ] + } + ], + "modelVersion": "2021-11-26" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/HealthInsights/preview/2023-03-01-preview/examples/SuccessfulTrialMatcherRequest.json b/specification/cognitiveservices/data-plane/HealthInsights/preview/2023-03-01-preview/examples/SuccessfulTrialMatcherRequest.json new file mode 100644 index 000000000000..620f0fa8e2a5 --- /dev/null +++ b/specification/cognitiveservices/data-plane/HealthInsights/preview/2023-03-01-preview/examples/SuccessfulTrialMatcherRequest.json @@ -0,0 +1,157 @@ +{ + "operationId": "TrialMatcher_CreateJob", + "title": "Creates a Trial Matcher job with the given request body.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2023-03-01-preview", + "body": { + "patients": [ + { + "id": "Patient ID Example 2", + "info": { + "sex": "female", + "birthDate": "1976-09-10", + "clinicalInfo": [ + { + "system": "UMLS", + "code": "C0041296", + "name": "Tuberculosis" + }, + { + "system": "UMLS", + "code": "C0027646", + "name": "Diagnostic Neoplasm Staging", + "value": "3" + } + ] + } + } + ], + "configuration": { + "verbose": true, + "includeEvidence": true, + "clinicalTrials": { + "customTrials": [ + { + "id": "1", + "eligibilityCriteriaText": "Inclusion criteria: In-patients female with acute tuberculosis, suspected tuberculosis or other pulmonary diseases (pneumonia, Bronchitis, COPD)", + "demographics": { + "acceptedSex": "female", + "acceptedAgeRange": { + "minimumAge": { + "unit": "years", + "value": 30 + } + } + }, + "metadata": { + "phases": [ + "phase2" + ], + "studyType": "interventional", + "recruitmentStatus": "recruiting", + "conditions": [ + "tuberculosis" + ], + "sponsors": [ + "University Hospital, Basel, Switzerland" + ], + "contacts": [ + { + "name": "John Doe, PD Dr. Med", + "email": "John@contoso.com", + "phone": "+55-555-5555-55" + } + ], + "facilities": [ + { + "name": "University Hospital, Basel", + "city": "Basel", + "state": "Basel-Stadt", + "countryOrRegion": "Switzerland" + } + ] + } + } + ], + "registryFilters": [ + { + "studyTypes": [ + "interventional", + "observational" + ], + "recruitmentStatuses": [ + "recruiting", + "enrollingByInvitation" + ], + "phases": [ + "phase2", + "phase3" + ], + "purposes": [ + "diagnostic", + "prevention", + "basicScience" + ], + "sources": [ + "clinicaltrials.gov" + ], + "facilityLocations": [ + { + "city": "Basel", + "countryOrRegion": "Switzerland" + }, + { + "city": "Allschwil", + "countryOrRegion": "Switzerland" + } + ] + }, + { + "sponsors": [ + "Janssen" + ], + "sources": [ + "clinicaltrials.gov" + ], + "facilityAreas": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + 7.588576, + 47.559601 + ] + }, + "properties": { + "subType": "Circle", + "radius": 80000 + } + } + ] + }, + { + "ids": [ + "NCT04006015", + "NCT04545788", + "NCT04773711" + ], + "sources": [ + "clinicaltrials.gov" + ] + } + ] + } + } + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{endpoint}/healthinsights/trialmatcher/jobs/{jobId}?api-version=2023-03-01-preview", + "Retry-After": "1" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/HealthInsights/preview/2023-03-01-preview/examples/SuccessfulTrialMatcherResponse.json b/specification/cognitiveservices/data-plane/HealthInsights/preview/2023-03-01-preview/examples/SuccessfulTrialMatcherResponse.json new file mode 100644 index 000000000000..efbb7199e3a1 --- /dev/null +++ b/specification/cognitiveservices/data-plane/HealthInsights/preview/2023-03-01-preview/examples/SuccessfulTrialMatcherResponse.json @@ -0,0 +1,113 @@ +{ + "operationId": "TrialMatcher_GetJob", + "title": "Gets the status and details of the Trial Matcher job.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2023-03-01-preview", + "jobId": "a4d3d73e-2be3-4ca1-bd4f-66a5bdd19754" + }, + "responses": { + "200": { + "body": { + "jobId": "a4d3d73e-2be3-4ca1-bd4f-66a5bdd19754", + "createdDateTime": "2021-11-28T09:13:11.046Z", + "expirationDateTime": "2021-11-28T09:13:11.046Z", + "lastUpdateDateTime": "2021-11-28T09:13:11.046Z", + "status": "succeeded", + "results": { + "patients": [ + { + "id": "Patient ID Example 2", + "inferences": [ + { + "type": "trialEligibility", + "value": "Eligible", + "description": "SwEaTB - Diagnosing of Acute Tuberculosis", + "confidenceScore": 1, + "evidence": [ + { + "eligibilityCriteriaEvidence": "In-patients with acute tuberculosis", + "patientInfoEvidence": { + "system": "UMLS", + "code": "C0019046", + "name": "tuberculosis" + }, + "importance": 1 + } + ], + "id": "NCT03667742", + "source": "clinicaltrials.gov", + "metadata": { + "phases": [ + "phase3" + ], + "studyType": "observational", + "recruitmentStatus": "recruiting", + "conditions": [ + "Tuberculosis" + ], + "sponsors": [ + "University Hospital, Basel, Switzerland" + ], + "contacts": [ + { + "name": "John Doe, PD Dr. Med", + "email": "John@contoso.com", + "phone": "+55-555-5555-55" + } + ], + "facilities": [ + { + "name": "University Hospital, Basel", + "city": "Basel", + "countryOrRegion": "Switzerland" + } + ] + } + }, + { + "type": "trialEligibility", + "value": "Ineligible", + "description": "Design of an Integrative Algorithm for Staging Tuberculosis (STAGE-TB)", + "confidenceScore": 1, + "evidence": [ + { + "eligibilityCriteriaEvidence": "negative for Quantiferon- TB Gold Plus Test or ELISpot", + "patientInfoEvidence": { + "system": "UMLS", + "code": "C0920508", + "name": "Enzyme-Linked Immunospot Assay", + "value": "30,000 PBMC cells per 10ul" + }, + "importance": 1 + } + ], + "id": "NCT03691883", + "source": "clinicaltrials.gov" + } + ], + "neededClinicalInfo": [ + { + "system": "UMLS", + "code": "C4317078", + "name": "Mycobacterium Tuberculosis Measurement ", + "semanticType": "Laboratory Procedure", + "category": "EXAMINATION_NAME" + }, + { + "system": "UMLS", + "code": "C0008031", + "name": "Chest Pain", + "semanticType": "Sign or Symptom", + "category": "SYMPTOM_OR_SIGN" + } + ] + } + ], + "modelVersion": "2021-10-28", + "knowledgeGraphLastUpdateDate": "2021-11-26" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/HealthInsights/preview/2023-03-01-preview/openapi.json b/specification/cognitiveservices/data-plane/HealthInsights/preview/2023-03-01-preview/openapi.json new file mode 100644 index 000000000000..517267cf772c --- /dev/null +++ b/specification/cognitiveservices/data-plane/HealthInsights/preview/2023-03-01-preview/openapi.json @@ -0,0 +1,2032 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Health Insights", + "version": "2023-03-01-preview", + "description": "Azure Health Insights provides an API that serves insight models, specific for Health & Life Sciences, that perform analysis and provide inferences to be used by a human.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}/healthinsights", + "useSchemePrefix": false, + "parameters": [ + { + "name": "endpoint", + "in": "path", + "required": true, + "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).", + "type": "string", + "format": "uri", + "x-ms-skip-url-encoding": true + } + ] + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "in": "header", + "name": "Ocp-Apim-Subscription-Key" + } + }, + "tags": [ + { + "name": "TrialMatcher" + }, + { + "name": "OncoPhenotype" + } + ], + "paths": { + "/oncophenotype/jobs": { + "post": { + "tags": [ + "OncoPhenotype" + ], + "operationId": "OncoPhenotype_CreateJob", + "summary": "Create Onco Phenotype job", + "description": "Creates an Onco Phenotype job with the given request body.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityRequestId" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityFirstSent" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/OncoPhenotypeData" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/OncoPhenotypeResult" + } + }, + "202": { + "description": "The request has been accepted for processing, but processing has not yet completed.", + "headers": { + "Operation-Location": { + "description": "The location of an instance of OperationStatus", + "type": "string", + "format": "uri" + }, + "Retry-After": { + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": "integer", + "format": "int32" + }, + "Repeatability-Result": { + "description": "Indicates whether the repeatable request was accepted or rejected.", + "type": "string", + "enum": [ + "accepted", + "rejected" + ] + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "description": "String error code indicating what went wrong.", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + } + } + }, + "x-ms-examples": { + "SuccessfulOncoPhenotypeAnalyzeRequest": { + "$ref": "./examples/SuccessfulOncoPhenotypeRequest.json" + }, + "Creates an Onco Phenotype job with the given request body.": { + "$ref": "./examples/SuccessfulOncoPhenotypeRequest.json" + } + } + } + }, + "/oncophenotype/jobs/{jobId}": { + "get": { + "tags": [ + "OncoPhenotype" + ], + "operationId": "OncoPhenotype_GetJob", + "summary": "Get Onco Phenotype job details", + "description": "Gets the status and details of the Onco Phenotype job.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "jobId", + "in": "path", + "required": true, + "description": "A processing job identifier.", + "format": "uuid", + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/OncoPhenotypeResult" + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "description": "String error code indicating what went wrong.", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + } + } + }, + "x-ms-examples": { + "SuccessfulOncoPhenotypeGetAnalyzeStatus": { + "$ref": "./examples/SuccessfulOncoPhenotypeResponse.json" + }, + "Gets the status and details of the Onco Phenotype job.": { + "$ref": "./examples/SuccessfulOncoPhenotypeResponse.json" + } + } + } + }, + "/trialmatcher/jobs": { + "post": { + "tags": [ + "TrialMatcher" + ], + "operationId": "TrialMatcher_CreateJob", + "summary": "Create Trial Matcher job", + "description": "Creates a Trial Matcher job with the given request body.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityRequestId" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityFirstSent" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/TrialMatcherData" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/TrialMatcherResult" + } + }, + "202": { + "description": "The request has been accepted for processing, but processing has not yet completed.", + "headers": { + "Operation-Location": { + "description": "The location of an instance of OperationStatus", + "type": "string", + "format": "uri" + }, + "Retry-After": { + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": "integer", + "format": "int32" + }, + "Repeatability-Result": { + "description": "Indicates whether the repeatable request was accepted or rejected.", + "type": "string", + "enum": [ + "accepted", + "rejected" + ] + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "description": "String error code indicating what went wrong.", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + } + } + }, + "x-ms-examples": { + "SuccessfulTrialMatcherAnalyzeRequest": { + "$ref": "./examples/SuccessfulTrialMatcherRequest.json" + }, + "Creates a Trial Matcher job with the given request body.": { + "$ref": "./examples/SuccessfulTrialMatcherRequest.json" + } + } + } + }, + "/trialmatcher/jobs/{jobId}": { + "get": { + "tags": [ + "TrialMatcher" + ], + "operationId": "TrialMatcher_GetJob", + "summary": "Get Trial Matcher job details", + "description": "Gets the status and details of the Trial Matcher job.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "jobId", + "in": "path", + "required": true, + "description": "A processing job identifier.", + "format": "uuid", + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/TrialMatcherResult" + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "description": "String error code indicating what went wrong.", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + } + } + }, + "x-ms-examples": { + "SuccessfulTrialMatcherGetAnalyzeStatus": { + "$ref": "./examples/SuccessfulTrialMatcherResponse.json" + }, + "Gets the status and details of the Trial Matcher job.": { + "$ref": "./examples/SuccessfulTrialMatcherResponse.json" + } + } + } + } + }, + "definitions": { + "AcceptedAge": { + "type": "object", + "properties": { + "unit": { + "$ref": "#/definitions/AgeUnit", + "description": "Possible units for a person's age." + }, + "value": { + "type": "number", + "format": "float", + "description": "The number of years/months/days that represents the person's age." + } + }, + "description": "A person's age, given as a number (value) and a unit (e.g. years, months)", + "required": [ + "unit", + "value" + ] + }, + "AcceptedAgeRange": { + "type": "object", + "properties": { + "minimumAge": { + "$ref": "#/definitions/AcceptedAge", + "description": "A person's age, given as a number (value) and a unit (e.g. years, months)" + }, + "maximumAge": { + "$ref": "#/definitions/AcceptedAge", + "description": "A person's age, given as a number (value) and a unit (e.g. years, months)" + } + }, + "description": "A definition of the range of ages accepted by a clinical trial. Contains a minimum age and/or a maximum age." + }, + "AgeUnit": { + "type": "string", + "description": "Possible units for a person's age.", + "enum": [ + "years", + "months", + "days" + ], + "x-ms-enum": { + "name": "AgeUnit", + "modelAsString": true, + "values": [ + { + "name": "Years", + "value": "years" + }, + { + "name": "Months", + "value": "months" + }, + { + "name": "Days", + "value": "days" + } + ] + } + }, + "ApiVersion": { + "type": "string", + "enum": [ + "2023-03-01-preview" + ], + "x-ms-enum": { + "name": "ApiVersion", + "modelAsString": true, + "values": [ + { + "name": "v2023_03_01_preview", + "value": "2023-03-01-preview" + } + ] + } + }, + "AreaGeometry": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/GeoJsonGeometryType", + "description": "`GeoJSON` geometry type." + }, + "coordinates": { + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "x-typespec-name": "float32[]", + "description": "Coordinates of the area circle's center, represented according to the `GeoJSON` standard.\nThis is an array of 2 decimal numbers, longitude and latitude (precisely in this order).", + "minItems": 2, + "maxItems": 2 + } + }, + "description": "`GeoJSON` geometry, representing the area circle's center.", + "required": [ + "type", + "coordinates" + ] + }, + "AreaProperties": { + "type": "object", + "properties": { + "subType": { + "$ref": "#/definitions/GeoJsonPropertiesSubType", + "description": "`GeoJSON` object sub-type." + }, + "radius": { + "type": "number", + "format": "double", + "description": "The radius of the area's circle, in meters." + } + }, + "description": "`GeoJSON` object properties.", + "required": [ + "subType", + "radius" + ] + }, + "Azure.Core.Foundations.Error": { + "type": "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", + "items": { + "$ref": "#/definitions/Azure.Core.Foundations.Error" + }, + "x-ms-identifiers": [], + "x-typespec-name": "Azure.Core.Foundations.Error[]", + "description": "An array of details about specific errors that led to this reported error." + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "An object containing more specific information than the current object about the error." + } + }, + "description": "The error object.", + "required": [ + "code", + "message", + "details" + ] + }, + "Azure.Core.Foundations.ErrorResponse": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "The error object." + } + }, + "description": "A response containing error details.", + "required": [ + "error" + ] + }, + "Azure.Core.Foundations.InnerError": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "Inner error." + } + }, + "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.", + "required": [ + "code" + ] + }, + "ClinicalCodedElement": { + "type": "object", + "properties": { + "system": { + "type": "string", + "description": "The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS." + }, + "code": { + "type": "string", + "description": "The code within the given clinical coding system." + }, + "name": { + "type": "string", + "description": "The name of this coded concept in the coding system." + }, + "value": { + "type": "string", + "description": "A value associated with the code within the given clinical coding system." + } + }, + "description": "A piece of clinical information, expressed as a code in a clinical coding system.", + "required": [ + "system", + "code" + ] + }, + "ClinicalDocumentType": { + "type": "string", + "description": "The type of the clinical document.", + "enum": [ + "consultation", + "dischargeSummary", + "historyAndPhysical", + "procedure", + "progress", + "imaging", + "laboratory", + "pathology" + ], + "x-ms-enum": { + "name": "ClinicalDocumentType", + "modelAsString": true, + "values": [ + { + "name": "Consultation", + "value": "consultation" + }, + { + "name": "DischargeSummary", + "value": "dischargeSummary" + }, + { + "name": "HistoryAndPhysical", + "value": "historyAndPhysical" + }, + { + "name": "Procedure", + "value": "procedure" + }, + { + "name": "Progress", + "value": "progress" + }, + { + "name": "Imaging", + "value": "imaging" + }, + { + "name": "Laboratory", + "value": "laboratory" + }, + { + "name": "Pathology", + "value": "pathology" + } + ] + } + }, + "ClinicalNoteEvidence": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The identifier of the document containing the evidence." + }, + "text": { + "type": "string", + "description": "The actual text span which is evidence for the inference." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The start index of the evidence text span in the document (0 based).", + "minimum": 0 + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the evidence text span.", + "minimum": 1 + } + }, + "description": "A piece of evidence from a clinical note (text document).", + "required": [ + "id", + "offset", + "length" + ] + }, + "ClinicalTrialAcceptedSex": { + "type": "string", + "description": "Possible values for the Sex eligibility criterion as accepted by clinical trials, which indicates the sex of people who may participate in a clinical study.", + "enum": [ + "all", + "female", + "male" + ], + "x-ms-enum": { + "name": "ClinicalTrialAcceptedSex", + "modelAsString": true, + "values": [ + { + "name": "All", + "value": "all" + }, + { + "name": "Female", + "value": "female" + }, + { + "name": "Male", + "value": "male" + } + ] + } + }, + "ClinicalTrialDemographics": { + "type": "object", + "properties": { + "acceptedSex": { + "$ref": "#/definitions/ClinicalTrialAcceptedSex", + "description": "Indication of the sex of people who may participate in the clinical trial." + }, + "acceptedAgeRange": { + "$ref": "#/definitions/AcceptedAgeRange", + "description": "A definition of the range of ages accepted by a clinical trial. Contains a minimum age and/or a maximum age." + } + }, + "description": "Demographic criteria for a clinical trial." + }, + "ClinicalTrialDetails": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A given identifier for the clinical trial. Has to be unique within a list of clinical trials.", + "minLength": 1 + }, + "eligibilityCriteriaText": { + "type": "string", + "description": "The eligibility criteria of the clinical trial (inclusion and exclusion), given as text." + }, + "demographics": { + "$ref": "#/definitions/ClinicalTrialDemographics", + "description": "Demographic criteria for a clinical trial." + }, + "metadata": { + "$ref": "#/definitions/ClinicalTrialMetadata", + "description": "Trial data which is of interest to the potential participant." + } + }, + "description": "A description of a clinical trial.", + "required": [ + "id", + "metadata" + ] + }, + "ClinicalTrialMetadata": { + "type": "object", + "properties": { + "phases": { + "type": "array", + "items": { + "$ref": "#/definitions/ClinicalTrialPhase" + }, + "x-typespec-name": "ClinicalTrialPhase[]", + "description": "Phases which are relevant for the clinical trial.\nEach clinical trial can be in a certain phase or in multiple phases." + }, + "studyType": { + "$ref": "#/definitions/ClinicalTrialStudyType", + "description": "Possible study types of a clinical trial." + }, + "recruitmentStatus": { + "$ref": "#/definitions/ClinicalTrialRecruitmentStatus", + "description": "Possible recruitment status of a clinical trial." + }, + "conditions": { + "type": "array", + "items": { + "type": "string" + }, + "x-typespec-name": "string[]", + "description": "Medical conditions and their synonyms which are relevant for the clinical trial, given as strings.", + "minItems": 1 + }, + "sponsors": { + "type": "array", + "items": { + "type": "string" + }, + "x-typespec-name": "string[]", + "description": "Sponsors/collaborators involved with the trial." + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/ContactDetails" + }, + "x-ms-identifiers": [], + "x-typespec-name": "ContactDetails[]", + "description": "Contact details of the trial administrators, for patients that want to participate in the trial." + }, + "facilities": { + "type": "array", + "items": { + "$ref": "#/definitions/ClinicalTrialResearchFacility" + }, + "x-ms-identifiers": [], + "x-typespec-name": "ClinicalTrialResearchFacility[]", + "description": "Research facilities where the clinical trial is conducted." + } + }, + "description": "Trial data which is of interest to the potential participant.", + "required": [ + "conditions" + ] + }, + "ClinicalTrialPhase": { + "type": "string", + "description": "Possible phases of a clinical trial.", + "enum": [ + "notApplicable", + "earlyPhase1", + "phase1", + "phase2", + "phase3", + "phase4" + ], + "x-ms-enum": { + "name": "ClinicalTrialPhase", + "modelAsString": true, + "values": [ + { + "name": "NotApplicable", + "value": "notApplicable" + }, + { + "name": "EarlyPhase1", + "value": "earlyPhase1" + }, + { + "name": "Phase1", + "value": "phase1" + }, + { + "name": "Phase2", + "value": "phase2" + }, + { + "name": "Phase3", + "value": "phase3" + }, + { + "name": "Phase4", + "value": "phase4" + } + ] + } + }, + "ClinicalTrialPurpose": { + "type": "string", + "description": "Possible purposes of a clinical trial.", + "enum": [ + "notApplicable", + "screening", + "diagnostic", + "prevention", + "healthServicesResearch", + "treatment", + "deviceFeasibility", + "supportiveCare", + "basicScience", + "other" + ], + "x-ms-enum": { + "name": "ClinicalTrialPurpose", + "modelAsString": true, + "values": [ + { + "name": "NotApplicable", + "value": "notApplicable" + }, + { + "name": "Screening", + "value": "screening" + }, + { + "name": "Diagnostic", + "value": "diagnostic" + }, + { + "name": "Prevention", + "value": "prevention" + }, + { + "name": "HealthServicesResearch", + "value": "healthServicesResearch" + }, + { + "name": "Treatment", + "value": "treatment" + }, + { + "name": "DeviceFeasibility", + "value": "deviceFeasibility" + }, + { + "name": "SupportiveCare", + "value": "supportiveCare" + }, + { + "name": "BasicScience", + "value": "basicScience" + }, + { + "name": "Other", + "value": "other" + } + ] + } + }, + "ClinicalTrialRecruitmentStatus": { + "type": "string", + "description": "Possible recruitment status of a clinical trial.", + "enum": [ + "unknownStatus", + "notYetRecruiting", + "recruiting", + "enrollingByInvitation" + ], + "x-ms-enum": { + "name": "ClinicalTrialRecruitmentStatus", + "modelAsString": true, + "values": [ + { + "name": "UnknownStatus", + "value": "unknownStatus" + }, + { + "name": "NotYetRecruiting", + "value": "notYetRecruiting" + }, + { + "name": "Recruiting", + "value": "recruiting" + }, + { + "name": "EnrollingByInvitation", + "value": "enrollingByInvitation" + } + ] + } + }, + "ClinicalTrialRegistryFilter": { + "type": "object", + "properties": { + "conditions": { + "type": "array", + "items": { + "type": "string" + }, + "x-typespec-name": "string[]", + "description": "Trials with any of the given medical conditions will be included in the selection (provided that other limitations are satisfied).\nLeaving this list empty will not limit the medical conditions." + }, + "studyTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/ClinicalTrialStudyType" + }, + "x-typespec-name": "ClinicalTrialStudyType[]", + "description": "Trials with any of the given study types will be included in the selection (provided that other limitations are satisfied).\nLeaving this list empty will not limit the study types." + }, + "recruitmentStatuses": { + "type": "array", + "items": { + "$ref": "#/definitions/ClinicalTrialRecruitmentStatus" + }, + "x-typespec-name": "ClinicalTrialRecruitmentStatus[]", + "description": "Trials with any of the given recruitment statuses will be included in the selection (provided that other limitations are satisfied).\nLeaving this list empty will not limit the recruitment statuses." + }, + "sponsors": { + "type": "array", + "items": { + "type": "string" + }, + "x-typespec-name": "string[]", + "description": "Trials with any of the given sponsors will be included in the selection (provided that other limitations are satisfied).\nLeaving this list empty will not limit the sponsors." + }, + "phases": { + "type": "array", + "items": { + "$ref": "#/definitions/ClinicalTrialPhase" + }, + "x-typespec-name": "ClinicalTrialPhase[]", + "description": "Trials with any of the given phases will be included in the selection (provided that other limitations are satisfied).\nLeaving this list empty will not limit the phases." + }, + "purposes": { + "type": "array", + "items": { + "$ref": "#/definitions/ClinicalTrialPurpose" + }, + "x-typespec-name": "ClinicalTrialPurpose[]", + "description": "Trials with any of the given purposes will be included in the selection (provided that other limitations are satisfied).\nLeaving this list empty will not limit the purposes." + }, + "ids": { + "type": "array", + "items": { + "type": "string" + }, + "x-typespec-name": "string[]", + "description": "Trials with any of the given identifiers will be included in the selection (provided that other limitations are satisfied).\nLeaving this list empty will not limit the trial identifiers." + }, + "sources": { + "type": "array", + "items": { + "$ref": "#/definitions/ClinicalTrialSource" + }, + "x-typespec-name": "ClinicalTrialSource[]", + "description": "Trials with any of the given sources will be included in the selection (provided that other limitations are satisfied).\nLeaving this list empty will not limit the sources." + }, + "facilityNames": { + "type": "array", + "items": { + "type": "string" + }, + "x-typespec-name": "string[]", + "description": "Trials with any of the given facility names will be included in the selection (provided that other limitations are satisfied).\nLeaving this list empty will not limit the trial facility names." + }, + "facilityLocations": { + "type": "array", + "items": { + "$ref": "#/definitions/GeographicLocation" + }, + "x-ms-identifiers": [], + "x-typespec-name": "GeographicLocation[]", + "description": "Trials with any of the given facility locations will be included in the selection (provided that other limitations are satisfied).\nLeaving this list empty will not limit the trial facility locations." + }, + "facilityAreas": { + "type": "array", + "items": { + "$ref": "#/definitions/GeographicArea" + }, + "x-ms-identifiers": [], + "x-typespec-name": "GeographicArea[]", + "description": "Trials with any of the given facility area boundaries will be included in the selection (provided that other limitations are satisfied).\nLeaving this list empty will not limit the trial facility area boundaries." + } + }, + "description": "A filter defining a subset of clinical trials from a given clinical trial registry (e.g. clinicaltrials.gov)." + }, + "ClinicalTrialResearchFacility": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The facility's name." + }, + "city": { + "type": "string", + "description": "City name." + }, + "state": { + "type": "string", + "description": "State name." + }, + "countryOrRegion": { + "type": "string", + "description": "Country/region name." + } + }, + "description": "Details of a research facility where a clinical trial is conducted.", + "required": [ + "name", + "countryOrRegion" + ] + }, + "ClinicalTrialSource": { + "type": "string", + "description": "Possible sources of a clinical trial.", + "enum": [ + "custom", + "clinicaltrials.gov" + ], + "x-ms-enum": { + "name": "ClinicalTrialSource", + "modelAsString": true, + "values": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "ClinicaltrialsGov", + "value": "clinicaltrials.gov" + } + ] + } + }, + "ClinicalTrialStudyType": { + "type": "string", + "description": "Possible study types of a clinical trial.", + "enum": [ + "interventional", + "observational", + "expandedAccess", + "patientRegistries" + ], + "x-ms-enum": { + "name": "ClinicalTrialStudyType", + "modelAsString": true, + "values": [ + { + "name": "Interventional", + "value": "interventional" + }, + { + "name": "Observational", + "value": "observational" + }, + { + "name": "ExpandedAccess", + "value": "expandedAccess" + }, + { + "name": "PatientRegistries", + "value": "patientRegistries" + } + ] + } + }, + "ClinicalTrials": { + "type": "object", + "properties": { + "customTrials": { + "type": "array", + "items": { + "$ref": "#/definitions/ClinicalTrialDetails" + }, + "x-typespec-name": "ClinicalTrialDetails[]", + "description": "A list of clinical trials.", + "minItems": 1 + }, + "registryFilters": { + "type": "array", + "items": { + "$ref": "#/definitions/ClinicalTrialRegistryFilter" + }, + "x-ms-identifiers": [], + "x-typespec-name": "ClinicalTrialRegistryFilter[]", + "description": "A list of filters, each one creating a selection of trials from a given\nclinical trial registry.", + "minItems": 1 + } + }, + "description": "The clinical trials that the patient(s) should be matched to. \nThe trial selection can be given as a list of custom clinical trials and/or a list of filters to known clinical trial registries.\nIn case both are given, the resulting trial set is a union of the two sets." + }, + "ContactDetails": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The person's name." + }, + "email": { + "type": "string", + "description": "The person's email." + }, + "phone": { + "type": "string", + "description": "A person's phone number." + } + }, + "description": "A person's contact details." + }, + "DocumentContent": { + "type": "object", + "properties": { + "sourceType": { + "$ref": "#/definitions/DocumentContentSourceType", + "description": "The type of the content's source.\nIn case the source type is 'inline', the content is given as a string (for instance, text).\nIn case the source type is 'reference', the content is given as a URI." + }, + "value": { + "type": "string", + "description": "The content of the document, given either inline (as a string) or as a reference (URI)." + } + }, + "description": "The content of the patient document.", + "required": [ + "sourceType", + "value" + ] + }, + "DocumentContentSourceType": { + "type": "string", + "description": "The type of the content's source. \nIn case the source type is 'inline', the content is given as a string (for instance, text). \nIn case the source type is 'reference', the content is given as a URI.", + "enum": [ + "inline", + "reference" + ], + "x-ms-enum": { + "name": "DocumentContentSourceType", + "modelAsString": true, + "values": [ + { + "name": "Inline", + "value": "inline" + }, + { + "name": "Reference", + "value": "reference" + } + ] + } + }, + "DocumentType": { + "type": "string", + "description": "The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document).", + "enum": [ + "note", + "fhirBundle", + "dicom", + "genomicSequencing" + ], + "x-ms-enum": { + "name": "DocumentType", + "modelAsString": true, + "values": [ + { + "name": "Note", + "value": "note" + }, + { + "name": "FhirBundle", + "value": "fhirBundle" + }, + { + "name": "Dicom", + "value": "dicom" + }, + { + "name": "GenomicSequencing", + "value": "genomicSequencing" + } + ] + } + }, + "ExtendedClinicalCodedElement": { + "type": "object", + "properties": { + "system": { + "type": "string", + "description": "The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS." + }, + "code": { + "type": "string", + "description": "The code within the given clinical coding system." + }, + "name": { + "type": "string", + "description": "The name of this coded concept in the coding system." + }, + "value": { + "type": "string", + "description": "A value associated with the code within the given clinical coding system." + }, + "semanticType": { + "type": "string", + "description": "The [UMLS semantic type](https://www.nlm.nih.gov/research/umls/META3_current_semantic_types.html) associated with the coded concept." + }, + "category": { + "type": "string", + "description": "The bio-medical category related to the coded concept, e.g. Diagnosis, Symptom, Medication, Examination." + } + }, + "description": "A piece of clinical information, expressed as a code in a clinical coding system, extended by semantic information.", + "required": [ + "system", + "code" + ] + }, + "GeoJsonGeometryType": { + "type": "string", + "description": "`GeoJSON` geometry type.", + "enum": [ + "Point" + ], + "x-ms-enum": { + "name": "GeoJsonGeometryType", + "modelAsString": true, + "values": [ + { + "name": "Point", + "value": "Point" + } + ] + } + }, + "GeoJsonPropertiesSubType": { + "type": "string", + "description": "`GeoJSON` object sub-type.", + "enum": [ + "Circle" + ], + "x-ms-enum": { + "name": "GeoJsonPropertiesSubType", + "modelAsString": true, + "values": [ + { + "name": "Circle", + "value": "Circle" + } + ] + } + }, + "GeoJsonType": { + "type": "string", + "description": "`GeoJSON` type.", + "enum": [ + "Feature" + ], + "x-ms-enum": { + "name": "GeoJsonType", + "modelAsString": true, + "values": [ + { + "name": "Feature", + "value": "Feature" + } + ] + } + }, + "GeographicArea": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/GeoJsonType", + "description": "`GeoJSON` type." + }, + "geometry": { + "$ref": "#/definitions/AreaGeometry", + "description": "`GeoJSON` geometry, representing the area circle's center." + }, + "properties": { + "$ref": "#/definitions/AreaProperties", + "description": "`GeoJSON` object properties." + } + }, + "description": "A geographic area, expressed as a `Circle` geometry represented using a `GeoJSON Feature` (see [GeoJSON spec](https://tools.ietf.org/html/rfc7946)).", + "required": [ + "type", + "geometry", + "properties" + ] + }, + "GeographicLocation": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name." + }, + "state": { + "type": "string", + "description": "State name." + }, + "countryOrRegion": { + "type": "string", + "description": "Country/region name." + } + }, + "description": "A location given as a combination of city, state and country/region. It could specify a city, a state or a country/region.\nIn case a city is specified, either state +country/region or country/region (for countries/regions where there are no states) should be added.\nIn case a state is specified (without a city), country/region should be added.", + "required": [ + "countryOrRegion" + ] + }, + "Inference": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The value of the inference, as relevant for the given inference type." + }, + "description": { + "type": "string", + "description": "The description corresponding to the inference value." + }, + "confidenceScore": { + "type": "number", + "format": "float", + "description": "Confidence score for this inference.", + "minimum": 0, + "maximum": 1 + } + }, + "description": "An inference made by the model regarding a patient.", + "required": [ + "value" + ] + }, + "InferenceEvidence": { + "type": "object", + "properties": { + "patientDataEvidence": { + "$ref": "#/definitions/ClinicalNoteEvidence", + "description": "A piece of evidence from a clinical note (text document)." + }, + "patientInfoEvidence": { + "$ref": "#/definitions/ClinicalCodedElement", + "description": "A piece of clinical information, expressed as a code in a clinical coding\nsystem." + }, + "importance": { + "type": "number", + "format": "float", + "description": "A value indicating how important this piece of evidence is for the inference.", + "minimum": 0, + "maximum": 1 + } + }, + "description": "A piece of evidence corresponding to an inference." + }, + "JobStatus": { + "type": "string", + "description": "The status of the processing job.", + "enum": [ + "notStarted", + "running", + "succeeded", + "failed", + "partiallyCompleted" + ], + "x-ms-enum": { + "name": "JobStatus", + "modelAsString": true, + "values": [ + { + "name": "NotStarted", + "value": "notStarted" + }, + { + "name": "Running", + "value": "running" + }, + { + "name": "Succeeded", + "value": "succeeded" + }, + { + "name": "Failed", + "value": "failed" + }, + { + "name": "PartiallyCompleted", + "value": "partiallyCompleted" + } + ] + } + }, + "ModelVersion": { + "type": "string", + "description": "The version of the model used for inference, expressed as the model date." + }, + "NeededClinicalInfo": { + "type": "array", + "items": { + "$ref": "#/definitions/ExtendedClinicalCodedElement" + }, + "x-ms-identifiers": [], + "description": "Clinical information which is needed to provide better trial matching results for the patient." + }, + "OncoPhenotypeData": { + "type": "object", + "properties": { + "patients": { + "type": "array", + "items": { + "$ref": "#/definitions/PatientRecord" + }, + "x-typespec-name": "PatientRecord[]", + "description": "The list of patients, including their clinical information and data." + }, + "configuration": { + "$ref": "#/definitions/OncoPhenotypeModelConfiguration", + "description": "Configuration affecting the Onco Phenotype model's inference." + } + }, + "description": "The body of the Onco Phenotype request.", + "required": [ + "patients" + ] + }, + "OncoPhenotypeInference": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/OncoPhenotypeInferenceType", + "description": "The type of the Onco Phenotype inference" + }, + "value": { + "type": "string", + "description": "The value of the inference, as relevant for the given inference type." + }, + "description": { + "type": "string", + "description": "The description corresponding to the inference value." + }, + "confidenceScore": { + "type": "number", + "format": "float", + "description": "Confidence score for this inference.", + "minimum": 0, + "maximum": 1 + }, + "evidence": { + "type": "array", + "items": { + "$ref": "#/definitions/InferenceEvidence" + }, + "x-ms-identifiers": [], + "x-typespec-name": "InferenceEvidence[]", + "description": "The evidence corresponding to the inference value." + }, + "caseId": { + "type": "string", + "description": "An identifier for a clinical case, if there are multiple clinical cases regarding the same patient." + } + }, + "description": "An inference made by the Onco Phenotype model regarding a patient.", + "required": [ + "type", + "value" + ] + }, + "OncoPhenotypeInferenceType": { + "type": "string", + "description": "The type of the Onco Phenotype inference.", + "enum": [ + "tumorSite", + "histology", + "clinicalStageT", + "clinicalStageN", + "clinicalStageM", + "pathologicStageT", + "pathologicStageN", + "pathologicStageM" + ], + "x-ms-enum": { + "name": "OncoPhenotypeInferenceType", + "modelAsString": true, + "values": [ + { + "name": "TumorSite", + "value": "tumorSite" + }, + { + "name": "Histology", + "value": "histology" + }, + { + "name": "ClinicalStageT", + "value": "clinicalStageT" + }, + { + "name": "ClinicalStageN", + "value": "clinicalStageN" + }, + { + "name": "ClinicalStageM", + "value": "clinicalStageM" + }, + { + "name": "PathologicStageT", + "value": "pathologicStageT" + }, + { + "name": "PathologicStageN", + "value": "pathologicStageN" + }, + { + "name": "PathologicStageM", + "value": "pathologicStageM" + } + ] + } + }, + "OncoPhenotypeModelConfiguration": { + "type": "object", + "properties": { + "verbose": { + "type": "boolean", + "description": "An indication whether the model should produce verbose output.", + "default": false + }, + "includeEvidence": { + "type": "boolean", + "description": "An indication whether the model's output should include evidence for the inferences.", + "default": true + }, + "inferenceTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/OncoPhenotypeInferenceType" + }, + "x-typespec-name": "OncoPhenotypeInferenceType[]", + "description": "A list of inference types to be inferred for the current request.\nThis could be used if only part of the Onco Phenotype inferences are required.\nIf this list is omitted or empty, the model will return all the inference types." + }, + "checkForCancerCase": { + "type": "boolean", + "description": "An indication whether to perform a preliminary step on the patient's documents to determine whether they relate to a Cancer case.", + "default": false + } + }, + "description": "Configuration affecting the Onco Phenotype model's inference." + }, + "OncoPhenotypePatientResult": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The identifier given for the patient in the request." + }, + "inferences": { + "type": "array", + "items": { + "$ref": "#/definitions/OncoPhenotypeInference" + }, + "x-ms-identifiers": [], + "x-typespec-name": "OncoPhenotypeInference[]", + "description": "The model's inferences for the given patient." + } + }, + "description": "The results of the model's work for a single patient.", + "required": [ + "id", + "inferences" + ] + }, + "OncoPhenotypeResult": { + "type": "object", + "properties": { + "jobId": { + "type": "string", + "description": "A processing job identifier.", + "format": "uuid", + "readOnly": true + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "The date and time when the processing job was created.", + "readOnly": true + }, + "expirationDateTime": { + "type": "string", + "format": "date-time", + "description": "The date and time when the processing job is set to expire.", + "readOnly": true + }, + "lastUpdateDateTime": { + "type": "string", + "format": "date-time", + "description": "The date and time when the processing job was last updated.", + "readOnly": true + }, + "status": { + "$ref": "#/definitions/JobStatus", + "description": "The status of the processing job.", + "readOnly": true + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/definitions/Azure.Core.Foundations.Error" + }, + "x-ms-identifiers": [], + "x-typespec-name": "Azure.Core.Foundations.Error[]", + "description": "An array of errors, if any errors occurred during the processing job.", + "readOnly": true + }, + "results": { + "$ref": "#/definitions/OncoPhenotypeResults", + "description": "The inference results for the Onco Phenotype request.", + "readOnly": true + } + }, + "description": "The response for the Onco Phenotype request.", + "required": [ + "jobId", + "createdDateTime", + "expirationDateTime", + "lastUpdateDateTime", + "status" + ] + }, + "OncoPhenotypeResults": { + "type": "object", + "properties": { + "patients": { + "type": "array", + "items": { + "$ref": "#/definitions/OncoPhenotypePatientResult" + }, + "x-typespec-name": "OncoPhenotypePatientResult[]", + "description": "Results for the patients given in the request." + }, + "modelVersion": { + "$ref": "#/definitions/ModelVersion", + "description": "The version of the model used for inference, expressed as the model date." + } + }, + "description": "The inference results for the Onco Phenotype request.", + "required": [ + "patients", + "modelVersion" + ] + }, + "PatientDocument": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/DocumentType", + "description": "The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document)." + }, + "clinicalType": { + "$ref": "#/definitions/ClinicalDocumentType", + "description": "The type of the clinical document." + }, + "id": { + "type": "string", + "description": "A given identifier for the document. Has to be unique across all documents for a single patient.", + "minLength": 1 + }, + "language": { + "type": "string", + "description": "A 2 letter ISO 639-1 representation of the language of the document." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "The date and time when the document was created." + }, + "content": { + "$ref": "#/definitions/DocumentContent", + "description": "The content of the patient document." + } + }, + "description": "A clinical document related to a patient. Document here is in the wide sense - not just a text document (note).", + "required": [ + "type", + "id", + "content" + ] + }, + "PatientInfo": { + "type": "object", + "properties": { + "sex": { + "$ref": "#/definitions/PatientInfoSex", + "description": "The patient's sex." + }, + "birthDate": { + "type": "string", + "format": "date", + "description": "The patient's date of birth." + }, + "clinicalInfo": { + "type": "array", + "items": { + "$ref": "#/definitions/ClinicalCodedElement" + }, + "x-ms-identifiers": [], + "x-typespec-name": "ClinicalCodedElement[]", + "description": "Known clinical information for the patient, structured." + } + }, + "description": "Patient structured information, including demographics and known structured clinical information." + }, + "PatientInfoSex": { + "type": "string", + "description": "The patient's sex.", + "enum": [ + "female", + "male", + "unspecified" + ], + "x-ms-enum": { + "name": "PatientInfoSex", + "modelAsString": true, + "values": [ + { + "name": "Female", + "value": "female" + }, + { + "name": "Male", + "value": "male" + }, + { + "name": "Unspecified", + "value": "unspecified" + } + ] + } + }, + "PatientRecord": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A given identifier for the patient. Has to be unique across all patients in a single request.", + "minLength": 1 + }, + "info": { + "$ref": "#/definitions/PatientInfo", + "description": "Patient structured information, including demographics and known structured clinical information." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/PatientDocument" + }, + "x-typespec-name": "PatientDocument[]", + "description": "Patient unstructured clinical data, given as documents." + } + }, + "description": "A patient record, including their clinical information and data.", + "required": [ + "id" + ] + }, + "TrialMatcherData": { + "type": "object", + "properties": { + "patients": { + "type": "array", + "items": { + "$ref": "#/definitions/PatientRecord" + }, + "x-typespec-name": "PatientRecord[]", + "description": "The list of patients, including their clinical information and data." + }, + "configuration": { + "$ref": "#/definitions/TrialMatcherModelConfiguration", + "description": "Configuration affecting the Trial Matcher model's inference." + } + }, + "description": "The body of the Trial Matcher request.", + "required": [ + "patients" + ] + }, + "TrialMatcherInference": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/TrialMatcherInferenceType", + "description": "The type of the Trial Matcher inference." + }, + "value": { + "type": "string", + "description": "The value of the inference, as relevant for the given inference type." + }, + "description": { + "type": "string", + "description": "The description corresponding to the inference value." + }, + "confidenceScore": { + "type": "number", + "format": "float", + "description": "Confidence score for this inference.", + "minimum": 0, + "maximum": 1 + }, + "evidence": { + "type": "array", + "items": { + "$ref": "#/definitions/TrialMatcherInferenceEvidence" + }, + "x-ms-identifiers": [], + "x-typespec-name": "TrialMatcherInferenceEvidence[]", + "description": "The evidence corresponding to the inference value." + }, + "id": { + "type": "string", + "description": "The identifier of the clinical trial.", + "minLength": 1 + }, + "source": { + "$ref": "#/definitions/ClinicalTrialSource", + "description": "Possible sources of a clinical trial." + }, + "metadata": { + "$ref": "#/definitions/ClinicalTrialMetadata", + "description": "Trial data which is of interest to the potential participant." + } + }, + "description": "An inference made by the Trial Matcher model regarding a patient.", + "required": [ + "type", + "value" + ] + }, + "TrialMatcherInferenceEvidence": { + "type": "object", + "properties": { + "eligibilityCriteriaEvidence": { + "type": "string", + "description": "A piece of evidence from the eligibility criteria text of a clinical trial." + }, + "patientDataEvidence": { + "$ref": "#/definitions/ClinicalNoteEvidence", + "description": "A piece of evidence from a clinical note (text document)." + }, + "patientInfoEvidence": { + "$ref": "#/definitions/ClinicalCodedElement", + "description": "A piece of clinical information, expressed as a code in a clinical coding\nsystem." + }, + "importance": { + "type": "number", + "format": "float", + "description": "A value indicating how important this piece of evidence is for the inference.", + "minimum": 0, + "maximum": 1 + } + }, + "description": "A piece of evidence corresponding to a Trial Matcher inference." + }, + "TrialMatcherInferenceType": { + "type": "string", + "description": "The type of the Trial Matcher inference.", + "enum": [ + "trialEligibility" + ], + "x-ms-enum": { + "name": "TrialMatcherInferenceType", + "modelAsString": true, + "values": [ + { + "name": "TrialEligibility", + "value": "trialEligibility" + } + ] + } + }, + "TrialMatcherModelConfiguration": { + "type": "object", + "properties": { + "verbose": { + "type": "boolean", + "description": "An indication whether the model should produce verbose output.", + "default": false + }, + "includeEvidence": { + "type": "boolean", + "description": "An indication whether the model's output should include evidence for the inferences.", + "default": true + }, + "clinicalTrials": { + "$ref": "#/definitions/ClinicalTrials", + "description": "The clinical trials that the patient(s) should be matched to.
The trial\nselection can be given as a list of custom clinical trials and/or a list of\nfilters to known clinical trial registries. In case both are given, the\nresulting trial set is a union of the two sets." + } + }, + "description": "Configuration affecting the Trial Matcher model's inference.", + "required": [ + "clinicalTrials" + ] + }, + "TrialMatcherPatientResult": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The identifier given for the patient in the request." + }, + "inferences": { + "type": "array", + "items": { + "$ref": "#/definitions/TrialMatcherInference" + }, + "x-typespec-name": "TrialMatcherInference[]", + "description": "The model's inferences for the given patient." + }, + "neededClinicalInfo": { + "$ref": "#/definitions/NeededClinicalInfo", + "description": "Clinical information which is needed to provide better trial matching results for the patient." + } + }, + "description": "The results of the model's work for a single patient.", + "required": [ + "id", + "inferences" + ] + }, + "TrialMatcherResult": { + "type": "object", + "properties": { + "jobId": { + "type": "string", + "description": "A processing job identifier.", + "format": "uuid", + "readOnly": true + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "The date and time when the processing job was created.", + "readOnly": true + }, + "expirationDateTime": { + "type": "string", + "format": "date-time", + "description": "The date and time when the processing job is set to expire.", + "readOnly": true + }, + "lastUpdateDateTime": { + "type": "string", + "format": "date-time", + "description": "The date and time when the processing job was last updated.", + "readOnly": true + }, + "status": { + "$ref": "#/definitions/JobStatus", + "description": "The status of the processing job.", + "readOnly": true + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/definitions/Azure.Core.Foundations.Error" + }, + "x-ms-identifiers": [], + "x-typespec-name": "Azure.Core.Foundations.Error[]", + "description": "An array of errors, if any errors occurred during the processing job.", + "readOnly": true + }, + "results": { + "$ref": "#/definitions/TrialMatcherResults", + "description": "The inference results for the Trial Matcher request.", + "readOnly": true + } + }, + "description": "The response for the Trial Matcher request.", + "required": [ + "jobId", + "createdDateTime", + "expirationDateTime", + "lastUpdateDateTime", + "status" + ] + }, + "TrialMatcherResults": { + "type": "object", + "properties": { + "patients": { + "type": "array", + "items": { + "$ref": "#/definitions/TrialMatcherPatientResult" + }, + "x-typespec-name": "TrialMatcherPatientResult[]", + "description": "Results for the patients given in the request." + }, + "modelVersion": { + "$ref": "#/definitions/ModelVersion", + "description": "The version of the model used for inference, expressed as the model date." + }, + "knowledgeGraphLastUpdateDate": { + "type": "string", + "format": "date", + "description": "The date when the clinical trials knowledge graph was last updated." + } + }, + "description": "The inference results for the Trial Matcher request.", + "required": [ + "patients", + "modelVersion" + ] + } + }, + "parameters": { + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "description": "The API version to use for this operation.", + "x-ms-client-name": "apiVersion", + "minLength": 1, + "type": "string", + "x-ms-parameter-location": "method" + }, + "Azure.Core.RepeatabilityRequestHeaders.repeatabilityFirstSent": { + "name": "Repeatability-First-Sent", + "in": "header", + "required": false, + "description": "Specifies the date and time at which the request was first created.", + "x-ms-client-name": "repeatabilityFirstSent", + "type": "string", + "format": "date-time", + "x-ms-parameter-location": "method" + }, + "Azure.Core.RepeatabilityRequestHeaders.repeatabilityRequestId": { + "name": "Repeatability-Request-ID", + "in": "header", + "required": false, + "description": "An opaque, globally-unique, client-generated string identifier for the request.", + "x-ms-client-name": "repeatabilityRequestId", + "type": "string", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/cognitiveservices/data-plane/HealthInsights/readme.md b/specification/cognitiveservices/data-plane/HealthInsights/readme.md new file mode 100644 index 000000000000..9e8e2f518b94 --- /dev/null +++ b/specification/cognitiveservices/data-plane/HealthInsights/readme.md @@ -0,0 +1,25 @@ +# Cognitive Services Health Insights SDK + +> see https://aka.ms/autorest + +Configuration for generating Health Insights SDK. + +The current release is `2023-03-01-preview`. + +```yaml +tag: 2023-03-01-preview +add-credentials: true +openapi-type: data-plane +``` + +# Releases + +### Release 2023-03-01-preview + + +These settings apply only when `--tag=2023-03-01-preview` is specified on the command line. + +```yaml $(tag) == '2023-03-01-preview' +input-file: + - preview/2023-03-01-preview/openapi.json +``` \ No newline at end of file