Backfilling Measurement Data
Tenovi delivers measurements in real time via webhooks. However, there are scenarios where you may need to retrieve measurements on demand:
- Your webhook endpoint was unreachable during a window of device activity
- You are seeding a new system with historical data
- You need to audit or verify that your records are complete
The HWI API provides two endpoints for pulling measurements directly.
Endpoints
| Endpoint | Use Case |
|---|---|
GET /api/v2/hwi/device-measurements/ | Fetch measurements for a single device |
GET /api/v2/hwi/patient-measurements/ | Fetch measurements for all devices assigned to a patient |
Filtering by Date Range
To backfill a specific window, use the timestamp__gte and timestamp__lt query parameters.
/api/v2/hwi/patient-measurements/?patient_id={id}& timestamp__gte={ISO8601}& timestamp__lt={ISO8601}Example:
GET /api/v2/hwi/patient-measurements/?patient_id=abc123& timestamp__gte=2024-01-01T00:00:00Z& timestamp__lt=2024-01-31T23:59:59ZProcess
Using either a list of Patient IDs or a list of HWI Device IDs you can backfill or verify data by:
- Getting a list of relevant IDs (Patient IDs or HWI Device IDs)
- Depending on the IDs you are working with, you would preform a GET request for each ID, with the relevant date range
- As each group of measurements is returned, you would loop through them to verify if you already have these saved in your system.
- If a measurement isn’t saved in your system, you can then save it to get your system in-sync with Tenovi.
Testing with Postman
You can test both endpoints using the Tenovi Postman collection before implementing them in your system. The collection includes pre-configured requests for both GET Device Measurements and GET Patient Measurements.