Skip to content

Commit 2b4a531

Browse files
authored
Microsoft.HealthcareApis EventGrid Spec (#17400)
* Swagger spec for HealthcareApi Events * Fix style issues with prettier * Add entry for Microsoft.HealthcareApis * Fix entry for Microsoft.HealthcareApis * Change property type names to camelcase in HealthcareApis.json * Chance the properties to camelCase * Changed the schema version for HealthcareApis.json to match the event grid * Modify readme * Rename example resource created file * Rename example files * Revert package-lock.json to earlier version * Address PR review comments-1 * Move common properties to FhirResourceEventBaseProperties
1 parent 2b92c25 commit 2b4a531

File tree

5 files changed

+105
-1
lines changed

5 files changed

+105
-1
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"version": "2018-01-01",
5+
"title": "Schema of Azure HealthcareApis events published to Azure Event Grid.",
6+
"description": "Describes the schema of the Azure HealthcareApis events published to Azure Event Grid. This corresponds to the Data property of an EventGridEvent."
7+
},
8+
"paths": {},
9+
"definitions": {
10+
"FhirResourceCreatedEventData": {
11+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.HealthcareApis.FhirResourceCreated event.",
12+
"allOf": [
13+
{
14+
"$ref": "#/definitions/FhirResourceEventBaseProperties"
15+
}
16+
]
17+
},
18+
"FhirResourceUpdatedEventData": {
19+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.HealthcareApis.FhirResourceUpdated event.",
20+
"allOf": [
21+
{
22+
"$ref": "#/definitions/FhirResourceEventBaseProperties"
23+
}
24+
]
25+
},
26+
"FhirResourceDeletedEventData": {
27+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.HealthcareApis.FhirResourceDeleted event.",
28+
"allOf": [
29+
{
30+
"$ref": "#/definitions/FhirResourceEventBaseProperties"
31+
}
32+
]
33+
},
34+
"FhirResourceEventBaseProperties": {
35+
"description": "Schema of common properties of all FhirResource events",
36+
"type": "object",
37+
"properties": {
38+
"resourceType": {
39+
"description": "Type of HL7 FHIR resource.",
40+
"type": "string"
41+
},
42+
"resourceFhirAccount": {
43+
"description": "Domain name of FHIR account for this resource.",
44+
"type": "string"
45+
},
46+
"resourceFhirId": {
47+
"description": "Id of HL7 FHIR resource.",
48+
"type": "string"
49+
},
50+
"resourceVersionId": {
51+
"description": "VersionId of HL7 FHIR resource. It changes when the resource is created, updated, or deleted(soft-deletion).",
52+
"type": "integer",
53+
"format": "int64"
54+
}
55+
}
56+
}
57+
}
58+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"id": "e4c7f556-d72c-e7f7-1069-1e82ac76ab41",
3+
"topic": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.HealthcareApis/workspaces/{workspace-name}",
4+
"subject": "{fhir-account}.fhir.azurehealthcareapis.com/Patient/e0a1f743-1a70-451f-830e-e96477163902",
5+
"data": {
6+
"resourceType": "Patient",
7+
"resourceFhirAccount": "{fhir-account}.fhir.azurehealthcareapis.com",
8+
"resourceFhirId": "e0a1f743-1a70-451f-830e-e96477163902",
9+
"resourceVersionId": 1
10+
},
11+
"eventType": "Microsoft.HealthcareApis.FhirResourceCreated",
12+
"dataVersion": "1",
13+
"metadataVersion": "1",
14+
"eventTime": "2021-09-08T01:14:04.5613214Z"
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"id": "ef289b93-3159-b833-3a44-dc6b86ed1a8a",
3+
"topic": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.HealthcareApis/workspaces/{workspace-name}",
4+
"subject": "{fhir-account}.fhir.azurehealthcareapis.com/Patient/e0a1f743-1a70-451f-830e-e96477163902",
5+
"data": {
6+
"resourceType": "Patient",
7+
"resourceFhirAccount": "{fhir-account}.fhir.azurehealthcareapis.com",
8+
"resourceFhirId": "e0a1f743-1a70-451f-830e-e96477163902",
9+
"resourceVersionId": 3
10+
},
11+
"eventType": "Microsoft.HealthcareApis.FhirResourceDeleted",
12+
"dataVersion": "3",
13+
"metadataVersion": "1",
14+
"eventTime": "2021-09-08T01:31:58.5175837Z"
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"id": "634bd421-8467-f23c-b8cb-f6a31e41c32a",
3+
"topic": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.HealthcareApis/workspaces/{workspace-name}",
4+
"subject": "{fhir-account}.fhir.azurehealthcareapis.com/Patient/e0a1f743-1a70-451f-830e-e96477163902",
5+
"data": {
6+
"resourceType": "Patient",
7+
"resourceFhirAccount": "{fhir-account}.fhir.azurehealthcareapis.com",
8+
"resourceFhirId": "e0a1f743-1a70-451f-830e-e96477163902",
9+
"resourceVersionId": 2
10+
},
11+
"eventType": "Microsoft.HealthcareApis.FhirResourceUpdated",
12+
"dataVersion": "2",
13+
"metadataVersion": "1",
14+
"eventTime": "2021-09-08T01:29:12.0618739Z"
15+
}

specification/eventgrid/data-plane/readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ input-file:
133133
- Microsoft.PolicyInsights/stable/2018-01-01/PolicyInsights.json
134134
- Microsoft.ContainerService/stable/2018-01-01/ContainerService.json
135135
- Microsoft.ApiManagement/stable/2018-01-01/APIManagement.json
136+
- Microsoft.HealthcareApis/stable/2018-01-01/HealthcareApis.json
136137
137138
```
138139

@@ -230,7 +231,7 @@ input-file:
230231
- $(this-folder)/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json
231232
- $(this-folder)/Microsoft.ContainerService/stable/2018-01-01/ContainerService.json
232233
- $(this-folder)/Microsoft.ApiManagement/stable/2018-01-01/APIManagement.json
233-
234+
- $(this-folder)/Microsoft.HealthcareApis/stable/2018-01-01/HealthcareApis.json
234235
```
235236

236237
If there are files that should not be in the `all-api-versions` set,

0 commit comments

Comments
 (0)