Emergency · LIVE
DHAKA dehydration score (Levine)
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).
Markdown: /docs/dhaka.md · Canonical: https://magentlab.com/docs/dhaka
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Sum four caller-assigned Levine 2015 DHAKA Table 3 items and return the published total (max 12) and dehydration band (no, some, or severe).
When to use
When an agent has already assigned Levine 2015 Table 3 general appearance, respirations, skin pinch, and tears and needs the published DHAKA Dehydration Score total and band, not a WHO IMCI algorithm, fluids order, or the DHAKA Tree.
When not to use
- Not a medical device and not a WHO IMCI algorithm clone. This is the empirically derived Levine 2015 DHAKA Dehydration Score (Table 3), not the DHAKA Tree / recursive partitioning model.
- Each of the four items is caller-assigned. magent does not examine the child or order fluids.
- Derived in children younger than 5 years with acute diarrhea. Age is not a score item and is not required.
- Table 3 bands only: no_dehydration 0–1, some_dehydration 2–3, severe_dehydration ≥4. Respirations have only Normal and Deep (no very-deep cell).
Formula
DHAKA = general_appearance (normal 0, restless_irritable 2, lethargic_unconscious 4) + respirations (normal 0, deep 2) + skin_pinch (normal 0, slow 2, very_slow 4) + tears (normal 0, decreased 1, absent 2); Levine 2015 Table 3; max 12
Citation
- Authors
- Levine AC, Glavis-Bloom J, Modi P, Nasrin S, Rege S, Chu C, Schmid CH, Alam NH
- Source
- Glob Health Sci Pract. 2015;3(3):405-418
Worked example
All items normal
Given:
general_appearance=normalrespirations=normalskin_pinch=normaltears=normal
- general_appearance normal 0 + respirations normal 0 + skin_pinch normal 0 + tears normal 0
- Score = 0 (max 12); dhaka_band no_dehydration
Deep respirations only
Given:
general_appearance=normalrespirations=deepskin_pinch=normaltears=normal
- respirations deep 2; other items 0
- Score = 2 (max 12); dhaka_band some_dehydration
Maximum Table 3 score
Given:
general_appearance=lethargic_unconsciousrespirations=deepskin_pinch=very_slowtears=absent
- lethargic_unconscious 4 + deep 2 + very_slow 4 + absent 2
- Score = 12 (max 12); dhaka_band severe_dehydration
Also searched as
- dhaka score
- pediatric dehydration
- diarrhea dehydration
- DHAKA dehydration score
- Levine DHAKA
- DHAKA Table 3
- child diarrhea dehydration
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
/api/calc/dhaka?general_appearance=normal&respirations=normal&skin_pinch=normal&tears=normal
Full URL: https://api.magentlab.com/api/calc/dhaka?general_appearance=normal&respirations=normal&skin_pinch=normal&tears=normal
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/dhaka?general_appearance=normal&respirations=normal&skin_pinch=normal&tears=normal"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
general_appearance |
string | required · normal, restless_irritable, lethargic_unconscious | Caller-assigned Levine 2015 Table 3 general appearance: normal (0), restless_irritable (2), or lethargic_unconscious (4). magent does not examine the child. |
respirations |
string | required · normal, deep | Caller-assigned Levine 2015 Table 3 respirations: normal (0) or deep (2). Table 3 has no very-deep cell. magent does not examine the child. |
skin_pinch |
string | required · normal, slow, very_slow | Caller-assigned Levine 2015 Table 3 skin pinch: normal (0), slow (2), or very_slow (4). magent does not examine the child. |
tears |
string | required · normal, decreased, absent | Caller-assigned Levine 2015 Table 3 tears: normal (0), decreased (1), or absent (2). magent does not examine the child. |
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.
- 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": [
{
"general_appearance": "normal",
"respirations": "normal",
"skin_pinch": "normal",
"tears": "normal"
},
{
"general_appearance": "normal",
"respirations": "normal",
"skin_pinch": "normal",
"tears": "normal"
}
]
}
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/dhaka",
"items": [
{
"components": [
{
"value": "normal",
"factor": "general_appearance",
"points": 0,
"present": true
},
{
"value": "normal",
"factor": "respirations",
"points": 0,
"present": true
},
{
"value": "normal",
"factor": "skin_pinch",
"points": 0,
"present": true
},
{
"value": "normal",
"factor": "tears",
"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": "Levine AC, Glavis-Bloom J, Modi P, Nasrin S, Rege S, Chu C, Schmid CH, Alam NH",
"doi": "10.9745/GHSP-D-15-00097",
"id": "levine-2015",
"pmid": "26374802",
"source": "Glob Health Sci Pract. 2015;3(3):405-418",
"title": "Empirically Derived Dehydration Scoring and Decision Tree Models for Children With Diarrhea: Assessment and Internal Validation in a Prospective Cohort Study in Dhaka, Bangladesh"
},
"formula": "dhaka",
"formula_expression": "DHAKA = general_appearance (normal 0, restless_irritable 2, lethargic_unconscious 4) + respirations (normal 0, deep 2) + skin_pinch (normal 0, slow 2, very_slow 4) + tears (normal 0, decreased 1, absent 2); Levine 2015 Table 3; max 12",
"max_score": 12,
"score": 0,
"dhaka_band": "no_dehydration",
"general_appearance": "normal",
"respirations": "normal",
"skin_pinch": "normal",
"tears": "normal"
},
{
"components": [
{
"value": "normal",
"factor": "general_appearance",
"points": 0,
"present": true
},
{
"value": "normal",
"factor": "respirations",
"points": 0,
"present": true
},
{
"value": "normal",
"factor": "skin_pinch",
"points": 0,
"present": true
},
{
"value": "normal",
"factor": "tears",
"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": "Levine AC, Glavis-Bloom J, Modi P, Nasrin S, Rege S, Chu C, Schmid CH, Alam NH",
"doi": "10.9745/GHSP-D-15-00097",
"id": "levine-2015",
"pmid": "26374802",
"source": "Glob Health Sci Pract. 2015;3(3):405-418",
"title": "Empirically Derived Dehydration Scoring and Decision Tree Models for Children With Diarrhea: Assessment and Internal Validation in a Prospective Cohort Study in Dhaka, Bangladesh"
},
"formula": "dhaka",
"formula_expression": "DHAKA = general_appearance (normal 0, restless_irritable 2, lethargic_unconscious 4) + respirations (normal 0, deep 2) + skin_pinch (normal 0, slow 2, very_slow 4) + tears (normal 0, decreased 1, absent 2); Levine 2015 Table 3; max 12",
"max_score": 12,
"score": 0,
"dhaka_band": "no_dehydration",
"general_appearance": "normal",
"respirations": "normal",
"skin_pinch": "normal",
"tears": "normal"
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | dhaka |
formula_expression |
string | Exact expression used |
score |
integer | DHAKA Table 3 points 0-12 |
max_score |
integer | Always 12 |
dhaka_band |
string | Levine 2015 Table 3 category: no_dehydration (0-1), some_dehydration (2-3), or severe_dehydration (≥4). A score band, not a fluids order and not the DHAKA Tree. |
general_appearance |
string | Caller-assigned token used: normal, restless_irritable, or lethargic_unconscious |
respirations |
string | Caller-assigned token used: normal or deep |
skin_pinch |
string | Caller-assigned token used: normal, slow, or very_slow |
tears |
string | Caller-assigned token used: normal, decreased, or absent |
components |
array | Per-item caller-assigned points |
citation |
object | Levine et al. Glob Health Sci Pract 2015 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"components": [
{
"value": "normal",
"factor": "general_appearance",
"points": 0,
"present": true
},
{
"value": "normal",
"factor": "respirations",
"points": 0,
"present": true
},
{
"value": "normal",
"factor": "skin_pinch",
"points": 0,
"present": true
},
{
"value": "normal",
"factor": "tears",
"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": "Levine AC, Glavis-Bloom J, Modi P, Nasrin S, Rege S, Chu C, Schmid CH, Alam NH",
"doi": "10.9745/GHSP-D-15-00097",
"id": "levine-2015",
"pmid": "26374802",
"source": "Glob Health Sci Pract. 2015;3(3):405-418",
"title": "Empirically Derived Dehydration Scoring and Decision Tree Models for Children With Diarrhea: Assessment and Internal Validation in a Prospective Cohort Study in Dhaka, Bangladesh"
},
"formula": "dhaka",
"formula_expression": "DHAKA = general_appearance (normal 0, restless_irritable 2, lethargic_unconscious 4) + respirations (normal 0, deep 2) + skin_pinch (normal 0, slow 2, very_slow 4) + tears (normal 0, decreased 1, absent 2); Levine 2015 Table 3; max 12",
"max_score": 12,
"score": 0,
"dhaka_band": "no_dehydration",
"general_appearance": "normal",
"respirations": "normal",
"skin_pinch": "normal",
"tears": "normal"
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_dhaka_appearance |
general_appearance must be normal, restless_irritable, or lethargic_unconscious (Levine 2015 DHAKA Table 3). Returned before settlement; you are not charged. |
| 400 | invalid_dhaka_respirations |
respirations must be normal or deep (Levine 2015 DHAKA Table 3). Returned before settlement; you are not charged. |
| 400 | invalid_dhaka_skin_pinch |
skin_pinch must be normal, slow, or very_slow (Levine 2015 DHAKA Table 3). Returned before settlement; you are not charged. |
| 400 | invalid_dhaka_tears |
tears must be normal, decreased, or absent (Levine 2015 DHAKA Table 3). 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
- Westley croup — Sum the Westley 1978 croup clinical score from caller-assigned consciousness, cyanosis, stridor, air entry, and retractions (maximum 17).
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.