{
    "description": "",
    "title": "",
    "plural_title": "",
    "definitions": {
        "Person": {
            "multiple": true,
            "description": "A person involved in the accident",
            "title": "Person (This is the title)",
            "required": [
                "_localId"
            ],
            "plural_title": "Persons",
            "propertyOrder": 2,
            "definitions": {},
            "type": "object",
            "properties": {
                "License number": {
                    "isSearchable": false,
                    "propertyOrder": 2,
                    "type": "string",
                    "fieldType": "text",
                    "format": "text"
                },
                "Name": {
                    "isSearchable": false,
                    "propertyOrder": 0,
                    "type": "string",
                    "fieldType": "text",
                    "format": "text"
                },
                "Driver error": {
                    "enum": [
                        "Fatigued/asleep",
                        "Inattentive",
                        "Too fast",
                        "Too close",
                        "No signal",
                        "Bad overtaking",
                        "Bad turning",
                        "Using cell phone"
                    ],
                    "displayType": "select",
                    "propertyOrder": 6,
                    "fieldType": "selectlist",
                    "isSearchable": false,
                    "type": "string"
                },
                "Age": {
                    "isSearchable": false,
                    "propertyOrder": 4,
                    "type": "string",
                    "fieldType": "text",
                    "format": "number"
                },
                "Vehicle": {
                    "watch": {
                        "target": "Vehicle"
                    },
                    "enumSource": [
                        {
                            "source": "target",
                            "value": "{{item._localId}}",
                            "title": ""
                        }
                    ],
                    "type": "string",
                    "fieldType": "reference",
                    "propertyOrder": 11
                },
                "Involvment": {
                    "enum": [
                        "Pedestrian",
                        "Witness",
                        "Passenger",
                        "Driver"
                    ],
                    "displayType": "select",
                    "propertyOrder": 10,
                    "fieldType": "selectlist",
                    "isSearchable": false,
                    "type": "string"
                },
                "Seat belt/helmet": {
                    "enum": [
                        "Seat belt/helmet worn",
                        "Not worn",
                        "Not worn correctly"
                    ],
                    "displayType": "select",
                    "propertyOrder": 8,
                    "fieldType": "selectlist",
                    "isSearchable": false,
                    "type": "string"
                },
                "Sex": {
                    "enum": [
                        "Male",
                        "Female"
                    ],
                    "displayType": "select",
                    "propertyOrder": 3,
                    "fieldType": "selectlist",
                    "isSearchable": false,
                    "type": "string"
                },
                "Alcohol/drugs": {
                    "enum": [
                        "Alcohol suspected",
                        "Drugs suspected"
                    ],
                    "displayType": "select",
                    "propertyOrder": 7,
                    "fieldType": "selectlist",
                    "isSearchable": false,
                    "type": "string"
                },
                "Address": {
                    "isSearchable": false,
                    "propertyOrder": 1,
                    "type": "string",
                    "fieldType": "text",
                    "format": "text"
                },
                "Injury": {
                    "enum": [
                        "Fatal",
                        "Serious",
                        "Minor",
                        "Not injured"
                    ],
                    "displayType": "select",
                    "propertyOrder": 5,
                    "fieldType": "selectlist",
                    "isSearchable": false,
                    "type": "string"
                },
                "Hospital": {
                    "isSearchable": false,
                    "propertyOrder": 9,
                    "type": "string",
                    "fieldType": "text",
                    "format": "text"
                },
                "_localId": {
                    "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
                    "type": "string",
                    "options": {
                        "hidden": true
                    }
                }
            }
        },
        "AccidentDetails": {
            "multiple": false,
            "description": "Details for Accident",
            "title": "Accident Details (Title)",
            "required": [
                "_localId"
            ],
            "plural_title": "Accident Details",
            "propertyOrder": 0,
            "details": true,
            "definitions": {},
            "type": "object",
            "properties": {
                "Traffic control": {
                    "enum": [
                        "None",
                        "Centerline",
                        "Pedestrian crossing",
                        "School crossing",
                        "Police controlled",
                        "Traffic lights",
                        "Stop sign",
                        "Give way"
                    ],
                    "displayType": "select",
                    "propertyOrder": 4,
                    "fieldType": "selectlist",
                    "isSearchable": false,
                    "type": "string"
                },
                "Severity": {
                    "enum": [
                        "Fatal",
                        "Injury",
                        "Property"
                    ],
                    "displayType": "select",
                    "propertyOrder": 0,
                    "fieldType": "selectlist",
                    "isSearchable": true,
                    "type": "string"
                },
                "Surface condition": {
                    "enum": [
                        "Dry",
                        "Wet",
                        "Muddy",
                        "Flooded"
                    ],
                    "displayType": "select",
                    "propertyOrder": 7,
                    "fieldType": "selectlist",
                    "isSearchable": false,
                    "type": "string"
                },
                "Light": {
                    "enum": [
                        "Daylight",
                        "Dawn/dusk",
                        "Night (lit)",
                        "Night (unlit)"
                    ],
                    "displayType": "select",
                    "propertyOrder": 6,
                    "fieldType": "selectlist",
                    "isSearchable": false,
                    "type": "string"
                },
                "Main cause": {
                    "enum": [
                        "Vehicle defect",
                        "Road defect",
                        "Human error"
                    ],
                    "displayType": "select",
                    "propertyOrder": 2,
                    "fieldType": "selectlist",
                    "isSearchable": true,
                    "type": "string"
                },
                "Weather": {
                    "enum": [
                        "Fair",
                        "Rain",
                        "Wind",
                        "Smoke",
                        "Fog",
                        "Drizzle",
                        "Storm"
                    ],
                    "displayType": "select",
                    "propertyOrder": 5,
                    "fieldType": "selectlist",
                    "isSearchable": true,
                    "type": "string"
                },
                "_localId": {
                    "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
                    "type": "string",
                    "options": {
                        "hidden": true
                    }
                },
                "Surface type": {
                    "enum": [
                        "Concrete",
                        "Asphalt",
                        "Gravel",
                        "Earth"
                    ],
                    "displayType": "select",
                    "propertyOrder": 8,
                    "fieldType": "selectlist",
                    "isSearchable": false,
                    "type": "string"
                },
                "Collision type": {
                    "enum": [
                        "Head on",
                        "Rear end",
                        "Right angle",
                        "Side swipe",
                        "Overturned vehicle",
                        "Hit object in road",
                        "Hit object off road",
                        "Hit parked vehicle",
                        "Hit pedestrian",
                        "Hit animal"
                    ],
                    "displayType": "select",
                    "propertyOrder": 1,
                    "fieldType": "selectlist",
                    "isSearchable": true,
                    "type": "string"
                },
                "Description": {
                    "isSearchable": false,
                    "propertyOrder": 3,
                    "type": "string",
                    "fieldType": "text",
                    "format": "textarea"
                }
            }
        },
        "Vehicle": {
            "multiple": true,
            "description": "A vehicle involved in the accident",
            "title": "Vehicle (Title)",
            "required": [
                "_localId"
            ],
            "plural_title": "Vehicles",
            "propertyOrder": 1,
            "definitions": {},
            "type": "object",
            "properties": {
                "Maneuver": {
                    "enum": [
                        "Left turn",
                        "Right turn",
                        "\"U\" turn",
                        "Cross traffic",
                        "Merging",
                        "Diverging",
                        "Overtaking",
                        "Going ahead",
                        "Reversing",
                        "Sudden start",
                        "Sudden stop",
                        "Parked off road",
                        "Parked on road"
                    ],
                    "displayType": "select",
                    "propertyOrder": 7,
                    "fieldType": "selectlist",
                    "isSearchable": false,
                    "type": "string"
                },
                "Direction": {
                    "enum": [
                        "North",
                        "South",
                        "East",
                        "West"
                    ],
                    "displayType": "select",
                    "propertyOrder": 9,
                    "fieldType": "selectlist",
                    "isSearchable": false,
                    "type": "string"
                },
                "Loading": {
                    "enum": [
                        "Legal",
                        "Over loaded",
                        "Unsafe load"
                    ],
                    "displayType": "select",
                    "propertyOrder": 8,
                    "fieldType": "selectlist",
                    "isSearchable": false,
                    "type": "string"
                },
                "Vehicle type": {
                    "enum": [
                        "Bicycle",
                        "Pedicab",
                        "Motorcycle",
                        "Tricycle",
                        "Car",
                        "Jeepney",
                        "Bus",
                        "Truck (Rigid)",
                        "Truck (Artic)",
                        "Van",
                        "Animal"
                    ],
                    "displayType": "select",
                    "propertyOrder": 0,
                    "fieldType": "selectlist",
                    "isSearchable": false,
                    "type": "string"
                },
                "Insurance details": {
                    "isSearchable": false,
                    "propertyOrder": 6,
                    "type": "string",
                    "fieldType": "text",
                    "format": "textarea"
                },
                "Chassis number": {
                    "isSearchable": false,
                    "propertyOrder": 4,
                    "type": "string",
                    "fieldType": "text",
                    "format": "text"
                },
                "Make": {
                    "isSearchable": false,
                    "propertyOrder": 1,
                    "type": "string",
                    "fieldType": "text",
                    "format": "text"
                },
                "Defect": {
                    "enum": [
                        "None",
                        "Lights",
                        "Brakes",
                        "Steering",
                        "Tires",
                        "Multiple"
                    ],
                    "displayType": "select",
                    "propertyOrder": 10,
                    "fieldType": "selectlist",
                    "isSearchable": false,
                    "type": "string"
                },
                "Damage": {
                    "enum": [
                        "None",
                        "Front",
                        "Rear",
                        "Right",
                        "Left",
                        "Roof",
                        "Multiple"
                    ],
                    "displayType": "select",
                    "propertyOrder": 11,
                    "fieldType": "selectlist",
                    "isSearchable": false,
                    "type": "string"
                },
                "_localId": {
                    "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
                    "type": "string",
                    "options": {
                        "hidden": true
                    }
                },
                "Model": {
                    "isSearchable": false,
                    "propertyOrder": 2,
                    "type": "string",
                    "fieldType": "text",
                    "format": "text"
                },
                "Plate number": {
                    "isSearchable": false,
                    "propertyOrder": 3,
                    "type": "string",
                    "fieldType": "text",
                    "format": "text"
                },
                "Engine number": {
                    "isSearchable": false,
                    "propertyOrder": 5,
                    "type": "string",
                    "fieldType": "text",
                    "format": "text"
                }
            }
        }
    },
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "Person": {
            "items": {
                "$ref": "#/definitions/Person"
            },
            "type": "array",
            "propertyOrder": 2
        },
        "Accident Details": {
            "$ref": "#/definitions/AccidentDetails",
            "propertyOrder": 0
        },
        "Vehicle": {
            "items": {
                "$ref": "#/definitions/Vehicle"
            },
            "type": "array",
            "propertyOrder": 1
        }
    }
}