Open bardram opened 1 month ago
Seems like the survey
data type is not even part of the data being collected for upload to the data stream service. Here is the list of data type being collected for upload, and survey
is not part of this list:
[log] [CAMS DEBUG] CarpDataManager - Starting upload of data batches...
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Primary Phone' and data type 'dk.cachet.carp.heartbeat'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Primary Phone' and data type 'dk.cachet.carp.error'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Primary Phone' and data type 'dk.cachet.carp.triggeredtask'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Primary Phone' and data type 'dk.cachet.carp.completedtask'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Location Service' and data type 'dk.cachet.carp.heartbeat'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Location Service' and data type 'dk.cachet.carp.triggeredtask'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Location Service' and data type 'dk.cachet.carp.completedtask'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Weather Service' and data type 'dk.cachet.carp.heartbeat'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Weather Service' and data type 'dk.cachet.carp.triggeredtask'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Weather Service' and data type 'dk.cachet.carp.completedtask'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Air Quality Service' and data type 'dk.cachet.carp.heartbeat'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Air Quality Service' and data type 'dk.cachet.carp.triggeredtask'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Air Quality Service' and data type 'dk.cachet.carp.completedtask'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Primary Phone' and data type 'dk.cachet.carp.ambientlight'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Primary Phone' and data type 'dk.cachet.carp.stepcount'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Primary Phone' and data type 'dk.cachet.carp.freememory'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Primary Phone' and data type 'dk.cachet.carp.deviceinformation'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Primary Phone' and data type 'dk.cachet.carp.batterystate'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Primary Phone' and data type 'dk.cachet.carp.screenevent'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Primary Phone' and data type 'dk.cachet.carp.activity'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Location Service' and data type 'dk.cachet.carp.location'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Location Service' and data type 'dk.cachet.carp.mobility'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Weather Service' and data type 'dk.cachet.carp.weather'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Air Quality Service' and data type 'dk.cachet.carp.airquality'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Polar HR Sensor' and data type 'dk.cachet.carp.heartbeat'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Polar HR Sensor' and data type 'dk.cachet.carp.triggeredtask'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Polar HR Sensor' and data type 'dk.cachet.carp.completedtask'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Polar HR Sensor' and data type 'dk.cachet.carp.polar.hr'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Polar HR Sensor' and data type 'dk.cachet.carp.polar.ecg'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Primary Phone' and data type 'dk.cachet.carp.currentlocation'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Primary Phone' and data type 'dk.cachet.carp.weather'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Primary Phone' and data type 'dk.cachet.carp.location'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Primary Phone' and data type 'dk.cachet.carp.audio'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Primary Phone' and data type 'dk.cachet.carp.image'.
Seems like the
survey
data type is not even part of the data being collected for upload to the data stream service. Here is the list of data type being collected for upload, andsurvey
is not part of this list:This is because the
survey
data type is not part of the list ofmeasures
to collect. And this is because it is part of anAppTask
and not in the measure list.
There is also an issue that the JSON uploaded, is the old snake_case
JSON from Research Package (and not camelCase
). We need to update to the latest version of RP....
Survey data also seems to be stored twice in the local DB:
[log] [CAMS DEBUG] SQLiteDataManager - wrote measurement to SQLite - id: 20, type: dk.cachet.carp.survey, device role name: Primary Phone.
[log] [CAMS DEBUG] SQLiteDataManager - wrote measurement to SQLite - id: 21, type: dk.cachet.carp.survey, device role name: Primary Phone.
Not all survey data is part of the data downloaded from CAWS.
Note that this is using the "compressed" endpoint.
Here is what I upload as a survey data point:
And here is the same data point (check the time stamp in sensorStartTime
) when downloaded from CAWS:
It seems like we are not uploading the full survey data - this is what is uploaded when not using the compressed end point. As can be seen, the survey data is missing.
{
"dataStream": {
"studyDeploymentId": "b8b4bf38-5026-417f-bd2f-218fa704b4f7",
"deviceRoleName": "Primary Phone",
"dataType": "dk.cachet.carp.survey"
},
"firstSequenceId": 63,
"measurements": [
{
"sensorStartTime": 1729778311577814,
"data": {
"__type": "dk.cachet.carp.survey",
"surveyResult": {
"identifier": "symptoms_survey",
"startDate": "2024-10-24T15:58:31.577394",
"results": {
"sym_1": {
"identifier": "sym_1",
"startDate": "2024-10-24T15:58:31.577492",
"endDate": "2024-10-24T15:58:31.577541"
}
}
}
}
},
{
"sensorStartTime": 1729778311577814,
"data": {
"__type": "dk.cachet.carp.survey",
"surveyResult": {
"identifier": "symptoms_survey",
"startDate": "2024-10-24T15:58:31.577394",
"results": {
"sym_1": {
"identifier": "sym_1",
"startDate": "2024-10-24T15:58:31.577492",
"endDate": "2024-10-24T15:58:31.577541"
}
}
}
}
}
],
"triggerIds": [
10,
13
]
}
It seems like we are not uploading the full survey data - this is what is uploaded when not using the compressed end point.
This was because the result objects in RP - RPResult
- was not done using polymorphic serialization. Fixed in v. 1.7.2
Survey data is not available on when downloading data from CAWS.
The only thing available is the
completedTask
of a survey task, like this:which does not contain the result of the survey either.
This can be caused by several things: