PenuX-AP-Severity uses routine admission lab values to identify high-risk pancreatitis patients at the time of hospital admission — before complications develop.
A four-step pipeline from admission to risk stratification, fully automated and EHR-integrated.
Patient presents with acute pancreatitis. Routine admission labs are drawn (standard of care — no extra tests needed).
WBC, CRP, creatinine, glucose, LDH, AST, hematocrit and 12 other markers are pulled from the EHR via FHIR R4 or HL7.
The PenuX gradient-boosted classifier returns a probability (0–1) and risk tier: Low / Moderate / High within seconds.
High-risk patients are flagged for ICU triage, aggressive fluid resuscitation, and early organ-failure monitoring.
23 models evaluated with 5-fold stratified cross-validation against Atlanta 2012 labels — 11 ML/DL/GBDT models on the labelled cohort (n=722, 585 severe / 137 mild) plus 12 extended ML models on the n=1,289 cohort. Now reporting likelihood ratios and post-test probability for clinical decision-making.
Best model: Random Forest — AUC=0.877, threshold=0.535 (F1-optimal)
Plus 12 extended ML models with likelihood ratios & post-test probability — see the full 23-model comparison on the Models page.
| Model | Type | Best Threshold | TP | FP | FN | TN | Sensitivity | Specificity | PPV | F1 | AUC |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Logistic Regression | ML | 0.575 | 549 | 77 | 36 | 60 | 93.8% | 43.8% | 87.7% | 0.907 | 0.817 |
| Random Forest ★ | ML | 0.535 | 566 | 84 | 19 | 53 | 96.8% | 38.7% | 87.1% | 0.917 | 0.877 |
| Gradient Boosting | ML | 0.350 | 568 | 85 | 17 | 52 | 97.1% | 38.0% | 87.0% | 0.918 | 0.874 |
| MLP (3-layer) | DL | 0.282 | 567 | 103 | 18 | 34 | 96.9% | 24.8% | 84.6% | 0.909 | 0.836 |
| Residual MLP | DL | 0.203 | 572 | 98 | 13 | 39 | 97.8% | 28.5% | 85.4% | 0.912 | 0.804 |
| Attention MLP | DL | 0.418 | 575 | 105 | 10 | 32 | 98.3% | 23.4% | 84.6% | 0.909 | 0.784 |
| XGBoost | GBDT | 0.522 | 555 | 62 | 30 | 75 | 94.9% | 54.7% | 90.0% | 0.923 | 0.883 |
| LightGBM | GBDT | 0.516 | 555 | 69 | 30 | 68 | 94.9% | 49.6% | 88.9% | 0.918 | 0.879 |
| CatBoost ★ | GBDT | 0.592 | 559 | 63 | 26 | 74 | 95.6% | 54.0% | 89.9% | 0.926 | 0.882 |
| NGBoost | GBDT | 0.364 | 569 | 91 | 16 | 46 | 97.3% | 33.6% | 86.2% | 0.914 | 0.854 |
| EBM | GBDT | 0.427 | 568 | 79 | 17 | 58 | 97.1% | 42.3% | 87.8% | 0.922 | 0.856 |
| Score | AUROC | Sensitivity | Specificity | Timing | Requires |
|---|---|---|---|---|---|
| PenuX-AP-Severity (RF) This work | 0.877 | 96.8% | 38.7% | <4 hours | 59 routine admission labs · Chinese cohort n=722 |
| BISAP | 0.77 | 0.68 | 0.89 | 24 hours | BUN, mental status, SIRS, age, pleural effusion |
| APACHE-II | 0.74 | 0.65 | 0.85 | 24 hours | 12 physiological parameters + GCS |
| Ranson Criteria | 0.71 | 0.62 | 0.83 | 48 hours | 11 criteria over 2 time points |
| CTSI (imaging) | 0.79 | 0.70 | 0.88 | CT required | Contrast-enhanced CT scan |
* Comparative figures are approximate values from published literature. PenuX figures are from 5-fold stratified CV on the Chinese AP cohort (n=722). No external test set — results are from in-sample cross-validation only.
Designed for real clinical workflows — fast, interpretable, and privacy-preserving.
Returns a risk score in <200 ms. No CT scan or 24-hour observation required.
Uses only standard admission labs — no special tests, no imaging, no extra cost.
Direct integration with any FHIR-compliant EHR. Supports Camelion, Epic, Cerner, and OpenEMR.
Patient identifiers (TZ, MRN) are stripped before scoring. No PII stored or logged.
MIT licence. Full training code, model weights, and documentation on GitHub.
Seeking clinical validation partners across Europe, USA, Asia, and Africa.
Three endpoints — plain JSON, FHIR R4 Bundle, or HL7 v2 message.
# POST /predict — plain JSON admission data curl -X POST https://api.penux.uk/predict \ -H "Content-Type: application/json" \ -d '{ "age": 62, "sex": "M", "wbc": 18.5, "crp": 220, "creatinine": 1.8, "glucose": 180, "ldh": 450, "ast": 90, "hematocrit": 42 }'
# POST /fhir/predict — FHIR R4 Bundle (Patient + Observations) curl -X POST https://api.penux.uk/fhir/predict \ -H "Content-Type: application/fhir+json" \ -d '{ "resourceType": "Bundle", "type": "collection", "entry": [ { "resource": { "resourceType": "Patient", "birthDate": "1962-03-15", "gender": "male" } }, { "resource": { "resourceType": "Observation", "code": {"coding": [{"system": "http://loinc.org", "code": "1988-5"}]}, "valueQuantity": {"value": 220, "unit": "mg/L"} } } ] }'
# POST /hl7/predict — raw HL7 v2.x message (text/plain) curl -X POST https://api.penux.uk/hl7/predict \ -H "Content-Type: text/plain" \ --data-raw 'MSH|^~\&|LIS|HOSPITAL|PENUX|API|20240601||ORU^R01|001|P|2.5 PID|1||MRN123||DOE^JOHN||19620315|M OBR|1|||AP_PANEL OBX|1|NM|1988-5^CRP^LN||220|mg/L|0-5||||F OBX|2|NM|6690-2^WBC^LN||18.5|10*3/uL|4-11||||F OBX|3|NM|2160-0^CREATININE^LN||1.8|mg/dL|0.7-1.2||||F'
# Response (all endpoints return same structure) { "severe_ap_probability": 0.782, "risk_group": "High", "recommendation": "Consider ICU/HDU admission. Early aggressive fluid resuscitation.", "fields_used": ["wbc", "crp", "creatinine", "glucose", "ldh", "ast"], "missing_fields": ["bun", "calcium", "albumin"], "model_version": "1.0.0", "atlanta_classification": "Potentially Severe" }
Plug-and-play integration with major hospital information systems.
Native JSON adapter + FHIR R4 Bundle endpoint. Hebrew & English field names supported.
SupportedSMART on FHIR R4 with Epic LOINC and vendor LIS codes. Uses Epic's open.epic endpoint.
SupportedHL7 v2.x OBX segments + FHIR R4 via Cerner Millennium API.
SupportedAny FHIR R4 compliant system. Patient + Observation resources with LOINC codes.
SupportedClassic ORU^R01 messages with MSH, PID, OBR, OBX segments from any LIS.
SupportedCSV upload, direct JSON, or contact us to build a custom adapter.
On Request19 routine admission values with their standard LOINC codes.
| Parameter | LOINC Code | Unit | Clinical Relevance |
|---|---|---|---|
| WBC (White Blood Cells) | 6690-2 | 10³/µL | Inflammatory response |
| CRP (C-Reactive Protein) | 1988-5 | mg/L | Primary severity marker |
| Creatinine | 2160-0 | mg/dL | Renal failure indicator |
| BUN (Blood Urea Nitrogen) | 3094-0 | mg/dL | Renal / hydration status |
| Glucose | 2345-7 | mg/dL | Metabolic stress |
| LDH (Lactate Dehydrogenase) | 2532-0 | U/L | Tissue necrosis marker |
| AST | 1920-8 | U/L | Hepatic / pancreatic injury |
| ALT | 1742-6 | U/L | Biliary pancreatitis |
| Hematocrit | 20570-8 | % | Haemoconcentration / necrosis |
| Calcium | 17861-6 | mg/dL | Ranson / APACHE criterion |
| Albumin | 1751-7 | g/dL | Nutritional / severity marker |
| Total Bilirubin | 1975-2 | mg/dL | Biliary obstruction |
| Lipase | 3040-3 | U/L | Diagnostic confirmation |
| Amylase | 1798-8 | U/L | Diagnostic confirmation |
We are seeking clinical validation partners worldwide — gastroenterology and pancreatology departments with access to retrospective SAP cohorts.
PenuX — Severe Acute Pancreatitis AI Research Initiative
We are seeking clinical sites for a We are currently in Stage 0 — building data partnership agreements with hospitals before formal validation begins. We are looking for gastroenterology or acute-medicine departments willing to share de-identified retrospective SAP data, co-develop an IRB protocol, and serve as the first external validation site. Co-authorship offered to all participating sites.