# NIRUDAK dehydration score (Barry)

NIRUDAK

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

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

## What it computes

Sum seven caller-assigned Barry 2021 NIRUDAK Table 2 items and return the published total (max 13) and dehydration band (no, some, or severe).

## When to use

When an agent has already assigned Barry 2021 Table 2 age, sex, eye level, radial pulse, respirations, skin pinch, and 24-hour vomiting and needs the published integer NIRUDAK total and band, not WHO IMCI/IMAI, the DHAKA child score, PLOS logistic models, or a fluids order.

## When not to use

- Not a medical device. Not a WHO IMCI or IMAI algorithm. Not the Levine 2015 DHAKA score. Not PLOS logistic models.
- Each clinical sign is caller-assigned. magent does not examine the patient or order fluids.
- Age is an integer from 5 to 120 (Barry 2021 NIRUDAK; not the adult 18–120 clamp).
- Table 2 integer score only (max 13). Bands: no_dehydration 0–3, some_dehydration 4–6, severe_dehydration 7–13. Skin pinch reference is rapid, not DHAKA normal.

## Formula

```
NIRUDAK = age (>59 0, 20-59 1, <20 2) + sex (female 0, male 1) + eye_level (normal 0, sunken 1) + radial_pulse (strong 0, decreased 1, absent 2) + respirations (normal 0, deep 1) + skin_pinch (rapid 0, slow 2, very_slow 4) + vomiting_episodes_24h (lt_1 0, 1_to_10 1, gt_10 2); Barry 2021 Table 2; max 13
```

## Citation

[Derivation and Internal Validation of a Score to Predict Dehydration Severity in Patients over 5 Years with Acute Diarrhea](https://doi.org/10.4269/ajtmh.21-0143)
Barry MA, Garbern SC, Lee JA, Qu K, Gainey M, Schmid CH, Nasrin S, Alam NH, Nelson EJ, Rosen RK, Levine AC
Am J Trop Med Hyg. 2021;105(5):1368-1375
DOI: [10.4269/ajtmh.21-0143](https://doi.org/10.4269/ajtmh.21-0143)

## Worked example

### All-reference elderly female

Given: `age=70, eye_level=normal, radial_pulse=strong, respirations=normal, sex=female, skin_pinch=rapid, vomiting_episodes_24h=lt_1`

1. age 70 >59 0 + female 0 + eyes normal 0 + pulse strong 0 + respirations normal 0 + pinch rapid 0 + vomiting lt_1 0
2. Score = 0 (max 13); nirudak_band no_dehydration


### Very slow skin pinch only

Given: `age=70, eye_level=normal, radial_pulse=strong, respirations=normal, sex=female, skin_pinch=very_slow, vomiting_episodes_24h=lt_1`

1. skin_pinch very_slow 4; other items 0
2. Score = 4 (max 13); nirudak_band some_dehydration


### Maximum Table 2 score

Given: `age=10, eye_level=sunken, radial_pulse=absent, respirations=deep, sex=male, skin_pinch=very_slow, vomiting_episodes_24h=gt_10`

1. age <20 2 + male 1 + sunken 1 + absent 2 + deep 1 + very_slow 4 + gt_10 2
2. Score = 13 (max 13); nirudak_band severe_dehydration


## Also searched as

- nirudak score
- NIRUDAK Table 2
- Barry dehydration score
- acute diarrhea dehydration
- over 5 years dehydration
- sunken eyes dehydration
- skin pinch dehydration
- NIRUDAK integer score

## Parameters

- `age` (integer, required): Age in years, integer 5–120. Barry 2021 Table 2: >59 scores 0, 20–59 scores 1, <20 scores 2. Not the adult 18–120 clamp.
- `sex` (string, required): female (0) or male (1) (Barry 2021 Table 2).
- `eye_level` (string, required): Caller-assigned Barry 2021 Table 2 eye level: normal (0) or sunken (1). magent does not examine the patient.
- `radial_pulse` (string, required): Caller-assigned Barry 2021 Table 2 radial pulse: strong (0), decreased (1), or absent (2). magent does not examine the patient.
- `respirations` (string, required): Caller-assigned Barry 2021 Table 2 respirations: normal (0) or deep (1). Deep scores 1, not DHAKA Table 3's 2. magent does not examine the patient.
- `skin_pinch` (string, required): Caller-assigned Barry 2021 Table 2 skin pinch: rapid (0), slow (2), or very_slow (4). Reference is rapid, not DHAKA normal. magent does not examine the patient.
- `vomiting_episodes_24h` (string, required): Caller-assigned Barry 2021 Table 2 vomiting episodes in 24 hours: lt_1 (0; <1), 1_to_10 (1), or gt_10 (2; >10).

## 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/nirudak`
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": [
    {
      "age": "70",
      "eye_level": "normal",
      "radial_pulse": "strong",
      "respirations": "normal",
      "sex": "female",
      "skin_pinch": "rapid",
      "vomiting_episodes_24h": "lt_1"
    },
    {
      "age": "70",
      "eye_level": "normal",
      "radial_pulse": "strong",
      "respirations": "normal",
      "sex": "female",
      "skin_pinch": "rapid",
      "vomiting_episodes_24h": "lt_1"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/nirudak",
  "items": [
    {
      "components": [
        {
          "value": 70,
          "factor": "age",
          "points": 0,
          "present": true
        },
        {
          "value": "female",
          "factor": "sex",
          "points": 0,
          "present": true
        },
        {
          "value": "normal",
          "factor": "eye_level",
          "points": 0,
          "present": true
        },
        {
          "value": "strong",
          "factor": "radial_pulse",
          "points": 0,
          "present": true
        },
        {
          "value": "normal",
          "factor": "respirations",
          "points": 0,
          "present": true
        },
        {
          "value": "rapid",
          "factor": "skin_pinch",
          "points": 0,
          "present": true
        },
        {
          "value": "lt_1",
          "factor": "vomiting_episodes_24h",
          "points": 0,
          "present": 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": "Barry MA, Garbern SC, Lee JA, Qu K, Gainey M, Schmid CH, Nasrin S, Alam NH, Nelson EJ, Rosen RK, Levine AC",
        "doi": "10.4269/ajtmh.21-0143",
        "id": "barry-2021",
        "pmid": "34398821",
        "source": "Am J Trop Med Hyg. 2021;105(5):1368-1375",
        "title": "Derivation and Internal Validation of a Score to Predict Dehydration Severity in Patients over 5 Years with Acute Diarrhea"
      },
      "formula": "nirudak",
      "formula_expression": "NIRUDAK = age (>59 0, 20-59 1, <20 2) + sex (female 0, male 1) + eye_level (normal 0, sunken 1) + radial_pulse (strong 0, decreased 1, absent 2) + respirations (normal 0, deep 1) + skin_pinch (rapid 0, slow 2, very_slow 4) + vomiting_episodes_24h (lt_1 0, 1_to_10 1, gt_10 2); Barry 2021 Table 2; max 13",
      "age_years": 70,
      "max_score": 13,
      "score": 0,
      "sex": "female",
      "respirations": "normal",
      "skin_pinch": "rapid",
      "eye_level": "normal",
      "nirudak_band": "no_dehydration",
      "radial_pulse": "strong",
      "vomiting_episodes_24h": "lt_1"
    },
    {
      "components": [
        {
          "value": 70,
          "factor": "age",
          "points": 0,
          "present": true
        },
        {
          "value": "female",
          "factor": "sex",
          "points": 0,
          "present": true
        },
        {
          "value": "normal",
          "factor": "eye_level",
          "points": 0,
          "present": true
        },
        {
          "value": "strong",
          "factor": "radial_pulse",
          "points": 0,
          "present": true
        },
        {
          "value": "normal",
          "factor": "respirations",
          "points": 0,
          "present": true
        },
        {
          "value": "rapid",
          "factor": "skin_pinch",
          "points": 0,
          "present": true
        },
        {
          "value": "lt_1",
          "factor": "vomiting_episodes_24h",
          "points": 0,
          "present": 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": "Barry MA, Garbern SC, Lee JA, Qu K, Gainey M, Schmid CH, Nasrin S, Alam NH, Nelson EJ, Rosen RK, Levine AC",
        "doi": "10.4269/ajtmh.21-0143",
        "id": "barry-2021",
        "pmid": "34398821",
        "source": "Am J Trop Med Hyg. 2021;105(5):1368-1375",
        "title": "Derivation and Internal Validation of a Score to Predict Dehydration Severity in Patients over 5 Years with Acute Diarrhea"
      },
      "formula": "nirudak",
      "formula_expression": "NIRUDAK = age (>59 0, 20-59 1, <20 2) + sex (female 0, male 1) + eye_level (normal 0, sunken 1) + radial_pulse (strong 0, decreased 1, absent 2) + respirations (normal 0, deep 1) + skin_pinch (rapid 0, slow 2, very_slow 4) + vomiting_episodes_24h (lt_1 0, 1_to_10 1, gt_10 2); Barry 2021 Table 2; max 13",
      "age_years": 70,
      "max_score": 13,
      "score": 0,
      "sex": "female",
      "respirations": "normal",
      "skin_pinch": "rapid",
      "eye_level": "normal",
      "nirudak_band": "no_dehydration",
      "radial_pulse": "strong",
      "vomiting_episodes_24h": "lt_1"
    }
  ]
}
```

## Response fields

- `formula` (string): nirudak
- `formula_expression` (string): Exact expression used
- `score` (integer): NIRUDAK Table 2 points 0-13
- `max_score` (integer): Always 13
- `nirudak_band` (string): Barry 2021 Table 2 category: no_dehydration (0-3), some_dehydration (4-6), or severe_dehydration (7-13). A score band, not a fluids order and not WHO IMCI/IMAI.
- `age_years` (integer): Age in years used for the >59 / 20–59 / <20 split
- `sex` (string): female or male
- `eye_level` (string): Caller-assigned token used: normal or sunken
- `radial_pulse` (string): Caller-assigned token used: strong, decreased, or absent
- `respirations` (string): Caller-assigned token used: normal or deep
- `skin_pinch` (string): Caller-assigned token used: rapid, slow, or very_slow
- `vomiting_episodes_24h` (string): Caller-assigned token used: lt_1, 1_to_10, or gt_10
- `components` (array): Per-item caller-assigned points
- `citation` (object): Barry et al. Am J Trop Med Hyg 2021 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 70,
      "factor": "age",
      "points": 0,
      "present": true
    },
    {
      "value": "female",
      "factor": "sex",
      "points": 0,
      "present": true
    },
    {
      "value": "normal",
      "factor": "eye_level",
      "points": 0,
      "present": true
    },
    {
      "value": "strong",
      "factor": "radial_pulse",
      "points": 0,
      "present": true
    },
    {
      "value": "normal",
      "factor": "respirations",
      "points": 0,
      "present": true
    },
    {
      "value": "rapid",
      "factor": "skin_pinch",
      "points": 0,
      "present": true
    },
    {
      "value": "lt_1",
      "factor": "vomiting_episodes_24h",
      "points": 0,
      "present": 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": "Barry MA, Garbern SC, Lee JA, Qu K, Gainey M, Schmid CH, Nasrin S, Alam NH, Nelson EJ, Rosen RK, Levine AC",
    "doi": "10.4269/ajtmh.21-0143",
    "id": "barry-2021",
    "pmid": "34398821",
    "source": "Am J Trop Med Hyg. 2021;105(5):1368-1375",
    "title": "Derivation and Internal Validation of a Score to Predict Dehydration Severity in Patients over 5 Years with Acute Diarrhea"
  },
  "formula": "nirudak",
  "formula_expression": "NIRUDAK = age (>59 0, 20-59 1, <20 2) + sex (female 0, male 1) + eye_level (normal 0, sunken 1) + radial_pulse (strong 0, decreased 1, absent 2) + respirations (normal 0, deep 1) + skin_pinch (rapid 0, slow 2, very_slow 4) + vomiting_episodes_24h (lt_1 0, 1_to_10 1, gt_10 2); Barry 2021 Table 2; max 13",
  "age_years": 70,
  "max_score": 13,
  "score": 0,
  "sex": "female",
  "respirations": "normal",
  "skin_pinch": "rapid",
  "eye_level": "normal",
  "nirudak_band": "no_dehydration",
  "radial_pulse": "strong",
  "vomiting_episodes_24h": "lt_1"
}
```

## Errors

- HTTP 400 `invalid_nirudak_age`: age must be an integer from 5 to 120 (Barry 2021 NIRUDAK; not the adult 18-120 clamp). Returned before settlement; you are not charged.
- HTTP 400 `invalid_sex`: sex must be female or male Returned before settlement; you are not charged.
- HTTP 400 `invalid_nirudak_eyes`: eye_level must be normal or sunken (Barry 2021 NIRUDAK Table 2). Returned before settlement; you are not charged.
- HTTP 400 `invalid_nirudak_pulse`: radial_pulse must be strong, decreased, or absent (Barry 2021 NIRUDAK Table 2). Returned before settlement; you are not charged.
- HTTP 400 `invalid_dhaka_respirations`: respirations must be normal or deep (Levine 2015 DHAKA Table 3). Returned before settlement; you are not charged.
- HTTP 400 `invalid_nirudak_skin_pinch`: skin_pinch must be rapid, slow, or very_slow (Barry 2021 NIRUDAK Table 2; rapid is the reference). Returned before settlement; you are not charged.
- HTTP 400 `invalid_nirudak_vomiting`: vomiting_episodes_24h must be lt_1, 1_to_10, or gt_10 (Barry 2021 NIRUDAK Table 2). 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

- [DHAKA](https://magentlab.com/docs/dhaka) — Sum four caller-assigned Levine 2015 DHAKA Table 3 items and return the published total (max 12) and dehydration band (no, some, or severe).

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