{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/acuiq-com/json-schema/acuiq-com-corpus-line-schema.json",
  "title": "CorpusLine",
  "description": "One line of GET /api/corpus and of protocols.jsonl in the corpus zip: one source reporting one point selection for these symptoms. It is not evidence the selection worked.",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/acuiq-com-openapi.json#/components/schemas/CorpusLine",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "ref": {
      "type": [
        "string",
        "null"
      ],
      "description": "Source reference as extracted"
    },
    "source": {
      "type": "object",
      "description": "The reference as the site classifies it. kind study means the ref resolves to a DOI or a PubMed record, not that the finding was positive",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "study",
            "text",
            "web",
            "unsourced"
          ]
        },
        "label": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "description": "Present when the source is directly reachable"
        }
      },
      "required": [
        "kind",
        "label"
      ]
    },
    "cred": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Credibility score of the source, not of the finding"
    },
    "modality": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "needling",
          "electroacupuncture",
          "moxibustion",
          "acupressure",
          "press-needle",
          "teas",
          "laser",
          "embedding",
          "injection",
          "application",
          "bloodletting",
          "cupping"
        ]
      }
    },
    "sessions": {
      "type": [
        "integer",
        "null"
      ]
    },
    "courseDays": {
      "type": [
        "integer",
        "null"
      ]
    },
    "sex": {
      "type": [
        "string",
        "null"
      ]
    },
    "age": {
      "type": [
        "number",
        "null"
      ],
      "description": "Recorded cohort age, often a mean"
    },
    "outcome": {
      "type": "string",
      "enum": [
        "positive",
        "no-effect",
        "unreported",
        "not-tested"
      ]
    },
    "comparator": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "sham",
        "active",
        "usual-care",
        "waitlist",
        "none"
      ],
      "description": "Null where the result has not been read"
    },
    "note": {
      "type": "string",
      "description": "Absent when the row has none"
    },
    "points": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Catalogue point codes"
    },
    "symptoms": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Canonical symptom names"
    },
    "raw": {
      "type": [
        "string",
        "null"
      ],
      "description": "The treatments as the source wrote them"
    }
  },
  "required": [
    "id",
    "ref",
    "source",
    "cred",
    "modality",
    "sessions",
    "courseDays",
    "sex",
    "age",
    "outcome",
    "comparator",
    "points",
    "symptoms",
    "raw"
  ]
}