{"uid":"cap_K_upgbtyWQ_Y5bQifmy_W","slug":"magent-ap-prediction-jin-2018-early-diagnosis-score-0ccecb0f","name":"magent AP Prediction (Jin 2018 Early Diagnosis Score)","description":"Jin 2018 ED model for early diagnosis of acute pancreatitis when lipase is at least 3x ULN. Integer points: prior episodes 0/1/2/3/4, cholelithiasis +2, abdominal surgery in 2 months -2, epigastric pain +2, worsening pain +1, pain duration >=5 days -1, severity mild 0 / moderate +2 / severe +3, lipase fold +0/+1/+2. Score max 14; jin2018_high_ppv if score>=8; jin2024_accuracy_cut if score>=6. Not a diagnosis. Not an imaging order. Not Ranson, BISAP, or Glasgow-Imrie.","url":"https://api.magentlab.com/api/calc/ap_prediction","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":["prior_ap_episodes","cholelithiasis","abdominal_surgery_2mo","epigastric_pain","worsening_pain","pain_duration_days","pain_severity","lipase_uln_fold"],"properties":{"pain_severity":{"enum":["mild_0_3","moderate_4_6","severe_7_10"],"type":"string","description":"Caller-assigned pain-severity token (Jin 2018). mild_0_3 (0-3) scores 0; moderate_4_6 (4-6) scores +2; severe_7_10 (7-10) scores +3. magent does not assign a pain scale."},"cholelithiasis":{"type":"boolean","description":"Caller-assigned cholelithiasis (Jin 2018). true scores +2; false scores 0. magent does not read imaging."},"worsening_pain":{"type":"boolean","description":"Caller-assigned worsening pain (Jin 2018). true scores +1; false scores 0."},"epigastric_pain":{"type":"boolean","description":"Caller-assigned epigastric pain (Jin 2018). true scores +2; false scores 0. magent does not examine the patient."},"lipase_uln_fold":{"type":"number","description":"Serum lipase as a fold of the laboratory ULN. Population is lipase ≥3× ULN (Jin 2018). ≥3 and <10 scores 0; ≥10 and <20 scores +1; ≥20 scores +2. Below 3 is invalid_ap_prediction."},"prior_ap_episodes":{"enum":["0","1","2","3","4_or_more"],"type":"string","description":"Caller-assigned prior acute-pancreatitis episode token (Jin 2018). 0 scores 0; 1 scores 1; 2 scores 2; 3 scores 3; 4_or_more scores 4. magent does not take a history."},"pain_duration_days":{"enum":["lt_5","gte_5"],"type":"string","description":"Caller-assigned pain-duration token (Jin 2018). lt_5 (<5 days) scores 0; gte_5 (≥5 days) scores -1. magent does not take a history."},"abdominal_surgery_2mo":{"type":"boolean","description":"Caller-assigned abdominal surgery within 2 months (Jin 2018). true scores -2; false scores 0."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"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_FMtur_Ja2dj9hPsssWRnG","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 Jin 2018 integer prediction score for early diagnosis of acute pancreatitis in patients with serum lipase ≥3× ULN, returning a total score and risk-threshold flags.","exampleAgentPrompt":"Run the Jin 2018 acute pancreatitis prediction score for a patient with 1 prior AP episode, cholelithiasis present, no abdominal surgery in the last 2 months, epigastric pain yes, worsening pain yes, pain duration less than 5 days, moderate pain severity (4-6/10), and serum lipase 15× ULN.","exampleUseCases":[{"title":"ED triage for first-time AP suspect","prompt":"Score this ED patient for early acute pancreatitis using Jin 2018 — they have no prior AP episodes, no cholelithiasis, no recent abdominal surgery, epigastric pain present, worsening pain yes, pain under 5 days, pain is severe (7-10/10), and lipase is 22 times the upper limit of normal."},{"title":"Recurrent pancreatitis risk stratification","prompt":"Calculate the Jin 2018 AP prediction score for a patient with 3 prior pancreatitis episodes, cholelithiasis confirmed, no abdominal surgery in the past 2 months, epigastric pain yes, pain not worsening, duration less than 5 days, mild pain (0-3/10), lipase fold of 8 times ULN — tell me if they hit the high-PPV threshold."},{"title":"Post-surgical abdominal pain evaluation","prompt":"Run the Jin 2018 acute pancreatitis score for someone who had abdominal surgery 6 weeks ago, 2 prior AP episodes, no cholelithiasis, epigastric pain present, worsening pain no, pain lasting 6 days, moderate severity, and lipase at 5 times ULN — I want to know the total score and whether it crosses the accuracy cutoff."}],"resultDescription":"Returns the computed Jin 2018 integer total score (max 14) summed from all eight clinical parameters, plus boolean flags: jin2018_high_ppv (true if score ≥8) and jin2024_accuracy_cut (true if score ≥6). Returns an invalid_ap_prediction flag if lipase fold is below 3× ULN. Does not provide a diagnosis, imaging order, or treatment recommendation.","failureModes":["lipase_uln_fold below 3 returns invalid_ap_prediction — the model population requires confirmed lipase ≥3× ULN","missing required query parameters return a 4xx error","out-of-enum values for prior_ap_episodes, pain_severity, or pain_duration_days return validation errors","network or service errors return 5xx; retry is safe as endpoint is idempotent","payment failure (x402) if USDC balance is insufficient"],"whenToPreferThis":"Use this endpoint when you need a structured, reproducible integer score for early acute pancreatitis diagnosis specifically following the Jin 2018 model in patients with serum lipase ≥3× ULN. Prefer this over BISAP (mortality-focused), Ranson (24/48h severity), or Glasgow-Imrie (severity) when the clinical goal is early ED diagnosis confirmation rather than severity stratification or mortality prediction. Choose this when you already have caller-assigned clinical variables and a confirmed lipase fold value and want a score plus threshold flags, not an imaging order or clinical examination.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T13:08:48.867Z","isFirstParty":false}