mPower Visualization
Nightly Precompute Job
Owner: Chris Bare
JIRA:
Nightly job to read the data from Synapse and pre-compute the visualization data for all PD users (non-control, on meds).
This job should run nightly after Bridge-EX. Bridge-EX runs at 10am UTC (2am PDT, 3am PST) and takes about 15 minutes. This job should run after that.
The data will be written to Bridge. See next section for Bridge API and data format.
Bridge should be called with yesterday's date. (For example, if you're running the nightly job in the morning of 2016-02-10, you're processing 2016-02-09's data, so you should call Bridge with date 2016-02-09.)
OPEN QUESTION: We don't have an R or Python client for Bridge Server. Will the Precompute Job call the REST API directly? Or should we write the Precompute Job in Java so we can use the Java SDK? Or should we take a different approach to writing visualization data to Bridge?
Bridge API
Owner: Dwayne Jeng
JIRA(s):
Write mPower Visualization Data
URL: POST /parkinson/visualization
Body:
{
"healthCode":"d9c31718-481f-4d75-b7d8-49154653504a",
"date":"2016-02-09",
"visualization":{
"standingPreMedication":0.8,
"standingPostMedication":0.9,
"tappingPreMedication":0.4,
"tappingPostMedication":0.6,
"voicePreMedication":0.7,
"voicePostMedication":0.8,
"walkingPreMedication":0.5,
"walkingPostMedication":0.8
}
}
(NOTE: The above healthCode is a spoof healthCode and the data is randomly generated data. It does not correspond to any real user.)
Response: 201 CREATED
Notes: This will be called with a Bridge worker account that the Precompute Job has credentials to. Note that this will require adding a new type of account to Bridge.
Read mPower Visualization Data
URL: GET /parkinson/visualization?startDate=2016-02-06&endDate=2016-02-08
Response:
{
"2016-02-06":{
"standingPreMedication":0.8,
"standingPostMedication":0.9,
"tappingPreMedication":0.4,
"tappingPostMedication":0.6,
"voicePreMedication":0.7,
"voicePostMedication":0.8,
"walkingPreMedication":0.5,
"walkingPostMedication":0.8
},
"2016-02-07":{
"standingPreMedication":0.4,
"standingPostMedication":0.9,
"tappingPreMedication":0.6,
"tappingPostMedication":0.7,
"voicePreMedication":0.5,
"voicePostMedication":0.9,
"walkingPreMedication":0.4,
"walkingPostMedication":0.5
},
"2016-02-06":{
"standingPreMedication":0.6,
"standingPostMedication":0.9,
"tappingPreMedication":0.1,
"tappingPostMedication":1.0,
"voicePreMedication":0.2,
"voicePostMedication":0.8,
"walkingPreMedication":0.4,
"walkingPostMedication":1.0
}