Skip to content

Commit

Permalink
[EG] Healthcare APIs required/optional (#30762)
Browse files Browse the repository at this point in the history
* healthcare

* update value type made required

---------

Co-authored-by: Laurent Mazuel <[email protected]>
  • Loading branch information
l0lawrence and lmazuel authored Dec 3, 2024
1 parent 4e0aaf2 commit 0c06024
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 40 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import "@typespec/versioning";

using TypeSpec.Versioning;

/** Describes the schema of the Azure HealthcareApis events published to Azure Event Grid. This corresponds to the Data property of an EventGridEvent. */
Expand All @@ -12,13 +11,14 @@ namespace Microsoft.EventGrid.SystemEvents {
resourceType: HealthcareFhirResourceType;

/** Domain name of FHIR account for this resource. */
resourceFhirAccount?: string;
resourceFhirAccount: string;

/** Id of HL7 FHIR resource. */
resourceFhirId?: string;
resourceFhirId: string;

/** VersionId of HL7 FHIR resource. It changes when the resource is created, updated, or deleted(soft-deletion). */
resourceVersionId?: int64;
@madeRequired(ServiceApiVersions.v2024_01_01)
resourceVersionId: int64;
}

/** Schema of the Data property of an EventGridEvent for a Microsoft.HealthcareApis.FhirResourceUpdated event. */
Expand All @@ -28,13 +28,14 @@ namespace Microsoft.EventGrid.SystemEvents {
resourceType: HealthcareFhirResourceType;

/** Domain name of FHIR account for this resource. */
resourceFhirAccount?: string;
resourceFhirAccount: string;

/** Id of HL7 FHIR resource. */
resourceFhirId?: string;
resourceFhirId: string;

/** VersionId of HL7 FHIR resource. It changes when the resource is created, updated, or deleted(soft-deletion). */
resourceVersionId?: int64;
@madeRequired(ServiceApiVersions.v2024_01_01)
resourceVersionId: int64;
}

/** Schema of the Data property of an EventGridEvent for a Microsoft.HealthcareApis.FhirResourceDeleted event. */
Expand All @@ -44,76 +45,80 @@ namespace Microsoft.EventGrid.SystemEvents {
resourceType: HealthcareFhirResourceType;

/** Domain name of FHIR account for this resource. */
resourceFhirAccount?: string;
resourceFhirAccount: string;

/** Id of HL7 FHIR resource. */
resourceFhirId?: string;
resourceFhirId: string;

/** VersionId of HL7 FHIR resource. It changes when the resource is created, updated, or deleted(soft-deletion). */
resourceVersionId?: int64;
@madeRequired(ServiceApiVersions.v2024_01_01)
resourceVersionId: int64;
}

/** Schema of the Data property of an EventGridEvent for a Microsoft.HealthcareApis.DicomImageCreated event. */
model HealthcareDicomImageCreatedEventData {
/** Data partition name */
partitionName?: string;
partitionName: string;

/** Unique identifier for the Study */
imageStudyInstanceUid?: string;
imageStudyInstanceUid: string;

/** Unique identifier for the Series */
imageSeriesInstanceUid?: string;
imageSeriesInstanceUid: string;

/** Unique identifier for the DICOM Image */
imageSopInstanceUid?: string;
imageSopInstanceUid: string;

/** Domain name of the DICOM account for this image. */
serviceHostName?: string;
serviceHostName: string;

/** Sequence number of the DICOM Service within Azure Health Data Services. It is unique for every image creation and deletion within the service. */
sequenceNumber?: int64;
@madeRequired(ServiceApiVersions.v2024_01_01)
sequenceNumber: int64;
}

/** Schema of the Data property of an EventGridEvent for a Microsoft.HealthcareApis.DicomImageDeleted event. */
model HealthcareDicomImageDeletedEventData {
/** Data partition name */
partitionName?: string;
partitionName: string;

/** Unique identifier for the Study */
imageStudyInstanceUid?: string;
imageStudyInstanceUid: string;

/** Unique identifier for the Series */
imageSeriesInstanceUid?: string;
imageSeriesInstanceUid: string;

/** Unique identifier for the DICOM Image */
imageSopInstanceUid?: string;
imageSopInstanceUid: string;

/** Host name of the DICOM account for this image. */
serviceHostName?: string;
serviceHostName: string;

/** Sequence number of the DICOM Service within Azure Health Data Services. It is unique for every image creation and deletion within the service. */
sequenceNumber?: int64;
@madeRequired(ServiceApiVersions.v2024_01_01)
sequenceNumber: int64;
}

/** Schema of the Data property of an EventGridEvent for a Microsoft.HealthcareApis.DicomImageUpdated event. */
model HealthcareDicomImageUpdatedEventData {
/** Data partition name */
partitionName?: string;
partitionName: string;

/** Unique identifier for the Study */
imageStudyInstanceUid?: string;
imageStudyInstanceUid: string;

/** Unique identifier for the Series */
imageSeriesInstanceUid?: string;
imageSeriesInstanceUid: string;

/** Unique identifier for the DICOM Image */
imageSopInstanceUid?: string;
imageSopInstanceUid: string;

/** Domain name of the DICOM account for this image. */
serviceHostName?: string;
serviceHostName: string;

/** Sequence number of the DICOM Service within Azure Health Data Services. It is unique for every image creation, updation and deletion within the service. */
sequenceNumber?: int64;
@madeRequired(ServiceApiVersions.v2024_01_01)
sequenceNumber: int64;
}

/** Schema of FHIR resource type enumeration. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4280,7 +4280,14 @@
"format": "int64",
"description": "Sequence number of the DICOM Service within Azure Health Data Services. It is unique for every image creation and deletion within the service."
}
}
},
"required": [
"partitionName",
"imageStudyInstanceUid",
"imageSeriesInstanceUid",
"imageSopInstanceUid",
"serviceHostName"
]
},
"HealthcareDicomImageDeletedEventData": {
"type": "object",
Expand Down Expand Up @@ -4311,7 +4318,14 @@
"format": "int64",
"description": "Sequence number of the DICOM Service within Azure Health Data Services. It is unique for every image creation and deletion within the service."
}
}
},
"required": [
"partitionName",
"imageStudyInstanceUid",
"imageSeriesInstanceUid",
"imageSopInstanceUid",
"serviceHostName"
]
},
"HealthcareDicomImageUpdatedEventData": {
"type": "object",
Expand Down Expand Up @@ -4342,7 +4356,14 @@
"format": "int64",
"description": "Sequence number of the DICOM Service within Azure Health Data Services. It is unique for every image creation, updation and deletion within the service."
}
}
},
"required": [
"partitionName",
"imageStudyInstanceUid",
"imageSeriesInstanceUid",
"imageSopInstanceUid",
"serviceHostName"
]
},
"HealthcareFhirResourceCreatedEventData": {
"type": "object",
Expand All @@ -4369,7 +4390,11 @@
"description": "VersionId of HL7 FHIR resource. It changes when the resource is created, updated, or deleted(soft-deletion).",
"x-ms-client-name": "FhirResourceVersionId"
}
}
},
"required": [
"resourceFhirAccount",
"resourceFhirId"
]
},
"HealthcareFhirResourceDeletedEventData": {
"type": "object",
Expand All @@ -4396,7 +4421,11 @@
"description": "VersionId of HL7 FHIR resource. It changes when the resource is created, updated, or deleted(soft-deletion).",
"x-ms-client-name": "FhirResourceVersionId"
}
}
},
"required": [
"resourceFhirAccount",
"resourceFhirId"
]
},
"HealthcareFhirResourceType": {
"type": "string",
Expand Down Expand Up @@ -5401,7 +5430,11 @@
"description": "VersionId of HL7 FHIR resource. It changes when the resource is created, updated, or deleted(soft-deletion).",
"x-ms-client-name": "FhirResourceVersionId"
}
}
},
"required": [
"resourceFhirAccount",
"resourceFhirId"
]
},
"IotHubDeviceConnectedEventData": {
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4366,7 +4366,15 @@
"format": "int64",
"description": "Sequence number of the DICOM Service within Azure Health Data Services. It is unique for every image creation and deletion within the service."
}
}
},
"required": [
"partitionName",
"imageStudyInstanceUid",
"imageSeriesInstanceUid",
"imageSopInstanceUid",
"serviceHostName",
"sequenceNumber"
]
},
"HealthcareDicomImageDeletedEventData": {
"type": "object",
Expand Down Expand Up @@ -4397,7 +4405,15 @@
"format": "int64",
"description": "Sequence number of the DICOM Service within Azure Health Data Services. It is unique for every image creation and deletion within the service."
}
}
},
"required": [
"partitionName",
"imageStudyInstanceUid",
"imageSeriesInstanceUid",
"imageSopInstanceUid",
"serviceHostName",
"sequenceNumber"
]
},
"HealthcareDicomImageUpdatedEventData": {
"type": "object",
Expand Down Expand Up @@ -4428,7 +4444,15 @@
"format": "int64",
"description": "Sequence number of the DICOM Service within Azure Health Data Services. It is unique for every image creation, updation and deletion within the service."
}
}
},
"required": [
"partitionName",
"imageStudyInstanceUid",
"imageSeriesInstanceUid",
"imageSopInstanceUid",
"serviceHostName",
"sequenceNumber"
]
},
"HealthcareFhirResourceCreatedEventData": {
"type": "object",
Expand Down Expand Up @@ -4457,7 +4481,10 @@
}
},
"required": [
"resourceType"
"resourceType",
"resourceFhirAccount",
"resourceFhirId",
"resourceVersionId"
]
},
"HealthcareFhirResourceDeletedEventData": {
Expand Down Expand Up @@ -4487,7 +4514,10 @@
}
},
"required": [
"resourceType"
"resourceType",
"resourceFhirAccount",
"resourceFhirId",
"resourceVersionId"
]
},
"HealthcareFhirResourceType": {
Expand Down Expand Up @@ -5495,7 +5525,10 @@
}
},
"required": [
"resourceType"
"resourceType",
"resourceFhirAccount",
"resourceFhirId",
"resourceVersionId"
]
},
"IotHubDeviceConnectedEventData": {
Expand Down

0 comments on commit 0c06024

Please sign in to comment.