Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Triggers are removed from study protocol when deployed #56

Closed
bardram opened this issue May 6, 2024 · 5 comments
Closed

Triggers are removed from study protocol when deployed #56

bardram opened this issue May 6, 2024 · 5 comments
Labels
bug Something isn't working help wanted Extra attention is needed question Further information is requested

Comments

@bardram
Copy link
Collaborator

bardram commented May 6, 2024

I have a study protocol (the Demo protocol) which has a set of OneTimeTriggers like this:

    "triggers": {

     ....
        "9": {
            "__type": "dk.cachet.carp.common.application.triggers.ImmediateTrigger",
            "sourceDeviceRoleName": "Polar HR Sensor"
        },
        "10": {
            "__type": "dk.cachet.carp.common.application.triggers.OneTimeTrigger",
            "sourceDeviceRoleName": "Primary Phone"
        },
        "11": {
            "__type": "dk.cachet.carp.common.application.triggers.OneTimeTrigger",
            "sourceDeviceRoleName": "Primary Phone"
        },
        "12": {
            "__type": "dk.cachet.carp.common.application.triggers.OneTimeTrigger",
            "sourceDeviceRoleName": "Primary Phone"
        },
        "13": {
            "__type": "dk.cachet.carp.common.application.triggers.OneTimeTrigger",
            "sourceDeviceRoleName": "Primary Phone"
        },
        "14": {
            "__type": "dk.cachet.carp.common.application.triggers.OneTimeTrigger",
            "sourceDeviceRoleName": "Primary Phone"
        },
        "15": {
            "__type": "dk.cachet.carp.common.application.triggers.OneTimeTrigger",
            "sourceDeviceRoleName": "Primary Phone"
        },
        "16": {
            "__type": "dk.cachet.carp.common.application.triggers.UserTaskTrigger",
            "sourceDeviceRoleName": "Primary Phone",
            "taskName": "Task #18",
            "triggerCondition": "done"
        },
        "17": {
            "__type": "dk.cachet.carp.common.application.triggers.UserTaskTrigger",
            "sourceDeviceRoleName": "Primary Phone",
            "taskName": "Task #19",
            "triggerCondition": "done"
        },

      ....

    },

But when I download the study deployment from CAWS, these 6 OneTimeTriggers are reduced to only one (1)....:

          "9": {
            "__type": "dk.cachet.carp.common.application.triggers.ImmediateTrigger",
            "sourceDeviceRoleName": "Polar HR Sensor"
          },
          "10": {
            "__type": "dk.cachet.carp.common.application.triggers.OneTimeTrigger",
            "sourceDeviceRoleName": "Primary Phone"
          },
          "11": {
            "__type": "dk.cachet.carp.common.application.triggers.UserTaskTrigger",
            "taskName": "Task #18",
            "triggerCondition": "done",
            "sourceDeviceRoleName": "Primary Phone"
          },

This causes problems on the client-side, since when there is only one OneTimeTrigger, this will trigger only once and the other 5 will NOT trigger.

I don't know if this is a CAWS or CARP Core problem – @Whathecode; please chip in if you know this.

@bardram
Copy link
Collaborator Author

bardram commented May 6, 2024

The full protocols are included below.

Uploaded Study Protocol
{
  "applicationData": {
      "studyDescription": {
          "__type": "StudyDescription",
          "title": "study.description.title",
          "description": "study.description.description",
          "purpose": "study.description.purpose",
          "studyDescriptionUrl": "study.description.url",
          "privacyPolicyUrl": "study.description.privacy",
          "responsible": {
              "__type": "StudyResponsible",
              "id": "study.responsible.id",
              "name": "study.responsible.name",
              "title": "study.responsible.title",
              "email": "study.responsible.email",
              "address": "study.responsible.address",
              "affiliation": "study.responsible.affiliation"
          }
      },
      "dataEndPoint": {
          "__type": "CarpDataEndPoint",
          "type": "CAWS",
          "dataFormat": "dk.cachet.carp",
          "uploadMethod": "stream",
          "name": "CARP Web Service",
          "onlyUploadOnWiFi": false,
          "uploadInterval": 10,
          "deleteWhenUploaded": true
      }
  },
  "id": "4f835530-a131-1fb2-bf9f-7382de7ce11c",
  "createdOn": "2024-05-06T08:46:22.607884Z",
  "version": 0,
  "description": "study.description.description",
  "ownerId": "979b408d-784e-4b1b-bb1e-ff9204e072f3",
  "name": "CARP Demo Protocol",
  "participantRoles": [
      {
          "role": "Participant",
          "isOptional": false
      }
  ],
  "primaryDevices": [
      {
          "__type": "dk.cachet.carp.common.application.devices.Smartphone",
          "roleName": "Primary Phone",
          "isOptional": false,
          "defaultSamplingConfiguration": {},
          "isPrimaryDevice": true
      }
  ],
  "connectedDevices": [
      {
          "__type": "dk.cachet.carp.common.application.devices.LocationService",
          "roleName": "Location Service",
          "isOptional": true,
          "defaultSamplingConfiguration": {},
          "accuracy": "balanced",
          "distance": 10.0,
          "interval": 60000000,
          "notificationOnTapBringToFront": false
      },
      {
          "__type": "dk.cachet.carp.common.application.devices.WeatherService",
          "roleName": "Weather Service",
          "isOptional": true,
          "defaultSamplingConfiguration": {},
          "apiKey": "12b6e28582eb9298577c734a31ba9f4f"
      },
      {
          "__type": "dk.cachet.carp.common.application.devices.AirQualityService",
          "roleName": "Air Quality Service",
          "isOptional": true,
          "defaultSamplingConfiguration": {},
          "apiKey": "9e538456b2b85c92647d8b65090e29f957638c77"
      },
      {
          "__type": "dk.cachet.carp.common.application.devices.PolarDevice",
          "roleName": "Polar HR Sensor",
          "isOptional": true,
          "defaultSamplingConfiguration": {}
      }
  ],
  "connections": [
      {
          "roleName": "Location Service",
          "connectedToRoleName": "Primary Phone"
      },
      {
          "roleName": "Weather Service",
          "connectedToRoleName": "Primary Phone"
      },
      {
          "roleName": "Air Quality Service",
          "connectedToRoleName": "Primary Phone"
      },
      {
          "roleName": "Polar HR Sensor",
          "connectedToRoleName": "Primary Phone"
      }
  ],
  "assignedDevices": {},
  "tasks": [
      {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #8",
          "measures": [
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.heartbeat"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.error"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.triggeredtask"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.completedtask"
              }
          ]
      },
      {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #9",
          "measures": [
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.heartbeat"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.triggeredtask"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.completedtask"
              }
          ]
      },
      {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #10",
          "measures": [
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.heartbeat"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.triggeredtask"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.completedtask"
              }
          ]
      },
      {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #11",
          "measures": [
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.heartbeat"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.triggeredtask"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.completedtask"
              }
          ]
      },
      {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #12",
          "measures": [
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.ambientlight"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.stepcount"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.freememory"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.deviceinformation"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.batterystate"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.screenevent"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.activity"
              }
          ]
      },
      {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #13",
          "measures": [
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.location"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.mobility"
              }
          ]
      },
      {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #14",
          "measures": [
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.weather"
              }
          ]
      },
      {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #15",
          "measures": [
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.airquality"
              }
          ]
      },
      {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #16",
          "measures": [
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.heartbeat"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.triggeredtask"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.completedtask"
              }
          ]
      },
      {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #17",
          "measures": [
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.polar.hr"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.polar.ecg"
              }
          ]
      },
      {
          "__type": "dk.cachet.carp.common.application.tasks.AppTask",
          "name": "Task #18",
          "measures": [
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.currentlocation"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.weather"
              }
          ],
          "type": "one_time_sensing",
          "title": "environment.title",
          "description": "environment.description",
          "instructions": "",
          "notification": false
      },
      {
          "__type": "dk.cachet.carp.common.application.tasks.RPAppTask",
          "name": "Task #19",
          "measures": [
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.location"
              }
          ],
          "type": "survey",
          "title": "survey.demographics.title",
          "description": "survey.demographics.description",
          "instructions": "",
          "minutesToComplete": 2,
          "expire": 432000000000,
          "notification": false,
          "rpTask": {
              "__type": "RPOrderedTask",
              "identifier": "demo_survey",
              "close_after_finished": true,
              "steps": [
                  {
                      "__type": "RPQuestionStep",
                      "identifier": "survey.demographics.1",
                      "title": "survey.demographics.question.sex",
                      "optional": false,
                      "answer_format": {
                          "__type": "RPChoiceAnswerFormat",
                          "question_type": "SingleChoice",
                          "choices": [
                              {
                                  "__type": "RPChoice",
                                  "text": "survey.demographics.femal",
                                  "value": 1,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "survey.demographics.male",
                                  "value": 2,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "survey.demographics.other",
                                  "value": 3,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "survey.demographics.prefer_not",
                                  "value": 4,
                                  "is_free_text": false
                              }
                          ],
                          "answer_style": "SingleChoice"
                      },
                      "auto_skip": false,
                      "timeout": 0,
                      "auto_focus": false
                  },
                  {
                      "__type": "RPQuestionStep",
                      "identifier": "survey.demographics.2",
                      "title": "survey.demographics.question.age",
                      "optional": false,
                      "answer_format": {
                          "__type": "RPChoiceAnswerFormat",
                          "question_type": "SingleChoice",
                          "choices": [
                              {
                                  "__type": "RPChoice",
                                  "text": "survey.demographics.under_20",
                                  "value": 1,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "20-29",
                                  "value": 2,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "30-39",
                                  "value": 3,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "40-49",
                                  "value": 4,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "50-59",
                                  "value": 5,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "60-69",
                                  "value": 6,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "70-79",
                                  "value": 7,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "80-89",
                                  "value": 8,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "survey.demographics.90_above",
                                  "value": 9,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "survey.demographics.prefer_not",
                                  "value": 10,
                                  "is_free_text": false
                              }
                          ],
                          "answer_style": "SingleChoice"
                      },
                      "auto_skip": false,
                      "timeout": 0,
                      "auto_focus": false
                  },
                  {
                      "__type": "RPQuestionStep",
                      "identifier": "survey.demographics.3",
                      "title": "survey.demographics.question.smoke",
                      "optional": false,
                      "answer_format": {
                          "__type": "RPChoiceAnswerFormat",
                          "question_type": "SingleChoice",
                          "choices": [
                              {
                                  "__type": "RPChoice",
                                  "text": "survey.demographics.smoke.never",
                                  "value": 1,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "survey.demographics.smoke.ex",
                                  "value": 2,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "survey.demographics.smoke.1",
                                  "value": 3,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "survey.demographics.smoke.1-10",
                                  "value": 4,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "survey.demographics.smoke.11-20",
                                  "value": 5,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "survey.demographics.smoke.21+",
                                  "value": 6,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "survey.demographics.prefer_not",
                                  "value": 7,
                                  "is_free_text": false
                              }
                          ],
                          "answer_style": "SingleChoice"
                      },
                      "auto_skip": false,
                      "timeout": 0,
                      "auto_focus": false
                  }
              ]
          }
      },
      {
          "__type": "dk.cachet.carp.common.application.tasks.RPAppTask",
          "name": "Task #20",
          "measures": [
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.location"
              }
          ],
          "type": "survey",
          "title": "Symptoms",
          "description": "A short 1-item survey on your daily symptoms.",
          "instructions": "",
          "minutesToComplete": 1,
          "expire": 86400000000,
          "notification": true,
          "rpTask": {
              "__type": "RPOrderedTask",
              "identifier": "symptoms_survey",
              "close_after_finished": true,
              "steps": [
                  {
                      "__type": "RPQuestionStep",
                      "identifier": "sym_1",
                      "title": "Do you have any of the following symptoms today?",
                      "optional": false,
                      "answer_format": {
                          "__type": "RPChoiceAnswerFormat",
                          "question_type": "MultipleChoice",
                          "choices": [
                              {
                                  "__type": "RPChoice",
                                  "text": "None",
                                  "value": 1,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "Fever (warmer than usual)",
                                  "value": 2,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "Dry cough",
                                  "value": 3,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "Wet cough",
                                  "value": 4,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "Sore throat, runny or blocked nose",
                                  "value": 5,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "Loss of taste and smell",
                                  "value": 6,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "Difficulty breathing or feeling short of breath",
                                  "value": 7,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "Tightness in your chest",
                                  "value": 8,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "Dizziness, confusion or vertigo",
                                  "value": 9,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "Headache",
                                  "value": 10,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "Muscle aches",
                                  "value": 11,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "Chills",
                                  "value": 12,
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "Prefer not to say",
                                  "value": 13,
                                  "is_free_text": false
                              }
                          ],
                          "answer_style": "MultipleChoice"
                      },
                      "auto_skip": false,
                      "timeout": 0,
                      "auto_focus": false
                  }
              ]
          }
      },
      {
          "__type": "dk.cachet.carp.common.application.tasks.AppTask",
          "name": "Task #21",
          "measures": [
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.audio"
              },
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.location"
              }
          ],
          "type": "audio",
          "title": "reading.title",
          "description": "reading.description",
          "instructions": "reading.instructions",
          "minutesToComplete": 3,
          "notification": false
      },
      {
          "__type": "dk.cachet.carp.common.application.tasks.AppTask",
          "name": "Task #22",
          "measures": [
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.image"
              }
          ],
          "type": "image",
          "title": "wound.title",
          "description": "wound.description",
          "instructions": "wound.instructions",
          "minutesToComplete": 3,
          "notification": false
      },
      {
          "__type": "dk.cachet.carp.common.application.tasks.RPAppTask",
          "name": "Task #23",
          "measures": [],
          "type": "cognition",
          "title": "Parkinsons Assessment",
          "description": "A simple task assessing cognitive functioning and finger tapping speed.",
          "instructions": "",
          "minutesToComplete": 3,
          "notification": false,
          "rpTask": {
              "__type": "RPOrderedTask",
              "identifier": "parkinsons_assessment",
              "close_after_finished": true,
              "steps": [
                  {
                      "__type": "RPInstructionStep",
                      "identifier": "parkinsons_instruction",
                      "title": "Parkinsons Disease Assessment",
                      "text": "In the following pages, you will be asked to solve two simple test which will help assess your symptoms on a daily basis. Each test has an instruction page, which you should read carefully before starting the test.\n\nPlease sit down comfortably and hold the phone in one hand while performing the test with the other.",
                      "optional": false
                  },
                  {
                      "__type": "RPFlankerActivity",
                      "identifier": "flanker_1",
                      "title": "RPActivityStep",
                      "optional": false,
                      "include_instructions": true,
                      "include_results": true,
                      "length_of_test": 30,
                      "number_of_cards": 10
                  },
                  {
                      "__type": "RPTappingActivity",
                      "identifier": "tapping_1",
                      "title": "RPActivityStep",
                      "optional": false,
                      "include_instructions": true,
                      "include_results": true,
                      "length_of_test": 10
                  }
              ]
          }
      },
      {
          "__type": "dk.cachet.carp.common.application.tasks.RPAppTask",
          "name": "Task #24",
          "measures": [
              {
                  "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
                  "type": "dk.cachet.carp.location"
              }
          ],
          "type": "survey",
          "title": "Parkinsons Disease Activities of Daily Living Scale",
          "description": "A new simple and brief subjective measure of disability in Parkinsons disease",
          "instructions": "",
          "minutesToComplete": 1,
          "expire": 86400000000,
          "notification": true,
          "rpTask": {
              "__type": "RPOrderedTask",
              "identifier": "parkinsons_survey",
              "close_after_finished": true,
              "steps": [
                  {
                      "__type": "RPQuestionStep",
                      "identifier": "parkinsons_1",
                      "title": "Please tick one of the descriptions that best describes how your Parkinsons disease has affected your day-to-day activities in the last month.",
                      "optional": false,
                      "answer_format": {
                          "__type": "RPChoiceAnswerFormat",
                          "question_type": "SingleChoice",
                          "choices": [
                              {
                                  "__type": "RPChoice",
                                  "text": "No difficulties with day-to-day activities.",
                                  "value": 1,
                                  "detail_text": "For example: Your Parkinsons disease at present is not affecting your daily living.",
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "Mild difficulties with day-to-day activities.",
                                  "value": 2,
                                  "detail_text": "For example: Slowness with some aspects of housework, gardening or shopping. Able to dress and manage personal hygiene completely independently but rate is slower. You may feel that your medication is not quite effective as it was.",
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "Moderate difficulties with day-to-day activities.",
                                  "value": 3,
                                  "detail_text": "For example: Your Parkinsons disease is interfering with your daily activities. It is increasingly difficult to do simple activities without some help such as rising from a chair, washing, dressing, shopping, housework. You may have some difficulties walking and may require assistance. Difficulties with recreational activities or the ability to drive a car. The medication is now less effective.",
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "High levels of difficulties with day-to-day activities.",
                                  "value": 4,
                                  "detail_text": "For example: You now require much more assistance with activities of daily living such as washing, dressing, housework or feeding yourself. You may have greater difficulties with mobility and find you are becoming more dependent for assistance from others or aids and appliances. Your medication appears to be significantly less effective.",
                                  "is_free_text": false
                              },
                              {
                                  "__type": "RPChoice",
                                  "text": "Extreme difficulties with day-to-day activities.",
                                  "value": 5,
                                  "detail_text": "For example: You require assistance in all daily activities. These may include dressing, washing, feeding yourself or walking unaided. You may now be housebound and obtain little or no benefit from your medication.",
                                  "is_free_text": false
                              }
                          ],
                          "answer_style": "SingleChoice"
                      },
                      "auto_skip": false,
                      "timeout": 0,
                      "auto_focus": false
                  }
              ]
          }
      }
  ],
  "triggers": {
      "0": {
          "__type": "dk.cachet.carp.common.application.triggers.NoOpTrigger",
          "sourceDeviceRoleName": "Primary Phone"
      },
      "1": {
          "__type": "dk.cachet.carp.common.application.triggers.NoOpTrigger",
          "sourceDeviceRoleName": "Location Service"
      },
      "2": {
          "__type": "dk.cachet.carp.common.application.triggers.NoOpTrigger",
          "sourceDeviceRoleName": "Weather Service"
      },
      "3": {
          "__type": "dk.cachet.carp.common.application.triggers.NoOpTrigger",
          "sourceDeviceRoleName": "Air Quality Service"
      },
      "4": {
          "__type": "dk.cachet.carp.common.application.triggers.ImmediateTrigger",
          "sourceDeviceRoleName": "Primary Phone"
      },
      "5": {
          "__type": "dk.cachet.carp.common.application.triggers.ImmediateTrigger",
          "sourceDeviceRoleName": "Location Service"
      },
      "6": {
          "__type": "dk.cachet.carp.common.application.triggers.PeriodicTrigger",
          "sourceDeviceRoleName": "Weather Service",
          "period": 1800000000
      },
      "7": {
          "__type": "dk.cachet.carp.common.application.triggers.PeriodicTrigger",
          "sourceDeviceRoleName": "Air Quality Service",
          "period": 1800000000
      },
      "8": {
          "__type": "dk.cachet.carp.common.application.triggers.NoOpTrigger",
          "sourceDeviceRoleName": "Polar HR Sensor"
      },
      "9": {
          "__type": "dk.cachet.carp.common.application.triggers.ImmediateTrigger",
          "sourceDeviceRoleName": "Polar HR Sensor"
      },
      "10": {
          "__type": "dk.cachet.carp.common.application.triggers.OneTimeTrigger",
          "sourceDeviceRoleName": "Primary Phone"
      },
      "11": {
          "__type": "dk.cachet.carp.common.application.triggers.OneTimeTrigger",
          "sourceDeviceRoleName": "Primary Phone"
      },
      "12": {
          "__type": "dk.cachet.carp.common.application.triggers.OneTimeTrigger",
          "sourceDeviceRoleName": "Primary Phone"
      },
      "13": {
          "__type": "dk.cachet.carp.common.application.triggers.OneTimeTrigger",
          "sourceDeviceRoleName": "Primary Phone"
      },
      "14": {
          "__type": "dk.cachet.carp.common.application.triggers.OneTimeTrigger",
          "sourceDeviceRoleName": "Primary Phone"
      },
      "15": {
          "__type": "dk.cachet.carp.common.application.triggers.OneTimeTrigger",
          "sourceDeviceRoleName": "Primary Phone"
      },
      "16": {
          "__type": "dk.cachet.carp.common.application.triggers.UserTaskTrigger",
          "sourceDeviceRoleName": "Primary Phone",
          "taskName": "Task #18",
          "triggerCondition": "done"
      },
      "17": {
          "__type": "dk.cachet.carp.common.application.triggers.UserTaskTrigger",
          "sourceDeviceRoleName": "Primary Phone",
          "taskName": "Task #19",
          "triggerCondition": "done"
      },
      "18": {
          "__type": "dk.cachet.carp.common.application.triggers.UserTaskTrigger",
          "sourceDeviceRoleName": "Primary Phone",
          "taskName": "Task #20",
          "triggerCondition": "done"
      },
      "19": {
          "__type": "dk.cachet.carp.common.application.triggers.UserTaskTrigger",
          "sourceDeviceRoleName": "Primary Phone",
          "taskName": "Task #21",
          "triggerCondition": "done"
      },
      "20": {
          "__type": "dk.cachet.carp.common.application.triggers.UserTaskTrigger",
          "sourceDeviceRoleName": "Primary Phone",
          "taskName": "Task #22",
          "triggerCondition": "done"
      },
      "21": {
          "__type": "dk.cachet.carp.common.application.triggers.UserTaskTrigger",
          "sourceDeviceRoleName": "Primary Phone",
          "taskName": "Task #23",
          "triggerCondition": "done"
      },
      "22": {
          "__type": "dk.cachet.carp.common.application.triggers.UserTaskTrigger",
          "sourceDeviceRoleName": "Primary Phone",
          "taskName": "Task #23",
          "triggerCondition": "done"
      }
  },
  "taskControls": [
      {
          "triggerId": 0,
          "taskName": "Task #8",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
      },
      {
          "triggerId": 1,
          "taskName": "Task #9",
          "destinationDeviceRoleName": "Location Service",
          "control": "Start"
      },
      {
          "triggerId": 2,
          "taskName": "Task #10",
          "destinationDeviceRoleName": "Weather Service",
          "control": "Start"
      },
      {
          "triggerId": 3,
          "taskName": "Task #11",
          "destinationDeviceRoleName": "Air Quality Service",
          "control": "Start"
      },
      {
          "triggerId": 4,
          "taskName": "Task #12",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
      },
      {
          "triggerId": 5,
          "taskName": "Task #13",
          "destinationDeviceRoleName": "Location Service",
          "control": "Start"
      },
      {
          "triggerId": 6,
          "taskName": "Task #14",
          "destinationDeviceRoleName": "Weather Service",
          "control": "Start"
      },
      {
          "triggerId": 7,
          "taskName": "Task #15",
          "destinationDeviceRoleName": "Air Quality Service",
          "control": "Start"
      },
      {
          "triggerId": 8,
          "taskName": "Task #16",
          "destinationDeviceRoleName": "Polar HR Sensor",
          "control": "Start"
      },
      {
          "triggerId": 9,
          "taskName": "Task #17",
          "destinationDeviceRoleName": "Polar HR Sensor",
          "control": "Start"
      },
      {
          "triggerId": 10,
          "taskName": "Task #18",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
      },
      {
          "triggerId": 11,
          "taskName": "Task #19",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
      },
      {
          "triggerId": 12,
          "taskName": "Task #20",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
      },
      {
          "triggerId": 13,
          "taskName": "Task #21",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
      },
      {
          "triggerId": 14,
          "taskName": "Task #22",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
      },
      {
          "triggerId": 15,
          "taskName": "Task #23",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
      },
      {
          "triggerId": 16,
          "taskName": "Task #18",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
      },
      {
          "triggerId": 17,
          "taskName": "Task #19",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
      },
      {
          "triggerId": 18,
          "taskName": "Task #20",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
      },
      {
          "triggerId": 19,
          "taskName": "Task #21",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
      },
      {
          "triggerId": 20,
          "taskName": "Task #22",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
      },
      {
          "triggerId": 21,
          "taskName": "Task #23",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
      },
      {
          "triggerId": 22,
          "taskName": "Task #24",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
      }
  ],
  "expectedParticipantData": []
}
Downloaded Study Deployment
    {
      "deviceConfiguration": {
        "__type": "dk.cachet.carp.common.application.devices.Smartphone",
        "isPrimaryDevice": true,
        "roleName": "Primary Phone"
      },
      "registration": {
        "__type": "dk.cachet.carp.common.application.devices.DefaultDeviceRegistration",
        "registrationCreatedOn": "2024-05-06T09:09:39.684920Z",
        "deviceDisplayName": "SP1A.210812.016 - SM-G970F SAMSUNG [SDK 31]",
        "deviceId": "SP1A.210812.016"
      },
      "connectedDevices": [
        {
          "__type": "dk.cachet.carp.common.application.devices.LocationService",
          "accuracy": "balanced",
          "distance": 10,
          "interval": 60000000,
          "roleName": "Location Service",
          "isOptional": true,
          "defaultSamplingConfiguration": {},
          "notificationOnTapBringToFront": false
        },
        {
          "__type": "dk.cachet.carp.common.application.devices.WeatherService",
          "apiKey": "12b6e28582eb9298577c734a31ba9f4f",
          "roleName": "Weather Service",
          "isOptional": true,
          "defaultSamplingConfiguration": {}
        },
        {
          "__type": "dk.cachet.carp.common.application.devices.AirQualityService",
          "apiKey": "9e538456b2b85c92647d8b65090e29f957638c77",
          "roleName": "Air Quality Service",
          "isOptional": true,
          "defaultSamplingConfiguration": {}
        },
        {
          "__type": "dk.cachet.carp.common.application.devices.PolarDevice",
          "roleName": "Polar HR Sensor",
          "isOptional": true,
          "defaultSamplingConfiguration": {}
        }
      ],
      "connectedDeviceRegistrations": {
        "Weather Service": {
          "__type": "dk.cachet.carp.common.application.devices.DefaultDeviceRegistration",
          "registrationCreatedOn": "2024-05-06T09:09:44.524050Z",
          "deviceDisplayName": "Weather Service (OW)",
          "deviceId": "12b6e28582eb9298577c734a31ba9f4f"
        },
        "Location Service": {
          "__type": "dk.cachet.carp.common.application.devices.DefaultDeviceRegistration",
          "registrationCreatedOn": "2024-05-06T09:09:44.457603Z",
          "deviceDisplayName": "Location Service",
          "deviceId": "705570886"
        },
        "Air Quality Service": {
          "__type": "dk.cachet.carp.common.application.devices.DefaultDeviceRegistration",
          "registrationCreatedOn": "2024-05-06T09:09:44.595861Z",
          "deviceDisplayName": "Air Quality Service (WAQI)",
          "deviceId": "9e538456b2b85c92647d8b65090e29f957638c77"
        }
      },
      "tasks": [
        {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #8",
          "measures": [
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.heartbeat"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.error"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.triggeredtask"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.completedtask"
            }
          ]
        },
        {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #12",
          "measures": [
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.ambientlight"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.stepcount"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.freememory"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.deviceinformation"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.batterystate"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.screenevent"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.activity"
            }
          ]
        },
        {
          "name": "Task #18",
          "type": "one_time_sensing",
          "title": "environment.title",
          "__type": "dk.cachet.carp.common.application.tasks.AppTask",
          "measures": [
            {
              "type": "dk.cachet.carp.currentlocation",
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream"
            },
            {
              "type": "dk.cachet.carp.weather",
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream"
            }
          ],
          "description": "environment.description",
          "instructions": "",
          "notification": false
        },
        {
          "name": "Task #19",
          "type": "survey",
          "title": "survey.demographics.title",
          "__type": "dk.cachet.carp.common.application.tasks.RPAppTask",
          "expire": 432000000000,
          "rpTask": {
            "steps": [
              {
                "title": "survey.demographics.question.sex",
                "__type": "RPQuestionStep",
                "timeout": 0,
                "optional": false,
                "auto_skip": false,
                "auto_focus": false,
                "identifier": "survey.demographics.1",
                "answer_format": {
                  "__type": "RPChoiceAnswerFormat",
                  "choices": [
                    {
                      "text": "survey.demographics.femal",
                      "value": 1,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "survey.demographics.male",
                      "value": 2,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "survey.demographics.other",
                      "value": 3,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "survey.demographics.prefer_not",
                      "value": 4,
                      "__type": "RPChoice",
                      "is_free_text": false
                    }
                  ],
                  "answer_style": "SingleChoice",
                  "question_type": "SingleChoice"
                }
              },
              {
                "title": "survey.demographics.question.age",
                "__type": "RPQuestionStep",
                "timeout": 0,
                "optional": false,
                "auto_skip": false,
                "auto_focus": false,
                "identifier": "survey.demographics.2",
                "answer_format": {
                  "__type": "RPChoiceAnswerFormat",
                  "choices": [
                    {
                      "text": "survey.demographics.under_20",
                      "value": 1,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "20-29",
                      "value": 2,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "30-39",
                      "value": 3,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "40-49",
                      "value": 4,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "50-59",
                      "value": 5,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "60-69",
                      "value": 6,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "70-79",
                      "value": 7,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "80-89",
                      "value": 8,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "survey.demographics.90_above",
                      "value": 9,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "survey.demographics.prefer_not",
                      "value": 10,
                      "__type": "RPChoice",
                      "is_free_text": false
                    }
                  ],
                  "answer_style": "SingleChoice",
                  "question_type": "SingleChoice"
                }
              },
              {
                "title": "survey.demographics.question.smoke",
                "__type": "RPQuestionStep",
                "timeout": 0,
                "optional": false,
                "auto_skip": false,
                "auto_focus": false,
                "identifier": "survey.demographics.3",
                "answer_format": {
                  "__type": "RPChoiceAnswerFormat",
                  "choices": [
                    {
                      "text": "survey.demographics.smoke.never",
                      "value": 1,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "survey.demographics.smoke.ex",
                      "value": 2,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "survey.demographics.smoke.1",
                      "value": 3,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "survey.demographics.smoke.1-10",
                      "value": 4,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "survey.demographics.smoke.11-20",
                      "value": 5,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "survey.demographics.smoke.21+",
                      "value": 6,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "survey.demographics.prefer_not",
                      "value": 7,
                      "__type": "RPChoice",
                      "is_free_text": false
                    }
                  ],
                  "answer_style": "SingleChoice",
                  "question_type": "SingleChoice"
                }
              }
            ],
            "__type": "RPOrderedTask",
            "identifier": "demo_survey",
            "close_after_finished": true
          },
          "measures": [
            {
              "type": "dk.cachet.carp.location",
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream"
            }
          ],
          "description": "survey.demographics.description",
          "instructions": "",
          "notification": false,
          "minutesToComplete": 2
        },
        {
          "name": "Task #20",
          "type": "survey",
          "title": "Symptoms",
          "__type": "dk.cachet.carp.common.application.tasks.RPAppTask",
          "expire": 86400000000,
          "rpTask": {
            "steps": [
              {
                "title": "Do you have any of the following symptoms today?",
                "__type": "RPQuestionStep",
                "timeout": 0,
                "optional": false,
                "auto_skip": false,
                "auto_focus": false,
                "identifier": "sym_1",
                "answer_format": {
                  "__type": "RPChoiceAnswerFormat",
                  "choices": [
                    {
                      "text": "None",
                      "value": 1,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "Fever (warmer than usual)",
                      "value": 2,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "Dry cough",
                      "value": 3,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "Wet cough",
                      "value": 4,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "Sore throat, runny or blocked nose",
                      "value": 5,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "Loss of taste and smell",
                      "value": 6,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "Difficulty breathing or feeling short of breath",
                      "value": 7,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "Tightness in your chest",
                      "value": 8,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "Dizziness, confusion or vertigo",
                      "value": 9,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "Headache",
                      "value": 10,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "Muscle aches",
                      "value": 11,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "Chills",
                      "value": 12,
                      "__type": "RPChoice",
                      "is_free_text": false
                    },
                    {
                      "text": "Prefer not to say",
                      "value": 13,
                      "__type": "RPChoice",
                      "is_free_text": false
                    }
                  ],
                  "answer_style": "MultipleChoice",
                  "question_type": "MultipleChoice"
                }
              }
            ],
            "__type": "RPOrderedTask",
            "identifier": "symptoms_survey",
            "close_after_finished": true
          },
          "measures": [
            {
              "type": "dk.cachet.carp.location",
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream"
            }
          ],
          "description": "A short 1-item survey on your daily symptoms.",
          "instructions": "",
          "notification": true,
          "minutesToComplete": 1
        },
        {
          "name": "Task #21",
          "type": "audio",
          "title": "reading.title",
          "__type": "dk.cachet.carp.common.application.tasks.AppTask",
          "measures": [
            {
              "type": "dk.cachet.carp.audio",
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream"
            },
            {
              "type": "dk.cachet.carp.location",
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream"
            }
          ],
          "description": "reading.description",
          "instructions": "reading.instructions",
          "notification": false,
          "minutesToComplete": 3
        },
        {
          "name": "Task #22",
          "type": "image",
          "title": "wound.title",
          "__type": "dk.cachet.carp.common.application.tasks.AppTask",
          "measures": [
            {
              "type": "dk.cachet.carp.image",
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream"
            }
          ],
          "description": "wound.description",
          "instructions": "wound.instructions",
          "notification": false,
          "minutesToComplete": 3
        },
        {
          "name": "Task #23",
          "type": "cognition",
          "title": "Parkinsons Assessment",
          "__type": "dk.cachet.carp.common.application.tasks.RPAppTask",
          "rpTask": {
            "steps": [
              {
                "text": "In the following pages, you will be asked to solve two simple test which will help assess your symptoms on a daily basis. Each test has an instruction page, which you should read carefully before starting the test.\n\nPlease sit down comfortably and hold the phone in one hand while performing the test with the other.",
                "title": "Parkinsons Disease Assessment",
                "__type": "RPInstructionStep",
                "optional": false,
                "identifier": "parkinsons_instruction"
              },
              {
                "title": "RPActivityStep",
                "__type": "RPFlankerActivity",
                "optional": false,
                "identifier": "flanker_1",
                "length_of_test": 30,
                "include_results": true,
                "number_of_cards": 10,
                "include_instructions": true
              },
              {
                "title": "RPActivityStep",
                "__type": "RPTappingActivity",
                "optional": false,
                "identifier": "tapping_1",
                "length_of_test": 10,
                "include_results": true,
                "include_instructions": true
              }
            ],
            "__type": "RPOrderedTask",
            "identifier": "parkinsons_assessment",
            "close_after_finished": true
          },
          "measures": [],
          "description": "A simple task assessing cognitive functioning and finger tapping speed.",
          "instructions": "",
          "notification": false,
          "minutesToComplete": 3
        },
        {
          "name": "Task #24",
          "type": "survey",
          "title": "Parkinsons Disease Activities of Daily Living Scale",
          "__type": "dk.cachet.carp.common.application.tasks.RPAppTask",
          "expire": 86400000000,
          "rpTask": {
            "steps": [
              {
                "title": "Please tick one of the descriptions that best describes how your Parkinsons disease has affected your day-to-day activities in the last month.",
                "__type": "RPQuestionStep",
                "timeout": 0,
                "optional": false,
                "auto_skip": false,
                "auto_focus": false,
                "identifier": "parkinsons_1",
                "answer_format": {
                  "__type": "RPChoiceAnswerFormat",
                  "choices": [
                    {
                      "text": "No difficulties with day-to-day activities.",
                      "value": 1,
                      "__type": "RPChoice",
                      "detail_text": "For example: Your Parkinsons disease at present is not affecting your daily living.",
                      "is_free_text": false
                    },
                    {
                      "text": "Mild difficulties with day-to-day activities.",
                      "value": 2,
                      "__type": "RPChoice",
                      "detail_text": "For example: Slowness with some aspects of housework, gardening or shopping. Able to dress and manage personal hygiene completely independently but rate is slower. You may feel that your medication is not quite effective as it was.",
                      "is_free_text": false
                    },
                    {
                      "text": "Moderate difficulties with day-to-day activities.",
                      "value": 3,
                      "__type": "RPChoice",
                      "detail_text": "For example: Your Parkinsons disease is interfering with your daily activities. It is increasingly difficult to do simple activities without some help such as rising from a chair, washing, dressing, shopping, housework. You may have some difficulties walking and may require assistance. Difficulties with recreational activities or the ability to drive a car. The medication is now less effective.",
                      "is_free_text": false
                    },
                    {
                      "text": "High levels of difficulties with day-to-day activities.",
                      "value": 4,
                      "__type": "RPChoice",
                      "detail_text": "For example: You now require much more assistance with activities of daily living such as washing, dressing, housework or feeding yourself. You may have greater difficulties with mobility and find you are becoming more dependent for assistance from others or aids and appliances. Your medication appears to be significantly less effective.",
                      "is_free_text": false
                    },
                    {
                      "text": "Extreme difficulties with day-to-day activities.",
                      "value": 5,
                      "__type": "RPChoice",
                      "detail_text": "For example: You require assistance in all daily activities. These may include dressing, washing, feeding yourself or walking unaided. You may now be housebound and obtain little or no benefit from your medication.",
                      "is_free_text": false
                    }
                  ],
                  "answer_style": "SingleChoice",
                  "question_type": "SingleChoice"
                }
              }
            ],
            "__type": "RPOrderedTask",
            "identifier": "parkinsons_survey",
            "close_after_finished": true
          },
          "measures": [
            {
              "type": "dk.cachet.carp.location",
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream"
            }
          ],
          "description": "A new simple and brief subjective measure of disability in Parkinsons disease",
          "instructions": "",
          "notification": true,
          "minutesToComplete": 1
        },
        {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #9",
          "measures": [
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.heartbeat"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.triggeredtask"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.completedtask"
            }
          ]
        },
        {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #13",
          "measures": [
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.location"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.mobility"
            }
          ]
        },
        {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #10",
          "measures": [
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.heartbeat"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.triggeredtask"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.completedtask"
            }
          ]
        },
        {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #14",
          "measures": [
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.weather"
            }
          ]
        },
        {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #11",
          "measures": [
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.heartbeat"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.triggeredtask"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.completedtask"
            }
          ]
        },
        {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #15",
          "measures": [
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.airquality"
            }
          ]
        },
        {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #16",
          "measures": [
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.heartbeat"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.triggeredtask"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.completedtask"
            }
          ]
        },
        {
          "__type": "dk.cachet.carp.common.application.tasks.BackgroundTask",
          "name": "Task #17",
          "measures": [
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.polar.hr"
            },
            {
              "__type": "dk.cachet.carp.common.application.tasks.Measure.DataStream",
              "type": "dk.cachet.carp.polar.ecg"
            }
          ]
        }
      ],
      "triggers": {
        "0": {
          "__type": "dk.cachet.carp.common.application.triggers.NoOpTrigger",
          "sourceDeviceRoleName": "Primary Phone"
        },
        "1": {
          "__type": "dk.cachet.carp.common.application.triggers.NoOpTrigger",
          "sourceDeviceRoleName": "Location Service"
        },
        "2": {
          "__type": "dk.cachet.carp.common.application.triggers.NoOpTrigger",
          "sourceDeviceRoleName": "Weather Service"
        },
        "3": {
          "__type": "dk.cachet.carp.common.application.triggers.NoOpTrigger",
          "sourceDeviceRoleName": "Air Quality Service"
        },
        "4": {
          "__type": "dk.cachet.carp.common.application.triggers.ImmediateTrigger",
          "sourceDeviceRoleName": "Primary Phone"
        },
        "5": {
          "__type": "dk.cachet.carp.common.application.triggers.ImmediateTrigger",
          "sourceDeviceRoleName": "Location Service"
        },
        "6": {
          "__type": "dk.cachet.carp.common.application.triggers.PeriodicTrigger",
          "period": 1800000000,
          "sourceDeviceRoleName": "Weather Service"
        },
        "7": {
          "__type": "dk.cachet.carp.common.application.triggers.PeriodicTrigger",
          "period": 1800000000,
          "sourceDeviceRoleName": "Air Quality Service"
        },
        "8": {
          "__type": "dk.cachet.carp.common.application.triggers.NoOpTrigger",
          "sourceDeviceRoleName": "Polar HR Sensor"
        },
        "9": {
          "__type": "dk.cachet.carp.common.application.triggers.ImmediateTrigger",
          "sourceDeviceRoleName": "Polar HR Sensor"
        },
        "10": {
          "__type": "dk.cachet.carp.common.application.triggers.OneTimeTrigger",
          "sourceDeviceRoleName": "Primary Phone"
        },
        "11": {
          "__type": "dk.cachet.carp.common.application.triggers.UserTaskTrigger",
          "taskName": "Task #18",
          "triggerCondition": "done",
          "sourceDeviceRoleName": "Primary Phone"
        },
        "12": {
          "__type": "dk.cachet.carp.common.application.triggers.UserTaskTrigger",
          "taskName": "Task #19",
          "triggerCondition": "done",
          "sourceDeviceRoleName": "Primary Phone"
        },
        "13": {
          "__type": "dk.cachet.carp.common.application.triggers.UserTaskTrigger",
          "taskName": "Task #20",
          "triggerCondition": "done",
          "sourceDeviceRoleName": "Primary Phone"
        },
        "14": {
          "__type": "dk.cachet.carp.common.application.triggers.UserTaskTrigger",
          "taskName": "Task #21",
          "triggerCondition": "done",
          "sourceDeviceRoleName": "Primary Phone"
        },
        "15": {
          "__type": "dk.cachet.carp.common.application.triggers.UserTaskTrigger",
          "taskName": "Task #22",
          "triggerCondition": "done",
          "sourceDeviceRoleName": "Primary Phone"
        },
        "16": {
          "__type": "dk.cachet.carp.common.application.triggers.UserTaskTrigger",
          "taskName": "Task #23",
          "triggerCondition": "done",
          "sourceDeviceRoleName": "Primary Phone"
        }
      },
      "taskControls": [
        {
          "triggerId": 0,
          "taskName": "Task #8",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
        },
        {
          "triggerId": 1,
          "taskName": "Task #9",
          "destinationDeviceRoleName": "Location Service",
          "control": "Start"
        },
        {
          "triggerId": 2,
          "taskName": "Task #10",
          "destinationDeviceRoleName": "Weather Service",
          "control": "Start"
        },
        {
          "triggerId": 3,
          "taskName": "Task #11",
          "destinationDeviceRoleName": "Air Quality Service",
          "control": "Start"
        },
        {
          "triggerId": 4,
          "taskName": "Task #12",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
        },
        {
          "triggerId": 5,
          "taskName": "Task #13",
          "destinationDeviceRoleName": "Location Service",
          "control": "Start"
        },
        {
          "triggerId": 6,
          "taskName": "Task #14",
          "destinationDeviceRoleName": "Weather Service",
          "control": "Start"
        },
        {
          "triggerId": 7,
          "taskName": "Task #15",
          "destinationDeviceRoleName": "Air Quality Service",
          "control": "Start"
        },
        {
          "triggerId": 8,
          "taskName": "Task #16",
          "destinationDeviceRoleName": "Polar HR Sensor",
          "control": "Start"
        },
        {
          "triggerId": 9,
          "taskName": "Task #17",
          "destinationDeviceRoleName": "Polar HR Sensor",
          "control": "Start"
        },
        {
          "triggerId": 10,
          "taskName": "Task #18",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
        },
        {
          "triggerId": 10,
          "taskName": "Task #19",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
        },
        {
          "triggerId": 10,
          "taskName": "Task #20",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
        },
        {
          "triggerId": 10,
          "taskName": "Task #21",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
        },
        {
          "triggerId": 10,
          "taskName": "Task #22",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
        },
        {
          "triggerId": 10,
          "taskName": "Task #23",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
        },
        {
          "triggerId": 11,
          "taskName": "Task #18",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
        },
        {
          "triggerId": 12,
          "taskName": "Task #19",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
        },
        {
          "triggerId": 13,
          "taskName": "Task #20",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
        },
        {
          "triggerId": 14,
          "taskName": "Task #21",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
        },
        {
          "triggerId": 15,
          "taskName": "Task #22",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
        },
        {
          "triggerId": 16,
          "taskName": "Task #23",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
        },
        {
          "triggerId": 16,
          "taskName": "Task #24",
          "destinationDeviceRoleName": "Primary Phone",
          "control": "Start"
        }
      ],
      "applicationData": {
        "dataEndPoint": {
          "name": "CARP Web Service",
          "type": "CAWS",
          "__type": "CarpDataEndPoint",
          "dataFormat": "dk.cachet.carp",
          "uploadMethod": "stream",
          "uploadInterval": 10,
          "onlyUploadOnWiFi": false,
          "deleteWhenUploaded": true
        },
        "studyDescription": {
          "title": "study.description.title",
          "__type": "StudyDescription",
          "purpose": "study.description.purpose",
          "description": "study.description.description",
          "responsible": {
            "id": "study.responsible.id",
            "name": "study.responsible.name",
            "email": "study.responsible.email",
            "title": "study.responsible.title",
            "__type": "StudyResponsible",
            "address": "study.responsible.address",
            "affiliation": "study.responsible.affiliation"
          },
          "privacyPolicyUrl": "study.description.privacy",
          "studyDescriptionUrl": "study.description.url"
        }
      }
    }

@bardram bardram added bug Something isn't working help wanted Extra attention is needed question Further information is requested labels May 6, 2024
@bardram
Copy link
Collaborator Author

bardram commented May 6, 2024

Actually - taking a closer look, it seems to not only be a problem with OneTimeTriggers. In the original protocol there are 22 unique triggers whereas in the downloaded study deployment, there are only 16. So - 6 triggers have "disappeared" (i.e., one other than the 5 OneTimeTriggers).

@Whathecode
Copy link
Member

I don't immediately know what could explain this, but some observations:

  • Identical triggers don't make sense in CARP core. Simply let the same trigger launch multiple tasks (assuming this is why you have multiple).
  • a device deployment only receives that part of the protocol it needs to execute. Maybe it gets filtered out in that transformation. Is the trigger configured to start a task?

@bardram
Copy link
Collaborator Author

bardram commented May 6, 2024

  • Identical triggers don't make sense in CARP core. Simply let the same trigger launch multiple tasks (assuming this is why you have multiple).

Hm... I do need 6 triggers to trigger 6 tasks. But if this is how CARP Core works, I can adjust the trigger execution runtime on CAMS to adhere to this.

  • a device deployment only receives that part of the protocol it needs to execute. Maybe it gets filtered out in that transformation. Is the trigger configured to start a task?

Yes - I do get it down to the client.

@bardram
Copy link
Collaborator Author

bardram commented May 6, 2024

I've addressed this behavior in CAMS v. 1.6.1.

@bardram bardram closed this as completed May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants