Liver · LIVE
ABIC score
ABIC
Compute the Dominguez 2008 ABIC score from age, bilirubin, creatinine, and INR for prognostic stratification of alcoholic hepatitis.
Markdown: /docs/abic.md · Canonical: https://magentlab.com/docs/abic
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Compute the Dominguez 2008 ABIC score from age, bilirubin, creatinine, and INR for prognostic stratification of alcoholic hepatitis.
When to use
When an agent needs the published Dominguez 2008 ABIC arithmetic and must not invent a diagnosis of alcoholic hepatitis or a steroid or transplant order.
When not to use
- Not a medical device. magent does not diagnose alcoholic hepatitis.
- Not a steroid or transplant order.
- Dominguez 2008 ABIC only. This is not Maddrey DF, GAHS, or Lille.
Formula
ABIC = (age * 0.1) + (bilirubin_mg_dl * 0.08) + (creatinine_mg_dl * 0.3) + (inr * 0.8)
Citation
- Authors
- Dominguez M, Rincón D, Abraldes JG, Miquel R, Colmenero J, Bellot P, García-Pagán JC, Fernández J, Marín P, Guarner C, Arroyo V, Bruguera M, Bañares R, Ginès P, Caballería J
- Source
- Am J Gastroenterol. 2008;103(11):2747-2756
Worked example
Age 50, bilirubin 10 mg/dL, creatinine 1 mg/dL, INR 1.5
Given:
age=50bilirubin_mg_dl=10creatinine_mg_dl=1inr=1.5
- age term = 50 × 0.1 = 5.0
- bilirubin term = 10 × 0.08 = 0.8
- creatinine term = 1 × 0.3 = 0.3
- INR term = 1.5 × 0.8 = 1.2
- ABIC = 5.0 + 0.8 + 0.3 + 1.2 = 7.30
- 6.71 ≤ 7.30 ≤ 9.0 → intermediate
Also searched as
- ABIC score
- age bilirubin INR creatinine
- alcoholic hepatitis ABIC
- Dominguez ABIC
- ABIC prognostic score
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
/api/calc/abic?age=50&bilirubin_mg_dl=10&creatinine_mg_dl=1&inr=1.5
Full URL: https://api.magentlab.com/api/calc/abic?age=50&bilirubin_mg_dl=10&creatinine_mg_dl=1&inr=1.5
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/abic?age=50&bilirubin_mg_dl=10&creatinine_mg_dl=1&inr=1.5"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
age |
integer | required | Age in years (integer 18-120). |
bilirubin_mg_dl |
number | optional | Total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l, not both. |
bilirubin_umol_l |
number | optional | Total bilirubin in µmol/L (2-684). Converted as mg/dL = µmol/L / 17.1. |
creatinine_mg_dl |
number | optional | Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l, not both. |
creatinine_umol_l |
number | optional | Serum creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42. |
inr |
number | required | International normalized ratio (0.8-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.
- 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": [
{
"age": "50",
"bilirubin_mg_dl": "10",
"creatinine_mg_dl": "1",
"inr": "1.5"
},
{
"age": "50",
"bilirubin_mg_dl": "10",
"creatinine_mg_dl": "1",
"inr": "1.5"
}
]
}
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/abic",
"items": [
{
"age": 50,
"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": "Dominguez M, Rincón D, Abraldes JG, Miquel R, Colmenero J, Bellot P, García-Pagán JC, Fernández J, Marín P, Guarner C, Arroyo V, Bruguera M, Bañares R, Ginès P, Caballería J",
"doi": "10.1111/j.1572-0241.2008.02104.x",
"id": "dominguez-2008",
"pmid": "18721242",
"source": "Am J Gastroenterol. 2008;103(11):2747-2756",
"title": "A new scoring system for prognostic stratification of patients with alcoholic hepatitis"
},
"formula": "abic",
"formula_expression": "ABIC = (age * 0.1) + (bilirubin_mg_dl * 0.08) + (creatinine_mg_dl * 0.3) + (inr * 0.8)",
"inr": 1.5,
"abic_band": "intermediate",
"bilirubin_mg_dl": 10.0,
"abic_score": 7.3,
"creatinine_mg_dl": 1.0
},
{
"age": 50,
"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": "Dominguez M, Rincón D, Abraldes JG, Miquel R, Colmenero J, Bellot P, García-Pagán JC, Fernández J, Marín P, Guarner C, Arroyo V, Bruguera M, Bañares R, Ginès P, Caballería J",
"doi": "10.1111/j.1572-0241.2008.02104.x",
"id": "dominguez-2008",
"pmid": "18721242",
"source": "Am J Gastroenterol. 2008;103(11):2747-2756",
"title": "A new scoring system for prognostic stratification of patients with alcoholic hepatitis"
},
"formula": "abic",
"formula_expression": "ABIC = (age * 0.1) + (bilirubin_mg_dl * 0.08) + (creatinine_mg_dl * 0.3) + (inr * 0.8)",
"inr": 1.5,
"abic_band": "intermediate",
"bilirubin_mg_dl": 10.0,
"abic_score": 7.3,
"creatinine_mg_dl": 1.0
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | abic |
formula_expression |
string | Exact expression used |
age |
integer | Age in years used |
bilirubin_mg_dl |
number | Normalized total bilirubin in mg/dL |
creatinine_mg_dl |
number | Normalized serum creatinine in mg/dL |
inr |
number | INR used |
abic_score |
number | Dominguez 2008 ABIC, 2 decimal places |
abic_band |
string | Dominguez 2008 bands on the rounded score: low (<6.71), intermediate (6.71-9.0), high (>9.0). Not a diagnosis or steroid order. |
citation |
object | Dominguez 2008 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"age": 50,
"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": "Dominguez M, Rincón D, Abraldes JG, Miquel R, Colmenero J, Bellot P, García-Pagán JC, Fernández J, Marín P, Guarner C, Arroyo V, Bruguera M, Bañares R, Ginès P, Caballería J",
"doi": "10.1111/j.1572-0241.2008.02104.x",
"id": "dominguez-2008",
"pmid": "18721242",
"source": "Am J Gastroenterol. 2008;103(11):2747-2756",
"title": "A new scoring system for prognostic stratification of patients with alcoholic hepatitis"
},
"formula": "abic",
"formula_expression": "ABIC = (age * 0.1) + (bilirubin_mg_dl * 0.08) + (creatinine_mg_dl * 0.3) + (inr * 0.8)",
"inr": 1.5,
"abic_band": "intermediate",
"bilirubin_mg_dl": 10.0,
"abic_score": 7.3,
"creatinine_mg_dl": 1.0
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_age |
age must be an integer from 18 to 120 Returned before settlement; you are not charged. |
| 400 | invalid_bilirubin |
bilirubin_mg_dl (0.1-40) or bilirubin_umol_l (2-684) is required Returned before settlement; you are not charged. |
| 400 | invalid_creatinine |
creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged. |
| 400 | invalid_inr |
inr must be a number from 0.8 to 10 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
- Maddrey DF — Compute the 1978 Maddrey discriminant function from patient PT, control PT, and bilirubin.
- GAHS — Compute the Forrest 2005 Glasgow alcoholic hepatitis score (5-12) and the published ≥9 band.
- Lille score — Compute the Louvet 2007 Lille score from age, day-0 albumin, bilirubin on day 0 and day 7, creatinine, and PT seconds or INR. formula 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. 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.