{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/system/main/json-schema/system-topic-schema.json",
  "title": "Topic",
  "description": "Topic.",
  "x-generated": "2026-10-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/system-api-openapi.json#/components/schemas/Topic",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id",
      "description": "Unique identifier",
      "filterable": true
    },
    "name": {
      "type": "string",
      "title": "Name",
      "description": "Name of the topic",
      "searchable": true
    },
    "wikidata_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Wikidata Id",
      "description": "Wikidata identifier for the topic",
      "filterable": true
    },
    "umls_cuis": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Umls Cuis",
      "description": "UMLS Concept Unique Identifiers (CUIs) for the topic",
      "filterable": true
    },
    "category": {
      "anyOf": [
        {
          "$ref": "#/$defs/TopicCategory"
        },
        {
          "type": "null"
        }
      ],
      "description": "Category of the topic",
      "filterable": true
    },
    "roles": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/TopicRole"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Roles",
      "description": "Roles associated with the topic",
      "filterable": true
    }
  },
  "type": "object",
  "required": [
    "id",
    "name"
  ],
  "$defs": {
    "TopicCategory": {
      "type": "string",
      "enum": [
        "Biomedical - Diseases & disorders",
        "Biomedical - Hospitalization",
        "Biomedical - Mortality/survival",
        "Biomedical - Pathogen",
        "Biomedical - Ethnicity",
        "Biomedical - Other biological factors",
        "Biomedical - Anthropometry",
        "Biomedical - Age",
        "Biomedical - Sex",
        "Biomedical - Carcinogen",
        "Biomedical - Genetics",
        "Behavioral - Personal hygiene",
        "Behavioral - Other dietary factors",
        "Behavioral - Stress",
        "Behavioral - Substance use",
        "Behavioral - Eating behaviors",
        "Behavioral - Sleep",
        "Behavioral - Physical activity",
        "Behavioral - Other behavioral factors",
        "Behavioral - Sexual behavior",
        "Environmental - Air quality",
        "Environmental - Water quality",
        "Environmental - Weather and climate change",
        "Environmental - Other environmental factors",
        "Social - Education",
        "Social - Economic context",
        "Social - Other social factors",
        "Social - Physical infrastructure",
        "Social - Social context",
        "Social - Healthcare context",
        "Social - Occupation",
        "Social - Geography",
        "Social - Occupational context",
        "Healing",
        "Preventative",
        "Diagnostic",
        "Preservative",
        "Managing",
        "Therapeutic",
        "Other"
      ],
      "title": "TopicCategory",
      "description": "Topic category."
    },
    "TopicRole": {
      "type": "string",
      "enum": [
        "Determinant",
        "Intervention",
        "Outcome",
        "Agent"
      ],
      "title": "TopicRole",
      "description": "Topic role."
    }
  }
}