MAGENT

Neurology · LIVE

REST-LGS Lennox-Gastaut screening

REST-LGS

Sum Wolf 2024 REST-LGS major (+3) and minor (+1) caller-assigned flags and return the unlikely, possible, or likely LGS screening band.

LIVE $0.005 USDC GET /api/calc/rest_lgs

Markdown: /docs/rest-lgs.md · Canonical: https://magentlab.com/docs/rest-lgs

Not a medical device. Not a diagnosis, dose, or listing recommendation.

What it computes

Sum Wolf 2024 REST-LGS major (+3) and minor (+1) caller-assigned flags and return the unlikely, possible, or likely LGS screening band.

When to use

When an agent already has the eight REST-LGS items assigned as present or absent and needs the published Wolf 2024 point total and screening band, not a diagnosis of Lennox-Gastaut syndrome.

When not to use

  • Not a medical device. Not a diagnosis of Lennox-Gastaut syndrome. Screening only.
  • magent does not read EEG or charts. Each of the eight items is a caller-assigned true/false flag. There is no unknown or unavailable input; Wolf 2024 missing EEG rates are not modeled.
  • Scoring is Wolf 2024: each major criterion +3, each minor +1, then sum. The 2019 CRF 3-major plus 2–3-minor count threshold is not scored here.

Formula

REST-LGS = 3*two_or_more_seizure_types + 3*seizure_onset_before_12 + 3*slow_spike_wave + 3*cognitive_impairment_since_childhood + persistent_seizures_despite_two_asms + vns_keto_or_surgery + helmet_or_head_face_injury + other_eeg_abnormalities; each major 3, each minor 1; max 16; likely if score > 11; possible if 8-11; unlikely if score < 8 (Wolf 2024)

Citation

Title
Real-world use of the updated refractory epilepsy screening tool for Lennox-Gastaut syndrome
Authors
Wolf SM, Boyce D, Peña P, Piña-Garza JE, Roland JJ, Thomas B, Zogejani D, McGoldrick PE
Source
Epilepsia Open. 2024;9(4):1277-1286
DOI
10.1002/epi4.12952

Worked example

All eight flags false

Given: cognitive_impairment_since_childhood=falsehelmet_or_head_face_injury=falseother_eeg_abnormalities=falsepersistent_seizures_despite_two_asms=falseseizure_onset_before_12=falseslow_spike_wave=falsetwo_or_more_seizure_types=falsevns_keto_or_surgery=false

  1. All four major flags false → 0; all four minor flags false → 0
  2. Score = 0 (max 16); lgs_screen is unlikely because score < 8

Four major criteria, no minor criteria

Given: cognitive_impairment_since_childhood=truehelmet_or_head_face_injury=falseother_eeg_abnormalities=falsepersistent_seizures_despite_two_asms=falseseizure_onset_before_12=trueslow_spike_wave=truetwo_or_more_seizure_types=truevns_keto_or_surgery=false

  1. Four majors true → 3+3+3+3 = 12; four minors false → 0
  2. Score = 12 (max 16); lgs_screen is likely because score > 11

Three major criteria, no minor criteria

Given: cognitive_impairment_since_childhood=falsehelmet_or_head_face_injury=falseother_eeg_abnormalities=falsepersistent_seizures_despite_two_asms=falseseizure_onset_before_12=trueslow_spike_wave=truetwo_or_more_seizure_types=truevns_keto_or_surgery=false

  1. Three majors true → 9; cognitive_impairment_since_childhood false; four minors false → 0
  2. Score = 9 (max 16); lgs_screen is possible because score is 8-11

Also searched as

  • REST-LGS
  • refractory epilepsy screening tool
  • Lennox-Gastaut screening
  • Wolf 2024 LGS score
  • slow spike-wave LGS screen
  • updated refractory epilepsy screening tool

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/rest_lgs?two_or_more_seizure_types=false&seizure_onset_before_12=false&slow_spike_wave=false&cognitive_impairment_since_childhood=false&persistent_seizures_despite_two_asms=false&vns_keto_or_surgery=false&helmet_or_head_face_injury=false&other_eeg_abnormalities=false

Full URL: https://api.magentlab.com/api/calc/rest_lgs?two_or_more_seizure_types=false&seizure_onset_before_12=false&slow_spike_wave=false&cognitive_impairment_since_childhood=false&persistent_seizures_despite_two_asms=false&vns_keto_or_surgery=false&helmet_or_head_face_injury=false&other_eeg_abnormalities=false

Call

Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params return HTTP 400 before any quote or charge.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/rest_lgs?two_or_more_seizure_types=false&seizure_onset_before_12=false&slow_spike_wave=false&cognitive_impairment_since_childhood=false&persistent_seizures_despite_two_asms=false&vns_keto_or_surgery=false&helmet_or_head_face_injury=false&other_eeg_abnormalities=false"

Parameters

Name Type Required Description
two_or_more_seizure_types boolean required Two or more seizure types (Wolf 2024 major, +3). true or false as assigned by the caller.
seizure_onset_before_12 boolean required Seizure onset at younger than 12 years of age (Wolf 2024 major, +3). Age 12 does not meet. true or false as assigned by the caller. magent does not take numeric age.
slow_spike_wave boolean required History of slow spike-wave (SSW, <2.5 Hz) on EEG (Wolf 2024 major, +3). true or false as assigned by the caller. magent does not read EEG.
cognitive_impairment_since_childhood boolean required Cognitive impairment since childhood (Wolf 2024 major, +3), which may include past or current learning difficulties, special education, autism, intellectual disabilities, or developmental delays. true or false as assigned by the caller.
persistent_seizures_despite_two_asms boolean required Persistent seizures despite a trial of two or more antiseizure medications (Wolf 2024 minor, +1). true or false as assigned by the caller.
vns_keto_or_surgery boolean required History of vagal nerve stimulation, ketogenic diet therapy, or epilepsy surgery (Wolf 2024 minor, +1). true or false as assigned by the caller.
helmet_or_head_face_injury boolean required Evidence of seizure-related helmet use or head/face injury (Wolf 2024 minor, +1). true or false as assigned by the caller.
other_eeg_abnormalities boolean required Other EEG abnormalities: multifocal spikes, symptomatic generalized discharges, generalized periods of attenuation of background/electrodecrement, or paroxysmal fast activity (Wolf 2024 minor, +1). true or false as assigned by the caller. magent does not read EEG.

Bulk (POST)

POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement.

POST /api/calc/rest_lgs Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 PREVIEW

  • 1 to 25 items. Each item uses the same keys as the GET query parameters.
  • POST of 1 item costs the same as GET. Lists longer than 25: chunk into multiple POSTs. Extra items still execute; do not pad dummy rows.
  • The first invalid item fails the whole request (index in the 400 JSON). You are not charged.
  • HTTP 200 is {count, path, items}. Each items[i] is the GET 200 body for that row.
  • Catalog misses (empty matches, found=false) stay paid 200s inside that slot.
  • x402 resource URL is this path plus n and body_sha256. Browsers that prefer text/html get the same paywall as GET; Pay retries POST with the same items.

Example request (fixture)

{
  "items": [
    {
      "cognitive_impairment_since_childhood": "false",
      "helmet_or_head_face_injury": "false",
      "other_eeg_abnormalities": "false",
      "persistent_seizures_despite_two_asms": "false",
      "seizure_onset_before_12": "false",
      "slow_spike_wave": "false",
      "two_or_more_seizure_types": "false",
      "vns_keto_or_surgery": "false"
    },
    {
      "cognitive_impairment_since_childhood": "false",
      "helmet_or_head_face_injury": "false",
      "other_eeg_abnormalities": "false",
      "persistent_seizures_despite_two_asms": "false",
      "seizure_onset_before_12": "false",
      "slow_spike_wave": "false",
      "two_or_more_seizure_types": "false",
      "vns_keto_or_surgery": "false"
    }
  ]
}

Open bulk paywall →

Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.

Example 200 (fixture)

{
  "count": 2,
  "path": "/api/calc/rest_lgs",
  "items": [
    {
      "components": [
        {
          "factor": "two_or_more_seizure_types",
          "points": 0,
          "present": false
        },
        {
          "factor": "seizure_onset_before_12",
          "points": 0,
          "present": false
        },
        {
          "factor": "slow_spike_wave",
          "points": 0,
          "present": false
        },
        {
          "factor": "cognitive_impairment_since_childhood",
          "points": 0,
          "present": false
        },
        {
          "factor": "persistent_seizures_despite_two_asms",
          "points": 0,
          "present": false
        },
        {
          "factor": "vns_keto_or_surgery",
          "points": 0,
          "present": false
        },
        {
          "factor": "helmet_or_head_face_injury",
          "points": 0,
          "present": false
        },
        {
          "factor": "other_eeg_abnormalities",
          "points": 0,
          "present": false
        }
      ],
      "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
      "citation": {
        "authors": "Wolf SM, Boyce D, Peña P, Piña-Garza JE, Roland JJ, Thomas B, Zogejani D, McGoldrick PE",
        "doi": "10.1002/epi4.12952",
        "id": "wolf-2024",
        "pmid": "38726917",
        "source": "Epilepsia Open. 2024;9(4):1277-1286",
        "title": "Real-world use of the updated refractory epilepsy screening tool for Lennox-Gastaut syndrome"
      },
      "formula": "rest_lgs",
      "formula_expression": "REST-LGS = 3*two_or_more_seizure_types + 3*seizure_onset_before_12 + 3*slow_spike_wave + 3*cognitive_impairment_since_childhood + persistent_seizures_despite_two_asms + vns_keto_or_surgery + helmet_or_head_face_injury + other_eeg_abnormalities; each major 3, each minor 1; max 16; likely if score > 11; possible if 8-11; unlikely if score < 8 (Wolf 2024)",
      "max_score": 16,
      "score": 0,
      "major_count": 0,
      "minor_count": 0,
      "lgs_screen": "unlikely"
    },
    {
      "components": [
        {
          "factor": "two_or_more_seizure_types",
          "points": 0,
          "present": false
        },
        {
          "factor": "seizure_onset_before_12",
          "points": 0,
          "present": false
        },
        {
          "factor": "slow_spike_wave",
          "points": 0,
          "present": false
        },
        {
          "factor": "cognitive_impairment_since_childhood",
          "points": 0,
          "present": false
        },
        {
          "factor": "persistent_seizures_despite_two_asms",
          "points": 0,
          "present": false
        },
        {
          "factor": "vns_keto_or_surgery",
          "points": 0,
          "present": false
        },
        {
          "factor": "helmet_or_head_face_injury",
          "points": 0,
          "present": false
        },
        {
          "factor": "other_eeg_abnormalities",
          "points": 0,
          "present": false
        }
      ],
      "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
      "citation": {
        "authors": "Wolf SM, Boyce D, Peña P, Piña-Garza JE, Roland JJ, Thomas B, Zogejani D, McGoldrick PE",
        "doi": "10.1002/epi4.12952",
        "id": "wolf-2024",
        "pmid": "38726917",
        "source": "Epilepsia Open. 2024;9(4):1277-1286",
        "title": "Real-world use of the updated refractory epilepsy screening tool for Lennox-Gastaut syndrome"
      },
      "formula": "rest_lgs",
      "formula_expression": "REST-LGS = 3*two_or_more_seizure_types + 3*seizure_onset_before_12 + 3*slow_spike_wave + 3*cognitive_impairment_since_childhood + persistent_seizures_despite_two_asms + vns_keto_or_surgery + helmet_or_head_face_injury + other_eeg_abnormalities; each major 3, each minor 1; max 16; likely if score > 11; possible if 8-11; unlikely if score < 8 (Wolf 2024)",
      "max_score": 16,
      "score": 0,
      "major_count": 0,
      "minor_count": 0,
      "lgs_screen": "unlikely"
    }
  ]
}

Response

Field Type Description
formula string rest_lgs
formula_expression string Exact expression used
score integer Wolf 2024 REST-LGS points 0-16 (major +3, minor +1)
max_score integer 16
lgs_screen string Wolf 2024 screening band: likely if score > 11 (12-16), possible if 8-11, unlikely if score < 8 (0-7). Not a diagnosis.
major_count integer Count of true major criteria (two_or_more_seizure_types, seizure_onset_before_12, slow_spike_wave, cognitive_impairment_since_childhood); 0-4
minor_count integer Count of true minor criteria (persistent_seizures_despite_two_asms, vns_keto_or_surgery, helmet_or_head_face_injury, other_eeg_abnormalities); 0-4
components array Per-item points
citation object Wolf et al. Epilepsia Open 2024 citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "components": [
    {
      "factor": "two_or_more_seizure_types",
      "points": 0,
      "present": false
    },
    {
      "factor": "seizure_onset_before_12",
      "points": 0,
      "present": false
    },
    {
      "factor": "slow_spike_wave",
      "points": 0,
      "present": false
    },
    {
      "factor": "cognitive_impairment_since_childhood",
      "points": 0,
      "present": false
    },
    {
      "factor": "persistent_seizures_despite_two_asms",
      "points": 0,
      "present": false
    },
    {
      "factor": "vns_keto_or_surgery",
      "points": 0,
      "present": false
    },
    {
      "factor": "helmet_or_head_face_injury",
      "points": 0,
      "present": false
    },
    {
      "factor": "other_eeg_abnormalities",
      "points": 0,
      "present": false
    }
  ],
  "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
  "citation": {
    "authors": "Wolf SM, Boyce D, Peña P, Piña-Garza JE, Roland JJ, Thomas B, Zogejani D, McGoldrick PE",
    "doi": "10.1002/epi4.12952",
    "id": "wolf-2024",
    "pmid": "38726917",
    "source": "Epilepsia Open. 2024;9(4):1277-1286",
    "title": "Real-world use of the updated refractory epilepsy screening tool for Lennox-Gastaut syndrome"
  },
  "formula": "rest_lgs",
  "formula_expression": "REST-LGS = 3*two_or_more_seizure_types + 3*seizure_onset_before_12 + 3*slow_spike_wave + 3*cognitive_impairment_since_childhood + persistent_seizures_despite_two_asms + vns_keto_or_surgery + helmet_or_head_face_injury + other_eeg_abnormalities; each major 3, each minor 1; max 16; likely if score > 11; possible if 8-11; unlikely if score < 8 (Wolf 2024)",
  "max_score": 16,
  "score": 0,
  "major_count": 0,
  "minor_count": 0,
  "lgs_screen": "unlikely"
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_flag boolean clinical flags must be true or false Returned before settlement; you are not charged.
400 invalid_items POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
400 invalid_item_count items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
400 invalid_item each items entry must be a JSON object Returned before settlement; you are not charged.

Related tools

  • Glasgow Coma Scale — Compute the Glasgow Coma Scale as the sum of caller-assigned eye, verbal, and motor integers. The 1974 or 1976 edition is required.
  • TDN Grade — Apply the Terrapon 2021 Therapy-Disability-Neurology grade and return tdn_grade 1-5 as the maximum of caller-assigned therapy, mapped mRS disability, and new-deficit neurology grades.

Payment

Unpaid requests return HTTP 402 even if query parameters or POST items are missing or invalid, so CDP and agents can index the path. After a PAYMENT-SIGNATURE, invalid params return HTTP 400 JSON before settlement. magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s. Unpaid valid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake and shared payment errors: Payments. Stdio MCP: /docs/mcp.

Guarantees

  • HTTP 402 is unpaid, including a missing query. After PAYMENT-SIGNATURE, invalid parameters return HTTP 400 before settlement. You are not charged. HTTP 402 never includes the tool JSON.
  • exact: settlement finishes before the tool (paymentFlow upfront). batch-settlement: verify/deposit before the tool; chargedCumulativeAmount commits after HTTP 2xx. Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.
  • HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.
  • Execution is timeout-bounded and concurrency-capped.
  • Calculator inputs are stored encrypted for allowlisted operators (Magent Console). They are not in public logs, SSH lookups, catalog, or rollups. Request logs store path without query.