Skip to content

Commit b4d78ec

Browse files
authored
Merge pull request #228231 from msjasteppe/understand-updates
Adding in note regarding latest data ingested
2 parents 5c6a216 + be56add commit b4d78ec

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

articles/healthcare-apis/iot/understand-service.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: msjasteppe
66
ms.service: healthcare-apis
77
ms.subservice: iomt
88
ms.topic: overview
9-
ms.date: 02/14/2023
9+
ms.date: 02/22/2023
1010
ms.author: jasteppe
1111
---
1212

@@ -29,7 +29,7 @@ The MedTech service device message data processing follows these steps and in th
2929
:::image type="content" source="media/understand-service/understand-device-message-flow.png" alt-text="Screenshot of a device message as it processed by the MedTech service." lightbox="media/understand-service/understand-device-message-flow.png":::
3030

3131
## Ingest
32-
Ingest is the first stage where device messages are received from an [Azure Event Hubs](../../event-hubs/index.yml) event hub (`device message event hub`) and immediately pulled into the MedTech service. The Event Hubs service supports high scale and throughput with the ability to receive and process millions of device messages per second. It also enables the MedTech service to consume messages asynchronously, removing the need for devices to wait while device messages are processed.
32+
Ingest is the first stage where device messages are received from an [Azure Event Hubs](../../event-hubs/index.yml) event hub and immediately pulled into the MedTech service. The Event Hubs service supports high scale and throughput with the ability to receive and process millions of device messages per second. It also enables the MedTech service to consume messages asynchronously, removing the need for devices to wait while device messages are processed.
3333

3434
The device message event hub uses the MedTech service's [system-assigned managed identity](../../active-directory/managed-identities-azure-resources/overview.md#managed-identity-types) and [Azure resource-based access control (Azure RBAC)](../../role-based-access-control/overview.md) for secure access to the device message event hub.
3535

@@ -73,9 +73,38 @@ At this point, the [Device](https://www.hl7.org/fhir/device.html) resource, alon
7373
If no Device resource for a given device identifier exists in the FHIR service, the outcome depends upon the value of [Resolution Type](deploy-new-config.md#configure-the-destination-tab) set at the time of the MedTech service deployment. When set to `Lookup`, the specific message is ignored, and the pipeline continues to process other incoming device messages. If set to `Create`, the MedTech service creates minimal Device and Patient resources in the FHIR service.
7474

7575
> [!NOTE]
76-
> The `Resolution Type` can also be adjusted post deployment of the MedTech service in the event that a different type is later desired.
76+
> The `Resolution Type` can also be adjusted post deployment of the MedTech service if a different `Resolution Type` is later required.
7777
78-
The MedTech service buffers the FHIR Observations resources created during the transformation stage and provides near real-time processing. However, it can potentially take up to five minutes for FHIR Observation resources to be persisted in the FHIR service.
78+
The MedTech service provides near real-time processing and will also attempt to reduce the number of requests made to the FHIR service by grouping requests into batches of 300 [normalized messages](#normalize). If there's a low volume of data, and 300 normalized messages haven't been added to the group, then the corresponding FHIR Observations in that group are persisted to the FHIR service after ~five minutes. This means that when there's fewer than 300 normalized messages to be processed, there may be a delay of ~five minutes before FHIR Observations are created or updated in the FHIR service.
79+
80+
> [!NOTE]
81+
> When multiple device messages contain data for the same FHIR Observation, have the same timestamp, and are sent within the same device message batch (for example, within the ~five minute window or in groups of 300 normalized messages), only the data corresponding to the latest device message for that FHIR Observation is persisted.
82+
>
83+
> For example:
84+
>
85+
> Device message 1:
86+
> ```json
87+
> {   
88+
> "patientid": "testpatient1",   
89+
> "deviceid": "testdevice1",
90+
> "systolic": "129",   
91+
> "diastolic": "65",   
92+
> "measurementdatetime": "2022-02-15T04:00:00.000Z"
93+
> } 
94+
> ```
95+
>
96+
> Device message 2:
97+
> ```json
98+
> {   
99+
> "patientid": "testpatient1",   
100+
> "deviceid": "testdevice1",   
101+
> "systolic": "113",   
102+
> "diastolic": "58",   
103+
> "measurementdatetime": "2022-02-15T04:00:00.000Z"
104+
> }
105+
> ```
106+
>
107+
> Assuming these device messages were ingested within the same ~five minute window or in the same group of 300 normalized messages, and since the `measurementdatetime` is the same for both device messages (indicating these contain data for the same FHIR Observation), only device message 2 is persisted to represent the latest/most recent data.
79108
80109
## Persist
81110
Persist is the final stage where the FHIR Observation resources from the transform stage are persisted in the [FHIR service](../fhir/overview.md). If the FHIR Observation resource is new, it's created in the FHIR service. If the FHIR Observation resource already existed, it gets updated in the FHIR service.

0 commit comments

Comments
 (0)