{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "definitions": {
        "connectedPerson": {
            "properties": {
                "name": {
                    "faker": "name.findName",
                    "type": "string"
                },
                "phone": {
                    "chance": {
                        "phone": {
                            "country": "uk"
                        }
                    },
                    "type": "string"
                }
            },
            "type": "object"
        },
        "symptoms": {
            "additionalProperties": false,
            "properties": {
                "abdominal_pains": {
                    "type": "boolean"
                },
                "articular_pain": {
                    "type": "boolean"
                },
                "back_pain": {
                    "type": "boolean"
                },
                "bruises": {
                    "type": "boolean"
                },
                "cough": {
                    "type": "boolean"
                },
                "diarrhea": {
                    "type": "boolean"
                },
                "difficulty_breathing": {
                    "type": "boolean"
                },
                "difficulty_swallowing": {
                    "type": "boolean"
                },
                "fever": {
                    "type": "boolean"
                },
                "headache": {
                    "type": "boolean"
                },
                "hiccups": {
                    "type": "boolean"
                },
                "intense_fatigue": {
                    "type": "boolean"
                },
                "jaundice": {
                    "type": "boolean"
                },
                "loss_of_appetite": {
                    "type": "boolean"
                },
                "muscular_pain": {
                    "type": "boolean"
                },
                "nausea_vomiting": {
                    "type": "boolean"
                },
                "neck_rigidity": {
                    "type": "boolean"
                },
                "other": {
                    "type": "string"
                },
                "other_symptoms": {
                    "type": "boolean"
                },
                "rash": {
                    "type": "boolean"
                },
                "red_eyes": {
                    "type": "boolean"
                },
                "sore_throat": {
                    "type": "boolean"
                },
                "temperature": {
                    "type": "number"
                },
                "thoracic_pain": {
                    "type": "boolean"
                },
                "unexplained_bleedings": {
                    "type": "boolean"
                }
            },
            "type": "object"
        }
    },
    "description": "A single follow up of a person",
    "properties": {
        "_id": {
            "pattern": "^[^/]+:[^:]+$",
            "type": "string"
        },
        "comment": {
            "type": "string"
        },
        "dateOfVisit": {
            "_format": "date-time",
            "type": "string"
        },
        "deviceId": {
            "type": "string"
        },
        "doc_type": {
            "pattern": "^followup$",
            "type": "string"
        },
        "geoInfo": {
            "properties": {
                "coords": {
                    "properties": {
                        "latitude": {
                            "type": "number"
                        },
                        "longitude": {
                            "type": "number"
                        }
                    },
                    "type": "object"
                }
            },
            "type": "object"
        },
        "incompleteReason": {
            "enum": [
                "food-distribution-incomplete",
                "no-food-distribution",
                "gone-to-work",
                "resistance",
                "travelling",
                "other"
            ]
        },
        "interviewer": {
            "$ref": "#/definitions/connectedPerson"
        },
        "isSymptomatic": {
            "type": "boolean"
        },
        "personId": {
            "type": "string"
        },
        "status": {
            "enum": [
                "incomplete",
                "complete"
            ]
        },
        "symptoms": {
            "$ref": "#/definitions/symptoms"
        },
        "version": {
            "_format": "semver",
            "type": "string"
        }
    },
    "required": [
        "_id",
        "doc_type",
        "version",
        "dateOfVisit",
        "personId",
        "status"
    ],
    "title": "FollowUp",
    "type": "object"
}