Skip to content

Commit b83f356

Browse files
Merge pull request #213226 from msjasteppe/iot-hub-updates
Additional updates to articles based on feedback.
2 parents 15667ad + 695c5ff commit b83f356

File tree

2 files changed

+31
-19
lines changed

2 files changed

+31
-19
lines changed

articles/healthcare-apis/iot/device-data-through-iot-hub.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
11
---
22
title: Receive device data through Azure IoT Hub - Azure Health Data Services
3-
description: In this tutorial, you'll learn how to enable device data routing from IoT Hub into FHIR service through MedTech service.
3+
description: In this tutorial, you'll learn how to enable device data routing from IoT Hub into the FHIR service through MedTech service.
44
services: healthcare-apis
55
author: msjasteppe
66
ms.service: healthcare-apis
77
ms.subservice: iomt
88
ms.topic: tutorial
9-
ms.date: 09/29/2022
9+
ms.date: 10/03/2022
1010
ms.author: jasteppe
1111
---
1212

1313
# Tutorial: Receive device data through Azure IoT Hub
1414

1515
MedTech service may be used with devices created and managed through Azure IoT Hub for enhanced workflows and ease of use.
1616

17-
This tutorial provides the steps to connect and route device data from IoT Hub to MedTech service.
17+
This tutorial provides the steps to connect and route device data from IoT Hub to your MedTech service.
1818

1919
## Prerequisites
2020

2121
- An active Azure subscription - [Create one for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F)
2222
- FHIR service resource with at least one MedTech service - [Deploy MedTech service using Azure portal](deploy-iot-connector-in-azure.md)
2323
- Azure IoT Hub resource connected with real or simulated device(s) - [Create an IoT Hub using the Azure portal](../../iot-hub/iot-hub-create-through-portal.md)
2424

25-
> [!TIP]
26-
> If you are using an Azure IoT Hub simulated device application, feel free to pick the application of your choice amongst different supported languages and systems.
27-
2825
Below is a diagram of the IoT device message flow from IoT Hub into MedTech service:
2926

3027
:::image type="content" source="media\iot-hub-to-iot-connector\iot-hub-to-iot-connector.png" alt-text="Diagram of IoT message data flow through IoT Hub into the MedTech service." lightbox="media\iot-hub-to-iot-connector\iot-hub-to-iot-connector.png":::
@@ -45,15 +42,19 @@ Follow these directions to grant access to the IoT Hub system-assigned managed i
4542

4643
## Send device message to IoT Hub
4744

45+
> [!TIP]
46+
> [Visual Studio Code with the Azure IoT Hub extension](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-tools) is a recommended method for sending IoT device messages to your IoT Hub for testing and troubleshooting.
47+
4848
Use your device (real or simulated) to send the sample heart rate message shown below to the IoT Hub.
4949

5050
This message will get routed to MedTech service, where the message will be transformed into a FHIR Observation resource and stored into FHIR service.
5151

5252
> [!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)
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+
> 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).
5456
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+
**Sample IoT device message to send to IoT Hub**
5758

5859
```json
5960

articles/healthcare-apis/iot/how-to-use-iot-jsonpath-content-mappings.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: msjasteppe
55
ms.service: healthcare-apis
66
ms.subservice: fhir
77
ms.topic: how-to
8-
ms.date: 09/26/2022
8+
ms.date: 10/03/2022
99
ms.author: jasteppe
1010
---
1111

@@ -38,22 +38,27 @@ With each of these examples, you're provided with:
3838
* An example of what the MedTech service device message will look like after normalization.
3939

4040
> [!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)
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+
43+
> [!TIP]
44+
> [Visual Studio Code with the Azure IoT Hub extension](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-tools) is a recommended method for sending IoT device messages to your IoT Hub for testing and troubleshooting.
4245
4346
**Heart rate**
4447

45-
**A valid IoT device message.**
48+
**A valid IoT device message to send to your IoT Hub.**
4649

4750
```json
4851

49-
{heartrate” : “78”}
52+
{heartRate” : “78”}
5053

5154
```
5255

5356
**An example of what the IoT device message will look like after being received and processed by the IoT Hub.**
5457

5558
> [!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**.
59+
> 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`.
60+
>
61+
> `patientIdExpression` is only required for MedTech services in the **Create** mode, however, if **Lookup** is being used, a Device resource with a matching Device Identifier must exist in the FHIR service. These examples assume your MedTech service is in a **Create** mode. For more information on the **Create** and **Lookup** **Destination properties**, see [Configure Destination properties](deploy-05-new-config.md#destination-properties).
5762
5863
```json
5964

@@ -81,8 +86,9 @@ With each of these examples, you're provided with:
8186
{
8287
"templateType": "IotJsonPathContentTemplate",
8388
"template": {
84-
"typeName": "heartrate",
89+
"typeName": "heartRate",
8590
"typeMatchExpression": "$..[?(@Body.heartRate)]",
91+
"patientIdExpression": "$.SystemProperties.iothub-connection-device-id",
8692
"values": [
8793
{
8894
"required": "true",
@@ -102,7 +108,7 @@ With each of these examples, you're provided with:
102108
```json
103109

104110
{
105-
"type": "heartrate",
111+
"type": "heartRate",
106112
"occurrenceTimeUtc": "2021-02-01T22:46:01.875Z",
107113
"deviceId": "device123",
108114
"properties": [
@@ -117,7 +123,7 @@ With each of these examples, you're provided with:
117123

118124
**Blood pressure**
119125

120-
**A valid IoT device message.**
126+
**A valid IoT device message to send to your IoT Hub.**
121127

122128
```json
123129

@@ -131,7 +137,9 @@ With each of these examples, you're provided with:
131137
**An example of what the IoT device message will look like after being received and processed by the IoT Hub.**
132138

133139
> [!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**.
140+
> 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`.
141+
>
142+
> `patientIdExpression` is only required for MedTech services in the **Create** mode, however, if **Lookup** is being used, a Device resource with a matching Device Identifier must exist in the FHIR service. These examples assume your MedTech service is in a **Create** mode. For more information on the **Create** and **Lookup** **Destination properties**, see [Configure Destination properties](deploy-05-new-config.md#destination-properties).
135143
136144
```json
137145

@@ -162,6 +170,7 @@ With each of these examples, you're provided with:
162170
"template": {
163171
"typeName": "bloodpressure",
164172
"typeMatchExpression": "$..[?(@Body.systolic && @Body.diastolic)]",
173+
"patientIdExpression": "$.SystemProperties.iothub-connection-device-id",
165174
"values": [
166175
{
167176
"required": "true",
@@ -218,8 +227,9 @@ With each of these examples, you're provided with:
218227
{
219228
"templateType": "IotJsonPathContentTemplate",
220229
"template": {
221-
"typeName": "heartrate",
230+
"typeName": "heartRate",
222231
"typeMatchExpression": "$..[?(@Body.heartRate)]",
232+
"patientIdExpression": "$.SystemProperties.iothub-connection-device-id",
223233
"values": [
224234
{
225235
"required": "true",
@@ -234,6 +244,7 @@ With each of these examples, you're provided with:
234244
"template": {
235245
"typeName": "bloodpressure",
236246
"typeMatchExpression": "$..[?(@Body.systolic && @Body.diastolic)]",
247+
"patientIdExpression": "$.SystemProperties.iothub-connection-device-id",
237248
"values": [
238249
{
239250
"required": "true",

0 commit comments

Comments
 (0)