You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/healthcare-apis/iot/device-data-through-iot-hub.md
+13-4Lines changed: 13 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: msjasteppe
6
6
ms.service: healthcare-apis
7
7
ms.subservice: iomt
8
8
ms.topic: tutorial
9
-
ms.date: 03/25/2022
9
+
ms.date: 09/29/2022
10
10
ms.author: jasteppe
11
11
---
12
12
@@ -39,17 +39,24 @@ For more information on Azure role-based access control, see [Azure role-based a
39
39
40
40
## Connect IoT Hub with the MedTech service
41
41
42
-
Azure IoT Hub supports a feature called [message routing](../../iot-hub/iot-hub-devguide-messages-d2c.md). Message routing provides the capability to send device data to various Azure services (for example: event hub, Storage Accounts, and Service Buses). MedTech service uses this feature to allow an IoT Hub to connect and send device messages to the MedTech service device message event hub endpoint.
42
+
Azure IoT Hub supports a feature called [message routing](/azure/iot-hub/iot-hub-devguide-messages-d2c.md). Message routing provides the capability to send device data to various Azure services (for example: event hub, Storage Accounts, and Service Buses). MedTech service uses this feature to allow an IoT Hub to connect and send device messages to the MedTech service device message event hub endpoint.
43
43
44
-
Follow these directions to grant access to the IoT Hub user-assigned managed identity to your MedTech service device message event hub and set up message routing: [Configure message routing with managed identities](../../iot-hub/iot-hub-managed-identity.md#egress-connectivity-from-iot-hub-to-other-azure-resources).
44
+
Follow these directions to grant access to the IoT Hub system-assigned managed identity to your MedTech service device message event hub and set up message routing: [Configure message routing with managed identities](/azure-pipelines.yml/iot-hub/iot-hub-managed-identitymd#egress-connectivity-from-iot-hub-to-other-azure-resources)
45
45
46
46
## Send device message to IoT Hub
47
47
48
48
Use your device (real or simulated) to send the sample heart rate message shown below to the IoT Hub.
49
49
50
50
This message will get routed to MedTech service, where the message will be transformed into a FHIR Observation resource and stored into FHIR service.
51
51
52
+
> [!IMPORTANT]
53
+
> To avoid device spoofing in device-to-cloud messages, Azure IoT Hub enriches all messages with additional properties. To learn more about these properties, see [Anti-spoofing properties](/azure/iot-hub/iot-hub-devguide-messages-construct#anti-spoofing-properties)
54
+
55
+
> [!TIP]
56
+
> To learn about IoT Hub device message enrichment and IotJsonPathContentTemplate mappings usage with the MedTech service device mapping, see [How to use IotJsonPathContentTemplate mappings](how-to-use-iot-jsonpath-content-mappings.md)
57
+
52
58
```json
59
+
53
60
{
54
61
"HeartRate": 80,
55
62
"RespiratoryRate": 12,
@@ -61,7 +68,9 @@ This message will get routed to MedTech service, where the message will be trans
61
68
},
62
69
"Activity": "walking"
63
70
}
71
+
64
72
```
73
+
65
74
> [!IMPORTANT]
66
75
> Make sure to send the device message that conforms to the [Device mappings](how-to-use-device-mappings.md) and [FHIR destinations mappings](how-to-use-fhir-mappings.md) configured with your MedTech service.
67
76
@@ -81,4 +90,4 @@ To learn about the different stages of data flow within MedTech service, see
81
90
>[!div class="nextstepaction"]
82
91
>[MedTech service data flow](iot-data-flow.md)
83
92
84
-
(FHIR®) is a registered trademark of HL7 and is used with the permission of HL7.
93
+
FHIR® is a registered trademark of Health Level Seven International, registered in the U.S. Trademark Office and is used with their permission.
This article describes how to use IoTJsonPathContentTemplate mappings with the MedTech service [device mapping](how-to-use-device-mappings.md).
15
15
16
-
> [!TIP]
17
-
> Check out the [IoMT Connector Data Mapper](https://github.com/microsoft/iomt-fhir/tree/master/tools/data-mapper) tool for editing, testing, and troubleshooting the MedTech service Device and FHIR destination mappings. Export mappings for uploading to the MedTech service in the Azure portal or use with the [open-source version](https://github.com/microsoft/iomt-fhir) of the MedTech service.
18
-
19
16
## IotJsonPathContentTemplate
20
17
21
18
The IotJsonPathContentTemplate is similar to the JsonPathContentTemplate except the `DeviceIdExpression` and `TimestampExpression` aren't required.
@@ -25,7 +22,7 @@ The assumption, when using this template, is the messages being evaluated were s
25
22
When you're using these SDKs, the device identity and the timestamp of the message are known.
26
23
27
24
>[!IMPORTANT]
28
-
>Make sure that you're using a device identifier from Azure Iot Hub or Azure IoT Central that is registered as an identifier for a device resource on the destination FHIR service.
25
+
>Make sure that you're using a device identifier from Azure Iot Hub or Azure IoT Central that is registered as an identifier for a device resource on the destination Fast Healthcare Interoperability Resource (FHIR®) service.
29
26
30
27
If you're using Azure IoT Hub Device SDKs, you can still use the JsonPathContentTemplate, assuming that you're using custom properties in the message body for the device identity or measurement timestamp.
31
28
@@ -34,9 +31,29 @@ If you're using Azure IoT Hub Device SDKs, you can still use the JsonPathContent
34
31
35
32
### Examples
36
33
34
+
With each of these examples, you're provided with:
35
+
* A valid IoT device message.
36
+
* An example of what the IoT device message will look like after being received and processed by the IoT Hub.
37
+
* A valid MedTech service device mapping for normalizing the IoT device message after IoT Hub processing.
38
+
* An example of what the MedTech service device message will look like after normalization.
39
+
40
+
> [!IMPORTANT]
41
+
> To avoid device spoofing in device-to-cloud messages, Azure IoT Hub enriches all messages with additional properties. To learn more about these properties, see [Anti-spoofing properties](/azure/iot-hub/iot-hub-devguide-messages-construct#anti-spoofing-properties)
42
+
37
43
**Heart rate**
38
44
39
-
*Message*
45
+
**A valid IoT device message.**
46
+
47
+
```json
48
+
49
+
{“heartrate” : “78”}
50
+
51
+
```
52
+
53
+
**An example of what the IoT device message will look like after being received and processed by the IoT Hub.**
54
+
55
+
> [!NOTE]
56
+
> The IoT Hub enriches the device message before sending it to the MedTech service device event hub with all properties starting with **iothub**. For example: **iothub-creation-time-utc**.
40
57
41
58
```json
42
59
@@ -49,12 +66,12 @@ If you're using Azure IoT Hub Device SDKs, you can still use the JsonPathContent
49
66
},
50
67
"SystemProperties": {
51
68
"iothub-connection-device-id" : "device123"
52
-
}
53
-
}
69
+
}
70
+
}
54
71
55
72
```
56
73
57
-
*Template*
74
+
**A valid MedTech service device mapping for normalizing the IoT device message after IoT Hub processing.**
58
75
59
76
```json
60
77
@@ -80,28 +97,60 @@ If you're using Azure IoT Hub Device SDKs, you can still use the JsonPathContent
80
97
81
98
```
82
99
100
+
**An example of what the MedTech service device message will look like after the normalization process.**
101
+
102
+
```json
103
+
104
+
{
105
+
"type": "heartrate",
106
+
"occurrenceTimeUtc": "2021-02-01T22:46:01.875Z",
107
+
"deviceId": "device123",
108
+
"properties": [
109
+
{
110
+
"name": "hr",
111
+
"value": "78"
112
+
}
113
+
]
114
+
}
115
+
116
+
```
117
+
83
118
**Blood pressure**
84
119
85
-
*Message*
120
+
**A valid IoT device message.**
121
+
122
+
```json
123
+
124
+
{
125
+
"systolic": "123",
126
+
"diastolic": "87"
127
+
}
128
+
129
+
```
130
+
131
+
**An example of what the IoT device message will look like after being received and processed by the IoT Hub.**
132
+
133
+
> [!NOTE]
134
+
> The IoT Hub enriches the device message before sending it to the MedTech service device event hub with all properties starting with **iothub**. For example: **iothub-creation-time-utc**.
**A valid MedTech service device mapping for normalizing the IoT device message after IoT Hub processing.**
105
154
106
155
```json
107
156
@@ -132,50 +181,74 @@ If you're using Azure IoT Hub Device SDKs, you can still use the JsonPathContent
132
181
133
182
```
134
183
184
+
**An example of what the MedTech service device message will look like after the normalization process.**
185
+
186
+
```json
187
+
188
+
{
189
+
"type": "bloodpressure",
190
+
"occurrenceTimeUtc": "2021-02-01T22:46:01.875Z",
191
+
"deviceId": "device123",
192
+
"properties": [
193
+
{
194
+
"name": "systolic",
195
+
"value": "123"
196
+
},
197
+
{
198
+
"name": "diastolic",
199
+
"value": "87"
200
+
}
201
+
]
202
+
}
203
+
204
+
```
205
+
135
206
> [!TIP]
136
-
> The above IotJsonPathTemplate examples will work separately with your MedTech service device mapping or you can combine them into a single MedTech service device mapping as shown below. Additionally, the IotJasonPathTemplates can also be combined with with other template types such as [JasonPathContentTemplate mappings](how-to-use-jsonpath-content-mappings.md) to create and tune your MedTech service device mapping to meet your individual needs and scenarios.
207
+
> The IotJsonPathTemplate device mapping examples provided in this article may be combined into a single MedTech service device mapping as shown below.
208
+
>
209
+
> Additionally, the IotJasonPathTemplates can also be combined with with other template types such as [JasonPathContentTemplate mappings](how-to-use-jsonpath-content-mappings.md) to further expand your MedTech service device mapping.
137
210
138
-
*Template*
211
+
**Combined heart rate and blood pressure MedTech service device mapping example.**
0 commit comments