@@ -5,7 +5,7 @@ author: msjasteppe
5
5
ms.service : healthcare-apis
6
6
ms.subservice : fhir
7
7
ms.topic : how-to
8
- ms.date : 07/20 /2023
8
+ ms.date : 07/25 /2023
9
9
ms.author : jasteppe
10
10
---
11
11
@@ -89,7 +89,8 @@ In this example, we're using a device message that is capturing `heartRate` data
89
89
90
90
``` json
91
91
{
92
- "heartRate" : " 78"
92
+ "PatientId" : " patient1" ,
93
+ "HeartRate" : " 78"
93
94
}
94
95
```
95
96
@@ -103,13 +104,15 @@ The IoT hub enriches and routes the device message to the event hub before the M
103
104
``` json
104
105
{
105
106
"Body" : {
106
- "heartRate" : " 78"
107
- },
108
- "Properties" : {
109
- "iothub-creation-time-utc" : " 2023-03-13T22:46:01.87500000"
107
+ "PatientId" : " patient1" ,
108
+ "HeartRate" : 78
110
109
},
111
110
"SystemProperties" : {
112
- "iothub-connection-device-id" : " device01"
111
+ "iothub-enqueuedtime" : " 2023-07-25T20:41:26.046Z" ,
112
+ "iothub-connection-device-id" : " sampleDeviceId"
113
+ },
114
+ "Properties" : {
115
+ "iothub-creation-time-utc" : " 2023-07-25T20:41:26.046Z"
113
116
}
114
117
}
115
118
```
@@ -122,32 +125,33 @@ We're using this device mapping for the normalization stage:
122
125
{
123
126
"templateType" : " IotJsonPathContent" ,
124
127
"template" : {
125
- "typeName" : " heartRate " ,
126
- "typeMatchExpression" : " $..[?(@Body.heartRate )]" ,
127
- "patientIdExpression" : " $.SystemProperties.iothub-connection-device-id " ,
128
+ "typeName" : " HeartRate " ,
129
+ "typeMatchExpression" : " $..[?(@Body.HeartRate )]" ,
130
+ "patientIdExpression" : " $.Body.PatientId " ,
128
131
"values" : [
129
132
{
130
- "required" : " true" ,
131
- "valueExpression" : " $.Body.heartRate " ,
132
- "valueName" : " hr "
133
+ "required" : true ,
134
+ "valueExpression" : " $.Body.HeartRate " ,
135
+ "valueName" : " HeartRate "
133
136
}
134
137
]
135
138
}
136
139
}
137
- ]
140
+ ]
138
141
}
139
142
```
140
143
141
144
The resulting normalized message will look like this after the normalization stage:
142
145
143
146
``` json
144
147
{
145
- "type" : " heartRate" ,
146
- "occurrenceTimeUtc" : " 2023-03-13T22:46:01.875Z" ,
147
- "deviceId" : " device01" ,
148
+ "type" : " HeartRate" ,
149
+ "occurrenceTimeUtc" : " 2023-07-25T20:41:26.046Z" ,
150
+ "deviceId" : " sampleDeviceId" ,
151
+ "patientId" : " patient1" ,
148
152
"properties" : [
149
153
{
150
- "name" : " hr " ,
154
+ "name" : " HeartRate " ,
151
155
"value" : " 78"
152
156
}
153
157
]
0 commit comments