Skip to content

Commit

Permalink
fix: cgm & garmin changes (#24)
Browse files Browse the repository at this point in the history
* fix: πŸ› garmin adn cgm data

* fix: πŸ› update file processing table

* feat: ✨ add structure for v2 of file processing table

* fix: πŸ› cgm object relocation

* fix: πŸ› CGM object relocation

* fix: πŸ› update schema for garmin-sleep
  • Loading branch information
Aydawka authored Nov 14, 2024
1 parent 98bd96c commit 5064b51
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Respiration rate refers to the number of breaths a person takes per minute. It i

### Sleep

During sleep, the [device](https://www.garmin.com/en-US/garmin-technology/health-science/sleep-tracking/) autonomously detects the user's sleep patterns and tracks movement throughout their typical sleep hours. Sleep-related metrics include **total sleep duration in hours**.
During sleep, the [device](https://www.garmin.com/en-US/garmin-technology/health-science/sleep-tracking/) autonomously detects the user's sleep patterns and tracks movement throughout their typical sleep hours. Sleep-related metrics include **duration of sleep stages**.

### Stress

Expand Down Expand Up @@ -599,7 +599,7 @@ The AIREADI JSON schema for Physical activity calorie is as follows:
"activity": [
{
"activity_name": "kcal_burned",
"duration": {
"calories_value": {
"value": 0,
"unit": "kcal"
},
Expand Down Expand Up @@ -816,11 +816,8 @@ https://www.openmhealth.org/documentation/#/schema-docs/schema-library/schemas/o

```json
{
"sleep_duration": {
"value": 7.5,
"unit": "h"
},
"effective_time_frame": {
"sleep_stage_state": "light",
"sleep_stage_time_frame": {
"time_interval": {
"start_date_time": "2016-02-05T20:35:00Z",
"end_date_time": "2016-02-06T06:35:00Z"
Expand All @@ -846,11 +843,8 @@ The AIREADI JSON schema for Sleep is as follows:
"body": {
"sleep": [
{
"sleep_duration": {
"value": 0,
"unit": "h"
},
"effective_time_frame": {
"sleep_stage_state": "light",
"sleep_stage_time_frame": {
"time_interval": {
"start_date_time": "YYYY-MM-DDThh:mm:ss",
"end_date_time": "YYYY-MM-DDThh:mm:ss"
Expand Down Expand Up @@ -1058,7 +1052,7 @@ Stress: The negative stress values (-1 & -2) originate from the source, possibly

There may be cases in which certain participants do not have certain files, e.g have no measurement file for sleep data. In these cases, the file path will display "none." However, there are also instances where a measurement file exists, but it contains no observations, similar to having data with no meaningful content.

<a href="/fileProcessingTable" target="_blank">
<a href="/v2-fileProcessingTable" target="_blank">
See the table here
</a>

Expand Down
44 changes: 23 additions & 21 deletions docs/dataset/wearable-glucose-monitor/wearable-glucose-monitor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -291,27 +291,29 @@ More information can be found here:
},
"timezone": "PST"
},
"body": [
{
"effective_time_frame": {
"time_interval": {
"start_date_time": "YYYY-MM-DDThh:mm:ssZ",
"end_date_time": "YYYY-MM-DDThh:mm:ssZ"
}
},
"event_type": "event_type",
"source_device_id": "source_device_id",
"blood_glucose": {
"unit": "mg/dL",
"value": "val"
},
"transmitter_time": {
"unit": "long integer",
"value": "number"
},
"transmitter_id": "transmitter_id"
}
]
"body": {
"cgm": [
{
"effective_time_frame": {
"time_interval": {
"start_date_time": "YYYY-MM-DDThh:mm:ssZ",
"end_date_time": "YYYY-MM-DDThh:mm:ssZ"
}
},
"event_type": "event_type",
"source_device_id": "source_device_id",
"blood_glucose": {
"unit": "mg/dL",
"value": "val"
},
"transmitter_time": {
"unit": "long integer",
"value": "number"
},
"transmitter_id": "transmitter_id"
}
]
}
}
```

Expand Down
8 changes: 4 additions & 4 deletions docs/static/json/fileProcesing.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@
{
"Metadata Elements": "sleep_record_count",
"Description": "Total number of sleep measurements recorded",
"Example": "12"
"Example": "328"
},
{
"Metadata Elements": "average_sleep_hours",
"Description": "Average sleep duration during the recording period",
"Example": "7.25"
"Example": "0.28"
},
{
"Metadata Elements": "respiratory_rate_filename",
Expand All @@ -95,9 +95,9 @@
"Example": "/wearable_activity_monitor/physical_activity/garmin_vivosmart5/0000/0000_activity.json"
},
{
"Metadata Elements": "physical_activity_num_records",
"Metadata Elements": "physical_activity_num_days",
"Description": "Total number of measurements recorded",
"Example": "5524"
"Example": "19"
},
{
"Metadata Elements": "average_daily_activity",
Expand Down
2 changes: 1 addition & 1 deletion src/components/DirectFileProcessingTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useEffect } from 'react';
function DirectFileProcessingTable() {
useEffect(() => {
// Open OMOP Table in a new tab
window.open('/fileProcessingTable', '_blank');
window.open('/v2-fileProcessingTable', '_blank');

// Redirect the current page to the documentation
window.location.replace('/docs/2/dataset/wearable-activity-monitor');
Expand Down
2 changes: 1 addition & 1 deletion src/components/FileProcessingTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import FilterableTable from 'react-filterable-table';
// eslint-disable-next-line import/no-unresolved
import BrowserOnly from '@docusaurus/BrowserOnly';
import fileProcessing from '../../static/json/fileProcesing.json';
import fileProcessing from '../../docs/static/json/fileProcesing.json';

export default function ClinicalLabTable() {
// Fields to show in the table, and what object properties in the data they bind to
Expand Down
13 changes: 13 additions & 0 deletions src/pages/v2-fileProcessingTable.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* eslint-disable react/prop-types */
/* eslint-disable react/button-has-type */
import React from 'react';

import FileProcessingTable from '../components/FileProcessingTable';

export default function fileProcessingTable() {
return (
<div>
<FileProcessingTable />
</div>
);
}

0 comments on commit 5064b51

Please sign in to comment.