()
return {
        SchemaOptional("assignedUser"): id_schema,
        SchemaOptional("attributeCategoryOptions"): id_schema,
        SchemaOptional("attributeOptionCombo"): id_schema,
        SchemaOptional("completedBy"): str,
        SchemaOptional("completedDate"): date_schema,
        SchemaOptional("coordinate"): coordinate_schema,
        SchemaOptional("created"): datetime_schema,
        SchemaOptional("createdAtClient"): datetime_schema,
        SchemaOptional("createdByUserInfo"): user_info_schema,
        "dataValues": [{
            SchemaOptional("created"): datetime_schema,
            "dataElement": id_schema,
            SchemaOptional("lastUpdated"): datetime_schema,
            SchemaOptional("providedElsewhere"): bool,
            SchemaOptional("storedBy"): str,
            "value": object,
        }],
        SchemaOptional("deleted"): bool,
        SchemaOptional("dueDate"): date_schema,
        SchemaOptional("enrollment"): id_schema,
        SchemaOptional("enrollmentStatus"): enrollment_status_schema,
        SchemaOptional("event"): id_schema,
        "eventDate": date_schema,
        SchemaOptional("geometry"): {
            "type": str,
            "coordinates": [float],
        },
        SchemaOptional("lastUpdated"): datetime_schema,
        SchemaOptional("lastUpdatedAtClient"): datetime_schema,
        SchemaOptional("lastUpdatedByUserInfo"): user_info_schema,
        SchemaOptional("notes"): [note_schema],
        "orgUnit": id_schema,
        SchemaOptional("orgUnitName"): str,
        "program": id_schema,
        SchemaOptional("programStage"): id_schema,
        SchemaOptional("relationships"): [relationship_schema],
        SchemaOptional("status"): event_status_schema,
        SchemaOptional("storedBy"): str,
        SchemaOptional("trackedEntityInstance"): id_schema,
    }
Returns the schema for a DHIS2 Event.

    >>> event = {
    ...   "program": "eBAyeGv0exc",
    ...   "orgUnit": "DiszpKrYNg8",
    ...   "eventDate": "2013-05-17",
    ...   "status": "COMPLETED",
    ...   "completedDate": "2013-05-18",
    ...   "storedBy": "admin",
    ...   "coordinate": {
    ...     "latitude": 59.8,
    ...     "longitude": 10.9
    ...   },
    ...   "dataValues": [
    ...     { "dataElement": "qrur9Dvnyt5", "value": "22" },
    ...     { "dataElement": "oZg33kd9taw", "value": "Male" },
    ...     { "dataElement": "msodh3rEMJa", "value": "2013-05-18" }
    ...   ]
    ... }
    >>> Schema(get_event_schema()).is_valid(event)
    True
Returns the schema for a DHIS2 Event.
Returns the schema for a DHIS2 Event .
def get_event_schema() -> dict:
    """
    Returns the schema for a DHIS2 Event.

    >>> event = {
    ...   "program": "eBAyeGv0exc",
    ...   "orgUnit": "DiszpKrYNg8",
    ...   "eventDate": "2013-05-17",
    ...   "status": "COMPLETED",
    ...   "completedDate": "2013-05-18",
    ...   "storedBy": "admin",
    ...   "coordinate": {
    ...     "latitude": 59.8,
    ...     "longitude": 10.9
    ...   },
    ...   "dataValues": [
    ...     { "dataElement": "qrur9Dvnyt5", "value": "22" },
    ...     { "dataElement": "oZg33kd9taw", "value": "Male" },
    ...     { "dataElement": "msodh3rEMJa", "value": "2013-05-18" }
    ...   ]
    ... }
    >>> Schema(get_event_schema()).is_valid(event)
    True

    """
    coordinate_schema = get_coordinate_schema()
    note_schema = get_note_schema()
    relationship_schema = get_relationship_schema()
    user_info_schema = get_user_info_schema()
    return {
        SchemaOptional("assignedUser"): id_schema,
        SchemaOptional("attributeCategoryOptions"): id_schema,
        SchemaOptional("attributeOptionCombo"): id_schema,
        SchemaOptional("completedBy"): str,
        SchemaOptional("completedDate"): date_schema,
        SchemaOptional("coordinate"): coordinate_schema,
        SchemaOptional("created"): datetime_schema,
        SchemaOptional("createdAtClient"): datetime_schema,
        SchemaOptional("createdByUserInfo"): user_info_schema,
        "dataValues": [{
            SchemaOptional("created"): datetime_schema,
            "dataElement": id_schema,
            SchemaOptional("lastUpdated"): datetime_schema,
            SchemaOptional("providedElsewhere"): bool,
            SchemaOptional("storedBy"): str,
            "value": object,
        }],
        SchemaOptional("deleted"): bool,
        SchemaOptional("dueDate"): date_schema,
        SchemaOptional("enrollment"): id_schema,
        SchemaOptional("enrollmentStatus"): enrollment_status_schema,
        SchemaOptional("event"): id_schema,
        "eventDate": date_schema,
        SchemaOptional("geometry"): {
            "type": str,
            "coordinates": [float],
        },
        SchemaOptional("lastUpdated"): datetime_schema,
        SchemaOptional("lastUpdatedAtClient"): datetime_schema,
        SchemaOptional("lastUpdatedByUserInfo"): user_info_schema,
        SchemaOptional("notes"): [note_schema],
        "orgUnit": id_schema,
        SchemaOptional("orgUnitName"): str,
        "program": id_schema,
        SchemaOptional("programStage"): id_schema,
        SchemaOptional("relationships"): [relationship_schema],
        SchemaOptional("status"): event_status_schema,
        SchemaOptional("storedBy"): str,
        SchemaOptional("trackedEntityInstance"): id_schema,
    }
def get_event_schema ( ) -> dict : coordinate_schema = get_coordinate_schema ( ) note_schema = get_note_schema ( ) relationship_schema = get_relationship_schema ( ) user_info_schema = get_user_info_schema ( ) return { SchemaOptional ( "assignedUser" ) : id_schema , SchemaOptional ( "attributeCategoryOptions" ) : id_schema , SchemaOptional ( "attributeOptionCombo" ) : id_schema , SchemaOptional ( "completedBy" ) : str , SchemaOptional ( "completedDate" ) : date_schema , SchemaOptional ( "coordinate" ) : coordinate_schema , SchemaOptional ( "created" ) : datetime_schema , SchemaOptional ( "createdAtClient" ) : datetime_schema , SchemaOptional ( "createdByUserInfo" ) : user_info_schema , "dataValues" : [ { SchemaOptional ( "created" ) : datetime_schema , "dataElement" : id_schema , SchemaOptional ( "lastUpdated" ) : datetime_schema , SchemaOptional ( "providedElsewhere" ) : bool , SchemaOptional ( "storedBy" ) : str , "value" : object , } ] , SchemaOptional ( "deleted" ) : bool , SchemaOptional ( "dueDate" ) : date_schema , SchemaOptional ( "enrollment" ) : id_schema , SchemaOptional ( "enrollmentStatus" ) : enrollment_status_schema , SchemaOptional ( "event" ) : id_schema , "eventDate" : date_schema , SchemaOptional ( "geometry" ) : { "type" : str , "coordinates" : [ float ] , } , SchemaOptional ( "lastUpdated" ) : datetime_schema , SchemaOptional ( "lastUpdatedAtClient" ) : datetime_schema , SchemaOptional ( "lastUpdatedByUserInfo" ) : user_info_schema , SchemaOptional ( "notes" ) : [ note_schema ] , "orgUnit" : id_schema , SchemaOptional ( "orgUnitName" ) : str , "program" : id_schema , SchemaOptional ( "programStage" ) : id_schema , SchemaOptional ( "relationships" ) : [ relationship_schema ] , SchemaOptional ( "status" ) : event_status_schema , SchemaOptional ( "storedBy" ) : str , SchemaOptional ( "trackedEntityInstance" ) : id_schema , }