{
  "@context": {
    "ixo": "https://w3id.org/ixo/ns/protocol/",
    "@id": "@type",
    "type": "@type",
    "@protected": true
  },
  "type": "ixo:entity#surveyTemplate",
  "question": {
    "title": "Rivers Health Monitoring",
    "description": "A miniSASS field assessment of stream and river health. It takes about 15 minutes at the river.",
    "logoPosition": "right",
    "pages": [
      {
        "name": "intro",
        "elements": [
          {
            "type": "html",
            "name": "intro_text",
            "html": "<h2>Rivers Health Monitoring (miniSASS)</h2><p>The mini stream assessment scoring system (miniSASS) is a simple citizen-science tool for monitoring the water quality and health of streams and rivers.</p><p><strong>Work through the river in this order:</strong></p><ol><li>Clarity tube</li><li>Velocity plank</li><li>miniSASS (macroinvertebrates)</li></ol><p>A red star <strong>*</strong> means you must answer that question.</p><p>Some totals and averages are worked out for you and shown as read-only fields.</p><p>You can tap <strong>Back</strong> to fix any answer before you submit.</p>"
          }
        ]
      },
      {
        "name": "participant",
        "elements": [
          {
            "type": "dropdown",
            "name": "schema:isPartOf",
            "title": "Which project is this assessment for?",
            "isRequired": true,
            "requiredErrorText": "Please choose the project.",
            "choices": [
              {
                "value": "palmiet_trmp",
                "text": "Palmiet TRMP"
              }
            ]
          },
          {
            "type": "panel",
            "name": "schema:Person",
            "elements": [
              {
                "type": "text",
                "name": "schema:givenName",
                "title": "First name",
                "isRequired": true,
                "requiredErrorText": "Please tell us your first name."
              },
              {
                "type": "text",
                "name": "schema:familyName",
                "title": "Surname",
                "isRequired": true,
                "requiredErrorText": "Please tell us your surname."
              },
              {
                "type": "text",
                "name": "schema:identifier",
                "title": "Identity number",
                "isRequired": true,
                "requiredErrorText": "Please enter your identity number.",
                "inputType": "tel"
              }
            ],
            "title": "Your details"
          }
        ],
        "title": "1. Participant information"
      },
      {
        "name": "site",
        "elements": [
          {
            "type": "panel",
            "name": "schema:Place",
            "elements": [
              {
                "type": "dropdown",
                "name": "schema:name",
                "title": "Site name",
                "isRequired": true,
                "requiredErrorText": "Please choose the site.",
                "choices": [
                  "Sinathing",
                  "Henley",
                  "Mvubukazi",
                  "Ashdown",
                  "KwaPata",
                  "Willowfontein",
                  "Slangspruit",
                  "Foxhill Spruit",
                  "Dorpspruit",
                  "Baynespruit",
                  "Townbush Stream",
                  "Blackboroughspruit / Mkonza",
                  "Camps Drift",
                  "Umsunduzi",
                  "BlackboroughSpruit",
                  "BlackboroughSpruit 1",
                  "Ashdown Stream 2",
                  "Mvubukazi Trib",
                  "Mabane",
                  "Mpentshane Trib to Sinathing",
                  "Sinathing Trib",
                  "New Germany",
                  "Pinetown",
                  "Quarry Informal Settlements",
                  "Palmiet",
                  "Mthinzima"
                ]
              },
              {
                "type": "map-grid-selector",
                "name": "ixo:location",
                "title": "Location",
                "description": "Enable your device location. Zoom in until you see a grid appear on the map, select the grid block you are in. Make sure the location details are displaying below the map before proceeding."
              }
            ],
            "title": "Where are you monitoring?"
          }
        ],
        "title": "2. Site information"
      },
      {
        "name": "clarity",
        "elements": [
          {
            "type": "panel",
            "name": "minisass:ClarityTubeTest",
            "elements": [
              {
                "type": "text",
                "name": "minisass:clarityReadingOne",
                "title": "Reading one (tube units)",
                "isRequired": true,
                "requiredErrorText": "Please enter reading one.",
                "inputType": "number"
              },
              {
                "type": "text",
                "name": "minisass:clarityReadingTwo",
                "title": "Reading two (tube units)",
                "isRequired": true,
                "requiredErrorText": "Please enter reading two.",
                "inputType": "number"
              },
              {
                "type": "expression",
                "name": "minisass:averageClarityUnits",
                "title": "Average tube units",
                "description": "Average of the two readings. Worked out for you.",
                "expression": "({minisass:clarityReadingOne} + {minisass:clarityReadingTwo}) / 2",
                "displayStyle": "decimal",
                "maximumFractionDigits": 1
              }
            ],
            "title": "Clarity tube readings"
          }
        ],
        "title": "3. Clarity tube",
        "description": "The clarity tube measures how much light passes through the water."
      },
      {
        "name": "velocity",
        "elements": [
          {
            "type": "panel",
            "name": "minisass:VelocityTest",
            "elements": [
              {
                "type": "text",
                "name": "minisass:transectPointCount",
                "title": "Total number of points",
                "description": "How many points you recorded as you walked across the width of the river.",
                "isRequired": true,
                "requiredErrorText": "Please enter how many points you recorded.",
                "inputType": "number"
              },
              {
                "type": "text",
                "name": "minisass:velocityPointOne",
                "title": "Point 1 reading (cm)",
                "description": "Difference between the top and bottom recordings at this point.",
                "isRequired": true,
                "requiredErrorText": "Please enter the point 1 reading.",
                "inputType": "number"
              },
              {
                "type": "text",
                "name": "minisass:velocityPointTwo",
                "title": "Point 2 reading (cm)",
                "description": "Difference between the top and bottom recordings at this point.",
                "isRequired": true,
                "requiredErrorText": "Please enter the point 2 reading.",
                "inputType": "number"
              },
              {
                "type": "text",
                "name": "minisass:velocityPointThree",
                "title": "Point 3 reading (cm) (optional)",
                "description": "Difference between the top and bottom recordings at this point. Leave blank if you only took two points.",
                "inputType": "number"
              },
              {
                "type": "expression",
                "name": "minisass:averageVelocityReadingCm",
                "title": "Average reading (cm)",
                "description": "Average of the points above. Worked out for you.",
                "expression": "iif({minisass:velocityPointThree} notempty, ({minisass:velocityPointOne} + {minisass:velocityPointTwo} + {minisass:velocityPointThree}) / 3, ({minisass:velocityPointOne} + {minisass:velocityPointTwo}) / 2)",
                "displayStyle": "decimal",
                "maximumFractionDigits": 2
              },
              {
                "type": "dropdown",
                "name": "minisass:averageVelocityMs",
                "title": "Average velocity (m/s)",
                "description": "Use the average reading above to choose the matching velocity.",
                "isRequired": true,
                "requiredErrorText": "Please choose the average velocity.",
                "choices": [
                  {
                    "value": "0.12",
                    "text": "0.5 cm | 0.12 m/s"
                  },
                  {
                    "value": "0.24",
                    "text": "1.0 cm | 0.24 m/s"
                  },
                  {
                    "value": "0.33",
                    "text": "1.5 cm | 0.33 m/s"
                  },
                  {
                    "value": "0.41",
                    "text": "2.0 cm | 0.41 m/s"
                  },
                  {
                    "value": "0.48",
                    "text": "2.5 cm | 0.48 m/s"
                  },
                  {
                    "value": "0.54",
                    "text": "3.0 cm | 0.54 m/s"
                  },
                  {
                    "value": "0.60",
                    "text": "3.5 cm | 0.60 m/s"
                  },
                  {
                    "value": "0.65",
                    "text": "4.0 cm | 0.65 m/s"
                  },
                  {
                    "value": "0.70",
                    "text": "4.5 cm | 0.70 m/s"
                  },
                  {
                    "value": "0.75",
                    "text": "5.0 cm | 0.75 m/s"
                  },
                  {
                    "value": "0.80",
                    "text": "5.5 cm | 0.80 m/s"
                  },
                  {
                    "value": "0.84",
                    "text": "6.0 cm | 0.84 m/s"
                  },
                  {
                    "value": "0.88",
                    "text": "6.5 cm | 0.88 m/s"
                  },
                  {
                    "value": "0.92",
                    "text": "7.0 cm | 0.92 m/s"
                  },
                  {
                    "value": "0.96",
                    "text": "7.5 cm | 0.96 m/s"
                  },
                  {
                    "value": "1.00",
                    "text": "8.0 cm | 1.00 m/s"
                  },
                  {
                    "value": "1.03",
                    "text": "8.5 cm | 1.03 m/s"
                  },
                  {
                    "value": "1.07",
                    "text": "9.0 cm | 1.07 m/s"
                  },
                  {
                    "value": "1.10",
                    "text": "9.5 cm | 1.10 m/s"
                  },
                  {
                    "value": "1.13",
                    "text": "10.0 cm | 1.13 m/s"
                  },
                  {
                    "value": "1.17",
                    "text": "10.5 cm | 1.17 m/s"
                  },
                  {
                    "value": "1.20",
                    "text": "11.0 cm | 1.20 m/s"
                  },
                  {
                    "value": "1.23",
                    "text": "11.5 cm | 1.23 m/s"
                  },
                  {
                    "value": "1.26",
                    "text": "12.0 cm | 1.26 m/s"
                  },
                  {
                    "value": "1.29",
                    "text": "12.5 cm | 1.29 m/s"
                  },
                  {
                    "value": "1.32",
                    "text": "13.0 cm | 1.32 m/s"
                  },
                  {
                    "value": "1.34",
                    "text": "13.5 cm | 1.34 m/s"
                  },
                  {
                    "value": "1.37",
                    "text": "14.0 cm | 1.37 m/s"
                  },
                  {
                    "value": "1.40",
                    "text": "14.5 cm | 1.40 m/s"
                  },
                  {
                    "value": "1.43",
                    "text": "15.0 cm | 1.43 m/s"
                  },
                  {
                    "value": "1.45",
                    "text": "15.5 cm | 1.45 m/s"
                  },
                  {
                    "value": "1.48",
                    "text": "16.0 cm | 1.48 m/s"
                  },
                  {
                    "value": "1.50",
                    "text": "16.5 cm | 1.50 m/s"
                  },
                  {
                    "value": "1.53",
                    "text": "17.0 cm | 1.53 m/s"
                  },
                  {
                    "value": "1.55",
                    "text": "17.5 cm | 1.55 m/s"
                  },
                  {
                    "value": "1.58",
                    "text": "18.0 cm | 1.58 m/s"
                  },
                  {
                    "value": "1.60",
                    "text": "18.5 cm | 1.60 m/s"
                  },
                  {
                    "value": "1.63",
                    "text": "19.0 cm | 1.63 m/s"
                  },
                  {
                    "value": "1.65",
                    "text": "19.5 cm | 1.65 m/s"
                  },
                  {
                    "value": "1.67",
                    "text": "20.0 cm | 1.67 m/s"
                  },
                  {
                    "value": "1.70",
                    "text": "20.5 cm | 1.70 m/s"
                  },
                  {
                    "value": "1.72",
                    "text": "21.0 cm | 1.72 m/s"
                  },
                  {
                    "value": "1.74",
                    "text": "21.5 cm | 1.74 m/s"
                  },
                  {
                    "value": "1.76",
                    "text": "22.0 cm | 1.76 m/s"
                  },
                  {
                    "value": "1.79",
                    "text": "22.5 cm | 1.79 m/s"
                  },
                  {
                    "value": "1.81",
                    "text": "23.0 cm | 1.81 m/s"
                  },
                  {
                    "value": "1.83",
                    "text": "23.5 cm | 1.83 m/s"
                  },
                  {
                    "value": "1.85",
                    "text": "24.0 cm | 1.85 m/s"
                  },
                  {
                    "value": "1.87",
                    "text": "24.5 cm | 1.87 m/s"
                  },
                  {
                    "value": "1.89",
                    "text": "25.0 cm | 1.89 m/s"
                  }
                ]
              },
              {
                "type": "text",
                "name": "minisass:averageDepthCm",
                "title": "Average depth of the river (cm)",
                "isRequired": true,
                "requiredErrorText": "Please enter the average depth.",
                "inputType": "number"
              },
              {
                "type": "text",
                "name": "minisass:riverWidthM",
                "title": "Width of the river (m)",
                "isRequired": true,
                "requiredErrorText": "Please enter the river width.",
                "inputType": "number"
              }
            ],
            "title": "Flow measurements"
          },
          {
            "type": "panel",
            "name": "minisass:WeatherConditions",
            "elements": [
              {
                "type": "checkbox",
                "name": "minisass:weatherCondition",
                "title": "Weather conditions (optional)",
                "choices": [
                  {
                    "value": "sunny_clear",
                    "text": "Sunny and clear"
                  },
                  {
                    "value": "partly_cloudy_overcast",
                    "text": "Partly cloudy to overcast"
                  },
                  {
                    "value": "rainy",
                    "text": "Rainy"
                  },
                  {
                    "value": "windy",
                    "text": "Windy"
                  },
                  {
                    "value": "low_visibility",
                    "text": "Low visibility"
                  }
                ]
              },
              {
                "type": "radiogroup",
                "name": "minisass:recentRainfall",
                "title": "Was there any rainfall in the past two days?",
                "isRequired": true,
                "requiredErrorText": "Please tell us about rainfall in the past two days.",
                "choices": [
                  {
                    "value": "no",
                    "text": "No"
                  },
                  {
                    "value": "yes",
                    "text": "Yes"
                  }
                ]
              }
            ],
            "title": "Weather"
          }
        ],
        "title": "4. Velocity plank",
        "description": "The velocity plank (Transparent Velocity Head Rod) measures how fast the water flows."
      },
      {
        "name": "minisass_observations",
        "elements": [
          {
            "type": "panel",
            "name": "minisass:MiniSASSAssessment",
            "elements": [
              {
                "type": "checkbox",
                "name": "minisass:illegalDischarge",
                "title": "Human impact — any illegal discharges?",
                "isRequired": true,
                "requiredErrorText": "Please tick what you saw, or tick None.",
                "choices": [
                  {
                    "value": "factories",
                    "text": "Factories"
                  },
                  {
                    "value": "stormwater_drains",
                    "text": "Stormwater drains"
                  },
                  {
                    "value": "sewage_outfalls",
                    "text": "Sewage outfalls"
                  }
                ],
                "showOtherItem": true,
                "showNoneItem": true,
                "noneText": "None",
                "otherText": "Other"
              },
              {
                "type": "checkbox",
                "name": "minisass:nearbyLandUse",
                "title": "Nearby land use",
                "description": "What the surrounding community does with the river, or on the river.",
                "isRequired": true,
                "requiredErrorText": "Please tick the land uses, or tick None / Unknown.",
                "choices": [
                  {
                    "value": "urban",
                    "text": "Urban"
                  },
                  {
                    "value": "agricultural",
                    "text": "Agricultural"
                  },
                  {
                    "value": "industrial",
                    "text": "Industrial"
                  },
                  {
                    "value": "informal_settlements",
                    "text": "Informal settlements"
                  },
                  {
                    "value": "traditional_practices",
                    "text": "Traditional practices"
                  },
                  {
                    "value": "washing",
                    "text": "Washing"
                  },
                  {
                    "value": "fishing",
                    "text": "Fishing"
                  },
                  {
                    "value": "dumping",
                    "text": "Dumping"
                  },
                  {
                    "value": "recreation",
                    "text": "Recreation"
                  }
                ],
                "showNoneItem": true,
                "noneText": "None / Unknown"
              },
              {
                "type": "checkbox",
                "name": "minisass:habitatObservation",
                "title": "Habitat observations",
                "isRequired": true,
                "requiredErrorText": "Please tick what you observed.",
                "choices": [
                  {
                    "value": "algae",
                    "text": "Algae presence"
                  },
                  {
                    "value": "litter_debris",
                    "text": "Litter and debris"
                  },
                  {
                    "value": "dead_organisms",
                    "text": "Dead organisms"
                  },
                  {
                    "value": "alien_invasive",
                    "text": "Alien invasive species"
                  },
                  {
                    "value": "foam_oil_sheen",
                    "text": "Unnatural foam or oil sheen"
                  }
                ],
                "showOtherItem": true,
                "otherText": "Other"
              },
              {
                "type": "radiogroup",
                "name": "minisass:riverBankStability",
                "title": "River bank stability",
                "isRequired": true,
                "requiredErrorText": "Please choose the bank condition.",
                "choices": [
                  {
                    "value": "eroded",
                    "text": "Eroded"
                  },
                  {
                    "value": "collapsed",
                    "text": "Collapsed"
                  },
                  {
                    "value": "stable",
                    "text": "Stable banks"
                  }
                ]
              },
              {
                "type": "file",
                "name": "schema:image_species",
                "title": "Photo of the species you identified",
                "description": "Take a clear photo of the macroinvertebrates you found.",
                "isRequired": true,
                "requiredErrorText": "Please add a photo of the species.",
                "acceptedTypes": "image/*",
                "storeDataAsText": false,
                "maxSize": 5000000,
                "sourceType": "file-camera"
              }
            ],
            "title": "River and surroundings"
          }
        ],
        "title": "5. miniSASS — observations",
        "description": "Collect macroinvertebrates and note the conditions around the river."
      },
      {
        "name": "minisass_scoring",
        "elements": [
          {
            "type": "checkbox",
            "name": "minisass:identifiedGroups",
            "title": "Groups identified (with sensitivity scores)",
            "description": "Tick each group you found. The number is its sensitivity score.",
            "isRequired": true,
            "requiredErrorText": "Please tick at least one group you found.",
            "choices": [
              {
                "value": "flatworms",
                "text": "Flatworms (3)"
              },
              {
                "value": "worms",
                "text": "Worms (2)"
              },
              {
                "value": "leeches",
                "text": "Leeches (2)"
              },
              {
                "value": "crabs_shrimps",
                "text": "Crabs or Shrimps (6)"
              },
              {
                "value": "stoneflies",
                "text": "Stoneflies (17)"
              },
              {
                "value": "minnow_mayflies",
                "text": "Minnow Mayflies (5)"
              },
              {
                "value": "other_mayflies",
                "text": "Other Mayflies (11)"
              },
              {
                "value": "damselflies",
                "text": "Damselflies (4)"
              },
              {
                "value": "dragonflies",
                "text": "Dragonflies (6)"
              },
              {
                "value": "bugs_beetles",
                "text": "Bugs or Beetles (5)"
              },
              {
                "value": "caddisflies",
                "text": "Caddisflies, cased and uncased (9)"
              },
              {
                "value": "true_flies",
                "text": "True Flies (2)"
              },
              {
                "value": "snails",
                "text": "Snails (4)"
              }
            ]
          },
          {
            "type": "expression",
            "name": "minisass:groupCount",
            "title": "Total number of groups identified",
            "description": "Counted for you from the groups ticked above.",
            "expression": "iif({minisass:identifiedGroups} contains 'flatworms',1,0)+iif({minisass:identifiedGroups} contains 'worms',1,0)+iif({minisass:identifiedGroups} contains 'leeches',1,0)+iif({minisass:identifiedGroups} contains 'crabs_shrimps',1,0)+iif({minisass:identifiedGroups} contains 'stoneflies',1,0)+iif({minisass:identifiedGroups} contains 'minnow_mayflies',1,0)+iif({minisass:identifiedGroups} contains 'other_mayflies',1,0)+iif({minisass:identifiedGroups} contains 'damselflies',1,0)+iif({minisass:identifiedGroups} contains 'dragonflies',1,0)+iif({minisass:identifiedGroups} contains 'bugs_beetles',1,0)+iif({minisass:identifiedGroups} contains 'caddisflies',1,0)+iif({minisass:identifiedGroups} contains 'true_flies',1,0)+iif({minisass:identifiedGroups} contains 'snails',1,0)"
          },
          {
            "type": "expression",
            "name": "minisass:totalSensitivityScore",
            "title": "Total sensitivity score",
            "description": "Sum of the sensitivity scores of the groups ticked. Worked out for you.",
            "expression": "iif({minisass:identifiedGroups} contains 'flatworms',3,0)+iif({minisass:identifiedGroups} contains 'worms',2,0)+iif({minisass:identifiedGroups} contains 'leeches',2,0)+iif({minisass:identifiedGroups} contains 'crabs_shrimps',6,0)+iif({minisass:identifiedGroups} contains 'stoneflies',17,0)+iif({minisass:identifiedGroups} contains 'minnow_mayflies',5,0)+iif({minisass:identifiedGroups} contains 'other_mayflies',11,0)+iif({minisass:identifiedGroups} contains 'damselflies',4,0)+iif({minisass:identifiedGroups} contains 'dragonflies',6,0)+iif({minisass:identifiedGroups} contains 'bugs_beetles',5,0)+iif({minisass:identifiedGroups} contains 'caddisflies',9,0)+iif({minisass:identifiedGroups} contains 'true_flies',2,0)+iif({minisass:identifiedGroups} contains 'snails',4,0)"
          },
          {
            "type": "expression",
            "name": "minisass:miniSASSScore",
            "title": "Average score / miniSASS score",
            "description": "Total sensitivity score divided by the number of groups. Worked out for you.",
            "expression": "iif({minisass:groupCount} > 0, {minisass:totalSensitivityScore} / {minisass:groupCount}, 0)",
            "displayStyle": "decimal",
            "maximumFractionDigits": 1
          },
          {
            "type": "radiogroup",
            "name": "minisass:riverCategory",
            "title": "River category",
            "isRequired": true,
            "requiredErrorText": "Please choose the river category.",
            "choices": [
              {
                "value": "sandy",
                "text": "Sandy"
              },
              {
                "value": "rocky",
                "text": "Rocky"
              }
            ]
          },
          {
            "type": "radiogroup",
            "name": "minisass:challengesEncountered",
            "title": "Were there any challenges during this assessment?",
            "isRequired": true,
            "requiredErrorText": "Please tell us whether you had any challenges.",
            "choices": [
              {
                "value": "no",
                "text": "No"
              },
              {
                "value": "yes",
                "text": "Yes"
              }
            ]
          },
          {
            "type": "comment",
            "name": "minisass:challengesDescription",
            "visibleIf": "{minisass:challengesEncountered} = 'yes'",
            "title": "Please describe the challenges",
            "isRequired": true,
            "requiredErrorText": "Please describe the challenges you had.",
            "rows": 3
          }
        ],
        "title": "5. miniSASS — scoring",
        "description": "Record the groups you found. The totals and score are worked out for you."
      },
      {
        "name": "evidence",
        "elements": [
          {
            "type": "file",
            "name": "schema:image_selfie",
            "title": "Take a selfie on site",
            "description": "A photo of you at the river, to show you were there.",
            "isRequired": true,
            "requiredErrorText": "Please add a selfie on site.",
            "acceptedTypes": "image/*",
            "storeDataAsText": false,
            "maxSize": 5000000,
            "sourceType": "file-camera"
          },
          {
            "type": "file",
            "name": "schema:image_site",
            "title": "Photo of the site and tools",
            "description": "A photo showing the tools and the surroundings.",
            "isRequired": true,
            "requiredErrorText": "Please add a photo of the site and tools.",
            "acceptedTypes": "image/*",
            "storeDataAsText": false,
            "maxSize": 5000000,
            "sourceType": "file-camera"
          }
        ],
        "title": "6. Evidence"
      }
    ],
    "questionErrorLocation": "bottom",
    "showProgressBar": true,
    "progressBarLocation": "top",
    "startSurveyText": "Start assessment",
    "pagePrevText": "Back",
    "pageNextText": "Next",
    "completeText": "Submit assessment",
    "firstPageIsStartPage": true
  }
}