Liver · LIVE
Lille score (Louvet 2007)
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.
Markdown: /docs/lille.md · Canonical: https://magentlab.com/docs/lille
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
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.
When to use
When an agent needs the published Lille logistic and 0.45 cutoff and must not swap PT for INR or treat the band as a steroid order.
When not to use
- Not a medical device. magent does not recommend starting, stopping, or continuing corticosteroids or any other therapy.
- formula=pt or formula=inr is required. PT seconds and INR are not interchangeable; magent does not convert one to the other.
- responder and nonresponder are the paper's 0.45 cutoff on the Lille score, not a steroid order.
Formula
R = 3.19 - 0.101*age + 0.147*albumin_g_l + 0.0165*evolution_bilirubin_umol_l - 0.206*renal_insufficiency - 0.0065*bilirubin_day0_umol_l - 0.0096*pt_sec; lille_score = exp(-R)/(1+exp(-R))
Citation
- Authors
- Louvet A, Naveau S, Abdelnour M, et al.
- Source
- Hepatology. 2007;45(6):1348-1354
Worked example
Age 50, albumin 35 g/L, bilirubin 200→150 µmol/L, creatinine 1.0, PT 18 s
Given:
age=50albumin_g_l=35bilirubin_day0_umol_l=200bilirubin_day7_umol_l=150creatinine_mg_dl=1.0formula=ptpt_sec=18
- evolution bilirubin = 200 − 150 = 50 µmol/L
- renal insufficiency = 0 (creatinine 1.0 mg/dL is not > 1.3)
- R = 3.19 − 0.101×50 + 0.147×35 + 0.0165×50 − 0.206×0 − 0.0065×200 − 0.0096×18 = 2.6372
- lille_score = exp(−2.6372) / (1 + exp(−2.6372)) = 0.0668; 0.0668 < 0.45 → responder
Same labs with formula=inr and INR 2.0
Given:
age=50albumin_g_l=35bilirubin_day0_umol_l=200bilirubin_day7_umol_l=150creatinine_mg_dl=1.0formula=inrinr=2.0
- PT term is replaced with −0.0096×INR; formula=inr is required
- score is still < 0.45 → responder
Also searched as
- Lille score
- Lille model
- Louvet Lille
- alcoholic hepatitis Lille
- Lille 0.45
- steroid response Lille
- Lille PT INR
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
Full URL: https://api.magentlab.com/api/calc/lille?age=50&albumin_g_l=35&bilirubin_day0_umol_l=200&bilirubin_day7_umol_l=150&creatinine_mg_dl=1.0&formula=pt&pt_sec=18
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/lille?age=50&albumin_g_l=35&bilirubin_day0_umol_l=200&bilirubin_day7_umol_l=150&creatinine_mg_dl=1.0&formula=pt&pt_sec=18"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
formula |
string | required · pt, inr | pt (prothrombin time in seconds) or inr. Required; magent does not swap PT and INR. |
age |
integer | required | Age in years (18-120). |
albumin_g_l |
number | optional | Day-0 albumin in g/L (10-60). Provide this or albumin_g_dl, not both. Louvet 2007 uses g/L. |
albumin_g_dl |
number | optional | Day-0 albumin in g/dL (1-6). Converted as g/L = g/dL × 10. |
bilirubin_day0_umol_l |
number | optional | Day-0 total bilirubin in µmol/L (2-684). Provide this or bilirubin_day0_mg_dl. |
bilirubin_day0_mg_dl |
number | optional | Day-0 total bilirubin in mg/dL (0.1-40). Converted as µmol/L = mg/dL × 17.1. |
bilirubin_day7_umol_l |
number | optional | Day-7 total bilirubin in µmol/L (2-684). Provide this or bilirubin_day7_mg_dl. |
bilirubin_day7_mg_dl |
number | optional | Day-7 total bilirubin in mg/dL (0.1-40). Converted as µmol/L = mg/dL × 17.1. |
creatinine_mg_dl |
number | optional | Serum creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l. Renal insufficiency is 1 when > 1.3 mg/dL if this unit is used (Louvet 2007). |
creatinine_umol_l |
number | optional | Serum creatinine in µmol/L (9-1768). Provide this or creatinine_mg_dl. Renal insufficiency is 1 when > 115 µmol/L if this unit is used (Louvet 2007). |
pt_sec |
number | optional | Prothrombin time in seconds (8-120). Required when formula=pt. Ignored when formula=inr. |
inr |
number | optional | INR (0.8-10). Required when formula=inr. Ignored when formula=pt. |
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",
"albumin_g_l": "35",
"bilirubin_day0_umol_l": "200",
"bilirubin_day7_umol_l": "150",
"creatinine_mg_dl": "1.0",
"formula": "pt",
"pt_sec": "18"
},
{
"age": "50",
"albumin_g_l": "35",
"bilirubin_day0_umol_l": "200",
"bilirubin_day7_umol_l": "150",
"creatinine_mg_dl": "1.0",
"formula": "pt",
"pt_sec": "18"
}
]
}
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/lille",
"items": [
{
"response": "responder",
"r": 2.6372,
"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": "Louvet A, Naveau S, Abdelnour M, et al.",
"doi": "10.1002/hep.21607",
"id": "louvet-2007",
"pmid": "17518367",
"source": "Hepatology. 2007;45(6):1348-1354",
"title": "The Lille model: a new tool for therapeutic strategy in patients with severe alcoholic hepatitis treated with steroids"
},
"formula": "pt",
"formula_expression": "R = 3.19 - 0.101*age + 0.147*albumin_g_l + 0.0165*evolution_bilirubin_umol_l - 0.206*renal_insufficiency - 0.0065*bilirubin_day0_umol_l - 0.0096*pt_sec; lille_score = exp(-R)/(1+exp(-R))",
"age_years": 50,
"creatinine_mg_dl": 1.0,
"albumin_g_l": 35.0,
"pt_sec": 18.0,
"bilirubin_day0_umol_l": 200.0,
"bilirubin_day7_umol_l": 150.0,
"evolution_bilirubin_umol_l": 50.0,
"lille_score": 0.0668,
"renal_insufficiency": false
},
{
"response": "responder",
"r": 2.6372,
"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": "Louvet A, Naveau S, Abdelnour M, et al.",
"doi": "10.1002/hep.21607",
"id": "louvet-2007",
"pmid": "17518367",
"source": "Hepatology. 2007;45(6):1348-1354",
"title": "The Lille model: a new tool for therapeutic strategy in patients with severe alcoholic hepatitis treated with steroids"
},
"formula": "pt",
"formula_expression": "R = 3.19 - 0.101*age + 0.147*albumin_g_l + 0.0165*evolution_bilirubin_umol_l - 0.206*renal_insufficiency - 0.0065*bilirubin_day0_umol_l - 0.0096*pt_sec; lille_score = exp(-R)/(1+exp(-R))",
"age_years": 50,
"creatinine_mg_dl": 1.0,
"albumin_g_l": 35.0,
"pt_sec": 18.0,
"bilirubin_day0_umol_l": 200.0,
"bilirubin_day7_umol_l": 150.0,
"evolution_bilirubin_umol_l": 50.0,
"lille_score": 0.0668,
"renal_insufficiency": false
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | pt or inr |
formula_expression |
string | Exact expression used |
r |
number | Linear predictor R, 4 decimal places |
lille_score |
number | Lille score 0-1, 4 decimal places |
response |
string | responder if score < 0.45; nonresponder if score ≥ 0.45 (Louvet 2007) |
renal_insufficiency |
boolean | true when creatinine > 1.3 mg/dL |
age_years |
integer | Age used |
albumin_g_l |
number | Day-0 albumin in g/L |
bilirubin_day0_umol_l |
number | Day-0 bilirubin in µmol/L |
bilirubin_day7_umol_l |
number | Day-7 bilirubin in µmol/L |
evolution_bilirubin_umol_l |
number | bilirubin_day0 − bilirubin_day7 in µmol/L |
creatinine_mg_dl |
number | Normalized creatinine in mg/dL |
pt_sec |
number | PT in seconds when formula=pt. Omitted when formula=inr. |
inr |
number | INR when formula=inr. Omitted when formula=pt. |
citation |
object | Louvet 2007 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"response": "responder",
"r": 2.6372,
"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": "Louvet A, Naveau S, Abdelnour M, et al.",
"doi": "10.1002/hep.21607",
"id": "louvet-2007",
"pmid": "17518367",
"source": "Hepatology. 2007;45(6):1348-1354",
"title": "The Lille model: a new tool for therapeutic strategy in patients with severe alcoholic hepatitis treated with steroids"
},
"formula": "pt",
"formula_expression": "R = 3.19 - 0.101*age + 0.147*albumin_g_l + 0.0165*evolution_bilirubin_umol_l - 0.206*renal_insufficiency - 0.0065*bilirubin_day0_umol_l - 0.0096*pt_sec; lille_score = exp(-R)/(1+exp(-R))",
"age_years": 50,
"creatinine_mg_dl": 1.0,
"albumin_g_l": 35.0,
"pt_sec": 18.0,
"bilirubin_day0_umol_l": 200.0,
"bilirubin_day7_umol_l": 150.0,
"evolution_bilirubin_umol_l": 50.0,
"lille_score": 0.0668,
"renal_insufficiency": false
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_lille_formula |
formula must be pt or inr (Louvet 2007). Returned before settlement; you are not charged. |
| 400 | invalid_age |
age must be an integer from 18 to 120 Returned before settlement; you are not charged. |
| 400 | invalid_albumin |
albumin_g_dl (1-6) or albumin_g_l (10-60) is required 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_prothrombin_time |
pt_sec (8-120) is required, or pt_patient_sec (8-120) and pt_control_sec (8-20) are 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.
- MELD-Na — Compute OPTN/UNOS 2016 MELD and MELD-Na from creatinine, bilirubin, INR, sodium, and dialysis.
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.