🔬 Open-Source Clinical AI · Research Preview

Early Prediction of
Severe Acute Pancreatitis
in Under 4 Hours

PenuX-AP-Severity uses routine admission lab values to identify high-risk pancreatitis patients at the time of hospital admission — before complications develop.

⚡ Try the API ⭐ GitHub 📊 See Results
0.877
Best AUROC (RF)
23
Models evaluated
722
Patient cohort
59
Lab features
5-fold
Cross-validation
FHIR R4
Standard

How It Works

A four-step pipeline from admission to risk stratification, fully automated and EHR-integrated.

1

Patient Admitted

Patient presents with acute pancreatitis. Routine admission labs are drawn (standard of care — no extra tests needed).

2

Lab Values Extracted

WBC, CRP, creatinine, glucose, LDH, AST, hematocrit and 12 other markers are pulled from the EHR via FHIR R4 or HL7.

3

Model Scores Risk

The PenuX gradient-boosted classifier returns a probability (0–1) and risk tier: Low / Moderate / High within seconds.

4

Clinical Decision Support

High-risk patients are flagged for ICU triage, aggressive fluid resuscitation, and early organ-failure monitoring.

Model Performance

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.

⚠️

Research use only. PenuX-AP-Severity is a research prototype. It has not received CE marking, FDA clearance, or any regulatory approval. Do not use for clinical decision-making without prospective validation and appropriate oversight.

Best model: Random Forest — AUC=0.877, threshold=0.535 (F1-optimal)

0.877
AUROC — Random Forest
Best across 23 models
96.8%
Sensitivity
T=0.535 · TP=566, FN=19
38.7%
Specificity
T=0.535 · TN=53, FP=84
0.917
F1 Score
Random Forest best
87.1%
PPV
Positive Predictive Value
0.883
Best GBDT AUROC
XGBoost architecture

Optimal-Threshold Confusion Matrices (11 core ML/DL/GBDT models)

Plus 12 extended ML models with likelihood ratios & post-test probability — see the full 23-model comparison on the Models page.

ModelTypeBest Threshold TPFPFNTN SensitivitySpecificityPPVF1AUC
Logistic RegressionML0.57554977366093.8%43.8%87.7%0.9070.817
Random Forest ★ML0.53556684195396.8%38.7%87.1%0.9170.877
Gradient BoostingML0.35056885175297.1%38.0%87.0%0.9180.874
MLP (3-layer)DL0.282567103183496.9%24.8%84.6%0.9090.836
Residual MLPDL0.20357298133997.8%28.5%85.4%0.9120.804
Attention MLPDL0.418575105103298.3%23.4%84.6%0.9090.784
XGBoostGBDT0.52255562307594.9%54.7%90.0%0.9230.883
LightGBMGBDT0.51655569306894.9%49.6%88.9%0.9180.879
CatBoost ★GBDT0.59255963267495.6%54.0%89.9%0.9260.882
NGBoostGBDT0.36456991164697.3%33.6%86.2%0.9140.854
EBMGBDT0.42756879175897.1%42.3%87.8%0.9220.856

Comparison to Existing Severity Scores

ScoreAUROCSensitivitySpecificityTimingRequires
PenuX-AP-Severity (RF) This work 0.877 96.8%38.7% <4 hours 59 routine admission labs · Chinese cohort n=722
BISAP0.770.680.89 24 hours BUN, mental status, SIRS, age, pleural effusion
APACHE-II0.740.650.85 24 hours 12 physiological parameters + GCS
Ranson Criteria0.710.620.83 48 hours 11 criteria over 2 time points
CTSI (imaging)0.790.700.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.

Key Features

Designed for real clinical workflows — fast, interpretable, and privacy-preserving.

⚡

Instant Prediction

Returns a risk score in <200 ms. No CT scan or 24-hour observation required.

🧪

Routine Labs Only

Uses only standard admission labs — no special tests, no imaging, no extra cost.

🔗

FHIR R4 Native

Direct integration with any FHIR-compliant EHR. Supports Camelion, Epic, Cerner, and OpenEMR.

🔒

Privacy by Design

Patient identifiers (TZ, MRN) are stripped before scoring. No PII stored or logged.

📖

Fully Open Source

MIT licence. Full training code, model weights, and documentation on GitHub.

🌍

International Collaboration

Seeking clinical validation partners across Europe, USA, Asia, and Africa.

REST API

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"
}
📚 Full API Docs 🐙 View on GitHub

EHR Integration

Plug-and-play integration with major hospital information systems.

Camelion

Native JSON adapter + FHIR R4 Bundle endpoint. Hebrew & English field names supported.

Supported

Epic

SMART on FHIR R4 with Epic LOINC and vendor LIS codes. Uses Epic's open.epic endpoint.

Supported

Cerner / Oracle

HL7 v2.x OBX segments + FHIR R4 via Cerner Millennium API.

Supported

Generic FHIR R4

Any FHIR R4 compliant system. Patient + Observation resources with LOINC codes.

Supported

HL7 v2.x

Classic ORU^R01 messages with MSH, PID, OBR, OBX segments from any LIS.

Supported

Custom / Other

CSV upload, direct JSON, or contact us to build a custom adapter.

On Request

Supported Lab Parameters

19 routine admission values with their standard LOINC codes.

ParameterLOINC CodeUnitClinical Relevance
WBC (White Blood Cells)6690-210³/µLInflammatory response
CRP (C-Reactive Protein)1988-5mg/LPrimary severity marker
Creatinine2160-0mg/dLRenal failure indicator
BUN (Blood Urea Nitrogen)3094-0mg/dLRenal / hydration status
Glucose2345-7mg/dLMetabolic stress
LDH (Lactate Dehydrogenase)2532-0U/LTissue necrosis marker
AST1920-8U/LHepatic / pancreatic injury
ALT1742-6U/LBiliary pancreatitis
Hematocrit20570-8%Haemoconcentration / necrosis
Calcium17861-6mg/dLRanson / APACHE criterion
Albumin1751-7g/dLNutritional / severity marker
Total Bilirubin1975-2mg/dLBiliary obstruction
Lipase3040-3U/LDiagnostic confirmation
Amylase1798-8U/LDiagnostic confirmation

Interested in Collaboration?

We are seeking clinical validation partners worldwide — gastroenterology and pancreatology departments with access to retrospective SAP cohorts.

Project Lead

PenuX — Severe Acute Pancreatitis AI Research Initiative

N
Netanel Stern
Clinical AI Researcher & Software Engineer
🔬 PenuX-AP-Severity — open-source SAP prediction
🤖 11 ML/DL models · AUC 0.877 · n=722
🏥 FHIR R4 · HL7 v2 · EHR integration
✉️ nsh531@gmail.com 📞 +972-55-970-8708 ⭐ github.com/netanelcyber 🌐 penux.uk 🧪 Try the Calculator
NOW RECRUITING

Stage 0 — Seeking Hospital Data Partners

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.

✉️ Express Interest — nsh531@gmail.com or call +972-55-970-8708