Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1285e5e
V3 - remove OncoPhenotype, TrialMatcher, PatientTimeline interfaces
asaflevi-ms Feb 1, 2024
df97c8c
update readme file
asaflevi-ms Feb 1, 2024
b238f6f
remove client.tsp from all models except RadiologyInsights
asaflevi-ms Feb 1, 2024
9a9168d
Revert "remove client.tsp from all models except RadiologyInsights"
asaflevi-ms Feb 1, 2024
db33fc2
revert and return client.tsp files
asaflevi-ms Feb 1, 2024
7135f60
Merge branch 'main' of https://github.com/asaflevi-ms/azure-rest-api-…
asaflevi-ms Feb 4, 2024
c2b476a
Merge branch 'main' of https://github.com/asaflevi-ms/azure-rest-api-…
asaflevi-ms Feb 6, 2024
a0c0d83
remove version dependency, also remove all other models except RI
asaflevi-ms Feb 6, 2024
b3bc545
Fix: request example
asaflevi-ms Feb 6, 2024
a7dc6db
prettier
asaflevi-ms Feb 6, 2024
63bf0a8
remove model RadiologyInsightsResult
asaflevi-ms Feb 6, 2024
1625080
remove deprecated operation templates
asaflevi-ms Feb 6, 2024
3e01196
move imports to main.tsp
asaflevi-ms Feb 7, 2024
a587d83
add imports to rout.radiologyinsights
asaflevi-ms Feb 7, 2024
d91f484
revert - remove imports from rout file
asaflevi-ms Feb 7, 2024
f2a5a18
rename patientInfo
asaflevi-ms Feb 7, 2024
f014297
add expand trait
asaflevi-ms Feb 7, 2024
b3de133
update example with details property
asaflevi-ms Feb 7, 2024
c984b63
add imports to rout.radiologyinsights
asaflevi-ms Feb 7, 2024
71ef87a
fix: API Stewardship board review comments
asaflevi-ms Feb 8, 2024
fcc65bb
fix: tsv
asaflevi-ms Feb 8, 2024
182ae9e
prettier
asaflevi-ms Feb 8, 2024
59ace56
communication.communicatedAt , recommendation.effectiveAt
asaflevi-ms Feb 8, 2024
21e1855
expand format csv
asaflevi-ms Feb 8, 2024
87bc77d
comments
asaflevi-ms Feb 8, 2024
7f404bc
fix: tsv
asaflevi-ms Feb 8, 2024
7419401
Update specification/ai/data-plane/HealthInsights/readme.md
praveenkuttappan Feb 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ A given identifier for the patient. Has to be unique across all patients in a si
@doc("""
Patient structured information, including demographics and known structured clinical information.
""")
info?: PatientInfo;
details?: PatientDetails;

@doc("Patient encounters/visits.")
encounters?: Array<Encounter>;
encounters?: Array<PatientEncounter>;

@doc("Patient unstructured clinical data, given as documents.")
patientDocuments?: Array<PatientDocument>;
}

@doc("Patient structured information, including demographics and known structured clinical information.")
model PatientInfo {
model PatientDetails {
@doc("The patient's sex.")
sex?: PatientInfoSex;
sex?: PatientSex;

@doc("The patient's date of birth.")
birthDate?: plainDate;
Expand All @@ -53,7 +53,7 @@ model PatientInfo {

#suppress "@azure-tools/typespec-azure-core/documentation-required" "MUST fix in next update"
@doc("The patient's sex.")
enum PatientInfoSex {
enum PatientSex {
Female: "female",
Male: "male",
Unspecified: "unspecified",
Expand Down Expand Up @@ -111,7 +111,7 @@ model PatientDocument {
language?: string;

@doc("The date and time when the document was created.")
createdDateTime?: utcDateTime;
createdAt?: utcDateTime;

@doc("Document author(s)")
authors?: Array<DocumentAuthor>;
Expand All @@ -137,7 +137,7 @@ model DocumentAdministrativeMetadata {
}

@doc("visit/encounter information")
model Encounter {
model PatientEncounter {
@doc("The id of the visit.")
id: string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,45 @@ using TypeSpec.Rest;

namespace AzureHealthInsights;

/**
* Provides status details for long running operations.
* @template TStatusResult The type of the operation status result.
* @template TStatusError The type of the operation status error. If not provided, the default error is used.
*/
@doc("Provides status details for long running operations.")
model HealthInsightsOperationStatus<
TStatusResult = never,
TStatusError = Foundations.Error
> {
@key("operationId")
@doc("The unique ID of the operation.")
@visibility("read")
id: Azure.Core.uuid;

@doc("The status of the operation")
@visibility("read")
@lroStatus
status: JobStatus;

@doc("The date and time when the processing job was created.")
@visibility("read")
createdDateTime?: utcDateTime;

@doc("The date and time when the processing job is set to expire.")
@visibility("read")
expirationDateTime?: utcDateTime;

@doc("The date and time when the processing job was last updated.")
@visibility("read")
lastUpdateDateTime?: utcDateTime;

@doc("Error object that describes the error when status is \"Failed\".")
error?: TStatusError;

@doc("The result of the operation.")
@lroResult
result?: TStatusResult;
}
// /**
// * Provides status details for long running operations.
// * @template TStatusResult The type of the operation status result.
// * @template TStatusError The type of the operation status error. If not provided, the default error is used.
// */
// @doc("Provides status details for long running operations.")
// model HealthInsightsOperationStatus<
// TStatusResult = never,
// TStatusError = Foundations.Error
// > {
// @key("operationId")
// @doc("The unique ID of the operation.")
// @visibility("read")
// id: Azure.Core.uuid;

// @doc("The status of the operation")
// @visibility("read")
// @lroStatus
// status: JobStatus;

// @doc("The date and time when the processing job was created.")
// @visibility("read")
// createdDateTime?: utcDateTime;

// @doc("The date and time when the processing job is set to expire.")
// @visibility("read")
// expirationDateTime?: utcDateTime;

// @doc("The date and time when the processing job was last updated.")
// @visibility("read")
// lastUpdateDateTime?: utcDateTime;

// @doc("Error object that describes the error when status is \"Failed\".")
// error?: TStatusError;

// @doc("The result of the operation.")
// @lroResult
// result?: TStatusResult;
// }
////////////////// Inference //////////////////
@doc("An inference made by the model regarding a patient.")
model Inference {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,49 @@
using TypeSpec.Http;
using TypeSpec.Rest;
using Azure.Core;

namespace AzureHealthInsights;

/**
* Provides HealthInsights resource details for long running operations.
* @template TRequest The type of the operation request data.
* @template TResult The type of the operation result.
* @template TStatusError The type of the operation status error. If not provided, the default error is used.
*/
// @TypeSpec.Versioning.added(AzureHealthInsights.ApiVersion.v2024_04_01)
@doc("Provides status details for long running operations.")
model HealthInsightsJobBase {
@key("id")
@doc("The unique ID of the job.")
@visibility("read")
@maxLength(36)
@minLength(3)
@pattern("^[a-zA-Z0-9][a-zA-Z0-9-_]+[a-zA-Z0-9]$")
@path
id: string;

@doc("The status of the job.")
@visibility("read")
@lroStatus
status: JobStatus;

@doc("The date and time when the processing job was created.")
@visibility("read")
createdAt?: utcDateTime;

@doc("The date and time when the processing job is set to expire.")
@visibility("read")
expiresAt?: utcDateTime;

@doc("The date and time when the processing job was last updated.")
@visibility("read")
updatedAt?: utcDateTime;

@doc("Error object that describes the error when status is \"Failed\".")
@visibility("read")
error?: Foundations.Error;
}

@doc("ConditionStage")
model ConditionStage {
@doc("""
Expand Down
121 changes: 78 additions & 43 deletions specification/ai/HealthInsights/HealthInsights.Common/primitives.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,52 @@ using Azure.Core.Traits;

namespace AzureHealthInsights;

#suppress "@azure-tools/typespec-azure-core/long-running-polling-operation-required" "This is a template"
@doc("Long running RPC operation template")
op HealthInsightsLongRunningRpcOperation<
TParams extends TypeSpec.Reflection.Model,
TResponse extends TypeSpec.Reflection.Model,
TModelResult extends TypeSpec.Reflection.Model,
Traits extends TypeSpec.Reflection.Model = {}
> is Azure.Core.RpcOperation<
TParams & RepeatabilityRequestHeaders,
Foundations.AcceptedResponse<HealthInsightsLongRunningStatusLocation<TResponse> &
Foundations.RetryAfterHeader> &
RepeatabilityResponseHeaders &
HealthInsightsOperationStatus<TModelResult>,
Traits
>;
// #suppress "@azure-tools/typespec-azure-core/long-running-polling-operation-required" "This is a template"
// @doc("Long running RPC operation template")
// op HealthInsightsLongRunningRpcOperation<
// TParams extends TypeSpec.Reflection.Model,
// TResponse extends TypeSpec.Reflection.Model,
// TModelResult extends TypeSpec.Reflection.Model,
// Traits extends TypeSpec.Reflection.Model = {}
// > is Azure.Core.RpcOperation<
// TParams & RepeatabilityRequestHeaders,
// Foundations.AcceptedResponse<HealthInsightsLongRunningStatusLocation<TResponse> &
// Foundations.RetryAfterHeader> &
// RepeatabilityResponseHeaders &
// HealthInsightsOperationStatus<TModelResult>,
// Traits
// >;

#suppress "@azure-tools/typespec-azure-core/long-running-polling-operation-required" "This is a template"
@doc("Long running Pool operation template")
op HealthInsightsLongRunningPollOperation<TResult extends TypeSpec.Reflection.Model> is Azure.Core.RpcOperation<
{
@doc("A processing job identifier.")
@path("id")
id: Azure.Core.uuid;
},
TResult,
HealthInsightsRetryAfterTrait
>;
// #suppress "@azure-tools/typespec-azure-core/long-running-polling-operation-required" "This is a template"
// @doc("Long running Pool operation template")
// op HealthInsightsLongRunningPollOperation<TResult extends TypeSpec.Reflection.Model> is Azure.Core.RpcOperation<
// {
// @doc("A processing job identifier.")
// @path("id")
// id: Azure.Core.uuid;
// },
// TResult,
// HealthInsightsRetryAfterTrait
// >;

/**
* Metadata for long running operation status monitor locations.
* @template TStatusResult The type of the operation status result.
*/
@doc("Metadata for long running operation status monitor locations")
model HealthInsightsLongRunningStatusLocation<TStatusResult = never> {
@pollingLocation
@doc("The location for monitoring the operation state.")
@TypeSpec.Http.header("Operation-Location")
operationLocation: HealthInsightsResourceLocation<HealthInsightsOperationStatus<TStatusResult>>;
}
// /**
// * Metadata for long running operation status monitor locations.
// * @template TStatusResult The type of the operation status result.
// */
// @doc("Metadata for long running operation status monitor locations")
// model HealthInsightsLongRunningStatusLocation<TStatusResult = never> {
// @pollingLocation
// @doc("The location for monitoring the operation state.")
// @TypeSpec.Http.header("Operation-Location")
// operationLocation: HealthInsightsResourceLocation<HealthInsightsOperationStatus<TStatusResult>>;
// }

/**
* A URL that points to a resource.
* @template TResource The type of resource that the URL points to.
*/
@doc("The location of an instance of {name}", TResource)
scalar HealthInsightsResourceLocation<TResource extends {}> extends url;
// /**
// * A URL that points to a resource.
// * @template TResource The type of resource that the URL points to.
// */
// @doc("The location of an instance of {name}", TResource)
// scalar HealthInsightsResourceLocation<TResource extends {}> extends url;

@trait("HealthInsightsRetryAfterTrait")
@doc("Health Insights retry after trait")
Expand All @@ -60,3 +60,38 @@ model HealthInsightsRetryAfterTrait {
response: Foundations.RetryAfterHeader;
};
}
@doc("Provides the 'x-ms-request-id' header to enable request correlation in responses.")
@trait("RequestIdResponseHeader")
model RequestIdResponseHeaderTrait {
@doc("An opaque, globally-unique, server-generated string identifier for the request.")
requestId: {
@traitLocation(TraitLocation.Response)
response: RequestIdResponseHeader;
};
}

alias ExpandQueryParams = QueryParametersTrait<{
@doc("A comma separated list of related properties to be included in line with the job.")
@query({
format: "csv",
})
expand?: ExpandQueryParamsType;
}>;

@doc("Supported properties to be included in line with the job.")
enum ExpandQueryParamsType {
@doc("Use this value to expand the job with jobData property.")
JobData: "jobData",
}

alias ServiceTraits = NoRepeatableRequests &
NoConditionalRequests &
NoClientRequestId &
HealthInsightsRetryAfterTrait &
RequestIdResponseHeaderTrait &
ExpandQueryParams;

alias HealthInsightsOperations = ResourceOperations<
ServiceTraits,
Azure.Core.Foundations.ErrorResponse
>;
Loading