diff --git a/commons/active/thincit/thinc_it_pdq.avsc b/commons/active/thincit/thinc_it_pdq.avsc
index f3bd1310..0a3ac060 100644
--- a/commons/active/thincit/thinc_it_pdq.avsc
+++ b/commons/active/thincit/thinc_it_pdq.avsc
@@ -7,7 +7,7 @@
{ "name": "time", "type": "double", "doc": "Timestamp in UTC (s) when the test is submitted to the subject." },
{ "name": "timeCompleted", "type": "double", "doc": "Timestamp in UTC (s) when the subject completes the test." },
{ "name": "score", "type": "int", "doc": "THINC-it index score - 0 to 4000." },
- { "name": "questionOne", "type": ["null",
+ { "name": "questionOne", "type":
{
"type": "enum",
"name": "ThincItPdqQuestion",
@@ -19,11 +19,11 @@
"OFTEN",
"VERYOFTEN"
]
- }], "doc": "PDQ5 Question 1.", "default": null},
- { "name": "questionTwo", "type": ["null", "ThincItPdqQuestion"], "doc": "PDQ5 Question 2.", "default": null},
- { "name": "questionThree", "type": ["null", "ThincItPdqQuestion"], "doc": "PDQ5 Question 3.", "default": null},
- { "name": "questionFour", "type": ["null", "ThincItPdqQuestion"], "doc": "PDQ5 Question 4.", "default": null},
- { "name": "questionFive", "type": ["null", "ThincItPdqQuestion"], "doc": "PDQ5 Question 5.", "default": null},
+ }, "doc": "PDQ5 Question 1."},
+ { "name": "questionTwo", "type": "ThincItPdqQuestion", "doc": "PDQ5 Question 2."},
+ { "name": "questionThree", "type": "ThincItPdqQuestion", "doc": "PDQ5 Question 3."},
+ { "name": "questionFour", "type": "ThincItPdqQuestion", "doc": "PDQ5 Question 4."},
+ { "name": "questionFive", "type": "ThincItPdqQuestion", "doc": "PDQ5 Question 5."},
{ "name": "appVersion", "type": "int", "doc": "App version." }
]
}
diff --git a/commons/connector/fitbit/fitbit_intraday_heart_rate.avsc b/commons/connector/fitbit/fitbit_intraday_heart_rate.avsc
new file mode 100644
index 00000000..a5ab056e
--- /dev/null
+++ b/commons/connector/fitbit/fitbit_intraday_heart_rate.avsc
@@ -0,0 +1,13 @@
+{
+ "namespace": "org.radarcns.connector.fitbit",
+ "type": "record",
+ "name": "FitbitIntradayHeartRate",
+ "doc": "Intra day heart rate data from fitbit device.",
+ "fields": [
+ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." },
+ { "name": "timeReceived", "type": "double", "doc": "Time that the data was received from the Fitbit API (seconds since the Unix Epoch)." },
+ { "name": "timeInterval", "type": "int", "doc": "Chronological window size (s)." },
+ { "name": "timezoneOffset", "type": "int", "doc": "Offset from UTC (s)." },
+ { "name": "heartRate", "type": "int", "doc":"Heart rate value (bpm)."}
+ ]
+}
diff --git a/commons/connector/fitbit/fitbit_intraday_steps.avsc b/commons/connector/fitbit/fitbit_intraday_steps.avsc
new file mode 100644
index 00000000..7d93fd14
--- /dev/null
+++ b/commons/connector/fitbit/fitbit_intraday_steps.avsc
@@ -0,0 +1,13 @@
+{
+ "namespace": "org.radarcns.connector.fitbit",
+ "type": "record",
+ "name": "FitbitIntradaySteps",
+ "doc": "Intra day steps data from fitbit device.",
+ "fields": [
+ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." },
+ { "name": "timeReceived", "type": "double", "doc": "Time that the data was received from the Fitbit API (seconds since the Unix Epoch)." },
+ { "name": "timeInterval", "type": "int", "doc": "Chronological window size (s)." },
+ { "name": "timezoneOffset", "type": "int", "doc": "Offset from UTC (s)." },
+ { "name": "steps", "type": "int", "doc":"Steps taken in this period."}
+ ]
+}
diff --git a/commons/connector/fitbit/fitbit_sleep_pattern.avsc b/commons/connector/fitbit/fitbit_sleep_pattern.avsc
new file mode 100644
index 00000000..cde19939
--- /dev/null
+++ b/commons/connector/fitbit/fitbit_sleep_pattern.avsc
@@ -0,0 +1,13 @@
+{
+ "namespace": "org.radarcns.connector.fitbit",
+ "type": "record",
+ "name": "FitbitSleepPattern",
+ "doc": "Classic sleep data as defined at https://dev.fitbit.com/build/reference/web-api/sleep/.",
+ "fields": [
+ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." },
+ { "name": "timeReceived", "type": "double", "doc": "Time that the data was received from the Fitbit API (seconds since the Unix Epoch)." },
+ { "name": "level", "type": "string", "doc": "Level of sleep, 'awake', 'restless', or 'asleep'." },
+ { "name": "timezoneOffset", "type": "int", "doc": "Offset from UTC (s)." },
+ { "name": "sleepDuration", "type": "int", "doc":"Duration at this sleep characteristic in seconds." }
+ ]
+}
diff --git a/commons/connector/fitbit/fitbit_sleep_stage.avsc b/commons/connector/fitbit/fitbit_sleep_stage.avsc
new file mode 100644
index 00000000..f408f521
--- /dev/null
+++ b/commons/connector/fitbit/fitbit_sleep_stage.avsc
@@ -0,0 +1,13 @@
+{
+ "namespace": "org.radarcns.connector.fitbit",
+ "type": "record",
+ "name": "FitbitSleepStage",
+ "doc": "Fitbit 'stages' sleep data as defined at https://dev.fitbit.com/build/reference/web-api/sleep/.",
+ "fields": [
+ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." },
+ { "name": "timeReceived", "type": "double", "doc": "Time that the data was received from the Fitbit API (seconds since the Unix Epoch)." },
+ { "name": "level", "type": "string", "doc": "Level of sleep, 'deep', 'light', 'rem', or 'awake'." },
+ { "name": "timezoneOffset", "type": "int", "doc": "Offset from UTC (s)." },
+ { "name": "sleepDuration", "type": "int", "doc":"Duration at this sleep characteristic in seconds." }
+ ]
+}
diff --git a/commons/monitor/questionnaire/questionnaire_completion_log.avsc b/commons/monitor/questionnaire/questionnaire_completion_log.avsc
new file mode 100644
index 00000000..5c9a7772
--- /dev/null
+++ b/commons/monitor/questionnaire/questionnaire_completion_log.avsc
@@ -0,0 +1,11 @@
+{
+ "namespace": "org.radarcns.monitor.questionnaire",
+ "type": "record",
+ "name": "QuestionnaireCompletionLog",
+ "doc": "Schema for reporting the completion status of a questionnaire. This will help in calculating the compliance.",
+ "fields": [
+ { "name": "time", "type": "double", "doc": "Timestamp in UTC (s) when the questionnaire completion log is submitted." },
+ { "name": "name", "type": "string", "doc": "Questionnaire name." },
+ { "name": "completionPercentage", "type": [ "null", "double"], "doc": "Percentage of the questionnaire completed. 0 for not at all complete and 100 for full completion. Null if no completion value possible." , "default": null }
+ ]
+}
diff --git a/java-sdk/build.gradle b/java-sdk/build.gradle
index a837dc4a..81cdc3c7 100644
--- a/java-sdk/build.gradle
+++ b/java-sdk/build.gradle
@@ -17,7 +17,7 @@ subprojects {
apply plugin: 'idea'
// Configuration
- version = '0.3.2'
+ version = '0.3.3'
group = 'org.radarcns'
ext.githubRepoName = 'RADAR-CNS/RADAR-Schemas'
diff --git a/java-sdk/radar-schemas-commons/src/main/java/org/radarcns/schema/Scope.java b/java-sdk/radar-schemas-commons/src/main/java/org/radarcns/schema/Scope.java
index c0e03357..a21c2411 100644
--- a/java-sdk/radar-schemas-commons/src/main/java/org/radarcns/schema/Scope.java
+++ b/java-sdk/radar-schemas-commons/src/main/java/org/radarcns/schema/Scope.java
@@ -5,7 +5,7 @@
import java.util.Locale;
public enum Scope {
- ACTIVE, KAFKA, CATALOGUE, MONITOR, PASSIVE, STREAM;
+ ACTIVE, KAFKA, CATALOGUE, MONITOR, PASSIVE, STREAM, CONNECTOR;
private final String lower;
diff --git a/java-sdk/radar-schemas-tools/config/pmd/ruleset.xml b/java-sdk/radar-schemas-tools/config/pmd/ruleset.xml
index 8821c0b9..d888e0dd 100644
--- a/java-sdk/radar-schemas-tools/config/pmd/ruleset.xml
+++ b/java-sdk/radar-schemas-tools/config/pmd/ruleset.xml
@@ -10,6 +10,7 @@
+
diff --git a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/CommandLineApp.java b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/CommandLineApp.java
index 992076b4..be7cb7b7 100644
--- a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/CommandLineApp.java
+++ b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/CommandLineApp.java
@@ -91,7 +91,8 @@ public List getRawTopics() {
return Stream.of(
catalogue.getPassiveSources(),
catalogue.getActiveSources(),
- catalogue.getMonitorSources())
+ catalogue.getMonitorSources(),
+ catalogue.getConnectorSources())
.flatMap(map -> map.values().stream())
.flatMap(DataProducer::getTopicNames)
.sorted()
diff --git a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/registration/SchemaRegistry.java b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/registration/SchemaRegistry.java
index b0d68817..e85f5ac8 100644
--- a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/registration/SchemaRegistry.java
+++ b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/registration/SchemaRegistry.java
@@ -44,7 +44,6 @@
import java.net.MalformedURLException;
import java.util.Optional;
import java.util.regex.Pattern;
-import java.util.stream.Stream;
import static org.radarcns.schema.CommandLineApp.matchTopic;
@@ -73,16 +72,13 @@ public SchemaRegistry(String baseUrl) throws MalformedURLException {
}
/**
- * Register all schemas in a source catalogue. Stream sources are ignored.
+ * Register all schemas in a source catalogue. Stream and connector sources are ignored.
* @param catalogue schema catalogue to read schemas from
* @return whether all schemas were successfully registered.
*/
public boolean registerSchemas(SourceCatalogue catalogue) {
- return Stream.of(
- catalogue.getActiveSources(),
- catalogue.getPassiveSources(),
- catalogue.getMonitorSources())
- .flatMap(m -> m.values().stream())
+ return catalogue.getSources().stream()
+ .filter(DataProducer::doRegisterSchema)
.flatMap(DataProducer::getTopics)
.allMatch(this::registerSchema);
}
diff --git a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/DataProducer.java b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/DataProducer.java
index 2484de24..5bbc4739 100644
--- a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/DataProducer.java
+++ b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/DataProducer.java
@@ -13,6 +13,10 @@
import static org.radarcns.schema.util.Utils.applyOrEmpty;
+/**
+ * A producer of data to Kafka, generally mapping to a source.
+ * @param type of data that is produced.
+ */
public abstract class DataProducer {
@JsonProperty @NotBlank
private String name;
@@ -26,6 +30,14 @@ public abstract class DataProducer {
@JsonProperty
private List labels;
+ /**
+ * If true, register the schema during kafka initialization, otherwise, the producer should do
+ * that itself. The default is true, set in the constructor of subclasses to use a different
+ * default.
+ */
+ @JsonProperty("register_schema")
+ protected boolean registerSchema = true;
+
public String getName() {
return name;
}
@@ -56,6 +68,9 @@ public Stream getTopicNames() {
return getData().stream().flatMap(applyOrEmpty(DataTopic::getTopics));
}
+ public boolean doRegisterSchema() {
+ return registerSchema;
+ }
@Override
public boolean equals(Object o) {
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 8a21aa6f..b1c870ec 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
@@ -24,6 +24,7 @@
import java.nio.file.InvalidPathException;
import org.radarcns.schema.Scope;
import org.radarcns.schema.specification.active.ActiveSource;
+import org.radarcns.schema.specification.connector.ConnectorSource;
import org.radarcns.schema.specification.stream.StreamGroup;
import org.radarcns.schema.specification.monitor.MonitorSource;
import org.radarcns.schema.specification.passive.PassiveSource;
@@ -59,6 +60,7 @@ public class SourceCatalogue {
private final Map> activeSources;
private final Map monitorSources;
private final Map passiveSources;
+ private final Map connectorSources;
private final Map streamGroups;
private final Set> sources;
@@ -67,11 +69,13 @@ public class SourceCatalogue {
SourceCatalogue(Map> activeSources,
Map monitorSources,
Map passiveSources,
- Map streamGroups) {
+ Map streamGroups,
+ Map connectorSources) {
this.activeSources = activeSources;
this.monitorSources = monitorSources;
this.passiveSources = passiveSources;
this.streamGroups = streamGroups;
+ this.connectorSources = connectorSources;
sources = new HashSet<>();
@@ -79,6 +83,7 @@ public class SourceCatalogue {
sources.addAll(monitorSources.values());
sources.addAll(passiveSources.values());
sources.addAll(streamGroups.values());
+ sources.addAll(connectorSources.values());
}
/**
@@ -107,7 +112,8 @@ public static SourceCatalogue load(Path root) throws IOException {
initSources(mapper.readerFor(ActiveSource.class), specRoot, Scope.ACTIVE),
initSources(mapper.readerFor(MonitorSource.class), specRoot, Scope.MONITOR),
initSources(mapper.readerFor(PassiveSource.class), specRoot, Scope.PASSIVE),
- initSources(mapper.readerFor(StreamGroup.class), specRoot, Scope.STREAM));
+ initSources(mapper.readerFor(StreamGroup.class), specRoot, Scope.STREAM),
+ initSources(mapper.readerFor(ConnectorSource.class), specRoot, Scope.CONNECTOR));
}
private static Map initSources(ObjectReader reader, Path root, Scope scope)
@@ -207,6 +213,14 @@ public Stream getTopicNames() {
.flatMap(DataProducer::getTopicNames);
}
+ /**
+ * TODO.
+ * @return TODO
+ */
+ public Map getConnectorSources() {
+ return connectorSources;
+ }
+
/** Get all topics in the catalogue. */
public Stream> getTopics() {
return sources.stream()
diff --git a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/connector/ConnectorSource.java b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/connector/ConnectorSource.java
new file mode 100644
index 00000000..5daf47ff
--- /dev/null
+++ b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/connector/ConnectorSource.java
@@ -0,0 +1,32 @@
+package org.radarcns.schema.specification.connector;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.radarcns.schema.Scope;
+import org.radarcns.schema.specification.DataProducer;
+import org.radarcns.schema.specification.DataTopic;
+
+import java.util.List;
+
+/**
+ * Data producer for third-party connectors. This data topic does not register schemas to the schema
+ * registry by default, since Kafka Connect will do that itself. To enable auto-registration, set
+ * the {@code register_schema} property to {@code true}.
+ */
+public class ConnectorSource extends DataProducer {
+ @JsonProperty
+ private List data;
+
+ public ConnectorSource() {
+ registerSchema = false;
+ }
+
+ @Override
+ public List getData() {
+ return data;
+ }
+
+ @Override
+ public Scope getScope() {
+ return Scope.CONNECTOR;
+ }
+}
diff --git a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/stream/StreamDataTopic.java b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/stream/StreamDataTopic.java
index 40e892b7..6b47415a 100644
--- a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/stream/StreamDataTopic.java
+++ b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/stream/StreamDataTopic.java
@@ -17,8 +17,10 @@
import org.radarcns.stream.TimeWindowMetadata;
import org.radarcns.topic.AvroTopic;
+/**
+ * Topic used for Kafka Streams.
+ */
public class StreamDataTopic extends DataTopic {
-
/** Whether the stream is a windowed stream with standard TimeWindow windows. */
@JsonProperty
private boolean windowed = false;
diff --git a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/stream/StreamGroup.java b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/stream/StreamGroup.java
index 4dfcdc8f..048c8924 100644
--- a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/stream/StreamGroup.java
+++ b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/specification/stream/StreamGroup.java
@@ -8,6 +8,11 @@
import java.util.List;
import java.util.stream.Stream;
+/**
+ * Data producer for Kafka Streams. This data topic does not register schemas to the schema registry
+ * by default, since Kafka Streams will do that itself. To disable this, set the
+ * {@code register_schema} property to {@code true}.
+ */
public class StreamGroup extends DataProducer {
@JsonProperty @NotEmpty
private List data;
@@ -15,6 +20,10 @@ public class StreamGroup extends DataProducer {
@JsonProperty
private String master;
+ public StreamGroup() {
+ registerSchema = false;
+ }
+
@Override
public List getData() {
return data;
diff --git a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/validation/rules/SchemaRules.java b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/validation/rules/SchemaRules.java
index d9bd97ff..818bf8da 100644
--- a/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/validation/rules/SchemaRules.java
+++ b/java-sdk/radar-schemas-tools/src/main/java/org/radarcns/schema/validation/rules/SchemaRules.java
@@ -9,19 +9,29 @@
public interface SchemaRules {
SchemaFieldRules getFieldRules();
- /** Checks that schemas are unique compared to already validated schemas. */
+ /**
+ * Checks that schemas are unique compared to already validated schemas.
+ */
Validator validateUniqueness();
- /** Checks schema namespace format. */
+ /**
+ * Checks schema namespace format.
+ */
Validator validateNameSpace();
- /** Checks schema name format. */
+ /**
+ * Checks schema name format.
+ */
Validator validateName();
- /** Checks schema documentation presence and format. */
+ /**
+ * Checks schema documentation presence and format.
+ */
Validator validateSchemaDocumentation();
- /** Checks that the symbols of enums have the required format. */
+ /**
+ * Checks that the symbols of enums have the required format.
+ */
Validator validateSymbols();
/**
@@ -49,7 +59,9 @@ public interface SchemaRules {
*/
Validator validateNotTimeReceived();
- /** Validate an enum. */
+ /**
+ * Validate an enum.
+ */
default Validator validateEnum() {
return validateUniqueness()
.and(validateNameSpace())
@@ -58,7 +70,9 @@ default Validator validateEnum() {
.and(validateName());
}
- /** Validate a record that is defined inline. */
+ /**
+ * Validate a record that is defined inline.
+ */
default Validator validateRecord() {
return validateUniqueness()
.and(validateNameSpace())
@@ -69,6 +83,7 @@ default Validator validateRecord() {
/**
* Validates record schemas of an active source.
+ *
* @return TODO
*/
default Validator validateActiveSource() {
@@ -80,6 +95,7 @@ default Validator validateActiveSource() {
/**
* Validates schemas of monitor sources.
+ *
* @return TODO
*/
default Validator validateMonitor() {
diff --git a/java-sdk/radar-schemas-tools/src/test/java/org/radarcns/schema/validation/SourceCatalogueValidation.java b/java-sdk/radar-schemas-tools/src/test/java/org/radarcns/schema/validation/SourceCatalogueValidation.java
index 84cfc456..1ac20acb 100644
--- a/java-sdk/radar-schemas-tools/src/test/java/org/radarcns/schema/validation/SourceCatalogueValidation.java
+++ b/java-sdk/radar-schemas-tools/src/test/java/org/radarcns/schema/validation/SourceCatalogueValidation.java
@@ -54,7 +54,8 @@ public void validateTopics() {
catalogue.getActiveSources(),
catalogue.getMonitorSources(),
catalogue.getPassiveSources(),
- catalogue.getStreamGroups())
+ catalogue.getStreamGroups(),
+ catalogue.getConnectorSources())
.flatMap(map -> map.values().stream())
.flatMap(DataProducer::getTopicNames)
.sorted()
diff --git a/specifications/active/aRMT-1.2.0.yml b/specifications/active/aRMT-1.2.0.yml
new file mode 100644
index 00000000..d150726a
--- /dev/null
+++ b/specifications/active/aRMT-1.2.0.yml
@@ -0,0 +1,41 @@
+name: aRMT
+vendor: RADAR
+model: aRMT-App
+version: 1.2.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.notification.Notification
+ 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
+ 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
+ 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
+ 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
+ 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
+ - type: COMPLETION_LOG
+ topic: questionnaire_completion_log
+ value_schema: .monitor.questionnaire.QuestionnaireCompletionLog
diff --git a/specifications/connector/radar-fitbit-connector.yml b/specifications/connector/radar-fitbit-connector.yml
new file mode 100644
index 00000000..ff08e6a3
--- /dev/null
+++ b/specifications/connector/radar-fitbit-connector.yml
@@ -0,0 +1,15 @@
+name: RADAR-FITBIT-CONNECTOR
+doc: Spec for Radar fitbit connector. Schemas should be registered in the connector.
+data:
+ - doc: The intraday time series for heart rate.
+ topic: fitbit_intraday_heart_rate
+ value_schema: .connector.fitbit.FitbitIntradayHeartRate
+ - doc: The intraday time series for Steps.
+ topic: fitbit_intraday_steps
+ value_schema: .connector.fitbit.FitbitIntradaySteps
+ - doc: Sleep data with 60-second granularity. 'Sleep Pattern' levels include asleep, restless, and awake.
+ topic: fitbit_sleep_pattern
+ value_schema: .connector.fitbit.FitbitSleepPattern
+ - doc: Sleep data with 30-second granularity. 'Sleep Stages' levels include deep, light, rem, and wake.
+ topic: fitbit_sleep_stage
+ value_schema: .connector.fitbit.FitbitSleepStage
diff --git a/specifications/stream/android_phone.yml b/specifications/stream/android_phone.yml
index 910ff5a2..7a0c627e 100644
--- a/specifications/stream/android_phone.yml
+++ b/specifications/stream/android_phone.yml
@@ -7,7 +7,8 @@ data:
windowed: true
- input_topic: android_phone_usage_event
value_schema: .passive.phone.PhoneUsageEvent
- - input_topic: android_phone_usage_event_output
+ - topic: android_phone_usage_event_aggregated
+ input_topic: android_phone_usage_event_output
value_schema: .stream.aggregator.PhoneUsageAggregate
windowed: true
- input_topic: android_phone_battery_level