# 2017 McDonald criteria for multiple sclerosis

McDonald 2017

Status: LIVE
Price: $0.005 USDC
`GET /api/calc/mcdonald_2017`
HTML: https://magentlab.com/docs/mcdonald-2017
Markdown: https://magentlab.com/docs/mcdonald-2017.md

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

## What it computes

Apply Thompson 2018 / 2017 McDonald criteria for typical clinically isolated syndrome and return whether mcdonald_ms holds from caller-assigned typical CIS, no better explanation, attacks, lesions, DIS, MRI DIT, and CSF-specific oligoclonal bands.

## When to use

When an agent already has typical CIS versus not, whether a better explanation exists, ≥2-attack and ≥2-lesion flags, and caller-assigned 2017 DIS, MRI DIT, and CSF-specific OCB, and needs the published relapsing/CIS combination. magent does not read MRI or assay CSF.

## When not to use

- Not a medical device and not a diagnosis of multiple sclerosis.
- Relapsing / typical CIS pathway only. Does not implement the 2017 primary progressive MS (PPMS) row.
- Not the 2010 McDonald criteria (symptomatic lesions were excluded from DIS and DIT then; 2017 counts symptomatic and cortical lesions).
- Not MAGNIMS 2016 as a second system.
- magent does not read MRI and does not assay CSF. DIS, MRI DIT, and CSF-specific oligoclonal bands are caller-assigned.
- Remain vigilant for NMOSD (neuromyelitis optica spectrum disorder) and other better explanations; no_better_explanation is caller-assigned.

## Formula

```
mcdonald_ms iff typical_cis and no_better_explanation and ((two_or_more_attacks and two_or_more_lesions) or (two_or_more_attacks and not two_or_more_lesions and dis) or (not two_or_more_attacks and two_or_more_lesions and (dit_mri or csf_specific_ocb)) or (not two_or_more_attacks and not two_or_more_lesions and dis and (dit_mri or csf_specific_ocb))) (Thompson 2018 / 2017 McDonald typical CIS). CSF-specific OCB may substitute for MRI DIT when DIS is met. Not PPMS. Not 2010 McDonald. magent does not read MRI or assay CSF. Not a diagnosis
```

## Citation

[Diagnosis of multiple sclerosis: 2017 revisions of the McDonald criteria](https://doi.org/10.1016/S1474-4422(17)30470-2)
Thompson AJ, Banwell BL, Barkhof F, Carroll WM, Coetzee T, Comi G, Correale J, Fazekas F, Filippi M, Freedman MS, Fujihara K, Galetta SL, Hartung HP, Kappos L, Lublin FD, Marrie RA, Miller AE, Miller DH, Montalban X, Mowry EM, Sorensen PS, Tintoré M, Traboulsee AL, Trojano M, Uitdehaag BMJ, Vukusic S, Waubant E, Weinshenker BG, Reingold SC, Cohen JA
Lancet Neurol. 2018;17(2):162-173
DOI: [10.1016/S1474-4422(17)30470-2](https://doi.org/10.1016/S1474-4422(17)30470-2)

## Worked example

### Two attacks and two lesions meet 2017 McDonald without MRI DIT

Given: `csf_specific_ocb=false, dis=false, dit_mri=false, no_better_explanation=true, two_or_more_attacks=true, two_or_more_lesions=true, typical_cis=true`

1. typical_cis true and no_better_explanation true
2. two_or_more_attacks true and two_or_more_lesions true (row 1)
3. DIS, MRI DIT, and CSF-specific OCB are not required on this row
4. mcdonald_ms true


### CIS with DIS and MRI DIT

Given: `csf_specific_ocb=false, dis=true, dit_mri=true, no_better_explanation=true, two_or_more_attacks=false, two_or_more_lesions=false, typical_cis=true`

1. first/CIS attack and one lesion
2. dis true and dit_mri true
3. row 4: DIS and MRI DIT
4. mcdonald_ms true


### CIS with DIS and CSF-specific OCB (2017 DIT substitute)

Given: `csf_specific_ocb=true, dis=true, dit_mri=false, no_better_explanation=true, two_or_more_attacks=false, two_or_more_lesions=false, typical_cis=true`

1. first/CIS attack and one lesion
2. dis true, dit_mri false, csf_specific_ocb true
3. 2017: OCB may substitute for DIT when DIS is met
4. mcdonald_ms true


### CIS with one lesion and no DIS is not MS

Given: `csf_specific_ocb=false, dis=false, dit_mri=false, no_better_explanation=true, two_or_more_attacks=false, two_or_more_lesions=false, typical_cis=true`

1. typical_cis true and no_better_explanation true
2. first/CIS attack, one lesion, dis false
3. row 4 needs DIS plus DIT or OCB
4. mcdonald_ms false


## Also searched as

- McDonald criteria 2017
- 2017 McDonald MS diagnosis
- Thompson 2018 McDonald
- CIS dissemination in space
- CSF-specific oligoclonal bands
- McDonald DIS DIT
- multiple sclerosis diagnostic criteria
- clinically isolated syndrome MS

## Parameters

- `typical_cis` (boolean, required): Typical clinically isolated syndrome as assigned by the caller (Thompson 2018 panel 1). If false, mcdonald_ms is false; this tool does not diagnose MS from atypical presentations. true or false. magent does not examine the patient.
- `no_better_explanation` (boolean, required): No better explanation for the presentation as assigned by the caller (Thompson 2018). If false, mcdonald_ms is false. Remain vigilant for NMOSD. true or false. magent does not assign a better explanation.
- `two_or_more_attacks` (boolean, required): ≥2 clinical attacks as assigned by the caller. true means two or more attacks; false means this is the first/CIS attack. true or false. magent does not date attacks.
- `two_or_more_lesions` (boolean, required): Objective clinical evidence of ≥2 lesions as assigned by the caller. true means ≥2 lesions; false means 1 lesion. true or false. magent does not examine the patient.
- `dis` (boolean, required): Dissemination in space as assigned by the caller (2017: ≥1 T2-hyperintense lesion characteristic of MS in ≥2 of 4 areas: periventricular, cortical or juxtacortical, infratentorial, spinal cord; symptomatic lesions count; cortical lesions count). true or false. magent does not read MRI.
- `dit_mri` (boolean, required): MRI dissemination in time as assigned by the caller (simultaneous Gd-enhancing and non-enhancing lesions, or a new T2 or Gd-enhancing lesion on follow-up vs baseline). true or false. magent does not read MRI.
- `csf_specific_ocb` (boolean, required): CSF-specific oligoclonal bands as assigned by the caller (2017 DIT substitute when DIS is fulfilled). true or false. magent does not assay CSF.

## 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.

Method: `POST /api/calc/mcdonald_2017`
Max items: 25
Price: unit_amount + extra_item_amount * (n - 1) (unit 5000 atomic, extra 2000 atomic)
Status: 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:

```json
{
  "items": [
    {
      "csf_specific_ocb": "false",
      "dis": "false",
      "dit_mri": "false",
      "no_better_explanation": "true",
      "two_or_more_attacks": "true",
      "two_or_more_lesions": "true",
      "typical_cis": "true"
    },
    {
      "csf_specific_ocb": "false",
      "dis": "false",
      "dit_mri": "false",
      "no_better_explanation": "true",
      "two_or_more_attacks": "true",
      "two_or_more_lesions": "true",
      "typical_cis": "true"
    }
  ]
}
```

Human paywall (two-item fixture): https://api.magentlab.com/paywall/bulk/mcdonald-2017

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/mcdonald_2017",
  "items": [
    {
      "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": "Thompson AJ, Banwell BL, Barkhof F, Carroll WM, Coetzee T, Comi G, Correale J, Fazekas F, Filippi M, Freedman MS, Fujihara K, Galetta SL, Hartung HP, Kappos L, Lublin FD, Marrie RA, Miller AE, Miller DH, Montalban X, Mowry EM, Sorensen PS, Tintoré M, Traboulsee AL, Trojano M, Uitdehaag BMJ, Vukusic S, Waubant E, Weinshenker BG, Reingold SC, Cohen JA",
        "doi": "10.1016/S1474-4422(17)30470-2",
        "id": "thompson-2018",
        "pmid": "29275977",
        "source": "Lancet Neurol. 2018;17(2):162-173",
        "title": "Diagnosis of multiple sclerosis: 2017 revisions of the McDonald criteria"
      },
      "formula": "mcdonald_2017",
      "formula_expression": "mcdonald_ms iff typical_cis and no_better_explanation and ((two_or_more_attacks and two_or_more_lesions) or (two_or_more_attacks and not two_or_more_lesions and dis) or (not two_or_more_attacks and two_or_more_lesions and (dit_mri or csf_specific_ocb)) or (not two_or_more_attacks and not two_or_more_lesions and dis and (dit_mri or csf_specific_ocb))) (Thompson 2018 / 2017 McDonald typical CIS). CSF-specific OCB may substitute for MRI DIT when DIS is met. Not PPMS. Not 2010 McDonald. magent does not read MRI or assay CSF. Not a diagnosis",
      "criteria": [
        {
          "factor": "typical_cis",
          "met": true
        },
        {
          "factor": "no_better_explanation",
          "met": true
        },
        {
          "factor": "two_or_more_attacks",
          "met": true
        },
        {
          "factor": "two_or_more_lesions",
          "met": true
        },
        {
          "factor": "dis",
          "met": false
        },
        {
          "factor": "dit_mri",
          "met": false
        },
        {
          "factor": "csf_specific_ocb",
          "met": false
        },
        {
          "factor": "relapsing_cis_pathway",
          "met": true
        },
        {
          "factor": "mcdonald_ms",
          "met": true
        }
      ],
      "csf_specific_ocb": false,
      "dis": false,
      "dit_mri": false,
      "mcdonald_ms": true,
      "no_better_explanation": true,
      "two_or_more_attacks": true,
      "two_or_more_lesions": true,
      "typical_cis": true
    },
    {
      "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": "Thompson AJ, Banwell BL, Barkhof F, Carroll WM, Coetzee T, Comi G, Correale J, Fazekas F, Filippi M, Freedman MS, Fujihara K, Galetta SL, Hartung HP, Kappos L, Lublin FD, Marrie RA, Miller AE, Miller DH, Montalban X, Mowry EM, Sorensen PS, Tintoré M, Traboulsee AL, Trojano M, Uitdehaag BMJ, Vukusic S, Waubant E, Weinshenker BG, Reingold SC, Cohen JA",
        "doi": "10.1016/S1474-4422(17)30470-2",
        "id": "thompson-2018",
        "pmid": "29275977",
        "source": "Lancet Neurol. 2018;17(2):162-173",
        "title": "Diagnosis of multiple sclerosis: 2017 revisions of the McDonald criteria"
      },
      "formula": "mcdonald_2017",
      "formula_expression": "mcdonald_ms iff typical_cis and no_better_explanation and ((two_or_more_attacks and two_or_more_lesions) or (two_or_more_attacks and not two_or_more_lesions and dis) or (not two_or_more_attacks and two_or_more_lesions and (dit_mri or csf_specific_ocb)) or (not two_or_more_attacks and not two_or_more_lesions and dis and (dit_mri or csf_specific_ocb))) (Thompson 2018 / 2017 McDonald typical CIS). CSF-specific OCB may substitute for MRI DIT when DIS is met. Not PPMS. Not 2010 McDonald. magent does not read MRI or assay CSF. Not a diagnosis",
      "criteria": [
        {
          "factor": "typical_cis",
          "met": true
        },
        {
          "factor": "no_better_explanation",
          "met": true
        },
        {
          "factor": "two_or_more_attacks",
          "met": true
        },
        {
          "factor": "two_or_more_lesions",
          "met": true
        },
        {
          "factor": "dis",
          "met": false
        },
        {
          "factor": "dit_mri",
          "met": false
        },
        {
          "factor": "csf_specific_ocb",
          "met": false
        },
        {
          "factor": "relapsing_cis_pathway",
          "met": true
        },
        {
          "factor": "mcdonald_ms",
          "met": true
        }
      ],
      "csf_specific_ocb": false,
      "dis": false,
      "dit_mri": false,
      "mcdonald_ms": true,
      "no_better_explanation": true,
      "two_or_more_attacks": true,
      "two_or_more_lesions": true,
      "typical_cis": true
    }
  ]
}
```

## Response fields

- `formula` (string): mcdonald_2017
- `formula_expression` (string): Thompson 2018 / 2017 McDonald typical CIS combination
- `mcdonald_ms` (boolean): true iff typical_cis, no_better_explanation, and a published relapsing/CIS row hold. Not a diagnosis. Not PPMS. Not 2010 McDonald.
- `typical_cis` (boolean): Caller-assigned typical clinically isolated syndrome flag used
- `no_better_explanation` (boolean): Caller-assigned no-better-explanation flag used
- `two_or_more_attacks` (boolean): Caller-assigned ≥2 clinical attacks flag used
- `two_or_more_lesions` (boolean): Caller-assigned objective clinical evidence of ≥2 lesions flag used
- `dis` (boolean): Caller-assigned 2017 dissemination in space flag used
- `dit_mri` (boolean): Caller-assigned MRI dissemination in time flag used
- `csf_specific_ocb` (boolean): Caller-assigned CSF-specific oligoclonal bands flag used
- `criteria` (array): Rows for each caller flag, relapsing_cis_pathway, and mcdonald_ms with factor and met
- `citation` (object): Thompson 2018 Lancet Neurol McDonald citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "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": "Thompson AJ, Banwell BL, Barkhof F, Carroll WM, Coetzee T, Comi G, Correale J, Fazekas F, Filippi M, Freedman MS, Fujihara K, Galetta SL, Hartung HP, Kappos L, Lublin FD, Marrie RA, Miller AE, Miller DH, Montalban X, Mowry EM, Sorensen PS, Tintoré M, Traboulsee AL, Trojano M, Uitdehaag BMJ, Vukusic S, Waubant E, Weinshenker BG, Reingold SC, Cohen JA",
    "doi": "10.1016/S1474-4422(17)30470-2",
    "id": "thompson-2018",
    "pmid": "29275977",
    "source": "Lancet Neurol. 2018;17(2):162-173",
    "title": "Diagnosis of multiple sclerosis: 2017 revisions of the McDonald criteria"
  },
  "formula": "mcdonald_2017",
  "formula_expression": "mcdonald_ms iff typical_cis and no_better_explanation and ((two_or_more_attacks and two_or_more_lesions) or (two_or_more_attacks and not two_or_more_lesions and dis) or (not two_or_more_attacks and two_or_more_lesions and (dit_mri or csf_specific_ocb)) or (not two_or_more_attacks and not two_or_more_lesions and dis and (dit_mri or csf_specific_ocb))) (Thompson 2018 / 2017 McDonald typical CIS). CSF-specific OCB may substitute for MRI DIT when DIS is met. Not PPMS. Not 2010 McDonald. magent does not read MRI or assay CSF. Not a diagnosis",
  "criteria": [
    {
      "factor": "typical_cis",
      "met": true
    },
    {
      "factor": "no_better_explanation",
      "met": true
    },
    {
      "factor": "two_or_more_attacks",
      "met": true
    },
    {
      "factor": "two_or_more_lesions",
      "met": true
    },
    {
      "factor": "dis",
      "met": false
    },
    {
      "factor": "dit_mri",
      "met": false
    },
    {
      "factor": "csf_specific_ocb",
      "met": false
    },
    {
      "factor": "relapsing_cis_pathway",
      "met": true
    },
    {
      "factor": "mcdonald_ms",
      "met": true
    }
  ],
  "csf_specific_ocb": false,
  "dis": false,
  "dit_mri": false,
  "mcdonald_ms": true,
  "no_better_explanation": true,
  "two_or_more_attacks": true,
  "two_or_more_lesions": true,
  "typical_cis": true
}
```

## Errors

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

Shared HTTP 402 and 503: https://magentlab.com/docs/payments

## Related tools

- [Disease Steps](https://magentlab.com/docs/disease-steps) — Return the caller-assigned Hohol 1995 Disease Steps integer 0-6 with the published description. magent does not examine gait.
- [Glasgow Coma Scale](https://magentlab.com/docs/gcs) — Compute the Glasgow Coma Scale as the sum of caller-assigned eye, verbal, and motor integers. The 1974 or 1976 edition is required.

## 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.

- GET the tool with Accept: application/json (do not send Accept: text/html unless you want the human paywall).
- HTTP 402 means you have not paid. Decode the base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote.
- Sign accepts[0] (exact, EIP-3009) with validBefore = now + maxTimeoutSeconds (600 seconds), or accepts[1] (batch-settlement deposit/voucher) on product GET. Ping and POST {items} stay exact. Magent retries transient facilitator 429/5xx before answering.
- Retry the same URL with PAYMENT-SIGNATURE (base64 JSON of accepted and payload). Magent attaches canonical extensions.bazaar on CDP verify/settle; echoing 402 bazaar is optional.
- Success is HTTP 200 JSON plus PAYMENT-RESPONSE. exact settles before the tool. batch-settlement verifies (and deposit-settles) before the tool and commits the charge after HTTP 2xx. HTTP 503: retry the same PAYMENT-SIGNATURE. Mint a new exact nonce only after a new HTTP 402.

- offered `exact` on eip155:8453: Fixed-price USDC on Base. The buyer authorizes the advertised amount (EIP-3009). magent settles before the tool runs (paymentFlow upfront). extra.assetTransferMethod=eip3009 extra.paymentFlow=upfront.
- offered `batch-settlement` on eip155:8453: Payment-channel vouchers claimed later in batches. Exact stays accepts[0]. Same-path POST {items} is still exact. extra.assetTransferMethod=eip3009 extra.paymentFlow=authorization.

- not offered `upto`: Not offered. Usage-based: buyer authorizes a ceiling, seller settles the actual amount after work. Reserved for a future metered tool. Not for current calculators or code search.

Same-path POST {items} is still scheme exact: one EIP-3009 authorization for GET unit plus $0.002 per extra item. That is not x402 batch-settlement (payment channels / vouchers).

Shared HTTP 402 and 503 table: https://magentlab.com/docs/payments

Stdio MCP (one process per host): https://magentlab.com/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.
