Skip to content

Commit f8feb0c

Browse files
committed
Merge branch 'iotjsonpathcontent-updates' of https://github.com/msjasteppe/azure-docs-pr into iotjsonpathcontent-updates
2 parents 36c3fb4 + 73f00f1 commit f8feb0c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

articles/healthcare-apis/iot/how-to-use-iotjsonpathcontent-templates.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This article provides an overview of how to use IotJsonPathContent templates wit
1818

1919
## IotJsonPathContent template basics
2020

21-
IotJsonPathContent templates can be used when the MedTech service ingests device messages [routed](../../iot-hub/iot-concepts-and-iot-hub.md#message-routing-sends-data-to-other-endpoints) from an [Azure IoT Hub](../../iot-hub/iot-concepts-and-iot-hub.md). When IotJsonPathContent templates are used within the [device mapping](overview-of-device-mapping.md), the MedTech service extracts the device ID and measurement timestamp from metadata provided by an IoT hub. The TimestampExpression and DeviceIdExpression shouldn't be included in IotJsonPathContent templates.
21+
IotJsonPathContent templates can be used when the MedTech service ingests device messages [routed](../../iot-hub/iot-concepts-and-iot-hub.md#message-routing-sends-data-to-other-endpoints) from an [Azure IoT Hub](../../iot-hub/iot-concepts-and-iot-hub.md). When IotJsonPathContent templates are used within the [device mapping](overview-of-device-mapping.md), the MedTech service extracts the device ID and measurement timestamp from metadata provided by an IoT hub. The DeviceIdExpression and TimestampExpression shouldn't be included in IotJsonPathContent templates.
2222

2323
The MedTech service IotJsonPathContent templates support the JSON expression language JSONPath. Expressions are used to identify which template to use with a given JSON device message (for example: TypeMatchExpression) and to extract specific values that are required to create a normalized message (for example: PatientIdExpression, ValueExpression, etc.). IotJsonPathContent templates are similar to the CalculatedContent templates except the DeviceIdExpression and TimestampExpression aren't supported.
2424

@@ -43,7 +43,7 @@ In the following example, `typeMatchExpression` is defined as:
4343
```
4444

4545
> [!IMPORTANT]
46-
> The MedTech service will use the device ID defined in IoT hub as the FHIR resource device identifier. If the MedTech service is setup to use an identity resolution type of **Lookup**, a Device resource with a matching device identifier **must** exist in the FHIR service or an error will occur when the device message is processed. If the MedTech service identity resolution type is set to **Create**, a `patientIdExpression` must be included in the device message so that a new Patient resource and Device resource can be created if they do not already exist.
46+
> The MedTech service will use the device ID defined in IoT hub as the FHIR resource device identifier. If the MedTech service is set up to use an identity resolution type of **Lookup**, a Device resource with a matching device identifier **must** exist in the FHIR service or an error will occur when the device message is processed. If the MedTech service's identity resolution type is set to **Create**, a `patientIdExpression` must be included in the device mapping so that a new Patient resource and Device resource can be created if they do not already exist.
4747
4848
If your MedTech service is set up to ingest device messages from an IoT hub, you aren't required to use IotJsonPathContent templates. CalculatedContent templates can be used assuming that you correctly define the DeviceIdExpression and TimestampExpression.
4949

@@ -52,13 +52,13 @@ The IotJsonPathContent templates allow matching on and extracting values from a
5252
|Element|Description|JSONPath expression|
5353
|:------|:----------|:------------------|
5454
|typeMatchExpression|The expression that the MedTech service evaluates against the device message payload. If the service finds a matching token value, it considers the template a match. The service evaluates all later expressions against the extracted token value matched here.|`$..[?(@heartRate)]`|
55-
|patientIdExpression|The expression to extract the patient identifier. *Required* when the MedTech services's **Resolution type** is set to **Create**, and *optional* when the MedTech service's **Resolution type** is set to **Lookup**.|`$.matchedToken.patientId`|
56-
|encounterIdExpression|*Optional*: The expression to extract the encounter identifier.|`$.matchedToken.encounterId`|
57-
|correlationIdExpression|*Optional*: The expression to extract the correlation identifier. You can use this output to group values into a single observation in the FHIR destination mapping.|`$.matchedToken.correlationId`|
58-
|values[].valueExpression|The expression to extract the wanted value.|`$.matchedToken.heartRate`|
55+
|patientIdExpression|The expression to extract the patient identifier. *Required* when the MedTech services's **Resolution type** is set to **Create**, and *optional* when the MedTech service's **Resolution type** is set to **Lookup**.|`$.SystemProperties.iothub-connection-device-id`|
56+
|encounterIdExpression|*Optional*: The expression to extract the encounter identifier.|`$.Body.encounterId`|
57+
|correlationIdExpression|*Optional*: The expression to extract the correlation identifier. You can use this output to group values into a single observation in the FHIR destination mapping.|`$.Body.correlationId`|
58+
|values[].valueExpression|The expression to extract the wanted value.|`$.Body.heartRate`|
5959

6060
> [!NOTE]
61-
> The **Resolution type** specifies how the MedTech service associates device data with Device resources and Patient resources. The MedTech service reads Device and Patient resources from the FHIR service using [device identifiers](https://www.hl7.org/fhir/r4/device-definitions.html#Device.identifier) and [patient identifiers](https://www.hl7.org/fhir/r4/patient-definitions.html#Patient.identifier). If an [encounter identifier](https://hl7.org/fhir/r4/encounter-definitions.html#Encounter.identifier) is specified and extracted from the device data payload, it's linked to the observation if an encounter exists on the FHIR service with that identifier. If the [encounter identifier](../../healthcare-apis/release-notes.md#medtech-service) is successfully normalized, but no FHIR Encounter exists with that encounter identifier, a **FhirResourceNotFound** exception is thrown. For more information on configuring the the MedTech service **Resolution type**, see [Configure the Destination tab](deploy-manual-portal.md#configure-the-destination-tab).
61+
> The **Resolution type** specifies how the MedTech service associates device data with Device resources and Patient resources. The MedTech service reads Device and Patient resources from the FHIR service using [device identifiers](https://www.hl7.org/fhir/r4/device-definitions.html#Device.identifier) and [patient identifiers](https://www.hl7.org/fhir/r4/patient-definitions.html#Patient.identifier). If an [encounter identifier](https://hl7.org/fhir/r4/encounter-definitions.html#Encounter.identifier) is specified and extracted from the device data payload, it's linked to the observation if an encounter exists on the FHIR service with that identifier. If the [encounter identifier](../../healthcare-apis/release-notes.md#medtech-service) is successfully normalized, but no FHIR Encounter exists with that encounter identifier, a **FhirResourceNotFound** exception is thrown. For more information on configuring the MedTech service **Resolution type**, see [Configure the Destination tab](deploy-manual-portal.md#configure-the-destination-tab).
6262
6363
## Expression languages
6464

@@ -89,14 +89,14 @@ In this example, we're using a device message that is capturing `heartRate` data
8989

9090
```json
9191
{
92-
heartRate : “78”
92+
"heartRate" : "78"
9393
}
9494
```
9595

9696
> [!NOTE]
9797
> To avoid device spoofing in device-to-cloud (D2C) messages, Azure IoT Hub enriches all device messages with additional properties before routing them to the event hub. For example: **Properties**: `iothub-creation-time-utc` and **SystemProperties**: `iothub-connection-device-id`. For more information, see [Anti-spoofing properties](../../iot-hub/iot-hub-devguide-messages-construct.md#anti-spoofing-properties).
9898
>
99-
> `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 destination FHIR service. These examples assume your MedTech service is in the **Create** mode. For more information on the **Create** and **Lookup** **Destination properties**, see [Configure Destination properties](deploy-manual-portal.md#configure-the-destination-tab).
99+
> `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 destination FHIR service. These examples assume your MedTech service is in the **Create** mode. For more information on the **Create** and **Lookup** **Destination properties**, see [Configure the Destination tab](deploy-manual-portal.md#configure-the-destination-tab).
100100
101101
The IoT hub enriches and routes the device message to the event hub before the MedTech service reads the device message from the event hub:
102102

0 commit comments

Comments
 (0)