diff --git a/commons/active/healthkit/healthkit_typed_data.avsc b/commons/active/healthkit/healthkit_typed_data.avsc new file mode 100644 index 00000000..dff68674 --- /dev/null +++ b/commons/active/healthkit/healthkit_typed_data.avsc @@ -0,0 +1,67 @@ +{ + "namespace": "org.radarcns.active.healthkit", + "name": "HealthKitTypedData", + "type": "record", + "doc": "HealthKit generic typed data schema.", + "fields": [ + { + "name": "time", + "type": "double", + "doc": "Start time of this activity period in UTC (s)." + }, + { + "name": "endTime", + "type": "double", + "doc": "End time of this activity period in UTC (s)." + }, + { + "name": "timeReceived", + "type": "double", + "doc": "Time that the data was received from the Apple Healthkit ." + }, + { + "name": "sourceId", + "type": "string", + "doc": "The identifier of the app that produced the data." + }, + { + "name": "sourceName", + "type": "string", + "doc": "The name of the app that produced the data (as it appears to the user)." + }, + { + "name": "unit", + "type": "string", + "doc": "The unit of the measurement." + }, + { + "name": "key", + "type": "string", + "doc": "Type of data retrived e.g. weight, height, etc." + }, + { + "name": "intValue", + "type": ["null", "int"], + "doc": "Value of the int data retrieved.", + "default": null + }, + { + "name": "floatValue", + "type": ["null", "float"], + "doc": "Value of the float data retrieved.", + "default": null + }, + { + "name": "doubleValue", + "type": ["null", "double"], + "doc": "Value of the double data retrieved.", + "default": null + }, + { + "name": "stringValue", + "type": ["null", "string"], + "doc": "Value of the string data retrieved.", + "default": null + } + ] +} diff --git a/commons/passive/google/google_sleep_classify_event.avsc b/commons/passive/google/google_sleep_classify_event.avsc new file mode 100644 index 00000000..87f6bd5d --- /dev/null +++ b/commons/passive/google/google_sleep_classify_event.avsc @@ -0,0 +1,13 @@ +{ + "namespace": "org.radarcns.passive.google", + "type": "record", + "name": "GoogleSleepClassifyEvent", + "doc": "Sleep classification event that indicates that the user is probably sleeping. Includes sleep confidence, device motion and ambient light level.", + "fields": [ + { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, + { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "sleepConfidence", "type": "float", "doc": "Sleep confidence value between 0-1. Higher value indicate that the user is more likely sleeping, while lower values indicate that the user is more likely awake." }, + { "name": "light", "type": "int", "doc": "The brightness of the space around the device, based on the device's ambient light sensor readings. Value ranges from 1 to 6, inclusive. Higher values indicate brighter surroundings, while lower values indicate darker surroundings." }, + { "name": "motion", "type": "int", "doc": "The amount of device motion, based on the device's accelerometer readings. Value ranges from 1 to 6, inclusive. Higher values indicate more movement of the device." } + ] +} diff --git a/commons/passive/google/google_sleep_segment_event.avsc b/commons/passive/google/google_sleep_segment_event.avsc new file mode 100644 index 00000000..e690fe43 --- /dev/null +++ b/commons/passive/google/google_sleep_segment_event.avsc @@ -0,0 +1,17 @@ +{ + "namespace": "org.radarcns.passive.google", + "type": "record", + "name": "GoogleSleepSegmentEvent", + "doc": "Represents the result of sleep data after the user is awake.", + "fields": [ + { "name": "time", "type": "double", "doc": "The UNIX epoch time (s) for the moment when the user goes to sleep." }, + { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "endTime", "type": "double", "doc": "The UNIX epoch time (s) for the moment when the user wakes up." }, + { "name": "status", "type": { + "name": "SleepClassificationStatus", + "type": "enum", + "doc": "The status of the sleep segment detection. \nSUCCESSFUL indicates successful detection of sleep segment in the past day.\nNOT_DETECTED indicates Sleep segment is not detected in the past day, or there isn't enough confidence that the user slept during the past day. This could happen for a variety of reasons, including the following: too much missing data, the user sleeps with the light, the user interacts with their device often, or the user's device doesn't support the sensors needed for sleep detection. \nMISSING_DATA indicates sleep segment was detected, but there was some missing data near the detected sleep segment. This could happen for a variety of reasons, including the following: the user turned off their device, the user delayed logging into their device after a system reboot or system upgrade, or an event occurred that paused the detection.", + "symbols": ["SUCCESSFUL", "MISSING_DATA", "NOT_DETECTED", "UNKNOWN"] + }, "doc": "Status that indicates whether the system succeeded in detecting sleep.", "default": "UNKNOWN" } + ] +} diff --git a/java-sdk/build.gradle.kts b/java-sdk/build.gradle.kts index c7308db7..c125ce17 100644 --- a/java-sdk/build.gradle.kts +++ b/java-sdk/build.gradle.kts @@ -9,7 +9,7 @@ plugins { } allprojects { - version = "0.8.3" + version = "0.8.4" group = "org.radarbase" } diff --git a/specifications/active/aRMT-healthkit-1.0.0.yml b/specifications/active/aRMT-healthkit-1.0.0.yml new file mode 100644 index 00000000..c616cca6 --- /dev/null +++ b/specifications/active/aRMT-healthkit-1.0.0.yml @@ -0,0 +1,82 @@ +name: aRMT +vendor: RADAR +model: aRMT-App +version: 1.0.0 +assessment_type: QUESTIONNAIRE +doc: aRMT Healthkit data definition. In this specification, a generic schema is used for all data types. Data received from Apple Healthkit follow a similar schema, thus a shared schema can be used. Each Healthkit source type can have a different data type (this can either be a numerical or string value). The appropriate key (floatValue, doubleValue, stringValue, etc) can then be filled. +data: + - doc: A quantity sample type that measures the number of steps the user has taken, unit is count. + topic: active_apple_healthkit_steps + value_schema: .active.healthkit.HealthKitTypedData + - doc: A quantity sample type that measures the number flights of stairs that the user has climbed, unit is count. + topic: active_apple_healthkit_stairs + value_schema: .active.healthkit.HealthKitTypedData + - doc: A quantity sample type that measures the distance the user has moved by walking, running or cycling, unit is m. + topic: active_apple_healthkit_distance + value_schema: .active.healthkit.HealthKitTypedData + - doc: A quantity sample type that measures the amount of time the user spent exercising, unit is min. + topic: active_apple_healthkit_exercise_time + value_schema: .active.healthkit.HealthKitTypedData + - doc: A quantity sample type that measures the amount of active and basal energy the user has burned, unit is kcal. + topic: active_apple_healthkit_calories + value_schema: .active.healthkit.HealthKitTypedData + - doc: A workout sample that stores information about a single physical activity, unit is activityType. + topic: active_apple_healthkit_activity + value_schema: .active.healthkit.HealthKitTypedData + - doc: A category sample type describing the user's sleep stage, unit is sleepType. + topic: active_apple_healthkit_sleep_stage + value_schema: .active.healthkit.HealthKitTypedData + - doc: A quantity sample type that measures the user’s heart rate, unit is count/min. + topic: active_apple_healthkit_heart_rate + value_schema: .active.healthkit.HealthKitTypedData + - doc: A quantity sample type that measures the user’s respiratory rate, unit is count/min. + topic: active_apple_healthkit_resp_rate + value_schema: .active.healthkit.HealthKitTypedData + - doc: A quantity sample type that measures the user’s oxygen saturation, unit is %. + topic: active_apple_healthkit_oxygen_saturation + value_schema: .active.healthkit.HealthKitTypedData + - doc: A quantity sample that measures the maximal oxygen consumption during exercise, unit is ml/(kg * min). + topic: active_apple_healthkit_vo2max + value_schema: .active.healthkit.HealthKitTypedData + - doc: A quantity sample type that measures the user’s body temperature, unit is Celsius. + topic: active_apple_healthkit_temperature + value_schema: .active.healthkit.HealthKitTypedData + - doc: A quantity sample type that measures the user’s body fat percentage, unit is %. + topic: active_apple_healthkit_fat_percentage + value_schema: .active.healthkit.HealthKitTypedData + - doc: A quantity sample type that measures the user’s waist circumference, unit is m. + topic: active_apple_healthkit_waist_circumference + value_schema: .active.healthkit.HealthKitTypedData + - doc: A quantity sample type that measures the user’s blood glucose level, unit is mmol/L. + topic: active_apple_healthkit_blood_glucose + value_schema: .active.healthkit.HealthKitTypedData + - doc: A quantity sample that measures the amount of insulin delivered, unit is IU. + topic: active_apple_healthkit_insulin + value_schema: .active.healthkit.HealthKitTypedData + - doc: A correlation sample that combines a systolic sample and a diastolic sample into a single blood pressure reading, unit is mmHg. + topic: active_apple_healthkit_blood_pressure + value_schema: .active.healthkit.HealthKitTypedData + - doc: A characteristic type identifier for the user’s sex. + topic: active_apple_healthkit_gender + value_schema: .active.healthkit.HealthKitTypedData + - doc: A characteristic type identifier for the user’s date of birth. + topic: active_apple_healthkit_date_of_birth + value_schema: .active.healthkit.HealthKitTypedData + - doc: A category sample type for recording a mindful session, unit is sec. + topic: active_apple_healthkit_mindfulness + value_schema: .active.healthkit.HealthKitTypedData + - doc: A quantity sample type that shows the user's nutrition data, unit varies across types. + topic: active_apple_healthkit_nutrition + value_schema: .active.healthkit.HealthKitTypedData + - doc: A quantity sample type that measures the user’s exposure to UV radiation, unit is count. + topic: active_apple_healthkit_uv_exposure + value_schema: .active.healthkit.HealthKitTypedData + - doc: A quantity sample type that measures the user’s height, unit is m. + topic: active_apple_healthkit_height + value_schema: .active.healthkit.HealthKitTypedData + - doc: A quantity sample type that measures the user’s weight, unit is kg. + topic: active_apple_healthkit_weight + value_schema: .active.healthkit.HealthKitTypedData + - doc: A quantity sample type that measures the user’s body mass index, unit is count. + topic: active_apple_healthkit_bmi + value_schema: .active.healthkit.HealthKitTypedData diff --git a/specifications/passive/android_google-1.0.0.yml b/specifications/passive/android_google-1.0.0.yml new file mode 100644 index 00000000..51cf21cb --- /dev/null +++ b/specifications/passive/android_google-1.0.0.yml @@ -0,0 +1,23 @@ +#======================================== Google APIs =============================================# +vendor: GOOGLE +model: SLEEP +version: 1.0.0 +data: + #Google Sleep + - type: SLEEP_SEGMENT_EVENT + app_provider: .google.GoogleSleepProvider + unit: NON_DIMENSIONAL + processing_state: RAW + topic: android_google_sleep_segment_event + value_schema: .passive.google.GoogleSleepSegmentEvent + sample_rate: + dynamic: true + - type: SLEEP_CLASSIFY_EVENT + app_provider: .google.GoogleSleepProvider + unit: NON_DIMENSIONAL + processing_state: RAW + topic: android_google_sleep_classify_event + value_schema: .passive.google.GoogleSleepClassifyEvent + sample_rate: + interval: 600 + dynamic: true