From cc81c8453d7c7c5067833f6c12a78b692ce100ee Mon Sep 17 00:00:00 2001 From: mpgxvii Date: Wed, 9 Nov 2022 14:03:45 +0000 Subject: [PATCH 01/12] Add ART questionnaire schemas --- specifications/active/aRMT-1.18.0.yml | 339 ++++++++++++++++++++++++++ 1 file changed, 339 insertions(+) create mode 100644 specifications/active/aRMT-1.18.0.yml diff --git a/specifications/active/aRMT-1.18.0.yml b/specifications/active/aRMT-1.18.0.yml new file mode 100644 index 00000000..fa29076e --- /dev/null +++ b/specifications/active/aRMT-1.18.0.yml @@ -0,0 +1,339 @@ +name: aRMT +vendor: RADAR +model: aRMT-App +version: 1.18.0 +assessment_type: QUESTIONNAIRE +doc: aRMT Questionnaires definition. Includes Personal Health Questionnaire Depression Scale (PHQ-8), Experience sampling method (ESM) and RSES and other data. +data: + - type: THINC_IT + topic: notification_thinc_it + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://github.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/blob/master/questionnaires/thinc_it/thinc_it_armt.json + - type: ROMBERG_TEST + doc: The value of the task is in milliseconds (ms). + topic: task_romberg_test + value_schema: .active.task.Task + questionnaire_definition_url: https://github.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/blob/master/questionnaires/romberg_test/romberg_test_armt.json + - type: 2MW_TEST + doc: The value of the task is in milliseconds (ms). + topic: task_2MW_test + value_schema: .active.task.Task + 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 + doc: The value of the task is in milliseconds (ms). + topic: task_tandem_walking_test + value_schema: .active.task.Task + 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 + 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 + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/esm/esm_armt.json + - type: AUDIO + doc: A speech questionnaire that contain two parts, a scripted text part where users will record themselves reading a text aloud, and an unscripted text part where users will record themselves answering a question. + topic: questionnaire_audio + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/audio/audio_armt.json + - type: AUDIO_2 + doc: A speech questionnaire that contain two parts, a scripted text part where users will record themselves reading a text aloud, and an unscripted text part where users will record themselves answering a question. + topic: questionnaire_audio + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/audio_2/audio_2_armt.json + - type: AUDIO_3 + doc: A speech questionnaire that contain two parts, a scripted text part where users will record themselves reading a text aloud, and an unscripted text part where users will record themselves answering a question. + topic: questionnaire_audio + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/audio_3/audio_3_armt.json + - type: AUDIO_4 + topic: questionnaire_audio + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/audio_4/audio_4_armt.json + - 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 + - type: PERCEIVED_DEFICITS_QUESTIONNAIRE + topic: questionnaire_perceived_deficits_questionnaire + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/perceived_deficits_questionnaire/perceived_deficits_questionnaire_armt.json + - type: PATIENT_DETERMINED_DISEASE_STEP + topic: questionnaire_patient_determined_disease_step + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/patient_determined_disease_step/patient_determined_disease_step_armt.json + - type: ESM28Q + topic: questionnaire_esm28q + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/esm28q/esm28q_armt.json + - type: BIPQ + topic: questionnaire_bipq + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/bipq/bipq_armt.json + - type: ESM_EPI_MOD_1 + topic: questionnaire_esm_epi_mod_1 + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/esm_epi_mod_1/esm_epi_mod_1_armt.json + - type: EVENING_ASSESSMENT + topic: questionnaire_evening_assessment + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/evening_assessment/evening_assessment_armt.json + - type: MORNING_ASSESSMENT + topic: questionnaire_morning_assessment + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/morning_assessment/morning_assessment_armt.json + - type: TAM + topic: questionnaire_tam + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/tam/tam_armt.json + - type: BAARS_IV + topic: questionnaire_baars_iv + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/baars_iv/baars_iv_armt.json + - type: ARI_SELF + topic: questionnaire_ari_self + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/ari_self/ari_self_armt.json + - type: GAD7 + topic: questionnaire_gad7 + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/gad7/gad7_armt.json + - type: RPQ + topic: questionnaire_rpq + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/rpq/rpq_armt.json + - type: ART_COGNITIVE_TEST + topic: questionnaire_art_cognitive_test + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/art_cognitive_test/art_cognitive_test_armt.json + - type: COVID19_DIAGNOSIS + topic: questionnaire_covid19_diagnosis + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/covid19_diagnosis/covid19_diagnosis_armt.json + - type: COVID19_SYMPTOMS + topic: questionnaire_covid19_symptoms + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/covid19_symptoms/covid19_symptoms_armt.json + - type: CNS_COVID19_BASELINE + topic: questionnaire_cns_covid19_baseline + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/cns_covid19_baseline/cns_covid19_baseline_armt.json + - type: CNS_COVID19_FOLLOWUP + topic: questionnaire_cns_covid19_followup + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/cns_covid19_followup/cns_covid19_followup_armt.json + - type: CNS_COVID19_FOLLOWUP_V2 + topic: questionnaire_cns_covid19_followup_v2 + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/cns_covid19_followup_v2/cns_covid19_followup_v2_armt.json + - type: CNS_COVID19_FOLLOWUP_V3 + topic: questionnaire_cns_covid19_followup_v3 + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/cns_covid19_followup_v3/cns_covid19_followup_v3_armt.json + - type: ART_COVID19_FOLLOWUP + topic: questionnaire_art_covid19_followup + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/art_covid19_followup/art_covid19_followup_armt.json + - type: ADHD_MEDICATION_USE + topic: questionnaire_adhd_medication_use + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/adhd_medication_use/adhd_medication_use_armt.json + - type: QIDS + topic: questionnaire_qids + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/qids/qids_armt.json + - type: WSAS + topic: questionnaire_wsas + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/wsas/wsas_armt.json + - type: SLEEP_QUESTIONS + topic: questionnaire_rapid_sleep_questions + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/sleep_questions/sleep_questions_armt.json + - type: AUDIO_WITHOUT_UNSCRIPTED + doc: A speech questionnaire similar to the AUDIO questionnaire but without the second unscripted task. + topic: questionnaire_audio_without_unscripted + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/audio_without_unscripted/audio_without_unscripted_armt.json + - type: AUDIO_WITHOUT_UNSCRIPTED_2 + doc: A speech questionnaire similar to the AUDIO questionnaire but without the second unscripted task. + topic: questionnaire_audio_without_unscripted_2 + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/audio_without_unscripted_2/audio_without_unscripted_armt.json + - type: AUDIO_WITHOUT_UNSCRIPTED_3 + doc: A speech questionnaire similar to the AUDIO questionnaire but without the second unscripted task. + topic: questionnaire_audio_without_unscripted_3 + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/audio_without_unscripted_3/audio_without_unscripted_armt.json + - type: CAT + topic: questionnaire_cat + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/cat/cat_armt.json + - type: PSQI + topic: questionnaire_psqi + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/psqi/psqi_armt.json + - type: FSS + topic: questionnaire_fss + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/fss/fss_armt.json + - type: PCFS + topic: questionnaire_pcfs + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/pcfs/pcfs_armt.json + - type: RALPMH_COVID_SYMPTOMS + topic: questionnaire_ralpmh_covid_symptoms + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/ralpmh_covid_symptoms/ralpmh_covid_symptoms_armt.json + - type: LIPF + topic: questionnaire_lipf + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/lipf/lipf_armt.json + - type: ERS + topic: questionnaire_ers + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/ers/ers_armt.json + - type: VAS + topic: questionnaire_vas + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/vas/vas_armt.json + - type: PULSE_OX + topic: questionnaire_pulse_ox + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/pulse_ox/pulse_ox_armt.json + - type: AUDIO_WITHOUT_UNSCRIPTED_4 + doc: A speech questionnaire that contains `The North Wind` scripted text where users will record themselves reading a text aloud. + topic: questionnaire_audio_without_unscripted_4 + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/audio_without_unscripted_4/audio_without_unscripted_4_armt.json + - type: AUDIO_COUNT + doc: A speech questionnaire where users will record themselves count from 1 to 20 aloud. + topic: questionnaire_audio_count + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/audio_count/audio_count_armt.json + - type: AUDIO_VOCALISATION + doc: A speech questionnaire where users will record themselves speak the vowels displayed on the screen aloud. + topic: questionnaire_audio_vocalisation + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/audio_vocalisation/audio_vocalisation_armt.json + - type: EXACERBATION_DIARY + topic: questionnaire_exacerbation_diary + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/exacerbation_diary/exacerbation_diary_armt.json + - type: NUVOAIR_SPIROMETRY + topic: notification_nuvoair_spirometry + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/nuvoair_spirometry/nuvoair_spirometry_armt.json + - type: K_BUILD_PRIVATE + topic: questionnaire_k_build_private + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions-Private/master/questionnaires/k_build_private/k_build_private_armt.json + - type: EPI_SEIZURE_DIARY + topic: questionnaire_epi_seizure_diary + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/epi_seizure_diary/epi_seizure_diary_armt.json + - type: EPI_EVENING_QUESTIONNAIRE + topic: questionnaire_epi_evening_questionnaire + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/epi_evening_questionnaire/epi_evening_questionnaire_armt.json + - type: EPI_WSAS + topic: questionnaire_epi_wsas + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/epi_wsas/epi_wsas_armt.json + - type: BP + topic: questionnaire_bp + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/bp/bp_armt.json + - type: HLH + topic: questionnaire_hlh + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/hlh/hlh_armt.json + - type: TECHNOLOGY_USAGE + topic: questionnaire_technology_usage + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/technology_usage/technology_usage_armt.json + - type: REGULAR_ACTIVITIES + topic: questionnaire_regular_activities + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/regular_activities/regular_activities_armt.json + - type: NONREGULAR_ACTIVITIES + topic: questionnaire_nonregular_activities + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/nonregular_activities/nonregular_activities_armt.json + - type: AUTISM_SYMPTOMS + topic: questionnaire_autism_symptoms + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/autism_symptoms/autism_symptoms_armt.json + - type: SLEEP_QUALITY_INFO + topic: questionnaire_sleep_quality + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/sleep_quality_info/sleep_quality_info_armt.json + - type: SLEEP_QUALITY + topic: questionnaire_sleep_quality + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/sleep_quality/sleep_quality_armt.json + - type: ADHD_SYMPTOMS + topic: questionnaire_adhd_symptoms + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/adhd_symptoms/adhd_symptoms_armt.json + - type: USER_FEEDBACK + topic: questionnaire_user_feedback + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/user_feedback/user_feedback_armt.json + - type: PROGRESS_REPORT_1 + topic: questionnaire_progress_report + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_1/progress_report_1_armt.json + - type: PROGRESS_REPORT_2 + topic: questionnaire_progress_report + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_2/progress_report_2_armt.json + - type: PROGRESS_REPORT_3 + topic: questionnaire_progress_report + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_3/progress_report_3_armt.json + - type: PROGRESS_REPORT_4 + topic: questionnaire_progress_report + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + - type: ADHD_PHQ8 + topic: questionnaire_adhd_phq8 + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + - type: RPQ_A + topic: questionnaire_rpq_a + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + - type: ADHD_MEDICATION_USE_DAILY + topic: questionnaire_adhd_medication_use_daily + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + - type: ADHD_MEDICATION_SIDE_EFFECTS + topic: questionnaire_adhd_medication_side_effects + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + - type: FND + topic: questionnaire_fnd + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + - type: AUDIT + topic: questionnaire_audit + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + - type: LTE + topic: questionnaire_lte + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + - type: MEDITERRANEAN_DIET_ADHERENCE + topic: questionnaire_mediterranean_diet_adherence + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + - type: WEIGHT_AND_WAIST_CIRCUMFERENCE + topic: questionnaire_weight_and_waist_circumference + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + - type: BLOOD_PRESSURE_MEASUREMENT + topic: questionnaire_blood_pressure_measurement + value_schema: .active.questionnaire.Questionnaire + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json From 1e84aa6bfb9cb1f5e4e42f8140835d435ad34c0d Mon Sep 17 00:00:00 2001 From: mpgxvii Date: Wed, 9 Nov 2022 15:12:19 +0000 Subject: [PATCH 02/12] Fix questionnaire urls --- specifications/active/aRMT-1.18.0.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/specifications/active/aRMT-1.18.0.yml b/specifications/active/aRMT-1.18.0.yml index fa29076e..437e73e0 100644 --- a/specifications/active/aRMT-1.18.0.yml +++ b/specifications/active/aRMT-1.18.0.yml @@ -300,40 +300,40 @@ data: - type: ADHD_PHQ8 topic: questionnaire_adhd_phq8 value_schema: .active.questionnaire.Questionnaire - questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/adhd_phq8/adhd_phq8_armt.json - type: RPQ_A topic: questionnaire_rpq_a value_schema: .active.questionnaire.Questionnaire - questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/rpq_a/rpq_a_armt.json - type: ADHD_MEDICATION_USE_DAILY topic: questionnaire_adhd_medication_use_daily value_schema: .active.questionnaire.Questionnaire - questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/adhd_medication_daily/adhd_medication_daily_armt.json - type: ADHD_MEDICATION_SIDE_EFFECTS topic: questionnaire_adhd_medication_side_effects value_schema: .active.questionnaire.Questionnaire - questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/adhd_medication_side_effects/adhd_medication_side_effects_armt.json - type: FND topic: questionnaire_fnd value_schema: .active.questionnaire.Questionnaire - questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/fnd/fnd_armt.json - type: AUDIT topic: questionnaire_audit value_schema: .active.questionnaire.Questionnaire - questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/audit/audit_armt.json - type: LTE topic: questionnaire_lte value_schema: .active.questionnaire.Questionnaire - questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/lte/lte_armt.json - type: MEDITERRANEAN_DIET_ADHERENCE topic: questionnaire_mediterranean_diet_adherence value_schema: .active.questionnaire.Questionnaire - questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/mediterranean_diet_adherence/mediterranean_diet_adherence_armt.json - type: WEIGHT_AND_WAIST_CIRCUMFERENCE topic: questionnaire_weight_and_waist_circumference value_schema: .active.questionnaire.Questionnaire - questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/weight_and_waist_circumference/weight_and_waist_circumference_armt.json - type: BLOOD_PRESSURE_MEASUREMENT topic: questionnaire_blood_pressure_measurement value_schema: .active.questionnaire.Questionnaire - questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/progress_report_4/progress_report_4_armt.json + questionnaire_definition_url: https://raw.githubusercontent.com/RADAR-base/RADAR-REDCap-aRMT-Definitions/master/questionnaires/blood_pressure_measurement/blood_pressure_measurement_armt.json From e90aa404ccf65d247baf95cc7dd20132be3ca7ae Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Wed, 30 Nov 2022 14:37:04 +0100 Subject: [PATCH 03/12] Bump dev version --- java-sdk/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-sdk/build.gradle.kts b/java-sdk/build.gradle.kts index 04e4a2ee..ebb198dd 100644 --- a/java-sdk/build.gradle.kts +++ b/java-sdk/build.gradle.kts @@ -9,7 +9,7 @@ plugins { } allprojects { - version = "0.8.2" + version = "0.8.3-SNAPSHOT" group = "org.radarbase" } From a21704cfa35919e377628266a5f58ca2acb7ab2c Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Mon, 6 Feb 2023 10:49:24 +0100 Subject: [PATCH 04/12] Reduce complexity of retrySequence --- .editorconfig | 2 +- .../schema/registration/KafkaTopics.kt | 42 ++++++++++++------- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/.editorconfig b/.editorconfig index a7b4c924..40e3f9b5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -19,6 +19,6 @@ trim_trailing_whitespace = false indent_size = 4 # Java -[*.java] +[*.{java,kt,kts}] indent_size = 4 continuation_indent_size = 8 diff --git a/java-sdk/radar-schemas-registration/src/main/java/org/radarbase/schema/registration/KafkaTopics.kt b/java-sdk/radar-schemas-registration/src/main/java/org/radarbase/schema/registration/KafkaTopics.kt index dc413dba..12fe11c1 100644 --- a/java-sdk/radar-schemas-registration/src/main/java/org/radarbase/schema/registration/KafkaTopics.kt +++ b/java-sdk/radar-schemas-registration/src/main/java/org/radarbase/schema/registration/KafkaTopics.kt @@ -269,23 +269,33 @@ class KafkaTopics( }) } - fun retrySequence(startSleep: Duration, maxSleep: Duration): Sequence { - return generateSequence(Pair(Duration.ZERO, Instant.now())) { (sleep, previousTime) -> - val nextSleep = if (sleep == Duration.ZERO) { - startSleep - } else { - val timeToSleep = Duration.between(previousTime + sleep, Instant.now()) - if (!timeToSleep.isNegative) { - val sleepMillis = timeToSleep.toMillis() - logger.info("Waiting {} seconds to retry", (sleepMillis / 100) / 10.0) - Thread.sleep(sleepMillis) - } - if (sleep < maxSleep) { - sleep.multipliedBy(2L).coerceAtMost(maxSleep) - } else sleep + fun retrySequence( + startSleep: Duration, + maxSleep: Duration, + ): Sequence = sequence { + var sleep = startSleep + + while (true) { + // All computation for the sequence will be done in yield. It should be excluded + // from sleep. + val endTime = Instant.now() + sleep + yield(sleep) + sleepUntil(endTime) { sleepMillis -> + logger.info("Waiting {} seconds to retry", (sleepMillis / 100) / 10.0) + } + if (sleep < maxSleep) { + sleep = sleep.multipliedBy(2L).coerceAtMost(maxSleep) } - Pair(nextSleep, Instant.now()) - }.map { (sleep, _) -> sleep } + } + } + + private inline fun sleepUntil(time: Instant, beforeSleep: (Long) -> Unit) { + val timeToSleep = Duration.between(time, Instant.now()) + if (!timeToSleep.isNegative) { + val sleepMillis = timeToSleep.toMillis() + beforeSleep(sleepMillis) + Thread.sleep(sleepMillis) + } } } } From 57bf5bb53005d764499ff1c10747693e768acc7f Mon Sep 17 00:00:00 2001 From: yatharthranjan Date: Tue, 21 Mar 2023 16:17:25 +0000 Subject: [PATCH 05/12] various updates for garmin schemas - Includes new Sleep score, Health snapshot and HRV data --- .../push/garmin/garmin_activity_details.avsc | 1 + .../push/garmin/garmin_activity_summary.avsc | 1 + .../garmin/garmin_blood_pressure_summary.avsc | 16 +++++++++++ commons/push/garmin/garmin_daily_summary.avsc | 2 +- .../garmin_health_snapshot_summary.avsc | 28 +++++++++++++++++++ .../garmin_heart_rate_variability_sample.avsc | 12 ++++++++ ...garmin_heart_rate_variability_summary.avsc | 16 +++++++++++ .../garmin/garmin_sleep_score_sample.avsc | 20 +++++++++++++ commons/push/garmin/garmin_sleep_summary.avsc | 4 ++- commons/push/garmin/garmin_user_metrics.avsc | 3 +- 10 files changed, 100 insertions(+), 3 deletions(-) create mode 100644 commons/push/garmin/garmin_blood_pressure_summary.avsc create mode 100644 commons/push/garmin/garmin_health_snapshot_summary.avsc create mode 100644 commons/push/garmin/garmin_heart_rate_variability_sample.avsc create mode 100644 commons/push/garmin/garmin_heart_rate_variability_summary.avsc create mode 100644 commons/push/garmin/garmin_sleep_score_sample.avsc diff --git a/commons/push/garmin/garmin_activity_details.avsc b/commons/push/garmin/garmin_activity_details.avsc index 7380fc38..81bc05db 100644 --- a/commons/push/garmin/garmin_activity_details.avsc +++ b/commons/push/garmin/garmin_activity_details.avsc @@ -7,6 +7,7 @@ {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "summaryId", "type": "string", "doc": "Unique identifier for the summary."}, + {"name": "activityId", "type": ["null", "string"], "doc": "Unique identifier of the activity at Garmin Connect.", "default": null}, {"name": "startTimeOffset", "type": ["null", "int"], "doc": "Offset in seconds to add to time to derive the 'local' time of the device that captured the data.", "default": null}, {"name": "activityType", "type": ["null", "string"], "doc": "Text description of the activity type. See Appendix A for a complete list. e.g - SEDENTARY, SLEEP, RUNNING, CYCLING, WALKING, etc.", "default": null}, {"name": "duration", "type": ["null", "int"], "doc": "Length of the monitoring period in seconds.", "default": null}, diff --git a/commons/push/garmin/garmin_activity_summary.avsc b/commons/push/garmin/garmin_activity_summary.avsc index 3e74ef59..1c9939eb 100644 --- a/commons/push/garmin/garmin_activity_summary.avsc +++ b/commons/push/garmin/garmin_activity_summary.avsc @@ -7,6 +7,7 @@ {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "summaryId", "type": "string", "doc": "Unique identifier for the summary."}, + {"name": "activityId", "type": ["null", "string"], "doc": "Unique identifier of the activity at Garmin Connect.", "default": null}, {"name": "startTimeOffset", "type": ["null", "int"], "doc": "Offset in seconds to add to time to derive the 'local' time of the device that captured the data.", "default": null}, {"name": "activityType", "type": ["null", "string"], "doc": "Text description of the activity type. e.g - SEDENTARY, SLEEP, RUNNING, CYCLING, WALKING, etc.", "default": null}, {"name": "duration", "type": ["null", "int"], "doc": "Length of the monitoring period in seconds. 86400 once a full day is complete, but less if a user syncs mid-day.", "default": null}, diff --git a/commons/push/garmin/garmin_blood_pressure_summary.avsc b/commons/push/garmin/garmin_blood_pressure_summary.avsc new file mode 100644 index 00000000..56b078c7 --- /dev/null +++ b/commons/push/garmin/garmin_blood_pressure_summary.avsc @@ -0,0 +1,16 @@ +{ + "namespace": "org.radarcns.push.garmin", + "name": "GarminBloodPressureSummary", + "type": "record", + "doc": "Blood pressure summaries offer data from blood pressure readings taken using an Index BPM device or from a user’s manually uploaded blood pressure data. This includes systolic, diastolic, and pulse values taken at the time of the blood pressure reading. For more information about the validation of data using the Index BPM, please visit https://www.garmin.com/en-US/bpmvalidation/.", + "fields": [ + {"name": "time", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "summaryId", "type": "string", "doc": "Unique identifier for the summary."}, + {"name": "date", "type": ["null", "string"], "doc": "The calendar date this summary would be displayed on in Garmin Connect in the local time zone of the device. The date format is ‘yyyy-mm-dd’.", "default": null}, + {"name": "systolic", "type": ["null", "int"], "doc": "The systolic value of the blood pressure reading.", "default": null}, + {"name": "diastolic", "type": ["null", "int"], "doc": "The diastolic value of the blood pressure reading.", "default": null}, + {"name": "pulse", "type": ["null", "int"], "doc": "Pulse rate at the time the blood pressure reading.", "default": null}, + {"name": "sourceType", "type": ["null", "string"], "doc": "This field is used to determine if blood pressure data was entered manually or synced from a Garmin Device. Possible values: MANUAL: The user entered blood pressure information manually through a web form. DEVICE: The user used a Garmin device to perform a blood pressure reading.", "default": null} + ] +} \ No newline at end of file diff --git a/commons/push/garmin/garmin_daily_summary.avsc b/commons/push/garmin/garmin_daily_summary.avsc index 0d16e5b7..64fab347 100644 --- a/commons/push/garmin/garmin_daily_summary.avsc +++ b/commons/push/garmin/garmin_daily_summary.avsc @@ -14,7 +14,7 @@ {"name": "steps", "type": ["null", "int"], "doc": "Count of steps recorded during the monitoring period.", "default": null}, {"name": "distance", "type": ["null", "float"], "doc": "Distance traveled in meters.", "default": null}, {"name": "activeTime", "type": ["null", "int"], "doc": "Portion of the monitoring period (in seconds) in which the device wearer was considered Active. This relies on heuristics internal to each device.", "default": null}, - {"name": "activeKilocalories", "type": ["null", "int"], "doc": "Active kilocalories (dietary calories) burned through actual movement and activity during the monitoring period.", "default": null}, + {"name": "activeKilocalories", "type": ["null", "int"], "doc": "Active kilocalories (dietary calories) burned through actual movement and activity during the monitoring period. This includes only the calories burned by the activity and not calories burned as part of the basal metabolic rate (BMR).", "default": null}, {"name": "bmrKilocalories", "type": ["null", "int"], "doc": "BMR Kilocalories burned by existing Basal Metabolic Rate (calculated based on user height/weight/age/other demographic data).", "default": null}, {"name": "consumedCalories", "type": ["null", "int"], "doc": "The number of calories that have been consumed by the user through food for that day (value subtracted from calorie goal). This value is received from MyFitnessPal and is not entered within Connect.", "default": null}, {"name": "moderateIntensityDuration", "type": ["null", "int"], "doc": "Cumulative duration of activities of moderate intensity, lasting at least 600 seconds at a time. Moderate intensity is defined as activity with MET value range 3-6.", "default": null}, diff --git a/commons/push/garmin/garmin_health_snapshot_summary.avsc b/commons/push/garmin/garmin_health_snapshot_summary.avsc new file mode 100644 index 00000000..43fbb526 --- /dev/null +++ b/commons/push/garmin/garmin_health_snapshot_summary.avsc @@ -0,0 +1,28 @@ +{ + "namespace": "org.radarcns.push.garmin", + "name": "GarminHealthSnapshotSummary", + "type": "record", + "doc": "The Garmin Health Snapshot is a collection of key health-related insights recorded during a two-minute session on a compatible device. Heart rate (HR), heart rate variability (HRV), Pulse Ox, respiration, and stress are the metrics included this summary, which collectively provide you a glimpse of your overall cardiovascular status. More information about Health Snapshot can be found at https://support.garmin.com/en-US/?faq=PB1duL5p6V64IQwhNvcRK9.", + "fields": [ + {"name": "time", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "summaryId", "type": "string", "doc": "Unique identifier for the summary."}, + {"name": "date", "type": ["null", "string"], "doc": "The calendar date this summary would be displayed on in Garmin Connect in the local time zone of the device. The date format is ‘yyyy-mm-dd’.", "default": null}, + {"name": "startTimeOffset", "type": ["null", "int"], "doc": "Offset in seconds to add to time to derive the 'local' time of the device that captured the data.", "default": null}, + {"name": "rmssdHrvAverage", "type": ["null", "float"], "doc": "Average value of RMSSD HRV for this snapshot. RMSSD stands for the root mean square of successive differences between normal heartbeats. Athletes often use this measurement to assess recovery status and training readiness.", "default": null}, + {"name": "sdrrHrvAverage", "type": ["null", "float"], "doc": "Average value of SDRR HRV for this snapshot. SDRR is the standard deviation in time between heartbeats, which is sometimes referred to as the 'RR interval.' It is a useful reading for getting a sense of overall cardiac health during regular daily activities.", "default": null}, + {"name": "heartRateAverage", "type": ["null", "float"], "doc": "Average value of Heart Rate for this snapshot.", "default": null}, + {"name": "heartRateMin", "type": ["null", "float"], "doc": "Minimum value of Heart Rate for this snapshot.", "default": null}, + {"name": "heartRateMax", "type": ["null", "float"], "doc": "Maximum value of Heart Rate for this snapshot.", "default": null}, + {"name": "respirationAverage", "type": ["null", "float"], "doc": "Average value of respiration rate for this snapshot.", "default": null}, + {"name": "respirationMin", "type": ["null", "float"], "doc": "Minimum value of respiration rate for this snapshot.", "default": null}, + {"name": "respirationMax", "type": ["null", "float"], "doc": "Maximum value of respiration rate for this snapshot.", "default": null}, + {"name": "stressAverage", "type": ["null", "float"], "doc": "Average value of stress for this snapshot.", "default": null}, + {"name": "stressMin", "type": ["null", "float"], "doc": "Minimum value of stress for this snapshot.", "default": null}, + {"name": "stressMax", "type": ["null", "float"], "doc": "Maximum value of stress for this snapshot.", "default": null}, + {"name": "spo2Average", "type": ["null", "float"], "doc": "Average value of pulse ox (spo2) for this snapshot.", "default": null}, + {"name": "spo2Min", "type": ["null", "float"], "doc": "Minimum value of pulse ox (spo2) for this snapshot.", "default": null}, + {"name": "spo2Max", "type": ["null", "float"], "doc": "Maximum value of pulse ox (spo2) for this snapshot.", "default": null}, + {"name": "duration", "type": ["null", "int"], "doc": "The duration of the measurement period in seconds.", "default": null} + ] +} \ No newline at end of file diff --git a/commons/push/garmin/garmin_heart_rate_variability_sample.avsc b/commons/push/garmin/garmin_heart_rate_variability_sample.avsc new file mode 100644 index 00000000..32477fbb --- /dev/null +++ b/commons/push/garmin/garmin_heart_rate_variability_sample.avsc @@ -0,0 +1,12 @@ +{ + "namespace": "org.radarcns.push.garmin", + "name": "GarminHeartRateVariabilitySample", + "type": "record", + "doc": "Mapping between time (in seconds) to a heart rate variability value recorded for the time, in milliseconds. Lack of entry for a given time should be interpreted as no data available. These are accompanied with the HRV summary data and can be associated using the summaryId.", + "fields": [ + {"name": "time", "type": "double", "doc": "Start time of the sample in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "timeReceived", "type": "double", "doc": "Time this sample was recieved by the push service in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "summaryId", "type": "string", "doc": "Unique identifier for the summary that this sample is associated with."}, + {"name": "hrvValue", "type": ["null", "float"], "doc": "The HRV value in milliseconds.", "default": null} + ] +} diff --git a/commons/push/garmin/garmin_heart_rate_variability_summary.avsc b/commons/push/garmin/garmin_heart_rate_variability_summary.avsc new file mode 100644 index 00000000..277580fd --- /dev/null +++ b/commons/push/garmin/garmin_heart_rate_variability_summary.avsc @@ -0,0 +1,16 @@ +{ + "namespace": "org.radarcns.push.garmin", + "name": "GarminHeartRateVariabilitySummary", + "type": "record", + "doc": "Heart rate variability (HRV) refers to beat-to-beat variations in heart rate and is data collected during the overnight sleep window for select devices. To gain a deeper understanding of your overall health, recovery and training performance through heart rate variability while you sleep, based on technology developed by our Firstbeat Analytics team, please visit https://discover.garmin.com/en-US/performance-data/running/#heart-rate-variability.", + "fields": [ + {"name": "time", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "summaryId", "type": "string", "doc": "Unique identifier for the summary."}, + {"name": "date", "type": ["null", "string"], "doc": "The calendar date this summary would be displayed on in Garmin Connect in the local time zone of the device. The date format is ‘yyyy-mm-dd’.", "default": null}, + {"name": "startTimeOffset", "type": ["null", "int"], "doc": "Offset in seconds to add to time to derive the 'local' time of the device that captured the data.", "default": null}, + {"name": "lastNightAvg", "type": ["null", "float"], "doc": "The average heart rate variability value from the last night of data.", "default": null}, + {"name": "lastNight5MinHigh", "type": ["null", "float"], "doc": "The maximum HRV value over any 5 minute interval of the last night of data.", "default": null}, + {"name": "duration", "type": ["null", "int"], "doc": "The duration of the measurement period in seconds.", "default": null} + ] +} \ No newline at end of file diff --git a/commons/push/garmin/garmin_sleep_score_sample.avsc b/commons/push/garmin/garmin_sleep_score_sample.avsc new file mode 100644 index 00000000..ed23dacb --- /dev/null +++ b/commons/push/garmin/garmin_sleep_score_sample.avsc @@ -0,0 +1,20 @@ +{ + "namespace": "org.radarcns.push.garmin", + "name": "GarminSleepScoreSample", + "type": "record", + "doc": "A map of sleep score string descriptions for each type of sleep as well as restless periods and stress levels during sleep. Each entry in the sleepScores will have a qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s period of sleep.", + "fields": [ + {"name": "time", "type": "double", "doc": "Start time of the sleep in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "summaryId", "type": "string", "doc": "Unique identifier for the summary."}, + {"name": "date", "type": ["null", "string"], "doc": "The calendar date this summary would be displayed on in Garmin Connect in the local time zone of the device. The date format is ‘yyyy-mm-dd’.", "default": null}, + {"name": "startTimeOffset", "type": ["null", "int"], "doc": "Offset in seconds to add to time to derive the 'local' time of the device that captured the data.", "default": null}, + {"name": "totalDurationScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s total duration of sleep.", "default": null}, + {"name": "stressScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s stress during the period of sleep.", "default": null}, + {"name": "awakeCountScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s awake count during the period of sleep.", "default": null}, + {"name": "remPercentageScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s REM sleep percentage during the period of sleep.", "default": null}, + {"name": "restlessnessScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s restlessness during the period of sleep.", "default": null}, + {"name": "lightPercentageScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s light sleep percentage during the period of sleep.", "default": null}, + {"name": "deepPercentageScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s deep slep percentage during the period of sleep.", "default": null} + ] +} \ No newline at end of file diff --git a/commons/push/garmin/garmin_sleep_summary.avsc b/commons/push/garmin/garmin_sleep_summary.avsc index 2bd79279..6fd14ad7 100644 --- a/commons/push/garmin/garmin_sleep_summary.avsc +++ b/commons/push/garmin/garmin_sleep_summary.avsc @@ -15,6 +15,8 @@ {"name": "lightSleepDuration", "type": ["null", "int"], "doc": "Time in seconds the user spent in light sleep during the sleep period.", "default": null}, {"name": "remSleepDuration", "type": ["null", "int"], "doc": "Time in seconds the user spent in REM sleep during the sleep period.", "default": null}, {"name": "awakeDuration", "type": ["null", "int"], "doc": "Time in seconds the user spent awake during the sleep period.", "default": null}, - {"name": "validation", "type": ["null", "string"], "doc": "String that relays the validation state of the sleep data and its date range. The data could be auto-confirmed, but the sleep window could have been manually adjusted, or the sleep data itself is entirely manually entered. Possible values: MANUAL: The user entered sleep start and stop times manually through a web form. There is no device data backing up the sleep assessment. DEVICE: The user used a device with the sleep feature to manually start and stop sleep. This type still requires manual user intervention to judge sleep start and stop. AUTO_TENTATIVE: The sleep start and stop times were auto-detected by Garmin Connect using accelerometer data. However, it is possible that further refinements to this sleep record will come later. This could be because the user is still asleep or could be because the user owns multiple devices and might sync another device later for this same time period. AUTO_FINAL: The sleep start and stop times were auto-detected by Garmin Connect, and enough data has been gathered to finalize the window. This status also indicates that the user only has one device so this record can never be updated again – users that own multiple devices will never get an AUTO_FINAL. AUTO_MANUAL: Sleep data was auto-detected by Garmin Connect, but the user is overriding the start and stop times or the user started with a manual entry and the sleep was auto-detected later. Garmin Connect stores both but will display the manual start and stop times in favor of the auto-detected times. ENHANCED_TENTATIVE: Sleep data was collected from a device capable of running an enhanced sleep analysis to detect REM sleep, but an updated sleep summary record may come later with further refinements or a greater sleep period. ENHANCED_FINAL: Sleep data was collected from a device capable of running an enhanced sleep analysis to detect REM sleep, and no further updates or refinements to this sleep analysis are expected.", "default": null} + {"name": "validation", "type": ["null", "string"], "doc": "String that relays the validation state of the sleep data and its date range. The data could be auto-confirmed, but the sleep window could have been manually adjusted, or the sleep data itself is entirely manually entered. Possible values: MANUAL: The user entered sleep start and stop times manually through a web form. There is no device data backing up the sleep assessment. DEVICE: The user used a device with the sleep feature to manually start and stop sleep. This type still requires manual user intervention to judge sleep start and stop. AUTO_TENTATIVE: The sleep start and stop times were auto-detected by Garmin Connect using accelerometer data. However, it is possible that further refinements to this sleep record will come later. This could be because the user is still asleep or could be because the user owns multiple devices and might sync another device later for this same time period. AUTO_FINAL: The sleep start and stop times were auto-detected by Garmin Connect, and enough data has been gathered to finalize the window. This status also indicates that the user only has one device so this record can never be updated again – users that own multiple devices will never get an AUTO_FINAL. AUTO_MANUAL: Sleep data was auto-detected by Garmin Connect, but the user is overriding the start and stop times or the user started with a manual entry and the sleep was auto-detected later. Garmin Connect stores both but will display the manual start and stop times in favor of the auto-detected times. ENHANCED_TENTATIVE: Sleep data was collected from a device capable of running an enhanced sleep analysis to detect REM sleep, but an updated sleep summary record may come later with further refinements or a greater sleep period. ENHANCED_FINAL: Sleep data was collected from a device capable of running an enhanced sleep analysis to detect REM sleep, and no further updates or refinements to this sleep analysis are expected.", "default": null}, + {"name": "overallSleepScoreValue", "type": ["null", "int"], "doc": "The quantitative value of the overall sleep score.", "default": null}, + {"name": "overallSleepScoreQualifier", "type": ["null", "string"], "doc": "The sleep scores will have a qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s period of sleep.", "default": null} ] } \ No newline at end of file diff --git a/commons/push/garmin/garmin_user_metrics.avsc b/commons/push/garmin/garmin_user_metrics.avsc index 516c9566..d21fbee4 100644 --- a/commons/push/garmin/garmin_user_metrics.avsc +++ b/commons/push/garmin/garmin_user_metrics.avsc @@ -9,6 +9,7 @@ {"name": "summaryId", "type": "string", "doc": "Unique identifier for the summary."}, {"name": "date", "type": ["null", "string"], "doc": "The calendar date this summary would be displayed on in Garmin Connect in the local time zone of the device. The date format is ‘yyyy-mm-dd’.", "default": null}, {"name": "vo2Max", "type": ["null", "float"], "doc": "An estimate of the maximum volume of oxygen (in milliliters) the user can consume per minute per kilogram of body weight at maximum performance.", "default": null}, - {"name": "fitnessAge", "type": ["null", "int"], "doc": "An estimation of the ‘age’ of the user’s fitness level, calculated by comparing internal fitness metrics with the average readings of biometrically similar users by age. For instance, a fitness age of 48 indicates that the user’s physical fitness is similar to that of an average 48- year-old person of the same gender.", "default": null} + {"name": "fitnessAge", "type": ["null", "int"], "doc": "An estimation of the ‘age’ of the user’s fitness level, calculated by comparing internal fitness metrics with the average readings of biometrically similar users by age. For instance, a fitness age of 48 indicates that the user’s physical fitness is similar to that of an average 48- year-old person of the same gender.", "default": null}, + {"name": "enhanced", "type": ["null", "boolean"], "doc": "When set to true, the Fitness Age provided has been calculated using a new algorithm (taking into account activity intensity, resting heart rate and body fat percentage or BMI). When set to false, the value provided for Fitness Age has been calculated using the older method of estimation. More information on the improved Fitness Age calculation and device compatibility can be found at https://support.garmin.com/en-US/?faq=CM1YJmMrrNAbEpM9PapJ07.", "default": null} ] } \ No newline at end of file From f288352d6366f13836e17543629d0264a85e4444 Mon Sep 17 00:00:00 2001 From: Yatharth Ranjan Date: Tue, 28 Mar 2023 12:47:37 +0100 Subject: [PATCH 06/12] Apply suggestions from code review Co-authored-by: Amos Folarin --- commons/push/garmin/garmin_health_snapshot_summary.avsc | 4 ++-- commons/push/garmin/garmin_sleep_score_sample.avsc | 2 +- commons/push/garmin/garmin_sleep_summary.avsc | 2 +- commons/push/garmin/garmin_user_metrics.avsc | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/commons/push/garmin/garmin_health_snapshot_summary.avsc b/commons/push/garmin/garmin_health_snapshot_summary.avsc index 43fbb526..2163557f 100644 --- a/commons/push/garmin/garmin_health_snapshot_summary.avsc +++ b/commons/push/garmin/garmin_health_snapshot_summary.avsc @@ -9,8 +9,8 @@ {"name": "summaryId", "type": "string", "doc": "Unique identifier for the summary."}, {"name": "date", "type": ["null", "string"], "doc": "The calendar date this summary would be displayed on in Garmin Connect in the local time zone of the device. The date format is ‘yyyy-mm-dd’.", "default": null}, {"name": "startTimeOffset", "type": ["null", "int"], "doc": "Offset in seconds to add to time to derive the 'local' time of the device that captured the data.", "default": null}, - {"name": "rmssdHrvAverage", "type": ["null", "float"], "doc": "Average value of RMSSD HRV for this snapshot. RMSSD stands for the root mean square of successive differences between normal heartbeats. Athletes often use this measurement to assess recovery status and training readiness.", "default": null}, - {"name": "sdrrHrvAverage", "type": ["null", "float"], "doc": "Average value of SDRR HRV for this snapshot. SDRR is the standard deviation in time between heartbeats, which is sometimes referred to as the 'RR interval.' It is a useful reading for getting a sense of overall cardiac health during regular daily activities.", "default": null}, + {"name": "rmssdHrvAverage", "type": ["null", "float"], "doc": "Average value of RMSSD HRV for this snapshot. RMSSD stands for the root mean square of successive differences between normal heartbeats.", "default": null}, + {"name": "sdrrHrvAverage", "type": ["null", "float"], "doc": "Average value of SDRR HRV for this snapshot. SDRR is the standard deviation in time between heartbeats, which is sometimes referred to as the 'RR interval'.", "default": null}, {"name": "heartRateAverage", "type": ["null", "float"], "doc": "Average value of Heart Rate for this snapshot.", "default": null}, {"name": "heartRateMin", "type": ["null", "float"], "doc": "Minimum value of Heart Rate for this snapshot.", "default": null}, {"name": "heartRateMax", "type": ["null", "float"], "doc": "Maximum value of Heart Rate for this snapshot.", "default": null}, diff --git a/commons/push/garmin/garmin_sleep_score_sample.avsc b/commons/push/garmin/garmin_sleep_score_sample.avsc index ed23dacb..b06c3742 100644 --- a/commons/push/garmin/garmin_sleep_score_sample.avsc +++ b/commons/push/garmin/garmin_sleep_score_sample.avsc @@ -9,7 +9,7 @@ {"name": "summaryId", "type": "string", "doc": "Unique identifier for the summary."}, {"name": "date", "type": ["null", "string"], "doc": "The calendar date this summary would be displayed on in Garmin Connect in the local time zone of the device. The date format is ‘yyyy-mm-dd’.", "default": null}, {"name": "startTimeOffset", "type": ["null", "int"], "doc": "Offset in seconds to add to time to derive the 'local' time of the device that captured the data.", "default": null}, - {"name": "totalDurationScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s total duration of sleep.", "default": null}, + {"name": "totalDurationScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR used as a qualitative description of the user’s total duration of sleep.", "default": null}, {"name": "stressScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s stress during the period of sleep.", "default": null}, {"name": "awakeCountScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s awake count during the period of sleep.", "default": null}, {"name": "remPercentageScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s REM sleep percentage during the period of sleep.", "default": null}, diff --git a/commons/push/garmin/garmin_sleep_summary.avsc b/commons/push/garmin/garmin_sleep_summary.avsc index 6fd14ad7..c3a3fc00 100644 --- a/commons/push/garmin/garmin_sleep_summary.avsc +++ b/commons/push/garmin/garmin_sleep_summary.avsc @@ -15,7 +15,7 @@ {"name": "lightSleepDuration", "type": ["null", "int"], "doc": "Time in seconds the user spent in light sleep during the sleep period.", "default": null}, {"name": "remSleepDuration", "type": ["null", "int"], "doc": "Time in seconds the user spent in REM sleep during the sleep period.", "default": null}, {"name": "awakeDuration", "type": ["null", "int"], "doc": "Time in seconds the user spent awake during the sleep period.", "default": null}, - {"name": "validation", "type": ["null", "string"], "doc": "String that relays the validation state of the sleep data and its date range. The data could be auto-confirmed, but the sleep window could have been manually adjusted, or the sleep data itself is entirely manually entered. Possible values: MANUAL: The user entered sleep start and stop times manually through a web form. There is no device data backing up the sleep assessment. DEVICE: The user used a device with the sleep feature to manually start and stop sleep. This type still requires manual user intervention to judge sleep start and stop. AUTO_TENTATIVE: The sleep start and stop times were auto-detected by Garmin Connect using accelerometer data. However, it is possible that further refinements to this sleep record will come later. This could be because the user is still asleep or could be because the user owns multiple devices and might sync another device later for this same time period. AUTO_FINAL: The sleep start and stop times were auto-detected by Garmin Connect, and enough data has been gathered to finalize the window. This status also indicates that the user only has one device so this record can never be updated again – users that own multiple devices will never get an AUTO_FINAL. AUTO_MANUAL: Sleep data was auto-detected by Garmin Connect, but the user is overriding the start and stop times or the user started with a manual entry and the sleep was auto-detected later. Garmin Connect stores both but will display the manual start and stop times in favor of the auto-detected times. ENHANCED_TENTATIVE: Sleep data was collected from a device capable of running an enhanced sleep analysis to detect REM sleep, but an updated sleep summary record may come later with further refinements or a greater sleep period. ENHANCED_FINAL: Sleep data was collected from a device capable of running an enhanced sleep analysis to detect REM sleep, and no further updates or refinements to this sleep analysis are expected.", "default": null}, + {"name": "validation", "type": ["null", "string"], "doc": "String that defines the validation state of the sleep data and its date range. The data could be auto-confirmed, but the sleep window could have been manually adjusted, or the sleep data itself is entirely manually entered. Possible values: MANUAL: The user entered sleep start and stop times manually through a web form. There is no device data backing up the sleep assessment. DEVICE: The user used a device with the sleep feature to manually start and stop sleep. This type still requires manual user intervention to specify sleep start and stop. AUTO_TENTATIVE: The sleep start and stop times were auto-detected by Garmin Connect using accelerometer data. However, refinements to this sleep record may come later. This could be because the user is still asleep or because the user owns multiple devices and might sync another device later for the same time period. AUTO_FINAL: The sleep start and stop times were auto-detected by Garmin Connect, and enough data has been gathered to finalize the window. This status also indicates that the user only has one device so this record can never be updated again – users that own multiple devices will never receive an AUTO_FINAL. AUTO_MANUAL: Sleep data was auto-detected by Garmin Connect, but the user is overriding the start and stop times or the user started with a manual entry and the sleep was auto-detected later. Garmin Connect stores both but will display the manual start and stop times in favor of the auto-detected times. ENHANCED_TENTATIVE: Sleep data was collected from a device capable of running an enhanced sleep analysis to detect REM sleep, but an updated sleep summary record may come later with further refinements or a greater sleep period. ENHANCED_FINAL: Sleep data was collected from a device capable of running an enhanced sleep analysis to detect REM sleep with no further updates.", "default": null}, {"name": "overallSleepScoreValue", "type": ["null", "int"], "doc": "The quantitative value of the overall sleep score.", "default": null}, {"name": "overallSleepScoreQualifier", "type": ["null", "string"], "doc": "The sleep scores will have a qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s period of sleep.", "default": null} ] diff --git a/commons/push/garmin/garmin_user_metrics.avsc b/commons/push/garmin/garmin_user_metrics.avsc index d21fbee4..d67fc045 100644 --- a/commons/push/garmin/garmin_user_metrics.avsc +++ b/commons/push/garmin/garmin_user_metrics.avsc @@ -9,7 +9,7 @@ {"name": "summaryId", "type": "string", "doc": "Unique identifier for the summary."}, {"name": "date", "type": ["null", "string"], "doc": "The calendar date this summary would be displayed on in Garmin Connect in the local time zone of the device. The date format is ‘yyyy-mm-dd’.", "default": null}, {"name": "vo2Max", "type": ["null", "float"], "doc": "An estimate of the maximum volume of oxygen (in milliliters) the user can consume per minute per kilogram of body weight at maximum performance.", "default": null}, - {"name": "fitnessAge", "type": ["null", "int"], "doc": "An estimation of the ‘age’ of the user’s fitness level, calculated by comparing internal fitness metrics with the average readings of biometrically similar users by age. For instance, a fitness age of 48 indicates that the user’s physical fitness is similar to that of an average 48- year-old person of the same gender.", "default": null}, + {"name": "fitnessAge", "type": ["null", "int"], "doc": "An estimation of the ‘age’ of the user’s fitness level, calculated by comparing internal fitness metrics with the average readings of biometrically average users of the same age and gender.", "default": null}, {"name": "enhanced", "type": ["null", "boolean"], "doc": "When set to true, the Fitness Age provided has been calculated using a new algorithm (taking into account activity intensity, resting heart rate and body fat percentage or BMI). When set to false, the value provided for Fitness Age has been calculated using the older method of estimation. More information on the improved Fitness Age calculation and device compatibility can be found at https://support.garmin.com/en-US/?faq=CM1YJmMrrNAbEpM9PapJ07.", "default": null} ] } \ No newline at end of file From f618747d90116d30a52d490ece1f3cecf175d110 Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Thu, 30 Mar 2023 11:38:34 +0200 Subject: [PATCH 07/12] Ensure that topics are listed when the cluster is down --- .../java/org/radarbase/schema/registration/KafkaTopics.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java-sdk/radar-schemas-registration/src/main/java/org/radarbase/schema/registration/KafkaTopics.kt b/java-sdk/radar-schemas-registration/src/main/java/org/radarbase/schema/registration/KafkaTopics.kt index 12fe11c1..1458ac47 100644 --- a/java-sdk/radar-schemas-registration/src/main/java/org/radarbase/schema/registration/KafkaTopics.kt +++ b/java-sdk/radar-schemas-registration/src/main/java/org/radarbase/schema/registration/KafkaTopics.kt @@ -59,14 +59,14 @@ class KafkaTopics( .nodes() .get(sleep.toSeconds(), TimeUnit.SECONDS) .size - } catch (ex: ExecutionException) { - logger.error("Failed to connect to bootstrap server {}", - kafkaProperties[BOOTSTRAP_SERVERS_CONFIG], ex.cause) - 0 } catch (ex: TimeoutException) { logger.error("Failed to connect to bootstrap server {} within {} seconds", kafkaProperties[BOOTSTRAP_SERVERS_CONFIG], sleep) 0 + } catch (ex: Throwable) { + logger.error("Failed to connect to bootstrap server {}", + kafkaProperties[BOOTSTRAP_SERVERS_CONFIG], ex.cause) + 0 } } .firstOrNull { numBrokers -> From bb451e846e2a124408bcf6cbc1f091c965456196 Mon Sep 17 00:00:00 2001 From: Joris Borgdorff Date: Thu, 30 Mar 2023 11:41:30 +0200 Subject: [PATCH 08/12] Further exception handling fixes --- .../radarbase/schema/registration/KafkaTopics.kt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/java-sdk/radar-schemas-registration/src/main/java/org/radarbase/schema/registration/KafkaTopics.kt b/java-sdk/radar-schemas-registration/src/main/java/org/radarbase/schema/registration/KafkaTopics.kt index 1458ac47..d41eea96 100644 --- a/java-sdk/radar-schemas-registration/src/main/java/org/radarbase/schema/registration/KafkaTopics.kt +++ b/java-sdk/radar-schemas-registration/src/main/java/org/radarbase/schema/registration/KafkaTopics.kt @@ -59,6 +59,9 @@ class KafkaTopics( .nodes() .get(sleep.toSeconds(), TimeUnit.SECONDS) .size + } catch (ex: InterruptedException) { + logger.error("Refreshing topics interrupted") + throw ex } catch (ex: TimeoutException) { logger.error("Failed to connect to bootstrap server {} within {} seconds", kafkaProperties[BOOTSTRAP_SERVERS_CONFIG], sleep) @@ -165,7 +168,7 @@ class KafkaTopics( topicConfig.replicationFactor ?: replication, ).configs(topicConfig.properties) } - .toList() + .collect(Collectors.toList()) if (newTopics.isNotEmpty()) { kafkaClient @@ -202,12 +205,15 @@ class KafkaTopics( .listTopics(opts) .names() .get(sleep.toSeconds(), TimeUnit.SECONDS) - } catch (ex: ExecutionException) { - logger.error("Failed to list topics from brokers: {}", ex.cause.toString()) - emptySet() } catch (ex: TimeoutException) { logger.error("Failed to list topics within {} seconds", sleep) emptySet() + } catch (ex: InterruptedException) { + logger.error("Refreshing topics interrupted") + throw ex + } catch (ex: Throwable) { + logger.error("Failed to list topics from brokers: {}", ex.cause.toString()) + emptySet() } } .firstOrNull { it.isNotEmpty() } From 99a37dcbb17305a3200603d8f7437b6db652bfb8 Mon Sep 17 00:00:00 2001 From: yatharthranjan Date: Thu, 13 Apr 2023 09:04:16 +0100 Subject: [PATCH 09/12] PR suggestion --- commons/push/garmin/garmin_sleep_score_sample.avsc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/commons/push/garmin/garmin_sleep_score_sample.avsc b/commons/push/garmin/garmin_sleep_score_sample.avsc index b06c3742..a2b3fdb5 100644 --- a/commons/push/garmin/garmin_sleep_score_sample.avsc +++ b/commons/push/garmin/garmin_sleep_score_sample.avsc @@ -10,11 +10,11 @@ {"name": "date", "type": ["null", "string"], "doc": "The calendar date this summary would be displayed on in Garmin Connect in the local time zone of the device. The date format is ‘yyyy-mm-dd’.", "default": null}, {"name": "startTimeOffset", "type": ["null", "int"], "doc": "Offset in seconds to add to time to derive the 'local' time of the device that captured the data.", "default": null}, {"name": "totalDurationScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR used as a qualitative description of the user’s total duration of sleep.", "default": null}, - {"name": "stressScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s stress during the period of sleep.", "default": null}, - {"name": "awakeCountScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s awake count during the period of sleep.", "default": null}, - {"name": "remPercentageScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s REM sleep percentage during the period of sleep.", "default": null}, - {"name": "restlessnessScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s restlessness during the period of sleep.", "default": null}, - {"name": "lightPercentageScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s light sleep percentage during the period of sleep.", "default": null}, - {"name": "deepPercentageScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s deep slep percentage during the period of sleep.", "default": null} + {"name": "stressScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR used as a qualitative description of the user’s stress during the period of sleep.", "default": null}, + {"name": "awakeCountScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR used as a qualitative description of the user’s awake count during the period of sleep.", "default": null}, + {"name": "remPercentageScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR used as a qualitative description of the user’s REM sleep percentage during the period of sleep.", "default": null}, + {"name": "restlessnessScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR used as a qualitative description of the user’s restlessness during the period of sleep.", "default": null}, + {"name": "lightPercentageScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR used as a qualitative description of the user’s light sleep percentage during the period of sleep.", "default": null}, + {"name": "deepPercentageScoreQualifier", "type": ["null", "string"], "doc": "A qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR used as a qualitative description of the user’s deep slep percentage during the period of sleep.", "default": null} ] } \ No newline at end of file From e0bb2e220941a5c28fd7dd2a1e106376d2d4fa67 Mon Sep 17 00:00:00 2001 From: Yatharth Ranjan Date: Fri, 5 May 2023 20:30:17 +0100 Subject: [PATCH 10/12] fix garmin blood pressure schema --- commons/push/garmin/garmin_blood_pressure_summary.avsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commons/push/garmin/garmin_blood_pressure_summary.avsc b/commons/push/garmin/garmin_blood_pressure_summary.avsc index 56b078c7..2817d28d 100644 --- a/commons/push/garmin/garmin_blood_pressure_summary.avsc +++ b/commons/push/garmin/garmin_blood_pressure_summary.avsc @@ -7,10 +7,10 @@ {"name": "time", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "summaryId", "type": "string", "doc": "Unique identifier for the summary."}, - {"name": "date", "type": ["null", "string"], "doc": "The calendar date this summary would be displayed on in Garmin Connect in the local time zone of the device. The date format is ‘yyyy-mm-dd’.", "default": null}, + {"name": "measurementTimeOffset", "type": ["null", "int"], "doc": "Offset in seconds to add to time to derive the 'local' time of the device that captured the data.", "default": null}, {"name": "systolic", "type": ["null", "int"], "doc": "The systolic value of the blood pressure reading.", "default": null}, {"name": "diastolic", "type": ["null", "int"], "doc": "The diastolic value of the blood pressure reading.", "default": null}, {"name": "pulse", "type": ["null", "int"], "doc": "Pulse rate at the time the blood pressure reading.", "default": null}, {"name": "sourceType", "type": ["null", "string"], "doc": "This field is used to determine if blood pressure data was entered manually or synced from a Garmin Device. Possible values: MANUAL: The user entered blood pressure information manually through a web form. DEVICE: The user used a Garmin device to perform a blood pressure reading.", "default": null} ] -} \ No newline at end of file +} From d427c66f14d4e473d9745d43b5b94b4578b81031 Mon Sep 17 00:00:00 2001 From: Yatharth Ranjan Date: Fri, 5 May 2023 20:41:24 +0100 Subject: [PATCH 11/12] release version --- java-sdk/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-sdk/build.gradle.kts b/java-sdk/build.gradle.kts index ebb198dd..c7308db7 100644 --- a/java-sdk/build.gradle.kts +++ b/java-sdk/build.gradle.kts @@ -9,7 +9,7 @@ plugins { } allprojects { - version = "0.8.3-SNAPSHOT" + version = "0.8.3" group = "org.radarbase" } From 4e6724cbf93646b11aca270f660ff978fd40bbdb Mon Sep 17 00:00:00 2001 From: Yatharth Ranjan Date: Fri, 5 May 2023 20:50:08 +0100 Subject: [PATCH 12/12] add new garmin data types to specifications --- .../push/radar-garmin-push-1.0.0.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/specifications/push/radar-garmin-push-1.0.0.yml b/specifications/push/radar-garmin-push-1.0.0.yml index f5ac7763..537d0dfa 100644 --- a/specifications/push/radar-garmin-push-1.0.0.yml +++ b/specifications/push/radar-garmin-push-1.0.0.yml @@ -51,4 +51,21 @@ data: value_schema: .push.garmin.GarminSleepLevel - doc: Stress levels are provided as 3-minute averages of the real-time stress scores generated on the device with values ranging from 1 to 100. A value of -1 means there was not enough data to detect stress, and -2 means there was too much motion (e.g. the user was walking or running). Scores between 1 and 25 are considered “rest” (i.e. not stressful), 26-50 as “low” stress, 51-75 “medium” stress, and 76- 100 as “high” stress. Usually assocaited with Stress Details Summary using the summaryId. topic: push_garmin_stress_level - value_schema: .push.garmin.GarminStressLevelSample \ No newline at end of file + value_schema: .push.garmin.GarminStressLevelSample + - doc: Blood pressure summaries offer data from blood pressure readings taken using an Index BPM device or from a user’s manually uploaded blood pressure data. This includes systolic, diastolic, and pulse values taken at the time of the blood pressure reading. For more information about the validation of data using the Index BPM, please visit https://www.garmin.com/en-US/bpmvalidation/. + topic: push_garmin_blood_pressure + value_schema: .push.garmin.GarminBloodPressureSummary + - doc: A map of sleep score string descriptions for each type of sleep as well as restless periods and stress levels during sleep. Each entry in the sleepScores will have a qualifierKey value of EXCELLENT, GOOD, FAIR, or POOR that is used as a qualitative description of the user’s period of sleep. + topic: push_garmin_sleep_score + value_schema: .push.garmin.GarminSleepScoreSample + - doc: The Garmin Health Snapshot is a collection of key health-related insights recorded during a two-minute session on a compatible device. Heart rate (HR), heart rate variability (HRV), Pulse Ox, respiration, and stress are the metrics included this summary, which collectively provide you a glimpse of your overall cardiovascular status. More information about Health Snapshot can be found at https://support.garmin.com/en-US/?faq=PB1duL5p6V64IQwhNvcRK9. + topic: push_garmin_health_snapshot_summary + value_schema: .push.garmin.GarminHealthSnapshotSummary + - doc: Heart rate variability (HRV) refers to beat-to-beat variations in heart rate and is data collected during the overnight sleep window for select devices. To gain a deeper understanding of your overall health, recovery and training performance through heart rate variability while you sleep, based on technology developed by our Firstbeat Analytics team, please visit https://discover.garmin.com/en-US/performance-data/running/#heart-rate-variability. + topic: push_garmin_heart_rate_variability + value_schema: .push.garmin.GarminHeartRateVariabilitySummary + - doc: Mapping between time (in seconds) to a heart rate variability value recorded for the time, in milliseconds. Lack of entry for a given time should be interpreted as no data available. These are accompanied with the HRV summary data and can be associated using the summaryId. + topic: push_garmin_heart_rate_variability_sample + value_schema: .push.garmin.GarminHeartRateVariabilitySample + +