{
    "$defs": {
        "ChemicalEntity": {
            "additionalProperties": false,
            "description": "The chemical used as the stressor chemical in an exposure event.",
            "properties": {
                "cas_id": {
                    "description": "CAS identifier for the chemical.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "chebi_id": {
                    "description": "CHEBI identifier for the chemical.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "chemical_name": {
                    "description": "Name of the chemical.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "synonym": {
                    "description": "Other names for the chemical.",
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "uuid": {
                    "description": "UUID identifier.",
                    "type": "string"
                }
            },
            "required": [
                "uuid"
            ],
            "title": "ChemicalEntity",
            "type": "object"
        },
        "Control": {
            "additionalProperties": false,
            "description": "A subject serves as a reference for assessing phenotypic outcome in the phenotype observation set.",
            "properties": {
                "comment": {
                    "description": "Additional comments.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "control_image": {
                    "description": "Image associated with this control.",
                    "items": {
                        "$ref": "#/$defs/ControlImage"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "control_type": {
                    "description": "Type of control (e.g., wildtype vs mutant, treated vs untreated).",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "uuid": {
                    "description": "UUID identifier.",
                    "type": "string"
                },
                "vehicle_if_treated": {
                    "$ref": "#/$defs/VehicleEnumeration",
                    "description": "The vehicle used in a control."
                }
            },
            "required": [
                "uuid"
            ],
            "title": "Control",
            "type": "object"
        },
        "ControlImage": {
            "additionalProperties": false,
            "description": "An image associated with a control, taken at the same developmental stage as the corresponding phenotype observation.",
            "properties": {
                "magnification": {
                    "description": "The factor by which a microscope enlarges the apparent size of a subject compared to its actual size.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "phenotype_comments": {
                    "description": "Comments about the phenotype in the control image.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "phenotype_id": {
                    "description": "Foreign key reference to the PhenotypeObservationSet uuid (for database representation).",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "resolution": {
                    "description": "The level of detail in the image.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "scale_bar": {
                    "description": "Scale bar information, including the physical length it represents and the unit of measurement.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "uuid": {
                    "description": "UUID identifier.",
                    "type": "string"
                }
            },
            "required": [
                "uuid"
            ],
            "title": "ControlImage",
            "type": "object"
        },
        "Experiment": {
            "additionalProperties": false,
            "description": "A group of observations (phenotypic outcomes and their control) that are linked by a common exposure event and subject, and that are part of a study.",
            "properties": {
                "control": {
                    "description": "An observation that serves as the reference for assessing phenotypic outcome.",
                    "items": {
                        "$ref": "#/$defs/Control"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "exposure_event": {
                    "description": "The exposure event in an experiment.",
                    "items": {
                        "$ref": "#/$defs/ExposureEvent"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "fish": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/Fish"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "The fish subject of the experiment."
                },
                "rearing_condition_comment": {
                    "description": "Comments on rearing conditions, for example, about how conditions deviated from standard parameters.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "standard_rearing_condition": {
                    "description": "An indication of whether the subject was maintained under standard conditions, which are the established, consistent environmental and husbandry parameters (such as temperature, lighting, diet, and housing) designed to minimize variability and ensure reproducibility in experiments.",
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "uuid": {
                    "description": "UUID identifier.",
                    "type": "string"
                }
            },
            "required": [
                "uuid"
            ],
            "title": "Experiment",
            "type": "object"
        },
        "ExposureEvent": {
            "additionalProperties": false,
            "description": "An occurrence in a study where a subject is exposed to a stressor under defined conditions.",
            "properties": {
                "additional_exposure_condition": {
                    "description": "Additional information about the conditions under which exposure event occurred.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "comment": {
                    "description": "Additional comments.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "exposure_end_stage": {
                    "description": "The developmental stage of fish when exposure ended.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "exposure_start_stage": {
                    "description": "The developmental stage of fish when exposure started.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "exposure_type": {
                    "$ref": "#/$defs/ExposureTypeEnum",
                    "description": "An instance of exposure specifying the type of stressor a subject was exposed to."
                },
                "phenotype_observation": {
                    "description": "The phenotype observation resulting from an exposure event.",
                    "items": {
                        "$ref": "#/$defs/PhenotypeObservationSet"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "regimen": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/Regimen"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "The regimen for the exposure."
                },
                "route": {
                    "$ref": "#/$defs/ExposureRouteEnum",
                    "description": "The route of exposure."
                },
                "stressor": {
                    "description": "Substance, chemical or toxicant that elicits a response (a phenotype) in a subject when encountered through exposure.",
                    "items": {
                        "$ref": "#/$defs/StressorChemical"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "uuid": {
                    "description": "UUID identifier.",
                    "type": "string"
                },
                "vehicle": {
                    "description": "The substance or medium used to deliver a stressor.",
                    "items": {
                        "$ref": "#/$defs/VehicleEnumeration"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                }
            },
            "required": [
                "uuid"
            ],
            "title": "ExposureEvent",
            "type": "object"
        },
        "ExposureRegimenTypeEnum": {
            "description": "An enumeration of exposure regimen types.",
            "enum": [
                "continuous",
                "repeated"
            ],
            "title": "ExposureRegimenTypeEnum",
            "type": "string"
        },
        "ExposureRouteEnum": {
            "description": "An enumeration of exposure routes derived from the EXO ontology.",
            "title": "ExposureRouteEnum",
            "type": "string"
        },
        "ExposureTypeEnum": {
            "description": "An enumeration of exposure types derived from the ECTO ontology.",
            "title": "ExposureTypeEnum",
            "type": "string"
        },
        "Fish": {
            "additionalProperties": false,
            "description": "Zebrafish used as subject in the study.",
            "properties": {
                "id": {
                    "pattern": "^ZFIN:ZDB-FISH-[0-9]{4}-[0-9]{6}-[0-9]+$",
                    "type": "string"
                },
                "name": {
                    "description": "Name or label of an entity.",
                    "type": "string"
                },
                "uuid": {
                    "description": "UUID identifier.",
                    "type": "string"
                }
            },
            "required": [
                "id",
                "name",
                "uuid"
            ],
            "title": "Fish",
            "type": "object"
        },
        "Image": {
            "additionalProperties": false,
            "description": "An image associated with a phenotype observation.",
            "properties": {
                "magnification": {
                    "description": "The factor by which a microscope enlarges the apparent size of a subject compared to its actual size.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "resolution": {
                    "description": "The level of detail in the image.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "scale_bar": {
                    "description": "Scale bar information, including the physical length it represents and the unit of measurement.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "uuid": {
                    "description": "UUID identifier.",
                    "type": "string"
                }
            },
            "required": [
                "uuid"
            ],
            "title": "Image",
            "type": "object"
        },
        "Phenotype": {
            "additionalProperties": false,
            "description": "Any measurable or visible trait change in the subject as a result of exposure.",
            "properties": {
                "phenotype_term_id": {
                    "description": "The phenotype ontology term identifier.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "prevalence": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/QuantityValue"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "The percentage of subject exhibiting this phenotype."
                },
                "severity": {
                    "$ref": "#/$defs/SeverityEnum",
                    "description": "The intensity of the observed phenotype."
                },
                "stage": {
                    "description": "The developmental stage of fish when the phenotype was observed.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "uuid": {
                    "description": "UUID identifier.",
                    "type": "string"
                }
            },
            "required": [
                "uuid"
            ],
            "title": "Phenotype",
            "type": "object"
        },
        "PhenotypeObservationSet": {
            "additionalProperties": false,
            "description": "An observation set containing control and phenotypic outcome resulting from an exposure event.",
            "properties": {
                "control_image": {
                    "description": "Image associated with this control.",
                    "items": {
                        "$ref": "#/$defs/ControlImage"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "image": {
                    "description": "Images associated with this observation.",
                    "items": {
                        "$ref": "#/$defs/Image"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "phenotype": {
                    "description": "The phenotype observed.",
                    "items": {
                        "$ref": "#/$defs/Phenotype"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "uuid": {
                    "description": "UUID identifier.",
                    "type": "string"
                }
            },
            "required": [
                "uuid"
            ],
            "title": "PhenotypeObservationSet",
            "type": "object"
        },
        "QuantityValue": {
            "additionalProperties": false,
            "description": "A value of an attribute that is quantitative and measurable, expressed as a combination of a unit and a numeric value",
            "properties": {
                "numeric_value": {
                    "description": "The numeric value of the quantity value.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "unit": {
                    "description": "The unit of the quantity value.",
                    "type": [
                        "string",
                        "null"
                    ]
                }
            },
            "title": "QuantityValue",
            "type": "object"
        },
        "Regimen": {
            "additionalProperties": false,
            "description": "The schedule and pattern of an exposure event.",
            "properties": {
                "exposure_regimen_type": {
                    "$ref": "#/$defs/ExposureRegimenTypeEnum",
                    "description": "The type of exposure regimen (e.g., continuous or repeated)."
                },
                "individual_exposure_duration": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/QuantityValue"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "Individual exposure duration."
                },
                "interval_between_individual_exposures": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/QuantityValue"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "Interval between individual exposures."
                },
                "number_of_individual_exposure": {
                    "description": "Total number of individual exposures.",
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "total_exposure_duration": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/QuantityValue"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "Time between first and last individual exposure."
                },
                "uuid": {
                    "description": "UUID identifier.",
                    "type": "string"
                }
            },
            "required": [
                "uuid"
            ],
            "title": "Regimen",
            "type": "object"
        },
        "SeverityEnum": {
            "description": "An enumeration of severity levels for phenotypes.",
            "enum": [
                "mild",
                "moderate",
                "severe"
            ],
            "title": "SeverityEnum",
            "type": "string"
        },
        "StressorChemical": {
            "additionalProperties": false,
            "description": "A chemical, that elicit a response (a phenotype) in a subject when when encountered through exposure.",
            "properties": {
                "chemical_id": {
                    "$ref": "#/$defs/ChemicalEntity",
                    "description": "Chemical identifier (CHEBI, CAS, or UUID)."
                },
                "comment": {
                    "description": "Additional comments.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "concentration": {
                    "$ref": "#/$defs/QuantityValue",
                    "description": "The dose or concentration of the chemical to which the subject was exposed to."
                },
                "manufacturer": {
                    "description": "The manufacturer of the chemical.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "uuid": {
                    "description": "UUID identifier.",
                    "type": "string"
                }
            },
            "required": [
                "chemical_id",
                "concentration",
                "uuid"
            ],
            "title": "StressorChemical",
            "type": "object"
        },
        "Study": {
            "additionalProperties": false,
            "description": "A toxicological investigation, including the experimental conditions and phenotypic outcomes, with information provenance.",
            "properties": {
                "annotator": {
                    "description": "ORCID identifier of the indidvidual submitting the study data.",
                    "items": {
                        "pattern": "^ORCID:[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{3}[0-9X]$",
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "experiment": {
                    "description": "The experiment in a study.",
                    "items": {
                        "$ref": "#/$defs/Experiment"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "lab": {
                    "description": "ZFIN lab identifier of the laboratory that produced the study data.",
                    "pattern": "^ZFIN:ZDB-LAB-[0-9]+-[0-9]+$",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "publication": {
                    "description": "The publication identifier (e.g., PMID, DOI) for the study or \"not published\" if the study is unpublished.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "uuid": {
                    "description": "UUID identifier.",
                    "type": "string"
                }
            },
            "required": [
                "uuid"
            ],
            "title": "Study",
            "type": "object"
        },
        "VehicleEnumeration": {
            "description": "An enumeration of vehicles used in exposures.",
            "enum": [
                "ethanol",
                "dmso"
            ],
            "title": "VehicleEnumeration",
            "type": "string"
        }
    },
    "$id": "https://w3id.org/sierra-moxon/zebrafish-toxicology-atlas-schema",
    "$schema": "https://json-schema.org/draft/2019-09/schema",
    "additionalProperties": true,
    "metamodel_version": "1.7.0",
    "title": "zebrafish-toxicology-atlas-schema",
    "type": "object",
    "version": null
}

