Quickstart: Deploy Azure IoT Connector for FHIR (preview) using Azure portal

Azure IoT Connector for Fast Healthcare Interoperability Resources (FHIR®)* is an optional feature of Azure API for FHIR that provides the capability to ingest data from Internet of Medical Things (IoMT) devices. During the preview phase, Azure IoT Connector for FHIR feature is being available for free. In this quickstart, you'll learn how to:

  • Deploy and configure Azure IoT Connector for FHIR using the Azure portal
  • Use a simulated device to send data to Azure IoT Connector for FHIR
  • View resources created by Azure IoT Connector for FHIR on Azure API for FHIR

Prerequisites

Go to Azure API for FHIR resource

Open the Azure portal and go to the Azure API for FHIR resource for which you'd like to create the Azure IoT Connector for FHIR feature.

Azure API for FHIR resource

On the left-hand navigation menu, click on IoT Connector (preview) under the Add-ins section to open the IoT Connectors page.

IoT Connector feature

Create new Azure IoT Connector for FHIR (preview)

Click on the Add button to open the Create IoT Connector page.

Add IoT Connector

Enter settings for the new Azure IoT Connector for FHIR. Click on Create button and await Azure IoT Connector for FHIR deployment.

Note

Must select Create as the value for the Resolution type drop down for this installation.

Create IoT Connector

Setting Value Description
Connector name A unique name Enter a name to identify your Azure IoT Connector for FHIR This name should be unique within an Azure API for FHIR resource. The name can only contain lowercase letters, numbers, and the hyphen (-) character. It must start and end with a letter or a number, and must be between 3-24 characters in length.
Resolution type Lookup or Create Select Lookup if you have an out-of-band process to create Device and Patient FHIR resources in your Azure API for FHIR. Azure IoT Connector for FHIR will use reference to these resources when creating an Observation FHIR resource to represent the device data. Select Create when you want Azure IoT Connector for FHIR to create bare-bones Device and Patient resources in your Azure API for FHIR using respective identifier values present in the device data.

Once installation is complete, the newly created Azure IoT Connector for FHIR will show up on the IoT Connectors page.

IoT Connector created

Configure Azure IoT Connector for FHIR (preview)

Azure IoT Connector for FHIR needs two mapping templates to transform device messages into FHIR-based Observation resource(s): device mapping and FHIR mapping. Your Azure IoT Connector for FHIR isn't fully operational until these mappings are uploaded.

IoT Connector missing mappings

To upload mapping templates, click on the newly deployed Azure IoT Connector for FHIR to go to the IoT Connector page.

IoT Connector click

Device mapping

Device mapping template transforms device data into a normalized schema. On the IoT Connector page, click on Configure device mapping button to go to the Device mapping page.

IoT Connector click configure device mapping

On the Device mapping page, add the following script to the JSON editor and click Save.

{
  "templateType": "CollectionContent",
  "template": [
    {
      "templateType": "IotJsonPathContent",
      "template": {
        "typeName": "heartrate",
        "typeMatchExpression": "$..[?(@Body.telemetry.HeartRate)]",
        "patientIdExpression": "$.Properties.iotcentral-device-id",
        "values": [
          {
            "required": "true",
            "valueExpression": "$.Body.telemetry.HeartRate",
            "valueName": "hr"
          }
        ]
      }
    }
  ]
}

IoT Connector device mapping

FHIR mapping

FHIR mapping template transforms a normalized message to a FHIR-based Observation resource. On the IoT Connector page, click on Configure FHIR mapping button to go to the FHIR mapping page.

IoT Connector click configure FHIR mapping

On the FHIR mapping page, add the following script to the JSON editor and click Save.

{
  "templateType": "CollectionFhir",
  "template": [
    {
      "templateType": "CodeValueFhir",
      "template": {
        "codes": [
          {
            "code": "8867-4",
            "system": "http://loinc.org",
            "display": "Heart rate"
          }
        ],
        "periodInterval": 0,
        "typeName": "heartrate",
        "value": {
          "unit": "count/min",
          "valueName": "hr",
          "valueType": "Quantity"
        }
      }
    }
  ]
}

IoT Connector FHIR mapping

Generate a connection string

IoMT device needs a connection string to connect and send messages to Azure IoT Connector for FHIR. On the IoT Connector page for the newly deployed Azure IoT Connector for FHIR, select Manage client connections button.

IoT Connector click manage client connections

Once on Connections page, click on Add button to create a new connection.

IoT Connector connections

Provide a friendly name for this connection on the overlay window and select the Create button.

IoT Connector new connection

Select the newly created connection from the Connections page and copy the value of Primary connection string field from the overlay window on the right.

IoT Connector connection string

Preserve this connection string to be used at a later step.

Connect your devices to IoT

Azure offers an extensive suite of IoT products to connect and manage your IoT devices. You can build your own solution based on PaaS using Azure IoT Hub, or start with a manage IoT apps platform with Azure IoT Central. For this tutorial, we'll leverage Azure IoT Central, which has industry-focused solution templates to help you get started.

Deploy the Continuous patient monitoring application template. This template includes two simulated devices producing real-time data to help you get started: Smart Vitals Patch and Smart Knee Brace.

Note

Whenever your real devices are ready, you can use same IoT Central application to onboard your devices and replace device simulators. Your device data will automatically start flowing to FHIR as well.

Connect your IoT data with the Azure IoT Connector for FHIR (preview)

Once you've deployed your IoT Central application, your two out-of-the-box simulated devices will start generating telemetry. For this tutorial, we'll ingest the telemetry from Smart Vitals Patch simulator into FHIR via the Azure IoT Connector for FHIR. To export your IoT data to the Azure IoT Connector for FHIR, we'll want to set up a continuous data export within IoT Central. We'll first need to create a connection to the destination, and then we'll create a data export job to continuously run:

Note

You will want to select Data export vs. Data export (legacy) within the IoT Central App settings for this section.

IoT Central Data Export Settings

Create a new destination:

  • Go to the Destinations tab and create a new destination.
  • Start by giving your destination a unique name.
  • Pick Azure Event Hubs as the destination type.
  • Provide Azure IoT Connector for FHIR's connection string obtained in a previous step for the Connection string field.

Create a new data export:

  • Once you've created your destination, go over to the Exports tab and create a new data export.
  • Start by giving it the data export a unique name.
  • Under Data select Telemetry as the Type of data to export.
  • Under Destination select the destination name you created in the previous name.

View device data in Azure API for FHIR

You can view the FHIR-based Observation resource(s) created by Azure IoT Connector for FHIR on Azure API for FHIR using Postman. Set up your Postman to access Azure API for FHIR and make a GET request to https://your-fhir-server-url/Observation?code=http://loinc.org|8867-4 to view Observation FHIR resources with heart rate value.

Tip

Ensure that your user has appropriate access to Azure API for FHIR data plane. Use Azure role-based access control (Azure RBAC) to assign required data plane roles.

Clean up resources

When no longer needed, you can delete an instance of Azure IoT Connector for FHIR by removing the associated resource group, or the associated Azure API for FHIR service, or the Azure IoT Connector for FHIR instance itself.

To directly remove an Azure IoT Connector for FHIR instance, select the instance from IoT Connectors page to go to IoT Connector page and click on Delete button. Select Yes when asked for confirmation.

Delete IoT Connector instance

Next steps

In this quickstart guide, you've deployed Azure IoT Connector for FHIR feature in your Azure API for FHIR resource. Select from below next steps to learn more about Azure IoT Connector for FHIR:

Understand different stages of data flow within Azure IoT Connector for FHIR.

Learn how to configure IoT Connector using device and FHIR mapping templates.

*In the Azure portal, Azure IoT Connector for FHIR is referred to as IoT Connector (preview). FHIR is a registered trademark of HL7 and is used with the permission of HL7.