Emergency · LIVE
Kocher criteria
Sum the four Kocher 1999 predictors and return the published predicted probability of septic arthritis versus transient synovitis in children with irritable hip.
Markdown: /docs/kocher.md · Canonical: https://magentlab.com/docs/kocher
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Sum the four Kocher 1999 predictors and return the published predicted probability of septic arthritis versus transient synovitis in children with irritable hip.
When to use
When an agent needs the published Kocher 1999 point total and predicted probability and must not invent hip findings or treat the total as a diagnosis or aspiration order.
When not to use
- Not a medical device, not a diagnosis of septic arthritis, and not an aspiration or operating-room order.
- Kocher 1999 four predictors only (history of fever, non-weight-bearing, ESR ≥40 mm/h, serum WBC >12,000/mm³). Does not include Caird CRP. Not for adults.
- History of fever and non-weight-bearing are caller-assigned. magent does not examine the hip.
Formula
Kocher = history_of_fever + non_weight_bearing + (esr_mm_h >= 40) + (wbc_ul > 12000); each 1; max 4; predicted probability 0:<0.2% 1:3.0% 2:40.0% 3:93.1% 4:99.6%
Citation
- Authors
- Kocher MS, Zurakowski D, Kasser JR
- Source
- J Bone Joint Surg Am. 1999;81(12):1662-1670
Worked example
No predictors
Given:
esr_mm_h=20history_of_fever=falsenon_weight_bearing=falsewbc_k_ul=8.0
- history_of_fever false → 0; non_weight_bearing false → 0; ESR 20 < 40 → 0; WBC 8.0 k/µL = 8000 ≤ 12000 → 0
- Score = 0; predicted_probability <0.2%
Also searched as
- kocher
- septic arthritis
- transient synovitis
- pediatric hip
- Kocher criteria
- Kocher algorithm
- irritable hip
- Kocher 1999
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
/api/calc/kocher?history_of_fever=false&non_weight_bearing=false&esr_mm_h=20&wbc_k_ul=8.0
Full URL: https://api.magentlab.com/api/calc/kocher?history_of_fever=false&non_weight_bearing=false&esr_mm_h=20&wbc_k_ul=8.0
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/kocher?history_of_fever=false&non_weight_bearing=false&esr_mm_h=20&wbc_k_ul=8.0"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
history_of_fever |
boolean | required | History of fever (oral temperature >38.5°C in Kocher 1999). true or false as assigned by the caller. |
non_weight_bearing |
boolean | required | Non-weight-bearing on the affected limb (Kocher 1999). true or false as assigned by the caller. |
esr_mm_h |
number | required | Erythrocyte sedimentation rate in mm/h (1.0-150.0). ≥40 scores 1 (40 scores; 39.9 does not). |
wbc_k_ul |
number | optional | WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500. >12000/µL scores 1. |
wbc_ul |
number | optional | WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. >12000 scores 1 (12000 does not; 12001 does). |
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": [
{
"esr_mm_h": "20",
"history_of_fever": "false",
"non_weight_bearing": "false",
"wbc_k_ul": "8.0"
},
{
"esr_mm_h": "20",
"history_of_fever": "false",
"non_weight_bearing": "false",
"wbc_k_ul": "8.0"
}
]
}
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/kocher",
"items": [
{
"components": [
{
"factor": "history_of_fever",
"points": 0,
"present": false
},
{
"factor": "non_weight_bearing",
"points": 0,
"present": false
},
{
"value": 20.0,
"factor": "esr_ge_40",
"points": 0,
"present": false
},
{
"value": 8.0e3,
"factor": "wbc_gt_12000",
"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": "Kocher MS, Zurakowski D, Kasser JR",
"doi": "10.2106/00004623-199912000-00002",
"id": "kocher-1999",
"pmid": "10608376",
"source": "J Bone Joint Surg Am. 1999;81(12):1662-1670",
"title": "Differentiating between septic arthritis and transient synovitis of the hip in children: an evidence-based clinical prediction algorithm"
},
"formula": "kocher",
"formula_expression": "Kocher = history_of_fever + non_weight_bearing + (esr_mm_h >= 40) + (wbc_ul > 12000); each 1; max 4; predicted probability 0:<0.2% 1:3.0% 2:40.0% 3:93.1% 4:99.6%",
"max_score": 4,
"score": 0,
"wbc_ul": 8.0e3,
"esr_mm_h": 20.0,
"predicted_probability": "<0.2%"
},
{
"components": [
{
"factor": "history_of_fever",
"points": 0,
"present": false
},
{
"factor": "non_weight_bearing",
"points": 0,
"present": false
},
{
"value": 20.0,
"factor": "esr_ge_40",
"points": 0,
"present": false
},
{
"value": 8.0e3,
"factor": "wbc_gt_12000",
"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": "Kocher MS, Zurakowski D, Kasser JR",
"doi": "10.2106/00004623-199912000-00002",
"id": "kocher-1999",
"pmid": "10608376",
"source": "J Bone Joint Surg Am. 1999;81(12):1662-1670",
"title": "Differentiating between septic arthritis and transient synovitis of the hip in children: an evidence-based clinical prediction algorithm"
},
"formula": "kocher",
"formula_expression": "Kocher = history_of_fever + non_weight_bearing + (esr_mm_h >= 40) + (wbc_ul > 12000); each 1; max 4; predicted probability 0:<0.2% 1:3.0% 2:40.0% 3:93.1% 4:99.6%",
"max_score": 4,
"score": 0,
"wbc_ul": 8.0e3,
"esr_mm_h": 20.0,
"predicted_probability": "<0.2%"
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | kocher |
formula_expression |
string | Exact expression used |
score |
integer | Kocher predictors present, 0-4 |
max_score |
integer | Always 4 |
predicted_probability |
string | Kocher 1999 predicted probability of septic arthritis vs transient synovitis: <0.2%, 3.0%, 40.0%, 93.1%, or 99.6%. Not a diagnosis. |
esr_mm_h |
number | ESR in mm/h used for the ≥40 cutoff |
wbc_ul |
number | Normalized WBC in cells/µL used for the >12000 cutoff |
components |
array | Per-predictor points |
citation |
object | Kocher et al. JBJS 1999 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"components": [
{
"factor": "history_of_fever",
"points": 0,
"present": false
},
{
"factor": "non_weight_bearing",
"points": 0,
"present": false
},
{
"value": 20.0,
"factor": "esr_ge_40",
"points": 0,
"present": false
},
{
"value": 8.0e3,
"factor": "wbc_gt_12000",
"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": "Kocher MS, Zurakowski D, Kasser JR",
"doi": "10.2106/00004623-199912000-00002",
"id": "kocher-1999",
"pmid": "10608376",
"source": "J Bone Joint Surg Am. 1999;81(12):1662-1670",
"title": "Differentiating between septic arthritis and transient synovitis of the hip in children: an evidence-based clinical prediction algorithm"
},
"formula": "kocher",
"formula_expression": "Kocher = history_of_fever + non_weight_bearing + (esr_mm_h >= 40) + (wbc_ul > 12000); each 1; max 4; predicted probability 0:<0.2% 1:3.0% 2:40.0% 3:93.1% 4:99.6%",
"max_score": 4,
"score": 0,
"wbc_ul": 8.0e3,
"esr_mm_h": 20.0,
"predicted_probability": "<0.2%"
}
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_esr |
esr_mm_h must be a number from 1 to 150. Returned before settlement; you are not charged. |
| 400 | invalid_wbc |
wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required 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
- Alvarado score — Compute the Alvarado 1986 MANTRELS score from caller-assigned findings, temperature, WBC, and neutrophil percent.
- Ottawa knee rule — Apply the Stiell 1995 Ottawa knee rule and return whether a knee x-ray series is indicated from age and caller-assigned bone tenderness, flexion, and weight-bearing findings.
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.
- 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.