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.
11 models evaluated on a Chinese AP cohort (n=722, 585 severe / 137 mild) with 5-fold stratified cross-validation against Atlanta 2012 labels.
Best model: Random Forest — AUC=0.877, threshold=0.535 (F1-optimal)
| 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 |
| LSTM | LSTM | 0.300 | 585 | 137 | 0 | 0 | 100.0% | 0.0% | 81.0% | 0.895 | 0.699 |
| Stacked LSTM | LSTM | 0.489 | 575 | 121 | 10 | 16 | 98.3% | 11.7% | 82.6% | 0.898 | 0.705 |
| Bidirectional LSTM | LSTM | 0.318 | 582 | 129 | 3 | 8 | 99.5% | 5.8% | 81.9% | 0.898 | 0.715 |
| LSTM + Attention | LSTM | 0.172 | 585 | 136 | 0 | 1 | 100.0% | 0.7% | 81.1% | 0.896 | 0.684 |
| CNN-LSTM ★ LSTM | LSTM | 0.082 | 585 | 135 | 0 | 2 | 100.0% | 1.5% | 81.2% | 0.897 | 0.777 |
| Score | AUROC | Sensitivity | Specificity | Timing | Requires |
|---|---|---|---|---|---|
| PenuX-AP-Severity (RF) This work | 0.877 | 96.8% | 38.7% | <4 hours | 106 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.