{
    "$defs": {
        "Cohort": {
            "additionalProperties": false,
            "description": "A cohort of the GUTS study",
            "properties": {
                "identifier": {
                    "$ref": "#/$defs/CohortIdentifier",
                    "description": "A name that identifies the cohort uniquely within the GUTS study"
                },
                "objtype": {
                    "description": "The type designator for a GUTS \"thing\"",
                    "enum": [
                        "Cohort"
                    ],
                    "type": "string"
                },
                "participant_measures": {
                    "description": "All measures collected from all participants during all sessions of a specific cohort",
                    "items": {
                        "$ref": "#/$defs/ParticipantMeasure"
                    },
                    "type": "array"
                },
                "participants": {
                    "description": "A name that identifies the cohort uniquely within the GUTS study",
                    "items": {
                        "$ref": "#/$defs/Participant"
                    },
                    "type": "array"
                },
                "sessions": {
                    "description": "All sessions of a specific cohort",
                    "items": {
                        "$ref": "#/$defs/CohortSession"
                    },
                    "type": "array"
                }
            },
            "required": [
                "identifier"
            ],
            "title": "Cohort",
            "type": "object"
        },
        "CohortIdentifier": {
            "description": "",
            "enum": [
                "SOCIAL",
                "SCHOOL",
                "GAINS",
                "EMPATHY"
            ],
            "title": "CohortIdentifier",
            "type": "string"
        },
        "CohortSession": {
            "additionalProperties": false,
            "description": "A specific session of a specific cohort of the GUTS study",
            "properties": {
                "identifier": {
                    "$ref": "#/$defs/CohortIdentifier",
                    "description": "A name that identifies the cohort uniquely within the GUTS study"
                },
                "objtype": {
                    "description": "The type designator for a GUTS \"thing\"",
                    "enum": [
                        "CohortSession"
                    ],
                    "type": "string"
                },
                "participant_measures": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "participants": {
                    "description": "A name that identifies the cohort uniquely within the GUTS study",
                    "items": {
                        "$ref": "#/$defs/CohortIdentifier"
                    },
                    "type": "array"
                }
            },
            "required": [
                "identifier",
                "participants"
            ],
            "title": "CohortSession",
            "type": "object"
        },
        "DataCategory": {
            "description": "",
            "enum": [
                "antisocial",
                "background",
                "individual-outcome",
                "parenting",
                "prosocial-behavior",
                "self-regulation",
                "social-media"
            ],
            "title": "DataCategory",
            "type": "string"
        },
        "DataType": {
            "description": "",
            "enum": [
                "behavioral",
                "ecg",
                "eeg",
                "fmri",
                "hair-sample",
                "mri",
                "questionnaire",
                "questionnaire-diary",
                "saliva-sample"
            ],
            "title": "DataType",
            "type": "string"
        },
        "GUTSThing": {
            "additionalProperties": false,
            "description": "Any \"thing\" in the GUTS context",
            "properties": {
                "objtype": {
                    "description": "The type designator for a GUTS \"thing\"",
                    "enum": [
                        "GUTSThing"
                    ],
                    "type": "string"
                }
            },
            "title": "GUTSThing",
            "type": "object"
        },
        "GutsGraph": {
            "additionalProperties": false,
            "description": "A container for nodes in a GUTS graph",
            "properties": {
                "graph": {
                    "description": "GUTS graph nodes",
                    "items": {
                        "anyOf": [
                            {
                                "$ref": "#/$defs/CohortIdentifier"
                            },
                            {
                                "$ref": "#/$defs/CohortIdentifier"
                            },
                            {
                                "$ref": "#/$defs/ShortName"
                            },
                            {
                                "$ref": "#/$defs/ParticipantMeasure"
                            },
                            {
                                "type": "string"
                            }
                        ],
                        "type": "string"
                    },
                    "type": "array"
                }
            },
            "title": "GutsGraph",
            "type": "object"
        },
        "Measure": {
            "additionalProperties": false,
            "description": "A type of data sample in the GUTS study",
            "properties": {
                "category": {
                    "$ref": "#/$defs/DataCategory",
                    "description": "A data category for the measure"
                },
                "description": {
                    "description": "A description for the measure",
                    "type": "string"
                },
                "long_name": {
                    "description": "A longer name or title for the measure",
                    "type": "string"
                },
                "objtype": {
                    "description": "The type designator for a GUTS \"thing\"",
                    "enum": [
                        "Measure"
                    ],
                    "type": "string"
                },
                "short_name": {
                    "$ref": "#/$defs/ShortName",
                    "description": "An short code identifier for the measure that is unique within the GUTS context"
                },
                "type": {
                    "$ref": "#/$defs/DataType",
                    "description": "A data type for the measure"
                }
            },
            "required": [
                "short_name",
                "long_name"
            ],
            "title": "Measure",
            "type": "object"
        },
        "Participant": {
            "additionalProperties": false,
            "description": "A participant in any cohort of the GUTS study",
            "properties": {
                "code": {
                    "description": "An identifier for the participant that is unique within the GUTS context, i.e. across cohorts",
                    "type": "string"
                },
                "cohort": {
                    "$ref": "#/$defs/CohortIdentifier",
                    "description": "The cohort that the participant forms part of"
                },
                "measures": {
                    "$ref": "#/$defs/ParticipantMeasure",
                    "description": "All measures collected for this specific participant"
                },
                "objtype": {
                    "description": "The type designator for a GUTS \"thing\"",
                    "enum": [
                        "Participant"
                    ],
                    "type": "string"
                }
            },
            "required": [
                "code",
                "cohort"
            ],
            "title": "Participant",
            "type": "object"
        },
        "ParticipantMeasure": {
            "additionalProperties": false,
            "description": "A data sample of a specific type from a specific participant",
            "properties": {
                "age_in_years": {
                    "description": "The age (in years) of the participant when the data sample was collected",
                    "type": "integer"
                },
                "cohort": {
                    "$ref": "#/$defs/CohortIdentifier",
                    "description": "The specific cohort as part of which the data sample was collected"
                },
                "measure": {
                    "$ref": "#/$defs/ShortName",
                    "description": "The specific measure that was collected"
                },
                "objtype": {
                    "description": "The type designator for a GUTS \"thing\"",
                    "enum": [
                        "ParticipantMeasure"
                    ],
                    "type": "string"
                },
                "participant": {
                    "description": "The participant from whom the data sample was collected",
                    "type": "string"
                },
                "session": {
                    "$ref": "#/$defs/CohortIdentifier",
                    "description": "The session (of a specific cohort) during which the data sample was collected"
                }
            },
            "required": [
                "participant",
                "age_in_years",
                "measure",
                "session",
                "cohort"
            ],
            "title": "ParticipantMeasure",
            "type": "object"
        },
        "ShortName": {
            "description": "",
            "enum": [
                "hexaco",
                "iri",
                "ai",
                "srq-p",
                "srq-a",
                "bisbas",
                "soep",
                "shaps",
                "prt",
                "bscs",
                "demographics-1",
                "demographics-2",
                "demographics-3",
                "pds",
                "ace",
                "ctq",
                "pss",
                "cope-sf",
                "hsbc",
                "fmps",
                "health",
                "phq-9",
                "demographics-4",
                "nvs",
                "ius",
                "inequality",
                "scared",
                "qcae",
                "nri-wco",
                "pcs-ysr",
                "pops",
                "p-knowledge",
                "o2s3",
                "media",
                "cius",
                "sdq",
                "yqol-sf",
                "mwys",
                "education",
                "opbs-e",
                "ces",
                "soc-act",
                "intrust",
                "ethnocentrism",
                "politics",
                "ypt-s",
                "softdrugs",
                "harddrugs",
                "bpm",
                "audit",
                "fmri-sddt",
                "sddt",
                "fmri-reward",
                "reward",
                "fmri-trust-modified",
                "trust-modified",
                "fmri-rest",
                "smri",
                "eeg-social-reward",
                "social-reward",
                "eeg-social-flanker",
                "social-flanker",
                "eeg-gonogo",
                "gonogo",
                "eeg-rest",
                "prosocial-effort",
                "trust",
                "hair-testo",
                "hair-dheas",
                "hair-oxt",
                "hair-cort",
                "hair-e2",
                "saliva-testo",
                "saliva-dheas",
                "saliva-oxt",
                "saliva-cort",
                "saliva-e2",
                "dna",
                "esm-whereabouts",
                "esm-mood",
                "esm-regulation",
                "esm-sddt",
                "esm-stressor",
                "esm-self-esteem",
                "esm-pressure",
                "esm-relationships",
                "ecg",
                "hrv"
            ],
            "title": "ShortName",
            "type": "string"
        }
    },
    "$id": "https://guts-consortium.github.io/schema/guts",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "additionalProperties": true,
    "description": "A container for nodes in a GUTS graph",
    "metamodel_version": "1.7.0",
    "properties": {
        "graph": {
            "description": "GUTS graph nodes",
            "items": {
                "anyOf": [
                    {
                        "$ref": "#/$defs/CohortIdentifier"
                    },
                    {
                        "$ref": "#/$defs/CohortIdentifier"
                    },
                    {
                        "$ref": "#/$defs/ShortName"
                    },
                    {
                        "$ref": "#/$defs/ParticipantMeasure"
                    },
                    {
                        "type": "string"
                    }
                ],
                "type": "string"
            },
            "type": "array"
        }
    },
    "title": "guts-schema",
    "type": "object",
    "version": "0.0.1"
}
