{"uid":"cap_6lXiQP5lrldFswyCYyZoF","slug":"maddrey-discriminant-function-calculator-55cb2dd5","name":"Maddrey Discriminant Function Calculator","description":"Maddrey discriminant function (1978) from patient and control prothrombin time in seconds plus bilirubin. Deterministic published formula with citation; not a diagnosis or steroid order.","url":"https://api.magentlab.com/api/calc/maddrey","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"queryParams":{"type":"object","required":["pt_patient_sec","pt_control_sec"],"properties":{"pt_control_sec":{"type":"number","description":"Laboratory control prothrombin time in seconds (8-20). INR is not accepted."},"pt_patient_sec":{"type":"number","description":"Patient prothrombin time in seconds (8-120). INR is not accepted."},"bilirubin_mg_dl":{"type":"number","description":"Total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l."},"bilirubin_umol_l":{"type":"number","description":"Total bilirubin in µmol/L (2-684). Converted as mg/dL = µmol/L / 17.1."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"path":"/api/calc/maddrey","count":2,"items":[{"df":44.8,"formula":"maddrey_1978","citation":{"id":"maddrey-1978","doi":"10.1016/0016-5085(78)90401-8","title":"Corticosteroid therapy of alcoholic hepatitis","source":"Gastroenterology. 1978;75(2):193-199","authors":"Maddrey WC, Boitnott JK, Bedine MS, Weber FL Jr, Mezey E, White RI Jr"},"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.","pt_control_sec":12,"pt_patient_sec":20,"bilirubin_mg_dl":8,"formula_expression":"DF = 4.6 * (pt_patient_sec - pt_control_sec) + bilirubin_mg_dl"},{"df":44.8,"formula":"maddrey_1978","citation":{"id":"maddrey-1978","doi":"10.1016/0016-5085(78)90401-8","title":"Corticosteroid therapy of alcoholic hepatitis","source":"Gastroenterology. 1978;75(2):193-199","authors":"Maddrey WC, Boitnott JK, Bedine MS, Weber FL Jr, Mezey E, White RI Jr"},"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.","pt_control_sec":12,"pt_patient_sec":20,"bilirubin_mg_dl":8,"formula_expression":"DF = 4.6 * (pt_patient_sec - pt_control_sec) + bilirubin_mg_dl"}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_O86eMmDHX40JoKh2nFRZY","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the Maddrey Discriminant Function (MDF) score for alcoholic hepatitis severity from patient and control prothrombin times and serum bilirubin","exampleAgentPrompt":"Calculate the Maddrey discriminant function for a patient with a prothrombin time of 22 seconds, a control PT of 12 seconds, and a total bilirubin of 15 mg/dL — I need to know the MDF score.","exampleUseCases":[{"title":"Alcoholic hepatitis severity triage","prompt":"My patient has alcoholic hepatitis — PT is 19.5 seconds, control PT is 11 seconds, and total bilirubin is 8.4 mg/dL. What's their Maddrey discriminant function score?"},{"title":"Bilirubin in µmol/L conversion case","prompt":"Can you run the Maddrey formula for a patient whose PT is 25 seconds, control PT is 12 seconds, and bilirubin is 210 µmol/L? I need the MDF result."},{"title":"Borderline MDF threshold check","prompt":"I have a patient with PT 14.5 seconds, lab control PT of 11.5 seconds, and bilirubin of 6 mg/dL — compute their Maddrey score so I can see if they're above or below 32."}],"resultDescription":"Returns the calculated Maddrey Discriminant Function score (a numeric value where ≥32 indicates severe alcoholic hepatitis per the 1978 Maddrey publication), along with the formula applied, input values used, and a bibliographic citation. Does not provide a diagnosis or steroid treatment recommendation.","failureModes":["Missing required parameters (pt_patient_sec or pt_control_sec) returns a validation error","Bilirubin not provided in either mg/dL or µmol/L returns an error","Out-of-range values (e.g. PT control outside 8-20 sec, bilirubin outside 0.1-40 mg/dL) may return a validation error","INR values submitted instead of PT seconds are not accepted and will produce incorrect or rejected results","Payment not included or invalid x402 payment returns 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need a deterministic, citation-backed Maddrey Discriminant Function score computed from raw prothrombin times in seconds (not INR) and serum bilirubin. Prefer this over manual calculation to avoid arithmetic errors and to get a structured, citable result. It is not appropriate for endpoints requiring INR input, MELD score calculation, or clinical decision output beyond the MDF formula itself.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:16:45.415Z","isFirstParty":false}