Getting information about data compliance
For clinical trials it's critical to track data from wearables. Every data point is crucial for the trial's accuracy. If we don't regularly send this data to the cloud, problems like a dead battery or internet issues might cause data loss. By monitoring daily records, you can quickly catch and correct any gaps, ensuring that clinical trials have complete and reliable data.
In this document we describe how to get information about how many data points of a specific user for a specific date have been recorded.
Compliance statistics in the study portal
On the study portal you can see the (i) icon on the top of the page:
By clicking on this button you can see the table:
In this table you can see how many data points of the specific were recorded to the cloud for the selected day.
You can get this information with the API call as well.
You will need to use the Researcher Token.
API
You need to pass uuid of the user and the date in the YYYY-MM-DD format.
GET: https://api.integration.corsano.com/v1/patients/{UUID}/raw-data-compliance/{DATE}
In the response you'll get the object with keys - the data types and the values - the number of the points that have been recorded. We use the local date and time of the user to calculate these values.
Example:
Request:
curl --request GET \
--url 'https://api.integration.corsano.com/v1/patients/50907d67-1575-4599-8693-80b14e68b57b/raw-data-compliance/2023-09-14?token=YOUR_TOKEN'
Response:
{
"raw_data_activity": 1847,
"raw_data_hrv": 423,
"raw_data_rr_interval": 23581,
"raw_data_sleep": 500,
"raw_data_temperature": 1841,
"summary_data_activity_slots": 48,
"summary_data_heart_rate_slots": 288,
"summary_data_respiration_rate_slots": 48,
"summary_data_sleep_slots": 410,
"summary_data_spo2_slots": 48,
"summary_data_stress_slots": 82,
"summary_data_temperature_slots": 48,
"raw_data_acc": 177600,
"raw_data_ppg2": 2270592
}
Notes
- The data is calculated based on the local time of the user.
- The data is calculated based on the data that has been sent to the cloud. If the user has not synced the data to the cloud, it will not be counted.
- If you want to use UTC dates, you need to pass get-parameter utc=yes. In this case the data will be calculated based on the UTC time of the user.
Raw Data Compliance (UTC-based) for the range of dates for a patient
This API endpoint retrieves raw data compliance statistics for a given patient within a specified UTC-based time range. The response provides the count of recorded data points for different data types.
Endpoint
GET https://api.integration.corsano.com/v1/patients/{UUID}/raw-data-compliance
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
token | string | Yes | Authentication token for API access. |
utc_date_from | string | Yes | Start date and time in UTC (ISO 8601 format: YYYY-MM-DDTHH:MM:SS.SSSZ ). |
utc_date_to | string | Yes | End date and time in UTC (ISO 8601 format: YYYY-MM-DDTHH:MM:SS.SSSZ ). The maximum allowed range is 48 hours. |
Example Request
curl --request GET \
--url "https://api.integration.corsano.com/v1/patients/50907d67-1575-4599-8693-1234556678/raw-data-compliance?token=YOUR_TOKEN&utc_date_from=2025-03-13T20:16:33.002Z&utc_date_to=2025-03-14T20:16:33.002Z" \
Example Response
{
"raw_data_activity": 1038,
"raw_data_hrv": 644,
"raw_data_rr_interval": 38701,
"raw_data_sleep": 460,
"raw_data_temperature": 922,
"summary_data_activity_slots": 48,
"summary_data_heart_rate_slots": 288,
"summary_data_respiration_rate_slots": 48,
"summary_data_sleep_slots": 460,
"summary_data_spo2_slots": 48,
"summary_data_stress_slots": 93,
"summary_data_temperature_slots": 48,
"raw_data_acc": 142144,
"raw_data_ppg2": 1602656
}
Notes
- The requested time range (utc_date_from to utc_date_to) must not exceed 48 hours.
- All timestamps in the request and response are in UTC.
- Data is only available if it has been successfully synced to the cloud.
- Ensure proper authentication by including a valid token in the request.