From f0678edb1b8d92371f99fa3ade05b52f8028eb95 Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Mon, 29 Jan 2018 12:06:26 +0100 Subject: [PATCH 01/31] Snapshot version --- java-sdk/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-sdk/build.gradle b/java-sdk/build.gradle index 777812ae..ccd2471d 100644 --- a/java-sdk/build.gradle +++ b/java-sdk/build.gradle @@ -17,7 +17,7 @@ subprojects { apply plugin: 'idea' // Configuration - version = '0.3.1' + version = '0.3.2-SNAPSHOT' group = 'org.radarcns' ext.githubRepoName = 'RADAR-CNS/RADAR-Schemas' From 62b69e51c59e1a9e7bf282fe4084bdaba2fad406 Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Mon, 5 Feb 2018 16:36:28 +0100 Subject: [PATCH 02/31] Added application time zone --- commons/monitor/application/application_time_zone.avsc | 10 ++++++++++ specifications/monitor/radar_prmt-1.0.0.yml | 8 ++++++++ 2 files changed, 18 insertions(+) create mode 100644 commons/monitor/application/application_time_zone.avsc diff --git a/commons/monitor/application/application_time_zone.avsc b/commons/monitor/application/application_time_zone.avsc new file mode 100644 index 00000000..022fe9ab --- /dev/null +++ b/commons/monitor/application/application_time_zone.avsc @@ -0,0 +1,10 @@ +{ + "namespace": "org.radarcns.monitor.application", + "name": "ApplicationTimeZone", + "type": "record", + "doc": "Local time zone that the device is running in.", + "fields": [ + { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, + { "name": "offset", "type": "int", "doc": "Offset from UTC (s)." } + ] +} diff --git a/specifications/monitor/radar_prmt-1.0.0.yml b/specifications/monitor/radar_prmt-1.0.0.yml index 8c37130f..63ac54cf 100644 --- a/specifications/monitor/radar_prmt-1.0.0.yml +++ b/specifications/monitor/radar_prmt-1.0.0.yml @@ -35,3 +35,11 @@ data: unit: SECOND topic: application_uptime value_schema: .monitor.application.ApplicationUptime + - type: TIMEZONE + doc: Local time zone that the device is running in. + sample_rate: + interval: 86400 + configurable: true + unit: SECOND + topic: application_time_zone + value_schema: .monitor.application.ApplicationTimeZone From cd4be8b61c54d0566df4bd103364f6316c519a34 Mon Sep 17 00:00:00 2001 From: Maximilian Kerz Date: Tue, 6 Feb 2018 14:01:38 +0000 Subject: [PATCH 03/31] "I feel restless" question added --- specifications/active/aRMT-1.0.0.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/specifications/active/aRMT-1.0.0.yml b/specifications/active/aRMT-1.0.0.yml index bacf8203..b9c7d492 100644 --- a/specifications/active/aRMT-1.0.0.yml +++ b/specifications/active/aRMT-1.0.0.yml @@ -351,6 +351,26 @@ data: value: 6 - text: 7 very much value: 7 + - lead: Null + content: I feel restless + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 - lead: Null content: I feel self-confident widget: RANGE From bfb87e12b69e4e5f4db6f888c51f2cef67563b53 Mon Sep 17 00:00:00 2001 From: Maxim Moinat Date: Mon, 19 Feb 2018 14:35:13 +0100 Subject: [PATCH 04/31] renamed emotion to bittium as vendor of faros --- .../bittium_faros_acceleration.avsc} | 6 +-- .../bittium_faros_battery_level.avsc} | 6 +-- .../bittium_faros_ecg.avsc} | 6 +-- .../bittium_faros_inter_beat_interval.avsc} | 6 +-- .../bittium_faros_temperature.avsc} | 6 +-- .../passive/bittium_faros-1.0.0.yml | 41 +++++++++++++++++++ .../passive/emotion_faros-1.0.0.yml | 41 ------------------- 7 files changed, 56 insertions(+), 56 deletions(-) rename commons/passive/{emotion/emotion_faros_acceleration.avsc => bittium/bittium_faros_acceleration.avsc} (76%) rename commons/passive/{emotion/emotion_faros_battery_level.avsc => bittium/bittium_faros_battery_level.avsc} (72%) rename commons/passive/{emotion/emotion_faros_ecg.avsc => bittium/bittium_faros_ecg.avsc} (85%) rename commons/passive/{emotion/emotion_faros_inter_beat_interval.avsc => bittium/bittium_faros_inter_beat_interval.avsc} (73%) rename commons/passive/{emotion/emotion_faros_temperature.avsc => bittium/bittium_faros_temperature.avsc} (74%) create mode 100644 specifications/passive/bittium_faros-1.0.0.yml delete mode 100644 specifications/passive/emotion_faros-1.0.0.yml diff --git a/commons/passive/emotion/emotion_faros_acceleration.avsc b/commons/passive/bittium/bittium_faros_acceleration.avsc similarity index 76% rename from commons/passive/emotion/emotion_faros_acceleration.avsc rename to commons/passive/bittium/bittium_faros_acceleration.avsc index cbea1f09..190dcf05 100644 --- a/commons/passive/emotion/emotion_faros_acceleration.avsc +++ b/commons/passive/bittium/bittium_faros_acceleration.avsc @@ -1,8 +1,8 @@ { - "namespace": "org.radarcns.passive.emotion", + "namespace": "org.radarcns.passive.bittium", "type": "record", - "name": "EmotionFarosAcceleration", - "doc": "Data from 3-axis accelerometer sensor of a eMotion Faros device.", + "name": "BittiumFarosAcceleration", + "doc": "Data from 3-axis accelerometer sensor of a Bittium Faros device.", "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." } , diff --git a/commons/passive/emotion/emotion_faros_battery_level.avsc b/commons/passive/bittium/bittium_faros_battery_level.avsc similarity index 72% rename from commons/passive/emotion/emotion_faros_battery_level.avsc rename to commons/passive/bittium/bittium_faros_battery_level.avsc index 1280946f..74641fb2 100644 --- a/commons/passive/emotion/emotion_faros_battery_level.avsc +++ b/commons/passive/bittium/bittium_faros_battery_level.avsc @@ -1,8 +1,8 @@ { - "namespace": "org.radarcns.passive.emotion", + "namespace": "org.radarcns.passive.bittium", "type": "record", - "name": "EmotionFarosBatteryLevel", - "doc": "Battery level of a eMotion Faros device.", + "name": "BittiumFarosBatteryLevel", + "doc": "Battery level of a Bittium Faros device.", "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, diff --git a/commons/passive/emotion/emotion_faros_ecg.avsc b/commons/passive/bittium/bittium_faros_ecg.avsc similarity index 85% rename from commons/passive/emotion/emotion_faros_ecg.avsc rename to commons/passive/bittium/bittium_faros_ecg.avsc index 23100a2e..6035195b 100644 --- a/commons/passive/emotion/emotion_faros_ecg.avsc +++ b/commons/passive/bittium/bittium_faros_ecg.avsc @@ -1,8 +1,8 @@ { - "namespace": "org.radarcns.passive.emotion", + "namespace": "org.radarcns.passive.bittium", "type": "record", - "name": "EmotionFarosEcg", - "doc": "Data from eMotion Faros' multi-channel electrocardiography electrodes. Not all Faros models possess the same number of channels, so the second and third channels are optional.", + "name": "BittiumFarosEcg", + "doc": "Data from Bittium Faros' multi-channel electrocardiography electrodes. Not all Faros models possess the same number of channels, so the second and third channels are optional.", "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." } , diff --git a/commons/passive/emotion/emotion_faros_inter_beat_interval.avsc b/commons/passive/bittium/bittium_faros_inter_beat_interval.avsc similarity index 73% rename from commons/passive/emotion/emotion_faros_inter_beat_interval.avsc rename to commons/passive/bittium/bittium_faros_inter_beat_interval.avsc index addbd4f1..752a5f01 100644 --- a/commons/passive/emotion/emotion_faros_inter_beat_interval.avsc +++ b/commons/passive/bittium/bittium_faros_inter_beat_interval.avsc @@ -1,8 +1,8 @@ { - "namespace": "org.radarcns.passive.emotion", + "namespace": "org.radarcns.passive.bittium", "type": "record", - "name": "EmotionFarosInterBeatInterval", - "doc": "Time between two successive R-peaks (RR-interval), as calculated by a eMotion Faros device from the ECG signal. You can compute the heart rate as (60 / ibi).", + "name": "BittiumFarosInterBeatInterval", + "doc": "Time between two successive R-peaks (RR-interval), as calculated by a Bittium Faros device from the ECG signal. You can compute the heart rate as (60 / ibi).", "fields": [ {"name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, {"name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, diff --git a/commons/passive/emotion/emotion_faros_temperature.avsc b/commons/passive/bittium/bittium_faros_temperature.avsc similarity index 74% rename from commons/passive/emotion/emotion_faros_temperature.avsc rename to commons/passive/bittium/bittium_faros_temperature.avsc index d81574cf..10ffa876 100644 --- a/commons/passive/emotion/emotion_faros_temperature.avsc +++ b/commons/passive/bittium/bittium_faros_temperature.avsc @@ -1,8 +1,8 @@ { - "namespace": "org.radarcns.passive.emotion", + "namespace": "org.radarcns.passive.bittium", "type": "record", - "name": "EmotionFarosTemperature", - "doc": "Data from an eMotion Faros' temperature sensor.", + "name": "BittiumFarosTemperature", + "doc": "Data from an Bittium Faros' temperature sensor.", "fields": [ {"name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, {"name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, diff --git a/specifications/passive/bittium_faros-1.0.0.yml b/specifications/passive/bittium_faros-1.0.0.yml new file mode 100644 index 00000000..4938cd70 --- /dev/null +++ b/specifications/passive/bittium_faros-1.0.0.yml @@ -0,0 +1,41 @@ +#====================================== Faros 90/180/360 device =====================================# +vendor: Bittium +model: Faros +version: 1.0.0 +app_provider: .bittium.FarosServiceProvider +data: + - type: ACCELEROMETER + sample_rate: + dynamic: true + unit: G + processing_state: RAW + topic: android_bittium_faros_acceleration + value_schema: .passive.bittium.BittiumFarosAcceleration + - type: BATTERY + sample_rate: + dynamic: true + unit: PERCENTAGE + processing_state: RAW + topic: android_bittium_faros_battery_level + value_schema: .passive.bittium.BittiumFarosBatteryLevel + - type: ECG + sample_rate: + dynamic: true + unit: MICRO_VOLT + processing_state: RAW + topic: android_bittium_faros_ecg + value_schema: .passive.bittium.BittiumFarosEcg + - type: INTER_BEAT_INTERVAL + sample_rate: + dynamic: true + unit: SECOND + processing_state: VENDOR + topic: android_bittium_faros_inter_beat_interval + value_schema: .passive.bittium.BittiumFarosInterBeatInterval + - type: THERMOMETER + sample_rate: + dynamic: true + unit: CELSIUS + processing_state: VENDOR + topic: android_bittium_faros_acceleration + value_schema: .passive.bittium.BittiumFarosTemperature diff --git a/specifications/passive/emotion_faros-1.0.0.yml b/specifications/passive/emotion_faros-1.0.0.yml deleted file mode 100644 index 038ef489..00000000 --- a/specifications/passive/emotion_faros-1.0.0.yml +++ /dev/null @@ -1,41 +0,0 @@ -#====================================== Empatica E4 Wristband =====================================# -vendor: eMotion -model: Faros -version: 1.0.0 -app_provider: .emotion.FarosServiceProvider -data: - - type: ACCELEROMETER - sample_rate: - dynamic: true - unit: G - processing_state: RAW - topic: android_emotion_faros_acceleration - value_schema: .passive.emotion.EmotionFarosAcceleration - - type: BATTERY - sample_rate: - dynamic: true - unit: PERCENTAGE - processing_state: RAW - topic: android_emotion_faros_battery_level - value_schema: .passive.empatica.EmpaticaE4BatteryLevel - - type: ECG - sample_rate: - dynamic: true - unit: MICRO_VOLT - processing_state: RAW - topic: android_emotion_faros_ecg - value_schema: .passive.emotion.EmotionFarosEcg - - type: INTER_BEAT_INTERVAL - sample_rate: - dynamic: true - unit: SECOND - processing_state: VENDOR - topic: android_emotion_faros_inter_beat_interval - value_schema: .passive.emotion.EmotionFarosInterBeatInterval - - type: THERMOMETER - sample_rate: - dynamic: true - unit: CELSIUS - processing_state: VENDOR - topic: android_emotion_faros_acceleration - value_schema: .passive.emotion.EmotionFarosTemperature From f13acf46af3adb3d55ff4f077b8b8b9aed5be946 Mon Sep 17 00:00:00 2001 From: Maxim Moinat Date: Mon, 19 Feb 2018 14:47:07 +0100 Subject: [PATCH 05/31] add local_weather to android phone config --- specifications/passive/android_phone-1.0.0.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/specifications/passive/android_phone-1.0.0.yml b/specifications/passive/android_phone-1.0.0.yml index f5226e5d..ba58d54d 100644 --- a/specifications/passive/android_phone-1.0.0.yml +++ b/specifications/passive/android_phone-1.0.0.yml @@ -150,3 +150,13 @@ data: value_schema: .passive.phone.PhoneUserInteraction sample_rate: dynamic: true + # Weather + - type: WEATHER + app_provider: .weather.WeatherApiProvider + unit: NON_DIMENSIONAL + processing_state: RAW + topic: android_local_weather + value_schema: .passive.weather.LocalWeather + sample_rate: + interval: 10800 + configurable: true From a3b1c37019f75e7227249f5ebe64f13f672c8df9 Mon Sep 17 00:00:00 2001 From: yatharthranjan Date: Wed, 21 Feb 2018 15:33:04 +0000 Subject: [PATCH 06/31] add schema and spec for active audio --- commons/active/questionnaire/audio.avsc | 11 +++++++++++ specifications/active/aRMT-1.0.0.yml | 5 ++++- specifications/active/aRMT-v1.yml | 3 +++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 commons/active/questionnaire/audio.avsc diff --git a/commons/active/questionnaire/audio.avsc b/commons/active/questionnaire/audio.avsc new file mode 100644 index 00000000..e23111f5 --- /dev/null +++ b/commons/active/questionnaire/audio.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "org.radarcns.active.questionnaire", + "type": "record", + "name": "Audio", + "doc": "Audio data collected by aRMT app and processed using openSMILE.", + "fields": [ + {"name": "time", "type": "double", "doc": "Device timestamp in UTC (s)."}, + { "name": "timeCompleted", "type": "double", "doc": "Timestamp in UTC (s) when subject completes the audio questionnaire." }, + {"name": "data", "type": ["string", "null"], "doc": "Audio features computed by openSMILE recorded in Base64 format.", "default": null} + ] +} diff --git a/specifications/active/aRMT-1.0.0.yml b/specifications/active/aRMT-1.0.0.yml index b9c7d492..381e423a 100644 --- a/specifications/active/aRMT-1.0.0.yml +++ b/specifications/active/aRMT-1.0.0.yml @@ -898,7 +898,7 @@ data: - text: 3 value: 3 Very pleasant - lead: Null - content: This event was + content: This event was widget: RANGE responses: - text: -3 Unimportant @@ -1098,3 +1098,6 @@ data: value: 2 - text: Strongly agree value: 3 + - type: AUDIO + topic: questionnaire_audio + value_schema: .active.questionnaire.Audio diff --git a/specifications/active/aRMT-v1.yml b/specifications/active/aRMT-v1.yml index 9da766ff..cc115117 100644 --- a/specifications/active/aRMT-v1.yml +++ b/specifications/active/aRMT-v1.yml @@ -1078,3 +1078,6 @@ data: value: 2 - text: Strongly agree value: 3 + - type: AUDIO + topic: questionnaire_audio + value_schema: .active.questionnaire.Audio From 8d49fdee78092a5c03825acf70c3d520f7d7ef1e Mon Sep 17 00:00:00 2001 From: Yatharth Ranjan Date: Wed, 21 Feb 2018 15:59:07 +0000 Subject: [PATCH 07/31] move "null" --- commons/active/questionnaire/audio.avsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/active/questionnaire/audio.avsc b/commons/active/questionnaire/audio.avsc index e23111f5..e421f562 100644 --- a/commons/active/questionnaire/audio.avsc +++ b/commons/active/questionnaire/audio.avsc @@ -6,6 +6,6 @@ "fields": [ {"name": "time", "type": "double", "doc": "Device timestamp in UTC (s)."}, { "name": "timeCompleted", "type": "double", "doc": "Timestamp in UTC (s) when subject completes the audio questionnaire." }, - {"name": "data", "type": ["string", "null"], "doc": "Audio features computed by openSMILE recorded in Base64 format.", "default": null} + {"name": "data", "type": ["null", "string"], "doc": "Audio features computed by openSMILE recorded in Base64 format.", "default": null} ] } From 0178e5cd01b549b2ee5b4b7d032eb6c8c237e96d Mon Sep 17 00:00:00 2001 From: yatharthranjan Date: Wed, 21 Feb 2018 16:42:56 +0000 Subject: [PATCH 08/31] Use opensmile naming for audio --- .../audio.avsc => opensmile/open_smile_2_audio_analysis.avsc} | 4 ++-- specifications/active/aRMT-1.0.0.yml | 2 +- specifications/active/aRMT-v1.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename commons/active/{questionnaire/audio.avsc => opensmile/open_smile_2_audio_analysis.avsc} (84%) diff --git a/commons/active/questionnaire/audio.avsc b/commons/active/opensmile/open_smile_2_audio_analysis.avsc similarity index 84% rename from commons/active/questionnaire/audio.avsc rename to commons/active/opensmile/open_smile_2_audio_analysis.avsc index e421f562..bebf89c0 100644 --- a/commons/active/questionnaire/audio.avsc +++ b/commons/active/opensmile/open_smile_2_audio_analysis.avsc @@ -1,7 +1,7 @@ { - "namespace": "org.radarcns.active.questionnaire", + "namespace": "org.radarcns.active.opensmile", "type": "record", - "name": "Audio", + "name": "OpenSmile2AudioAnalysis", "doc": "Audio data collected by aRMT app and processed using openSMILE.", "fields": [ {"name": "time", "type": "double", "doc": "Device timestamp in UTC (s)."}, diff --git a/specifications/active/aRMT-1.0.0.yml b/specifications/active/aRMT-1.0.0.yml index 381e423a..73b231e6 100644 --- a/specifications/active/aRMT-1.0.0.yml +++ b/specifications/active/aRMT-1.0.0.yml @@ -1100,4 +1100,4 @@ data: value: 3 - type: AUDIO topic: questionnaire_audio - value_schema: .active.questionnaire.Audio + value_schema: .active.opensmile.OpenSmile2AudioAnalysis diff --git a/specifications/active/aRMT-v1.yml b/specifications/active/aRMT-v1.yml index cc115117..7b699d00 100644 --- a/specifications/active/aRMT-v1.yml +++ b/specifications/active/aRMT-v1.yml @@ -1080,4 +1080,4 @@ data: value: 3 - type: AUDIO topic: questionnaire_audio - value_schema: .active.questionnaire.Audio + value_schema: .active.opensmile.OpenSmile2AudioAnalysis From 0179e3764420aeb6bec61f35e047b74b1198f2a6 Mon Sep 17 00:00:00 2001 From: yatharthranjan Date: Wed, 21 Feb 2018 17:01:47 +0000 Subject: [PATCH 09/31] add config and format for opensmile --- commons/active/opensmile/open_smile_2_audio_analysis.avsc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commons/active/opensmile/open_smile_2_audio_analysis.avsc b/commons/active/opensmile/open_smile_2_audio_analysis.avsc index bebf89c0..0ecebe75 100644 --- a/commons/active/opensmile/open_smile_2_audio_analysis.avsc +++ b/commons/active/opensmile/open_smile_2_audio_analysis.avsc @@ -6,6 +6,8 @@ "fields": [ {"name": "time", "type": "double", "doc": "Device timestamp in UTC (s)."}, { "name": "timeCompleted", "type": "double", "doc": "Timestamp in UTC (s) when subject completes the audio questionnaire." }, - {"name": "data", "type": ["null", "string"], "doc": "Audio features computed by openSMILE recorded in Base64 format.", "default": null} + {"name": "config", "type": ["null", "string"], "doc": "OpenSMILE configuration file.", "default": null}, + {"name": "format", "type": ["null", "string"], "doc": "Format of the recorded data.", "default": null}, + {"name": "data", "type": ["null", "string"], "doc": "Audio features computed by openSMILE.", "default": null} ] } From 5af93b06ca0ef24554d74985570c46b81ecec4ec Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Thu, 22 Feb 2018 11:15:47 +0100 Subject: [PATCH 10/31] Amended faros battery level to also send battery status updates --- commons/passive/bittium/bittium_faros_battery_level.avsc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commons/passive/bittium/bittium_faros_battery_level.avsc b/commons/passive/bittium/bittium_faros_battery_level.avsc index 74641fb2..606ea042 100644 --- a/commons/passive/bittium/bittium_faros_battery_level.avsc +++ b/commons/passive/bittium/bittium_faros_battery_level.avsc @@ -6,6 +6,7 @@ "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, - { "name": "batteryLevel", "type": "float", "doc": "Battery level from 0 to 1. Note that the battery level is a rough estimate." } + { "name": "batteryLevel", "type": "float", "doc": "Battery level from 0 to 1. Note that the battery level is a rough estimate." }, + { "name": "exact", "type": "boolean", "doc": "Whether the batteryLevel can be taken as an exact value. True if the battery level is an exact representation, false if it is just an estimate based on the battery status (CRITICAL/LOW/MEDIUM/HIGH)." } ] } From 8356547dfec5603a06733dbd7403adf4397642c8 Mon Sep 17 00:00:00 2001 From: Maximilian Kerz Date: Thu, 22 Feb 2018 12:37:29 +0000 Subject: [PATCH 11/31] Types Notification and Task --- commons/active/notification/notification.avsc | 24 +++++++++++ commons/active/task/task.avsc | 24 +++++++++++ specifications/active/aRMT-1.0.0.yml | 42 ++++++++++++++++++- specifications/active/aRMT-v1.yml | 40 ++++++++++++++++++ 4 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 commons/active/notification/notification.avsc create mode 100644 commons/active/task/task.avsc diff --git a/commons/active/notification/notification.avsc b/commons/active/notification/notification.avsc new file mode 100644 index 00000000..6d451e14 --- /dev/null +++ b/commons/active/notification/notification.avsc @@ -0,0 +1,24 @@ +{ + "namespace": "org.radarcns.active.notification", + "type": "record", + "name": "Notification", + "doc": "General schema for notifications. Check the specification folder to see how the notification has been defined. For each NotificationType there is a JSON file reporting the questions set and possible answers if available.", + "fields": [ + { "name": "time", "type": "double", "doc": "Timestamp in UTC (s) when the notification is submitted to the subject." }, + { "name": "timeCompleted", "type": "double", "doc": "Timestamp in UTC (s) when subject marks the notification as complete." }, + { "name": "name", "type": "string", "doc": "Notifications names." }, + { "name": "version", "type": "string", "doc": "It reports the notification version stated in the JSON specification." }, + { "name": "answers", "type": { + "type": "array", + "items": { + "name": "Answer", + "type": "record", + "doc": "Notification answer.", + "fields": [ + { "name": "value", "type": ["int", "string", "double"], "doc": "Subject answer." }, + { "name": "startTime", "type": "double", "doc": "Timestamp in UTC (s) when the notification is shown." }, + { "name": "endTime", "type": "double", "doc": "Timestamp in UTC (s) when the notification is answered." } + ] + }}, "doc": "Answers list. The answers order must follow the notification order."} + ] +} diff --git a/commons/active/task/task.avsc b/commons/active/task/task.avsc new file mode 100644 index 00000000..197cad87 --- /dev/null +++ b/commons/active/task/task.avsc @@ -0,0 +1,24 @@ +{ + "namespace": "org.radarcns.active.task", + "type": "record", + "name": "Task", + "doc": "General schema for tasks. Check the specification folder to see how the task has been defined. For each TaskType there is a JSON file reporting the tasks set and possible answers if available.", + "fields": [ + { "name": "time", "type": "double", "doc": "Timestamp in UTC (s) when the task is submitted to the subject." }, + { "name": "timeCompleted", "type": "double", "doc": "Timestamp in UTC (s) when subject marks the task as complete." }, + { "name": "name", "type": "string", "doc": "task names." }, + { "name": "version", "type": "string", "doc": "It reports the task version stated in the JSON specification." }, + { "name": "answers", "type": { + "type": "array", + "items": { + "name": "Answer", + "type": "record", + "doc": "Task answer.", + "fields": [ + { "name": "value", "type": ["int", "string", "double"], "doc": "Subject answer." }, + { "name": "startTime", "type": "double", "doc": "Timestamp in UTC (s) when the task is shown." }, + { "name": "endTime", "type": "double", "doc": "Timestamp in UTC (s) when the task is answered." } + ] + }}, "doc": "Answers list. The answers order must follow the task order."} + ] +} diff --git a/specifications/active/aRMT-1.0.0.yml b/specifications/active/aRMT-1.0.0.yml index bacf8203..d65b5051 100644 --- a/specifications/active/aRMT-1.0.0.yml +++ b/specifications/active/aRMT-1.0.0.yml @@ -6,6 +6,46 @@ version: 1.0.0 assessment_type: QUESTIONNAIRE doc: aRMT Questionnaires definition. Includes Personal Health Questionnaire Depression Scale (PHQ-8), Experience sampling method (ESM) and RSES. data: + - type: THINC-IT + topic: notification_thinc_it + value_schema: .active.notification.Notification + questions: + - lead: Time for Thinc-it + content: It's time to complete the Thinc-it app. + widget: INFO + - type: ROMBERG_TEST + topic: task_romberg_test + value_schema: .active.task.Task + questions: + - lead: Romberg's Test + content: It's time to complete the Thinc-it app. + widget: INFO + - lead: Romberg's Test + content: Keep your eyes open. + widget: TIMED + - lead: Romberg's Test + content: Close your eyes. + widget: TIMED + - type: 2MW_TEST + topic: task_2MW_test + value_schema: .active.task.Task + questions: + - lead: 2MW Test + content: Null + widget: INFO + - lead: 2MW Test + content: Walk back and forth. + widget: TIMED + - type: TANDEM_WALKING_TEST + topic: task_tandem_walking_test + value_schema: .active.task.Task + questions: + - lead: Tandem Walking Test + content: Null + widget: INFO + - lead: Tandem Walking Test + content: Null + widget: INFO - type: PHQ8 topic: questionnaire_phq8 value_schema: .active.questionnaire.Questionnaire @@ -878,7 +918,7 @@ data: - text: 3 value: 3 Very pleasant - lead: Null - content: This event was + content: This event was widget: RANGE responses: - text: -3 Unimportant diff --git a/specifications/active/aRMT-v1.yml b/specifications/active/aRMT-v1.yml index a2c6fa7c..191af312 100644 --- a/specifications/active/aRMT-v1.yml +++ b/specifications/active/aRMT-v1.yml @@ -6,6 +6,46 @@ version: v1 assessment_type: QUESTIONNAIRE doc: aRMT Questionnaires definition. Includes Personal Health Questionnaire Depression Scale (PHQ-8), Experience sampling method (ESM) and RSES. data: + - type: THINC-IT + topic: notification_thinc_it + value_schema: .active.notification.Notification + questions: + - lead: Time for Thinc-it + content: It's time to complete the Thinc-it app. + widget: INFO + - type: ROMBERG_TEST + topic: task_romberg_test + value_schema: .active.task.Task + questions: + - lead: Romberg's Test + content: It's time to complete the Thinc-it app. + widget: INFO + - lead: Romberg's Test + content: Keep your eyes open. + widget: TIMED + - lead: Romberg's Test + content: Close your eyes. + widget: TIMED + - type: 2MW_TEST + topic: task_2MW_test + value_schema: .active.task.Task + questions: + - lead: 2MW Test + content: Null + widget: INFO + - lead: 2MW Test + content: Walk back and forth. + widget: TIMED + - type: TANDEM_WALKING_TEST + topic: task_tandem_walking_test + value_schema: .active.task.Task + questions: + - lead: Tandem Walking Test + content: Null + widget: INFO + - lead: Tandem Walking Test + content: Null + widget: INFO - type: PHQ8 topic: questionnaire_phq8 value_schema: .active.questionnaire.Questionnaire From fb02a850f94226ea7c34d1002bc2cadb19808f8a Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Thu, 22 Feb 2018 14:01:13 +0100 Subject: [PATCH 12/31] Split audio analysis from raw audio recording. --- .../opensmile/open_smile_2_audio_analysis.avsc | 7 +++---- .../questionnaire/questionnaire_audio_recording.avsc | 12 ++++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 commons/active/questionnaire/questionnaire_audio_recording.avsc diff --git a/commons/active/opensmile/open_smile_2_audio_analysis.avsc b/commons/active/opensmile/open_smile_2_audio_analysis.avsc index 0ecebe75..330d10ef 100644 --- a/commons/active/opensmile/open_smile_2_audio_analysis.avsc +++ b/commons/active/opensmile/open_smile_2_audio_analysis.avsc @@ -5,9 +5,8 @@ "doc": "Audio data collected by aRMT app and processed using openSMILE.", "fields": [ {"name": "time", "type": "double", "doc": "Device timestamp in UTC (s)."}, - { "name": "timeCompleted", "type": "double", "doc": "Timestamp in UTC (s) when subject completes the audio questionnaire." }, - {"name": "config", "type": ["null", "string"], "doc": "OpenSMILE configuration file.", "default": null}, - {"name": "format", "type": ["null", "string"], "doc": "Format of the recorded data.", "default": null}, - {"name": "data", "type": ["null", "string"], "doc": "Audio features computed by openSMILE.", "default": null} + { "name": "timeCompleted", "type": "double", "doc": "Timestamp in UTC (s) when subject completed the audio questionnaire." }, + {"name": "config", "type": "string", "doc": "Contents of an OpenSMILE configuration file." }, + {"name": "data", "type": ["null", "string"], "doc": "Audio features computed by openSMILE in plain text.", "default": null} ] } diff --git a/commons/active/questionnaire/questionnaire_audio_recording.avsc b/commons/active/questionnaire/questionnaire_audio_recording.avsc new file mode 100644 index 00000000..ce40ee17 --- /dev/null +++ b/commons/active/questionnaire/questionnaire_audio_recording.avsc @@ -0,0 +1,12 @@ +{ + "namespace": "org.radarcns.active.questionnaire", + "name": "QuestionnaireAudioRecording", + "type": "record", + "doc": "Audio recording part of the RADAR aRMT app.", + "fields": [ + { "name": "time", "type": "double", "doc": "Device timestamp when the audio recording was started (s since the Unix Epoch)." }, + { "name": "timeCompleted", "type": "double", "doc": "Device timestamp when the audio recording was completed (s since the Unix Epoch)." }, + { "name": "mediaType", "type": "string", "doc": "Media type of the audio recording format. For example, audio/wav for a WAV recording. See https://www.iana.org/assignments/media-types/media-types.xhtml#audio for the list of standardized audio media types."}, + { "name": "data", "type": "bytes", "doc": "Raw contents of the recorded audio file." } + ] +} \ No newline at end of file From 37be71e62cc20e39e503e1b58d1ba301a512a3fc Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Thu, 22 Feb 2018 14:03:46 +0100 Subject: [PATCH 13/31] Update audio specifications --- specifications/active/aRMT-1.0.0.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specifications/active/aRMT-1.0.0.yml b/specifications/active/aRMT-1.0.0.yml index 73b231e6..6f0500fb 100644 --- a/specifications/active/aRMT-1.0.0.yml +++ b/specifications/active/aRMT-1.0.0.yml @@ -1100,4 +1100,4 @@ data: value: 3 - type: AUDIO topic: questionnaire_audio - value_schema: .active.opensmile.OpenSmile2AudioAnalysis + value_schema: .active.questionnaire.QuestionnaireAudioRecording From 09d27be02862892f8ce5dcb5ca2726f7d622d6e3 Mon Sep 17 00:00:00 2001 From: Maximilian Kerz Date: Thu, 22 Feb 2018 14:00:04 +0000 Subject: [PATCH 14/31] Widget INFO, CHECKBOX and TIMED added --- commons/catalogue/radar_widget.avsc | 5 ++++- specifications/active/aRMT-1.0.0.yml | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/commons/catalogue/radar_widget.avsc b/commons/catalogue/radar_widget.avsc index a68ff6b6..f49b4d72 100644 --- a/commons/catalogue/radar_widget.avsc +++ b/commons/catalogue/radar_widget.avsc @@ -7,6 +7,9 @@ "RADIO" , "SLIDER", "NONE", - "RANGE" + "RANGE", + "INFO", + "CHECKBOX", + "TIMED" ] } diff --git a/specifications/active/aRMT-1.0.0.yml b/specifications/active/aRMT-1.0.0.yml index d65b5051..32195b8c 100644 --- a/specifications/active/aRMT-1.0.0.yml +++ b/specifications/active/aRMT-1.0.0.yml @@ -472,8 +472,8 @@ data: - text: 7 very much value: 7 - lead: Null - content: What am I doing (just before the beep)? - widget: RADIO + content: What am I doing? + widget: CHECKBOX responses: - text: nothing value: 0 @@ -659,7 +659,7 @@ data: value: 6 - lead: Null content: Who am I with? - widget: RADIO + widget: CHECKBOX responses: - text: Alone value: 0 From 5ab4b3c690842cd91f6988f8199894b7ed19d181 Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Thu, 22 Feb 2018 15:12:20 +0100 Subject: [PATCH 15/31] Updated opensmile recording schema --- .../open_smile_2_audio_recording.avsc} | 7 +- .../schema/specification/SourceCatalogue.java | 9 +- specifications/active/aRMT-1.0.0.yml | 3 - specifications/active/aRMT-1.1.0.yml | 1103 +++++++++++++++++ 4 files changed, 1113 insertions(+), 9 deletions(-) rename commons/active/{questionnaire/questionnaire_audio_recording.avsc => opensmile/open_smile_2_audio_recording.avsc} (72%) create mode 100644 specifications/active/aRMT-1.1.0.yml diff --git a/commons/active/questionnaire/questionnaire_audio_recording.avsc b/commons/active/opensmile/open_smile_2_audio_recording.avsc similarity index 72% rename from commons/active/questionnaire/questionnaire_audio_recording.avsc rename to commons/active/opensmile/open_smile_2_audio_recording.avsc index ce40ee17..1604e13e 100644 --- a/commons/active/questionnaire/questionnaire_audio_recording.avsc +++ b/commons/active/opensmile/open_smile_2_audio_recording.avsc @@ -1,12 +1,13 @@ { - "namespace": "org.radarcns.active.questionnaire", - "name": "QuestionnaireAudioRecording", + "namespace": "org.radarcns.active.opensmile", + "name": "OpenSmile2AudioRecording", "type": "record", "doc": "Audio recording part of the RADAR aRMT app.", "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp when the audio recording was started (s since the Unix Epoch)." }, { "name": "timeCompleted", "type": "double", "doc": "Device timestamp when the audio recording was completed (s since the Unix Epoch)." }, { "name": "mediaType", "type": "string", "doc": "Media type of the audio recording format. For example, audio/wav for a WAV recording. See https://www.iana.org/assignments/media-types/media-types.xhtml#audio for the list of standardized audio media types."}, - { "name": "data", "type": "bytes", "doc": "Raw contents of the recorded audio file." } + { "name": "data", "type": "bytes", "doc": "Raw contents of the recorded audio file." }, + { "name": "reciteText", "type": ["null", "string"], "doc": "Text that was supposed to be recited as part of the recording.", "default": null } ] } \ No newline at end of file diff --git a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/SourceCatalogue.java b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/SourceCatalogue.java index 36d9d576..86b0facf 100644 --- a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/SourceCatalogue.java +++ b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/SourceCatalogue.java @@ -122,10 +122,13 @@ private static Map initSources(ObjectReader reader, Path root, Sc .filter(Files::isRegularFile) .map(f -> { try { + String filename = f.getFileName().toString(); + int extensionIndex = filename.lastIndexOf('.'); + if (extensionIndex != -1) { + filename = filename.substring(0, extensionIndex); + } return new AbstractMap.SimpleImmutableEntry<>( - f.getFileName().toString() - .split("\\.")[0] - .toUpperCase(Locale.ENGLISH), + filename.toUpperCase(Locale.ENGLISH), reader.readValue(f.toFile())); } catch (IOException ex) { logger.error("Failed to load configuration {}", f, ex); diff --git a/specifications/active/aRMT-1.0.0.yml b/specifications/active/aRMT-1.0.0.yml index 6f0500fb..5746e4d5 100644 --- a/specifications/active/aRMT-1.0.0.yml +++ b/specifications/active/aRMT-1.0.0.yml @@ -1098,6 +1098,3 @@ data: value: 2 - text: Strongly agree value: 3 - - type: AUDIO - topic: questionnaire_audio - value_schema: .active.questionnaire.QuestionnaireAudioRecording diff --git a/specifications/active/aRMT-1.1.0.yml b/specifications/active/aRMT-1.1.0.yml new file mode 100644 index 00000000..cc380c72 --- /dev/null +++ b/specifications/active/aRMT-1.1.0.yml @@ -0,0 +1,1103 @@ +#==================== Personal Health Questionnaire Depression Scale (PHQ-8) ======================# +name: aRMT +vendor: RADAR +model: aRMT-App +version: 1.1.0 +assessment_type: QUESTIONNAIRE +doc: aRMT Questionnaires definition. Includes Personal Health Questionnaire Depression Scale (PHQ-8), Experience sampling method (ESM) and RSES. +data: + - type: PHQ8 + topic: questionnaire_phq8 + value_schema: .active.questionnaire.Questionnaire + questions: + - lead: Over the past two weeks, how often have you been bothered by any of the following problems? + content: Little interest or pleasure in doing things. + widget: RADIO + responses: + - text: Not at all + value: 0 + - text: Several days + value: 1 + - text: More than half the days + value: 2 + - text: Nearly every day + value: 3 + - lead: Over the past two weeks, how often have you been bothered by any of the following problems? + content: Feeling down, depressed, or hopeless. + widget: RADIO + responses: + - text: Not at all + value: 0 + - text: Several days + value: 1 + - text: More than half the days + value: 2 + - text: Nearly every day + value: 3 + - lead: Over the past two weeks, how often have you been bothered by any of the following problems? + content: Trouble falling or staying asleep, or sleeping too much. + widget: RADIO + responses: + - text: Not at all + value: 0 + - text: Several days + value: 1 + - text: More than half the days + value: 2 + - text: Nearly every day + value: 3 + - lead: Over the past two weeks, how often have you been bothered by any of the following problems? + content: Feeling tired or having little energy. + widget: RADIO + responses: + - text: Not at all + value: 0 + - text: Several days + value: 1 + - text: More than half the days + value: 2 + - text: Nearly every day + value: 3 + - lead: Over the past two weeks, how often have you been bothered by any of the following problems? + content: Poor appetite or overeating. + widget: RADIO + responses: + - text: Not at all + value: 0 + - text: Several days + value: 1 + - text: More than half the days + value: 2 + - text: Nearly every day + value: 3 + - lead: Over the past two weeks, how often have you been bothered by any of the following problems? + content: Feeling bad about yourself, or that you are a failure, or have let yourself or your family down. + widget: RADIO + responses: + - text: Not at all + value: 0 + - text: Several days + value: 1 + - text: More than half the days + value: 2 + - text: Nearly every day + value: 3 + - lead: Over the past two weeks, how often have you been bothered by any of the following problems? + content: Trouble concentrating on things, such as reading the newspaper or watching television. + widget: RADIO + responses: + - text: Not at all + value: 0 + - text: Several days + value: 1 + - text: More than half the days + value: 2 + - text: Nearly every day + value: 3 + - lead: Over the past two weeks, how often have you been bothered by any of the following problems? + content: Moving or speaking so slowly that other people could have noticed. Or the opposite – being so fidgety or restless that you have been moving around a lot more than usual. + widget: RADIO + responses: + - text: Not at all + value: 0 + - text: Several days + value: 1 + - text: More than half the days + value: 2 + - text: Nearly every day + value: 3 + + - type: ESM + topic: questionnaire_esm + value_schema: .active.questionnaire.Questionnaire + questions: + - lead: Null + content: I slept well + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Right now I feel cheerful + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Right now, I feel down + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Right now, I feel anxious + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Right now, I feel relaxed + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Right now, I feel irritated + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Right now, I feel stressed + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Right now, I feel content + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Right now, I feel insecure + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Right now, I feel hopeful + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Right now, I feel lonely + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: I am satisfied with myself + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: I feel restless + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: I feel self-confident + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Globally, I feel well + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: I am brooding + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: I am able to concentrate well + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: What am I doing (just before the beep)? + widget: RADIO + responses: + - text: nothing + value: 0 + - text: resting + value: 1 + - text: eating/drinking + value: 2 + - text: passive leisure + value: 3 + - text: active leisure + value: 4 + - text: travel + value: 5 + - text: household/groceries + value: 6 + - text: work/study + value: 7 + - text: self-care + value: 8 + - text: interaction/conversation + value: 9 + - text: mobile phone/social media + value: 10 + - text: something else + value: 11 + - lead: Null + content: I can do this well + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: I would rather do something else + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: This activity requires effort + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Physically, I am active + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Physcially, I am tired + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Physically, I am in pain + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Physically, I do not feel well + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Where am I? + widget: RADIO + responses: + - text: at home + value: 0 + - text: at family or friends place + value: 1 + - text: at work or school + value: 2 + - text: transport + value: 3 + - text: healthcare + value: 4 + - text: somewhere else indoors + value: 5 + - text: somewhere else outdoors + value: 6 + - lead: Null + content: Who am I with? + widget: RADIO + responses: + - text: Alone + value: 0 + - text: Partner + value: 1 + - text: Residents + value: 2 + - text: Family non-residents + value: 3 + - text: Friends + value: 4 + - text: Classmates/colleagues + value: 5 + - text: Caregiver + value: 6 + - text: Strangers/others + value: 7 + - lead: Null + content: How many people am I with? + widget: RADIO + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3-10 + value: 3 + - text: 4 + value: over 10 + - lead: Null + content: We are doing something together + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: I find the people I am with pleasant + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: I would prefer to be alone + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: I feel connected to the people I am with + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: I feel fine being alone + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: I would prefer to be with others + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Being alone right now is my choice + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: I feel left out + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: I am virtually interacting + widget: RADIO + responses: + - text: No + value: 0 + - text: Yes + value: 1 + - lead: Null + content: I find virtual interaction pleasant + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Most people would find my current situation stressful + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Think of the most important event that happened since the last beep. This event was + widget: RANGE + responses: + - text: -3 Very unpleasant + value: -3 + - text: -2 + value: -2 + - text: -1 + value: -1 + - text: 0 + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 Very pleasant + - lead: Null + content: This event was + widget: RANGE + responses: + - text: -3 Unimportant + value: -3 + - text: -2 + value: -2 + - text: -1 + value: -1 + - text: 0 + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 Important + - lead: Null + content: Since the last beep I had/taken + widget: RADIO + responses: + - text: Food + value: 0 + - text: Caffeine + value: 1 + - text: Nicotine + value: 2 + - text: Alcohol + value: 3 + - text: Medication + value: 4 + - text: Substances + value: 5 + - text: Nothing + value: 6 + - lead: Null + content: This beep disturbed me + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + - lead: Null + content: Filling out the questionnaire has influence my mood today + widget: RANGE + responses: + - text: 0 Not at all + value: 0 + - text: 1 + value: 1 + - text: 2 + value: 2 + - text: 3 + value: 3 + - text: 4 + value: 4 + - text: 5 + value: 5 + - text: 6 + value: 6 + - text: 7 very much + value: 7 + + - type: RSES + topic: questionnaire_rses + value_schema: .active.questionnaire.Questionnaire + questions: + - lead: Null + content: 1. On the whole, I am satisfied with myself + widget: RADIO + responses: + - text: Strongly disagree + value: 0 + - text: Disagree + value: 1 + - text: Agree + value: 2 + - text: Strongly agree + value: 3 + - lead: Null + content: 2. At times, I think I am no good at all + widget: RADIO + responses: + - text: Strongly disagree + value: 0 + - text: Disagree + value: 1 + - text: Agree + value: 2 + - text: Strongly agree + value: 3 + - lead: Null + content: 3. I feel that I have a number of good qualities + widget: RADIO + responses: + - text: Strongly disagree + value: 0 + - text: Disagree + value: 1 + - text: Agree + value: 2 + - text: Strongly agree + value: 3 + - lead: Null + content: 4. I am able to do things as well as most other people + widget: RADIO + responses: + - text: Strongly disagree + value: 0 + - text: Disagree + value: 1 + - text: Agree + value: 2 + - text: Strongly agree + value: 3 + - lead: Null + content: 5. I feel I do not have much to be proud of + widget: RADIO + responses: + - text: Strongly disagree + value: 0 + - text: Disagree + value: 1 + - text: Agree + value: 2 + - text: Strongly agree + value: 3 + - lead: Null + content: 6. I certainly feel useless at times + widget: RADIO + responses: + - text: Strongly disagree + value: 0 + - text: Disagree + value: 1 + - text: Agree + value: 2 + - text: Strongly agree + value: 3 + - lead: Null + content: 7. I feel that I'm a person of worth, at least on an equal plane with others + widget: RADIO + responses: + - text: Strongly disagree + value: 0 + - text: Disagree + value: 1 + - text: Agree + value: 2 + - text: Strongly agree + value: 3 + - lead: Null + content: 8. I wish I could have more respect for myself + widget: RADIO + responses: + - text: Strongly disagree + value: 0 + - text: Disagree + value: 1 + - text: Agree + value: 2 + - text: Strongly agree + value: 3 + - lead: Null + content: 9. All in all, I am inclined to feel that I am a failure + widget: RADIO + responses: + - text: Strongly disagree + value: 0 + - text: Disagree + value: 1 + - text: Agree + value: 2 + - text: Strongly agree + value: 3 + - lead: Null + content: 10. I take a positive attitude towards myself + widget: RADIO + responses: + - text: Strongly disagree + value: 0 + - text: Disagree + value: 1 + - text: Agree + value: 2 + - text: Strongly agree + value: 3 + - type: AUDIO + topic: questionnaire_audio + value_schema: .active.opensmile.OpenSmile2AudioRecording From 4f57e89ff28c0845e752593f6ac40dbd196971b6 Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Thu, 22 Feb 2018 15:13:09 +0100 Subject: [PATCH 16/31] Remove additional topic from existing specification --- specifications/active/aRMT-v1.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/specifications/active/aRMT-v1.yml b/specifications/active/aRMT-v1.yml index 7b699d00..9da766ff 100644 --- a/specifications/active/aRMT-v1.yml +++ b/specifications/active/aRMT-v1.yml @@ -1078,6 +1078,3 @@ data: value: 2 - text: Strongly agree value: 3 - - type: AUDIO - topic: questionnaire_audio - value_schema: .active.opensmile.OpenSmile2AudioAnalysis From 62c03af2cc51f3404f9363f3c45c00779445df22 Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Mon, 26 Feb 2018 12:29:32 +0100 Subject: [PATCH 17/31] Query timewindow metadata based on timewindow. --- .../radarcns/stream/TimeWindowMetadata.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/java-sdk/radar-schemas-commons/src/main/java/org/radarcns/stream/TimeWindowMetadata.java b/java-sdk/radar-schemas-commons/src/main/java/org/radarcns/stream/TimeWindowMetadata.java index 985bdcb1..6c411b56 100644 --- a/java-sdk/radar-schemas-commons/src/main/java/org/radarcns/stream/TimeWindowMetadata.java +++ b/java-sdk/radar-schemas-commons/src/main/java/org/radarcns/stream/TimeWindowMetadata.java @@ -1,5 +1,6 @@ package org.radarcns.stream; +import java.util.NoSuchElementException; import org.radarcns.catalogue.TimeWindow; import java.util.concurrent.TimeUnit; @@ -34,4 +35,28 @@ public long getIntervalInMilliSec() { public String getTopicLabel(String topic) { return topic + label; } + + /** + * Get the timewindow metadata for given TimeWindow. + * @param timeWindow time window to look up + * @return metadata or {@code null} if given TimeWindow is unknown. + */ + public static TimeWindowMetadata getMetadata(TimeWindow timeWindow) { + switch (timeWindow) { + case TEN_SECOND: + return TEN_SECOND; + case ONE_MIN: + return ONE_MIN; + case TEN_MIN: + return TEN_MIN; + case ONE_HOUR: + return ONE_HOUR; + case ONE_DAY: + return ONE_DAY; + case ONE_WEEK: + return ONE_WEEK; + case UNKNOWN: + return null; + } + } } From 7fbf64746b23c0d3ed9eb032e28341c51b98c9dc Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Mon, 26 Feb 2018 12:30:42 +0100 Subject: [PATCH 18/31] Remove unused import --- .../src/main/java/org/radarcns/stream/TimeWindowMetadata.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/java-sdk/radar-schemas-commons/src/main/java/org/radarcns/stream/TimeWindowMetadata.java b/java-sdk/radar-schemas-commons/src/main/java/org/radarcns/stream/TimeWindowMetadata.java index 6c411b56..76b13dac 100644 --- a/java-sdk/radar-schemas-commons/src/main/java/org/radarcns/stream/TimeWindowMetadata.java +++ b/java-sdk/radar-schemas-commons/src/main/java/org/radarcns/stream/TimeWindowMetadata.java @@ -1,9 +1,7 @@ package org.radarcns.stream; -import java.util.NoSuchElementException; -import org.radarcns.catalogue.TimeWindow; - import java.util.concurrent.TimeUnit; +import org.radarcns.catalogue.TimeWindow; /** TimeWindow labels and window time period. */ public enum TimeWindowMetadata { From 09a951e7a5238b23039d66d0a0068defad35afaf Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Mon, 26 Feb 2018 12:38:20 +0100 Subject: [PATCH 19/31] Always return --- .../src/main/java/org/radarcns/stream/TimeWindowMetadata.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-sdk/radar-schemas-commons/src/main/java/org/radarcns/stream/TimeWindowMetadata.java b/java-sdk/radar-schemas-commons/src/main/java/org/radarcns/stream/TimeWindowMetadata.java index 76b13dac..b9f32977 100644 --- a/java-sdk/radar-schemas-commons/src/main/java/org/radarcns/stream/TimeWindowMetadata.java +++ b/java-sdk/radar-schemas-commons/src/main/java/org/radarcns/stream/TimeWindowMetadata.java @@ -53,7 +53,7 @@ public static TimeWindowMetadata getMetadata(TimeWindow timeWindow) { return ONE_DAY; case ONE_WEEK: return ONE_WEEK; - case UNKNOWN: + default: return null; } } From debc88ea8e768edc7b8e52bce7ec9daa311d18a2 Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Mon, 26 Feb 2018 13:44:46 +0100 Subject: [PATCH 20/31] Remove unused questionnaire data --- .../schema/specification/SourceCatalogue.java | 9 +- .../active/questionnaire/Question.java | 57 - .../questionnaire/QuestionnaireDataTopic.java | 22 +- .../active/questionnaire/Response.java | 40 - .../validation/rules/QuestionRoles.java | 78 -- .../validation/rules/QuestionnaireRoles.java | 18 +- .../validation/rules/ResponseRoles.java | 49 - specifications/active/aRMT-1.0.0.yml | 1088 +---------------- specifications/active/aRMT-1.1.0.yml | 16 + specifications/active/aRMT-v1.yml | 1066 ---------------- 10 files changed, 35 insertions(+), 2408 deletions(-) delete mode 100644 java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/active/questionnaire/Question.java delete mode 100644 java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/active/questionnaire/Response.java delete mode 100644 java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/validation/rules/QuestionRoles.java delete mode 100644 java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/validation/rules/ResponseRoles.java create mode 100644 specifications/active/aRMT-1.1.0.yml diff --git a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/SourceCatalogue.java b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/SourceCatalogue.java index 36d9d576..769d430d 100644 --- a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/SourceCatalogue.java +++ b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/SourceCatalogue.java @@ -121,11 +121,14 @@ private static Map initSources(ObjectReader reader, Path root, Sc return Files.walk(baseFolder) .filter(Files::isRegularFile) .map(f -> { + String filename = f.getFileName().toString(); + int lastPeriod = filename.lastIndexOf('.'); + if (lastPeriod != -1) { + filename = filename.substring(0, lastPeriod); + } try { return new AbstractMap.SimpleImmutableEntry<>( - f.getFileName().toString() - .split("\\.")[0] - .toUpperCase(Locale.ENGLISH), + filename.toUpperCase(Locale.ENGLISH), reader.readValue(f.toFile())); } catch (IOException ex) { logger.error("Failed to load configuration {}", f, ex); diff --git a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/active/questionnaire/Question.java b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/active/questionnaire/Question.java deleted file mode 100644 index b3eb3add..00000000 --- a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/active/questionnaire/Question.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2017 King's College London and The Hyve - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.radarcns.schema.specification.active.questionnaire; - -import com.fasterxml.jackson.annotation.JsonProperty; -import org.radarcns.catalogue.RadarWidget; - -import javax.validation.constraints.NotBlank; -import java.util.List; - -/** - * TODO. - */ -public class Question { - - @JsonProperty @NotBlank - private String lead; - - @JsonProperty @NotBlank - private String content; - - @JsonProperty - private RadarWidget widget; - - @JsonProperty - private List responses; - - public String getLead() { - return lead; - } - - public String getContent() { - return content; - } - - public RadarWidget getWidget() { - return widget; - } - - public List getResponses() { - return responses; - } -} diff --git a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/active/questionnaire/QuestionnaireDataTopic.java b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/active/questionnaire/QuestionnaireDataTopic.java index 79a0a8c0..a85c2ee4 100644 --- a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/active/questionnaire/QuestionnaireDataTopic.java +++ b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/active/questionnaire/QuestionnaireDataTopic.java @@ -17,11 +17,9 @@ package org.radarcns.schema.specification.active.questionnaire; import com.fasterxml.jackson.annotation.JsonProperty; -import org.radarcns.schema.specification.DataTopic; - -import javax.validation.constraints.NotEmpty; -import java.util.List; +import java.net.URL; import java.util.Map; +import org.radarcns.schema.specification.DataTopic; /** * TODO. @@ -31,18 +29,16 @@ public enum RadarSourceTypes { ARMT } - @JsonProperty @NotEmpty - private List questions; + @JsonProperty + private URL url; - public List getQuestions() { - return questions; + public URL getUrl() { + return url; } @Override - protected void propertiesMap(Map properties, boolean reduced) { - super.propertiesMap(properties, reduced); - if (!reduced) { - properties.put("questions", questions); - } + protected void propertiesMap(Map props, boolean reduced) { + super.propertiesMap(props, reduced); + props.put("url", url); } } diff --git a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/active/questionnaire/Response.java b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/active/questionnaire/Response.java deleted file mode 100644 index bbe234d6..00000000 --- a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/active/questionnaire/Response.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.radarcns.schema.specification.active.questionnaire; - -/* - * Copyright 2017 King's College London and The Hyve - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.constraints.NotBlank; - -/** - * TODO. - */ -public class Response { - @JsonProperty @NotBlank - private String text; - - @JsonProperty - private Object value; - - public String getText() { - return text; - } - - public Object getValue() { - return value; - } -} diff --git a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/validation/rules/QuestionRoles.java b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/validation/rules/QuestionRoles.java deleted file mode 100644 index ac7c9d52..00000000 --- a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/validation/rules/QuestionRoles.java +++ /dev/null @@ -1,78 +0,0 @@ -package org.radarcns.schema.validation.rules; - -/* - * Copyright 2017 King's College London and The Hyve - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.radarcns.schema.specification.active.questionnaire.Question; - -import java.util.stream.Stream; - -import static org.radarcns.schema.validation.rules.Validator.check; -import static org.radarcns.schema.validation.rules.Validator.validateNonEmpty; -import static org.radarcns.schema.validation.rules.Validator.validateNonNull; - -/** - * TODO. - */ -public final class QuestionRoles { - private QuestionRoles() { - // utility class - } - - /** - * TODO. - * @return TODO - */ - static Validator validateContent() { - return validateNonEmpty(Question::getContent, - "Question \"content\" property is empty.", - content -> Stream.concat( - check(content.charAt(content.length() - 1) == '.', - "Question content should be terminated with a period."), - check(Character.isUpperCase(content.charAt(0)), - "Question content should start with an uppercase character."))); - } - - /** - * TODO. - * @return TODO - */ - static Validator validateLead() { - return validateNonEmpty(Question::getLead, "Question \"lead\" is empty.", - lead -> Stream.concat( - check(lead.charAt(lead.length() - 1) == '?', - "Question lead should be ended by a question mark: " + lead), - check(Character.isUpperCase(lead.charAt(0)), - "Question lead should start with an uppercase character."))); - } - - /** - * TODO. - * @return TODO - */ - static Validator validateWidget() { - return validateNonNull(Question::getWidget, "Widget cannot be null."); - } - - /** - * TODO. - * @return TODO - */ - static Validator validateResponses() { - return validateNonEmpty(Question::getResponses, - "Responses list cannot be null or empty."); - } -} diff --git a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/validation/rules/QuestionnaireRoles.java b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/validation/rules/QuestionnaireRoles.java index d36ee6c7..dbdb9c30 100644 --- a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/validation/rules/QuestionnaireRoles.java +++ b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/validation/rules/QuestionnaireRoles.java @@ -16,21 +16,17 @@ package org.radarcns.schema.validation.rules; -import org.radarcns.schema.specification.active.questionnaire.QuestionnaireDataTopic; - -import java.nio.file.Path; - import static org.radarcns.schema.specification.SourceCatalogue.YAML_EXTENSION; import static org.radarcns.schema.validation.ValidationSupport.equalsFileName; -import static org.radarcns.schema.validation.rules.Validator.validateNonEmpty; import static org.radarcns.schema.validation.rules.Validator.validateNonNull; +import java.nio.file.Path; +import org.radarcns.schema.specification.active.questionnaire.QuestionnaireDataTopic; + /** * TODO. */ public final class QuestionnaireRoles { - - private static final String QUESTIONS = "Questions list cannot null or empty."; private static final String QUESTIONNAIRE_TYPE = "Questionnaire Type cannot be null" + " and should match with the configuration file name."; @@ -47,12 +43,4 @@ static Validator validateQuestionnaireType(Path file) { equalsFileName(file, YAML_EXTENSION), QUESTIONNAIRE_TYPE); } - - /** - * TODO. - * @return TODO - */ - static Validator validateQuestions() { - return validateNonEmpty(QuestionnaireDataTopic::getQuestions, QUESTIONS); - } } diff --git a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/validation/rules/ResponseRoles.java b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/validation/rules/ResponseRoles.java deleted file mode 100644 index 88fe1990..00000000 --- a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/validation/rules/ResponseRoles.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2017 King's College London and The Hyve - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.radarcns.schema.validation.rules; - -import org.radarcns.schema.specification.active.questionnaire.Response; - -import static org.radarcns.schema.validation.rules.Validator.validateNonNull; - -/** - * TODO. - */ -public final class ResponseRoles { - private static final String SCORE = "Answer score cannot be null."; - private static final String TEXT = "Answer text cannot be null."; - - private ResponseRoles() { - // utility class - } - - /** - * TODO. - * @return TODO - */ - static Validator validateScore() { - return validateNonNull(Response::getValue, SCORE); - } - - /** - * TODO. - * @return TODO - */ - static Validator validateText() { - return validateNonNull(Response::getText, TEXT); - } -} diff --git a/specifications/active/aRMT-1.0.0.yml b/specifications/active/aRMT-1.0.0.yml index b9c7d492..2959393a 100644 --- a/specifications/active/aRMT-1.0.0.yml +++ b/specifications/active/aRMT-1.0.0.yml @@ -9,1092 +9,6 @@ data: - type: PHQ8 topic: questionnaire_phq8 value_schema: .active.questionnaire.Questionnaire - questions: - - lead: Over the past two weeks, how often have you been bothered by any of the following problems? - content: Little interest or pleasure in doing things. - widget: RADIO - responses: - - text: Not at all - value: 0 - - text: Several days - value: 1 - - text: More than half the days - value: 2 - - text: Nearly every day - value: 3 - - lead: Over the past two weeks, how often have you been bothered by any of the following problems? - content: Feeling down, depressed, or hopeless. - widget: RADIO - responses: - - text: Not at all - value: 0 - - text: Several days - value: 1 - - text: More than half the days - value: 2 - - text: Nearly every day - value: 3 - - lead: Over the past two weeks, how often have you been bothered by any of the following problems? - content: Trouble falling or staying asleep, or sleeping too much. - widget: RADIO - responses: - - text: Not at all - value: 0 - - text: Several days - value: 1 - - text: More than half the days - value: 2 - - text: Nearly every day - value: 3 - - lead: Over the past two weeks, how often have you been bothered by any of the following problems? - content: Feeling tired or having little energy. - widget: RADIO - responses: - - text: Not at all - value: 0 - - text: Several days - value: 1 - - text: More than half the days - value: 2 - - text: Nearly every day - value: 3 - - lead: Over the past two weeks, how often have you been bothered by any of the following problems? - content: Poor appetite or overeating. - widget: RADIO - responses: - - text: Not at all - value: 0 - - text: Several days - value: 1 - - text: More than half the days - value: 2 - - text: Nearly every day - value: 3 - - lead: Over the past two weeks, how often have you been bothered by any of the following problems? - content: Feeling bad about yourself, or that you are a failure, or have let yourself or your family down. - widget: RADIO - responses: - - text: Not at all - value: 0 - - text: Several days - value: 1 - - text: More than half the days - value: 2 - - text: Nearly every day - value: 3 - - lead: Over the past two weeks, how often have you been bothered by any of the following problems? - content: Trouble concentrating on things, such as reading the newspaper or watching television. - widget: RADIO - responses: - - text: Not at all - value: 0 - - text: Several days - value: 1 - - text: More than half the days - value: 2 - - text: Nearly every day - value: 3 - - lead: Over the past two weeks, how often have you been bothered by any of the following problems? - content: Moving or speaking so slowly that other people could have noticed. Or the opposite – being so fidgety or restless that you have been moving around a lot more than usual. - widget: RADIO - responses: - - text: Not at all - value: 0 - - text: Several days - value: 1 - - text: More than half the days - value: 2 - - text: Nearly every day - value: 3 - - type: ESM topic: questionnaire_esm - value_schema: .active.questionnaire.Questionnaire - questions: - - lead: Null - content: I slept well - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now I feel cheerful - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now, I feel down - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now, I feel anxious - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now, I feel relaxed - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now, I feel irritated - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now, I feel stressed - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now, I feel content - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now, I feel insecure - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now, I feel hopeful - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now, I feel lonely - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I am satisfied with myself - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I feel restless - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I feel self-confident - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Globally, I feel well - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I am brooding - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I am able to concentrate well - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: What am I doing (just before the beep)? - widget: RADIO - responses: - - text: nothing - value: 0 - - text: resting - value: 1 - - text: eating/drinking - value: 2 - - text: passive leisure - value: 3 - - text: active leisure - value: 4 - - text: travel - value: 5 - - text: household/groceries - value: 6 - - text: work/study - value: 7 - - text: self-care - value: 8 - - text: interaction/conversation - value: 9 - - text: mobile phone/social media - value: 10 - - text: something else - value: 11 - - lead: Null - content: I can do this well - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I would rather do something else - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: This activity requires effort - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Physically, I am active - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Physcially, I am tired - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Physically, I am in pain - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Physically, I do not feel well - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Where am I? - widget: RADIO - responses: - - text: at home - value: 0 - - text: at family or friends place - value: 1 - - text: at work or school - value: 2 - - text: transport - value: 3 - - text: healthcare - value: 4 - - text: somewhere else indoors - value: 5 - - text: somewhere else outdoors - value: 6 - - lead: Null - content: Who am I with? - widget: RADIO - responses: - - text: Alone - value: 0 - - text: Partner - value: 1 - - text: Residents - value: 2 - - text: Family non-residents - value: 3 - - text: Friends - value: 4 - - text: Classmates/colleagues - value: 5 - - text: Caregiver - value: 6 - - text: Strangers/others - value: 7 - - lead: Null - content: How many people am I with? - widget: RADIO - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3-10 - value: 3 - - text: 4 - value: over 10 - - lead: Null - content: We are doing something together - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I find the people I am with pleasant - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I would prefer to be alone - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I feel connected to the people I am with - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I feel fine being alone - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I would prefer to be with others - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Being alone right now is my choice - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I feel left out - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I am virtually interacting - widget: RADIO - responses: - - text: No - value: 0 - - text: Yes - value: 1 - - lead: Null - content: I find virtual interaction pleasant - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Most people would find my current situation stressful - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Think of the most important event that happened since the last beep. This event was - widget: RANGE - responses: - - text: -3 Very unpleasant - value: -3 - - text: -2 - value: -2 - - text: -1 - value: -1 - - text: 0 - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 Very pleasant - - lead: Null - content: This event was - widget: RANGE - responses: - - text: -3 Unimportant - value: -3 - - text: -2 - value: -2 - - text: -1 - value: -1 - - text: 0 - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 Important - - lead: Null - content: Since the last beep I had/taken - widget: RADIO - responses: - - text: Food - value: 0 - - text: Caffeine - value: 1 - - text: Nicotine - value: 2 - - text: Alcohol - value: 3 - - text: Medication - value: 4 - - text: Substances - value: 5 - - text: Nothing - value: 6 - - lead: Null - content: This beep disturbed me - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Filling out the questionnaire has influence my mood today - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - - type: RSES - topic: questionnaire_rses - value_schema: .active.questionnaire.Questionnaire - questions: - - lead: Null - content: 1. On the whole, I am satisfied with myself - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 - - lead: Null - content: 2. At times, I think I am no good at all - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 - - lead: Null - content: 3. I feel that I have a number of good qualities - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 - - lead: Null - content: 4. I am able to do things as well as most other people - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 - - lead: Null - content: 5. I feel I do not have much to be proud of - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 - - lead: Null - content: 6. I certainly feel useless at times - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 - - lead: Null - content: 7. I feel that I'm a person of worth, at least on an equal plane with others - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 - - lead: Null - content: 8. I wish I could have more respect for myself - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 - - lead: Null - content: 9. All in all, I am inclined to feel that I am a failure - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 - - lead: Null - content: 10. I take a positive attitude towards myself - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 + value_schema: .active.questionnaire.Questionnaire \ No newline at end of file diff --git a/specifications/active/aRMT-1.1.0.yml b/specifications/active/aRMT-1.1.0.yml new file mode 100644 index 00000000..ee3fb857 --- /dev/null +++ b/specifications/active/aRMT-1.1.0.yml @@ -0,0 +1,16 @@ +#==================== Personal Health Questionnaire Depression Scale (PHQ-8) ======================# +name: aRMT +vendor: RADAR +model: aRMT-App +version: 1.1.0 +assessment_type: QUESTIONNAIRE +doc: aRMT Questionnaires definition. Includes Personal Health Questionnaire Depression Scale (PHQ-8), Experience sampling method (ESM) and RSES. +data: + - type: PHQ8 + topic: questionnaire_phq8 + value_schema: .active.questionnaire.Questionnaire + url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/phq8/phq8_armt.json + - type: ESM + topic: questionnaire_esm + value_schema: .active.questionnaire.Questionnaire + url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/esm/esm_armt.json diff --git a/specifications/active/aRMT-v1.yml b/specifications/active/aRMT-v1.yml index 9da766ff..2c8b934f 100644 --- a/specifications/active/aRMT-v1.yml +++ b/specifications/active/aRMT-v1.yml @@ -9,1072 +9,6 @@ data: - type: PHQ8 topic: questionnaire_phq8 value_schema: .active.questionnaire.Questionnaire - questions: - - lead: Over the past two weeks, how often have you been bothered by any of the following problems? - content: Little interest or pleasure in doing things. - widget: RADIO - responses: - - text: Not at all - value: 0 - - text: Several days - value: 1 - - text: More than half the days - value: 2 - - text: Nearly every day - value: 3 - - lead: Over the past two weeks, how often have you been bothered by any of the following problems? - content: Feeling down, depressed, or hopeless. - widget: RADIO - responses: - - text: Not at all - value: 0 - - text: Several days - value: 1 - - text: More than half the days - value: 2 - - text: Nearly every day - value: 3 - - lead: Over the past two weeks, how often have you been bothered by any of the following problems? - content: Trouble falling or staying asleep, or sleeping too much. - widget: RADIO - responses: - - text: Not at all - value: 0 - - text: Several days - value: 1 - - text: More than half the days - value: 2 - - text: Nearly every day - value: 3 - - lead: Over the past two weeks, how often have you been bothered by any of the following problems? - content: Feeling tired or having little energy. - widget: RADIO - responses: - - text: Not at all - value: 0 - - text: Several days - value: 1 - - text: More than half the days - value: 2 - - text: Nearly every day - value: 3 - - lead: Over the past two weeks, how often have you been bothered by any of the following problems? - content: Poor appetite or overeating. - widget: RADIO - responses: - - text: Not at all - value: 0 - - text: Several days - value: 1 - - text: More than half the days - value: 2 - - text: Nearly every day - value: 3 - - lead: Over the past two weeks, how often have you been bothered by any of the following problems? - content: Feeling bad about yourself, or that you are a failure, or have let yourself or your family down. - widget: RADIO - responses: - - text: Not at all - value: 0 - - text: Several days - value: 1 - - text: More than half the days - value: 2 - - text: Nearly every day - value: 3 - - lead: Over the past two weeks, how often have you been bothered by any of the following problems? - content: Trouble concentrating on things, such as reading the newspaper or watching television. - widget: RADIO - responses: - - text: Not at all - value: 0 - - text: Several days - value: 1 - - text: More than half the days - value: 2 - - text: Nearly every day - value: 3 - - lead: Over the past two weeks, how often have you been bothered by any of the following problems? - content: Moving or speaking so slowly that other people could have noticed. Or the opposite – being so fidgety or restless that you have been moving around a lot more than usual. - widget: RADIO - responses: - - text: Not at all - value: 0 - - text: Several days - value: 1 - - text: More than half the days - value: 2 - - text: Nearly every day - value: 3 - - - type: ESM - topic: questionnaire_esm - value_schema: .active.questionnaire.Questionnaire - questions: - - lead: Null - content: I slept well - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now I feel cheerful - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now, I feel down - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now, I feel anxious - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now, I feel relaxed - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now, I feel irritated - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now, I feel stressed - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now, I feel content - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now, I feel insecure - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now, I feel hopeful - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Right now, I feel lonely - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I am satisfied with myself - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I feel self-confident - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Globally, I feel well - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I am brooding - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I am able to concentrate well - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: What am I doing (just before the beep)? - widget: RADIO - responses: - - text: nothing - value: 0 - - text: resting - value: 1 - - text: eating/drinking - value: 2 - - text: passive leisure - value: 3 - - text: active leisure - value: 4 - - text: travel - value: 5 - - text: household/groceries - value: 6 - - text: work/study - value: 7 - - text: self-care - value: 8 - - text: interaction/conversation - value: 9 - - text: mobile phone/social media - value: 10 - - text: something else - value: 11 - - lead: Null - content: I can do this well - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I would rather do something else - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: This activity requires effort - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Physically, I am active - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Physcially, I am tired - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Physically, I am in pain - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Physically, I do not feel well - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Where am I? - widget: RADIO - responses: - - text: at home - value: 0 - - text: at family or friends place - value: 1 - - text: at work or school - value: 2 - - text: transport - value: 3 - - text: healthcare - value: 4 - - text: somewhere else indoors - value: 5 - - text: somewhere else outdoors - value: 6 - - lead: Null - content: Who am I with? - widget: RADIO - responses: - - text: Alone - value: 0 - - text: Partner - value: 1 - - text: Residents - value: 2 - - text: Family non-residents - value: 3 - - text: Friends - value: 4 - - text: Classmates/colleagues - value: 5 - - text: Caregiver - value: 6 - - text: Strangers/others - value: 7 - - lead: Null - content: How many people am I with? - widget: RADIO - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3-10 - value: 3 - - text: 4 - value: over 10 - - lead: Null - content: We are doing something together - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I find the people I am with pleasant - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I would prefer to be alone - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I feel connected to the people I am with - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I feel fine being alone - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I would prefer to be with others - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Being alone right now is my choice - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I feel left out - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: I am virtually interacting - widget: RADIO - responses: - - text: No - value: 0 - - text: Yes - value: 1 - - lead: Null - content: I find virtual interaction pleasant - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Most people would find my current situation stressful - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Think of the most important event that happened since the last beep. This event was - widget: RANGE - responses: - - text: -3 Very unpleasant - value: -3 - - text: -2 - value: -2 - - text: -1 - value: -1 - - text: 0 - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 Very pleasant - - lead: Null - content: This event was - widget: RANGE - responses: - - text: -3 Unimportant - value: -3 - - text: -2 - value: -2 - - text: -1 - value: -1 - - text: 0 - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 Important - - lead: Null - content: Since the last beep I had/taken - widget: RADIO - responses: - - text: Food - value: 0 - - text: Caffeine - value: 1 - - text: Nicotine - value: 2 - - text: Alcohol - value: 3 - - text: Medication - value: 4 - - text: Substances - value: 5 - - text: Nothing - value: 6 - - lead: Null - content: This beep disturbed me - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - lead: Null - content: Filling out the questionnaire has influence my mood today - widget: RANGE - responses: - - text: 0 Not at all - value: 0 - - text: 1 - value: 1 - - text: 2 - value: 2 - - text: 3 - value: 3 - - text: 4 - value: 4 - - text: 5 - value: 5 - - text: 6 - value: 6 - - text: 7 very much - value: 7 - - type: RSES topic: questionnaire_rses value_schema: .active.questionnaire.Questionnaire - questions: - - lead: Null - content: 1. On the whole, I am satisfied with myself - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 - - lead: Null - content: 2. At times, I think I am no good at all - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 - - lead: Null - content: 3. I feel that I have a number of good qualities - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 - - lead: Null - content: 4. I am able to do things as well as most other people - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 - - lead: Null - content: 5. I feel I do not have much to be proud of - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 - - lead: Null - content: 6. I certainly feel useless at times - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 - - lead: Null - content: 7. I feel that I'm a person of worth, at least on an equal plane with others - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 - - lead: Null - content: 8. I wish I could have more respect for myself - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 - - lead: Null - content: 9. All in all, I am inclined to feel that I am a failure - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 - - lead: Null - content: 10. I take a positive attitude towards myself - widget: RADIO - responses: - - text: Strongly disagree - value: 0 - - text: Disagree - value: 1 - - text: Agree - value: 2 - - text: Strongly agree - value: 3 From 5ac7379bbf6208c4d750c09672aa9985bb7fd8d8 Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Mon, 26 Feb 2018 13:55:37 +0100 Subject: [PATCH 21/31] More explicit URL definition --- .../schema/specification/SourceCatalogue.java | 11 +++-------- .../active/questionnaire/QuestionnaireDataTopic.java | 8 ++++---- specifications/active/aRMT-1.1.0.yml | 5 +++-- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/SourceCatalogue.java b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/SourceCatalogue.java index beea6cc4..8a21aa6f 100644 --- a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/SourceCatalogue.java +++ b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/SourceCatalogue.java @@ -122,16 +122,11 @@ private static Map initSources(ObjectReader reader, Path root, Sc .filter(Files::isRegularFile) .map(f -> { String filename = f.getFileName().toString(); - int lastPeriod = filename.lastIndexOf('.'); - if (lastPeriod != -1) { - filename = filename.substring(0, lastPeriod); + int extensionIndex = filename.lastIndexOf('.'); + if (extensionIndex != -1) { + filename = filename.substring(0, extensionIndex); } try { - String filename = f.getFileName().toString(); - int extensionIndex = filename.lastIndexOf('.'); - if (extensionIndex != -1) { - filename = filename.substring(0, extensionIndex); - } return new AbstractMap.SimpleImmutableEntry<>( filename.toUpperCase(Locale.ENGLISH), reader.readValue(f.toFile())); diff --git a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/active/questionnaire/QuestionnaireDataTopic.java b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/active/questionnaire/QuestionnaireDataTopic.java index a85c2ee4..b4748e2c 100644 --- a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/active/questionnaire/QuestionnaireDataTopic.java +++ b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/active/questionnaire/QuestionnaireDataTopic.java @@ -30,15 +30,15 @@ public enum RadarSourceTypes { } @JsonProperty - private URL url; + private URL questionnaireDefinitionUrl; - public URL getUrl() { - return url; + public URL getQuestionnaireDefinitionUrl() { + return questionnaireDefinitionUrl; } @Override protected void propertiesMap(Map props, boolean reduced) { super.propertiesMap(props, reduced); - props.put("url", url); + props.put("questionnaireDefinitionUrl", questionnaireDefinitionUrl); } } diff --git a/specifications/active/aRMT-1.1.0.yml b/specifications/active/aRMT-1.1.0.yml index 75c88c2a..99b24cb4 100644 --- a/specifications/active/aRMT-1.1.0.yml +++ b/specifications/active/aRMT-1.1.0.yml @@ -9,14 +9,15 @@ data: - type: PHQ8 topic: questionnaire_phq8 value_schema: .active.questionnaire.Questionnaire - url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/phq8/phq8_armt.json + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/phq8/phq8_armt.json - type: ESM topic: questionnaire_esm value_schema: .active.questionnaire.Questionnaire - url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/esm/esm_armt.json + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/esm/esm_armt.json - type: AUDIO topic: questionnaire_audio value_schema: .active.opensmile.OpenSmile2AudioRecording - type: RSES topic: questionnaire_rses value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/rses/rses_armt.json From ee257663bf86c7e1577f7a4d159c2da034a1c4cd Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Mon, 26 Feb 2018 14:42:01 +0100 Subject: [PATCH 22/31] Removing widget --- commons/catalogue/radar_widget.avsc | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 commons/catalogue/radar_widget.avsc diff --git a/commons/catalogue/radar_widget.avsc b/commons/catalogue/radar_widget.avsc deleted file mode 100644 index a68ff6b6..00000000 --- a/commons/catalogue/radar_widget.avsc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "namespace": "org.radarcns.catalogue", - "type": "enum", - "name": "RadarWidget", - "doc": "User interface widget used in the Active Remote Monitor Technology to submit assessments to subjects.", - "symbols": [ - "RADIO" , - "SLIDER", - "NONE", - "RANGE" - ] -} From 401ba29b4e32f9aadfc15fd04f1563c2577aa052 Mon Sep 17 00:00:00 2001 From: Maximilian Kerz Date: Tue, 27 Feb 2018 16:00:25 +0000 Subject: [PATCH 23/31] capitalised docs --- commons/active/task/task.avsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/active/task/task.avsc b/commons/active/task/task.avsc index 197cad87..76151131 100644 --- a/commons/active/task/task.avsc +++ b/commons/active/task/task.avsc @@ -6,7 +6,7 @@ "fields": [ { "name": "time", "type": "double", "doc": "Timestamp in UTC (s) when the task is submitted to the subject." }, { "name": "timeCompleted", "type": "double", "doc": "Timestamp in UTC (s) when subject marks the task as complete." }, - { "name": "name", "type": "string", "doc": "task names." }, + { "name": "name", "type": "string", "doc": "Task names." }, { "name": "version", "type": "string", "doc": "It reports the task version stated in the JSON specification." }, { "name": "answers", "type": { "type": "array", From 8d0fd0a5979d540571fe9e18cfdd35400dbe6928 Mon Sep 17 00:00:00 2001 From: Yatharth Ranjan Date: Tue, 27 Feb 2018 16:09:48 +0000 Subject: [PATCH 24/31] add recite text --- commons/active/opensmile/open_smile_2_audio_analysis.avsc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commons/active/opensmile/open_smile_2_audio_analysis.avsc b/commons/active/opensmile/open_smile_2_audio_analysis.avsc index 330d10ef..4f19f325 100644 --- a/commons/active/opensmile/open_smile_2_audio_analysis.avsc +++ b/commons/active/opensmile/open_smile_2_audio_analysis.avsc @@ -7,6 +7,7 @@ {"name": "time", "type": "double", "doc": "Device timestamp in UTC (s)."}, { "name": "timeCompleted", "type": "double", "doc": "Timestamp in UTC (s) when subject completed the audio questionnaire." }, {"name": "config", "type": "string", "doc": "Contents of an OpenSMILE configuration file." }, - {"name": "data", "type": ["null", "string"], "doc": "Audio features computed by openSMILE in plain text.", "default": null} + {"name": "data", "type": ["null", "string"], "doc": "Audio features computed by openSMILE in plain text.", "default": null}, + { "name": "reciteText", "type": ["null", "string"], "doc": "Text that was supposed to be recited as part of the recording.", "default": null } ] } From c1b224b76b4ca78e18e22eff2532fee37290acc1 Mon Sep 17 00:00:00 2001 From: Yatharth Ranjan Date: Tue, 27 Feb 2018 16:16:30 +0000 Subject: [PATCH 25/31] Use opensmile analysis schema for active audio --- specifications/active/aRMT-1.1.0.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specifications/active/aRMT-1.1.0.yml b/specifications/active/aRMT-1.1.0.yml index cc380c72..fb563beb 100644 --- a/specifications/active/aRMT-1.1.0.yml +++ b/specifications/active/aRMT-1.1.0.yml @@ -1100,4 +1100,4 @@ data: value: 3 - type: AUDIO topic: questionnaire_audio - value_schema: .active.opensmile.OpenSmile2AudioRecording + value_schema: .active.opensmile.OpenSmile2AudioAnalysis From 2046a98cb51a169cc43a6dd5dab79f60f267b4f0 Mon Sep 17 00:00:00 2001 From: Yatharth Ranjan Date: Tue, 27 Feb 2018 16:17:07 +0000 Subject: [PATCH 26/31] Remove new data from 1.0.0 --- specifications/active/aRMT-1.0.0.yml | 40 ---------------------------- 1 file changed, 40 deletions(-) diff --git a/specifications/active/aRMT-1.0.0.yml b/specifications/active/aRMT-1.0.0.yml index d65e9aeb..d67a17e1 100644 --- a/specifications/active/aRMT-1.0.0.yml +++ b/specifications/active/aRMT-1.0.0.yml @@ -6,46 +6,6 @@ version: 1.0.0 assessment_type: QUESTIONNAIRE doc: aRMT Questionnaires definition. Includes Personal Health Questionnaire Depression Scale (PHQ-8), Experience sampling method (ESM) and RSES. data: - - type: THINC-IT - topic: notification_thinc_it - value_schema: .active.notification.Notification - questions: - - lead: Time for Thinc-it - content: It's time to complete the Thinc-it app. - widget: INFO - - type: ROMBERG_TEST - topic: task_romberg_test - value_schema: .active.task.Task - questions: - - lead: Romberg's Test - content: It's time to complete the Thinc-it app. - widget: INFO - - lead: Romberg's Test - content: Keep your eyes open. - widget: TIMED - - lead: Romberg's Test - content: Close your eyes. - widget: TIMED - - type: 2MW_TEST - topic: task_2MW_test - value_schema: .active.task.Task - questions: - - lead: 2MW Test - content: Null - widget: INFO - - lead: 2MW Test - content: Walk back and forth. - widget: TIMED - - type: TANDEM_WALKING_TEST - topic: task_tandem_walking_test - value_schema: .active.task.Task - questions: - - lead: Tandem Walking Test - content: Null - widget: INFO - - lead: Tandem Walking Test - content: Null - widget: INFO - type: PHQ8 topic: questionnaire_phq8 value_schema: .active.questionnaire.Questionnaire From 65805e62651749ba645c410cdf64250c98b20e98 Mon Sep 17 00:00:00 2001 From: Yatharth Ranjan Date: Tue, 27 Feb 2018 16:17:37 +0000 Subject: [PATCH 27/31] Add new data to 1.1.0 --- specifications/active/aRMT-1.1.0.yml | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/specifications/active/aRMT-1.1.0.yml b/specifications/active/aRMT-1.1.0.yml index fb563beb..140e475d 100644 --- a/specifications/active/aRMT-1.1.0.yml +++ b/specifications/active/aRMT-1.1.0.yml @@ -6,6 +6,46 @@ version: 1.1.0 assessment_type: QUESTIONNAIRE doc: aRMT Questionnaires definition. Includes Personal Health Questionnaire Depression Scale (PHQ-8), Experience sampling method (ESM) and RSES. data: + - type: THINC-IT + topic: notification_thinc_it + value_schema: .active.notification.Notification + questions: + - lead: Time for Thinc-it + content: It's time to complete the Thinc-it app. + widget: INFO + - type: ROMBERG_TEST + topic: task_romberg_test + value_schema: .active.task.Task + questions: + - lead: Romberg's Test + content: It's time to complete the Thinc-it app. + widget: INFO + - lead: Romberg's Test + content: Keep your eyes open. + widget: TIMED + - lead: Romberg's Test + content: Close your eyes. + widget: TIMED + - type: 2MW_TEST + topic: task_2MW_test + value_schema: .active.task.Task + questions: + - lead: 2MW Test + content: Null + widget: INFO + - lead: 2MW Test + content: Walk back and forth. + widget: TIMED + - type: TANDEM_WALKING_TEST + topic: task_tandem_walking_test + value_schema: .active.task.Task + questions: + - lead: Tandem Walking Test + content: Null + widget: INFO + - lead: Tandem Walking Test + content: Null + widget: INFO - type: PHQ8 topic: questionnaire_phq8 value_schema: .active.questionnaire.Questionnaire From 3beccff5c0cd5d925bf92e6c5a56d5d86691a08a Mon Sep 17 00:00:00 2001 From: yatharthranjan Date: Tue, 27 Feb 2018 17:10:01 +0000 Subject: [PATCH 28/31] PMD fix --- specifications/active/aRMT-1.1.0.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specifications/active/aRMT-1.1.0.yml b/specifications/active/aRMT-1.1.0.yml index 2b48d7fd..0d65dc20 100644 --- a/specifications/active/aRMT-1.1.0.yml +++ b/specifications/active/aRMT-1.1.0.yml @@ -9,19 +9,19 @@ data: - type: THINC-IT topic: notification_thinc_it value_schema: .active.notification.Notification - questions_definition_url: https://github.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/blob/master/questionnaires/thinc_it/thinc_it_armt.json + questionnaire_definition_url: https://github.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/blob/master/questionnaires/thinc_it/thinc_it_armt.json - type: ROMBERG_TEST topic: task_romberg_test value_schema: .active.task.Task - questions_definition_url: https://github.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/blob/master/questionnaires/romberg_test/romberg_test_armt.json + questionnaire_definition_url: https://github.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/blob/master/questionnaires/romberg_test/romberg_test_armt.json - type: 2MW_TEST topic: task_2MW_test value_schema: .active.task.Task - questions_definition_url: https://github.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/blob/master/questionnaires/2MW_test/2MW_test_armt.json + questionnaire_definition_url: https://github.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/blob/master/questionnaires/2MW_test/2MW_test_armt.json - type: TANDEM_WALKING_TEST topic: task_tandem_walking_test value_schema: .active.task.Task - questions_definition_url: https://github.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/blob/master/questionnaires/tandem_walking_test/tandem_walking_test_armt.json + questionnaire_definition_url: https://github.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/blob/master/questionnaires/tandem_walking_test/tandem_walking_test_armt.json - type: PHQ8 topic: questionnaire_phq8 value_schema: .active.questionnaire.Questionnaire From 46cfecd31feca2c5667a674ea5b09d52e7fd41b3 Mon Sep 17 00:00:00 2001 From: Yatharth Ranjan Date: Wed, 28 Feb 2018 13:25:46 +0000 Subject: [PATCH 29/31] Change according to topic naming convention --- specifications/stream/statistics.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specifications/stream/statistics.yml b/specifications/stream/statistics.yml index a6bcdf26..680749be 100644 --- a/specifications/stream/statistics.yml +++ b/specifications/stream/statistics.yml @@ -6,7 +6,7 @@ data: - android_empatica_e4_blood_volume_pulse_1min value_schema: .stream.SourceStatistics doc: Statistics about E4 devices. - - topic: source_statistics_radar_prmt + - topic: source_statistics_android_phone input_topics: - android_phone_acceleration_1min - android_phone_bluetooth_devices From 8c83057dea15040978bdb5ef3eb468f94a484a55 Mon Sep 17 00:00:00 2001 From: yatharthranjan Date: Wed, 28 Feb 2018 15:10:48 +0000 Subject: [PATCH 30/31] Update active audio recording --- commons/active/opensmile/open_smile_2_audio_recording.avsc | 4 ++-- specifications/active/aRMT-1.1.0.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commons/active/opensmile/open_smile_2_audio_recording.avsc b/commons/active/opensmile/open_smile_2_audio_recording.avsc index 1604e13e..7ef37e5d 100644 --- a/commons/active/opensmile/open_smile_2_audio_recording.avsc +++ b/commons/active/opensmile/open_smile_2_audio_recording.avsc @@ -7,7 +7,7 @@ { "name": "time", "type": "double", "doc": "Device timestamp when the audio recording was started (s since the Unix Epoch)." }, { "name": "timeCompleted", "type": "double", "doc": "Device timestamp when the audio recording was completed (s since the Unix Epoch)." }, { "name": "mediaType", "type": "string", "doc": "Media type of the audio recording format. For example, audio/wav for a WAV recording. See https://www.iana.org/assignments/media-types/media-types.xhtml#audio for the list of standardized audio media types."}, - { "name": "data", "type": "bytes", "doc": "Raw contents of the recorded audio file." }, + { "name": "data", "type": "string", "doc": "Base64 encoded contents of the recorded audio file." }, { "name": "reciteText", "type": ["null", "string"], "doc": "Text that was supposed to be recited as part of the recording.", "default": null } ] -} \ No newline at end of file +} diff --git a/specifications/active/aRMT-1.1.0.yml b/specifications/active/aRMT-1.1.0.yml index 0d65dc20..7b974aa3 100644 --- a/specifications/active/aRMT-1.1.0.yml +++ b/specifications/active/aRMT-1.1.0.yml @@ -32,7 +32,7 @@ data: questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/esm/esm_armt.json - type: AUDIO topic: questionnaire_audio - value_schema: .active.opensmile.OpenSmile2AudioAnalysis + value_schema: .active.opensmile.OpenSmile2AudioRecording - type: RSES topic: questionnaire_rses value_schema: .active.questionnaire.Questionnaire From fcb90076c6c86e3de527eee2c2694c5d73962377 Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Thu, 1 Mar 2018 12:10:52 +0100 Subject: [PATCH 31/31] Bump version --- java-sdk/README.md | 6 +++--- java-sdk/build.gradle | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/java-sdk/README.md b/java-sdk/README.md index 525278f7..e451063a 100644 --- a/java-sdk/README.md +++ b/java-sdk/README.md @@ -9,13 +9,13 @@ repositories { dependencies { // Commons schemas (backend, passive remote monitoring app) - compile 'org.radarcns:radar-schemas-commons:0.3.1' + compile 'org.radarcns:radar-schemas-commons:0.3.2' // REST API schemas (REST API, testing) - compile 'org.radarcns:radar-schemas-restapi:0.3.1' + compile 'org.radarcns:radar-schemas-restapi:0.3.2' // Questionnaire schemas (active remote monitoring app) - compile 'org.radarcns:radar-schemas-tools:0.3.1' + compile 'org.radarcns:radar-schemas-tools:0.3.2' } ``` Usually, you only need to include the schemas you actually need in your dependencies. diff --git a/java-sdk/build.gradle b/java-sdk/build.gradle index ccd2471d..a837dc4a 100644 --- a/java-sdk/build.gradle +++ b/java-sdk/build.gradle @@ -17,7 +17,7 @@ subprojects { apply plugin: 'idea' // Configuration - version = '0.3.2-SNAPSHOT' + version = '0.3.2' group = 'org.radarcns' ext.githubRepoName = 'RADAR-CNS/RADAR-Schemas'