{
  "@context": {
    "ixo": "https://w3id.org/ixo/ns/protocol/",
    "@id": "@type",
    "type": "@type",
    "@protected": true
  },
  "type": "ixo:entity#surveyTemplate",
  "question": {
    "title": "Home Visit",
    "description": "Assessment of household location and evidence collection for monitoring purposes.",
    "pages": [
      {
        "name": "home_visit",
        "elements": [
          {
            "type": "text",
            "name": "ecs:customerId",
            "title": "Customer ID",
            "readOnly": false
          },
          {
            "type": "map-grid-selector",
            "name": "schema:geoCoordinates",
            "title": "Household Location",
            "isRequired": true,
            "center": "-15.40354469974109, 28.28025716916359",
            "gridPrecision": 9
          },
          {
            "type": "file",
            "name": "stove_photo",
            "title": "Upload Charcoal Stove Picture",
            "allowMultiple": true,
            "acceptedTypes": "image/*",
            "waitForUpload": true,
            "maxSize": 1024000,
            "sourceType": "file-camera"
          },
          {
            "type": "radiogroup",
            "name": "ecs:ownsStove",
            "title": "Do you already have a stove from SupaMoto in your household?",
            "choices": [
              "Yes",
              "No"
            ]
          },
          {
            "type": "text",
            "name": "schema:fullName",
            "visibleIf": "{ecs:ownsStove} = 'Yes'",
            "title": "Who has the contract for the stove?",
            "description": "Name Surname"
          },
          {
            "type": "text",
            "name": "ecs:customerId_existing",
            "visibleIf": "{ecs:ownsStove} = 'Yes'",
            "title": "What is their SupaMoto Customer ID?"
          },
          {
            "type": "text",
            "name": "person:nationalId_1",
            "visibleIf": "{ecs:ownsStove} = 'Yes'",
            "title": "What is their National Identity Number?",
            "validators": [
              {
                "type": "regex",
                "text": "Use the format xxxxxx/xx/x",
                "regex": "^\\d{6}/\\d{2}/\\d{1}$"
              }
            ]
          },
          {
            "type": "comment",
            "name": "schema:comment",
            "title": "Additional Comments",
            "description": "Landmarks or Location Details"
          }
        ]
      }
    ]
  }
}