Skip to main content

Implementation of the Phoenix and Phoenix-8 Pediatric Sepsis Criteria

Project description

phoenix: Phoenix Sepsis and Phoenix-8 Sepsis Criteria

Implementation of the Phoenix and Phoenix-8 Sepsis Criteria as described in:

Phoenix Criteria

A patient is considered septic if they have a suspected (or proven) infection with at total Phoenix score of at least two points. The Phoenix score is the sum of the scores from four organ dysfunction scores:

  1. Respiratory,
  2. Cardiovascular,
  3. Coagulation, and
  4. Neurologic.

Septic shock is defined as sepsis with at least one cardiovascular point.

In addition to the Phoenix criteria there is an extended criteria intended for research, Phoenix-8, which includes the four organ systems above along with

  1. Endocrine,
  2. Immunologic,
  3. Renal, and
  4. Hepatic.

Phoenix Rubric

Organ System 0 Points 1 Point 2 Points 3 Points
Respiratory (0-3 points)
Any respiratory support IMVa IMV
  PaO2:FiO2 ≥ 400 < 400 < 200 < 100
  SpO2:FiO2b ≥ 292 < 292 < 220 < 148
Cardiovascular (0-6 points; sum of medications, Lactate, and MAP)
   Systemic Vasoactive Medicationsc No medications 1 medication 2 or more medications
   Lactated (mmol/L) < 5 5 ≤ Lactate < 11 ≥ 11
   Agee (months) adjusted MAPf (mmHg)
     0 ≤ Age < 1 ≥ 31 17 ≤ MAP < 31 < 17
     1 ≤ Age < 12 ≥ 39 25 ≤ MAP < 39 < 25
     12 ≤ Age < 24 ≥ 44 31 ≤ MAP < 44 < 31
     24 ≤ Age < 60 ≥ 45 32 ≤ MAP < 45 < 32
     60 ≤ Age < 144 ≥ 49 36 ≤ MAP < 49 < 36
     144 ≤ Age < 216 ≥ 52 38 ≤ MAP < 52 < 38
Coagulationg (0-2 points; 1 for each lab; max of 2 points)
   Platelets (1000/μL) ≥ 100 < 100
   INR ≤ 1.3 > 1.3
   D-Dimer (mg/L FEU) ≤ 2 > 2
   Fibrinogen (mg/dL) ≥ 100 < 100
Neurologich (0-2 points)
   GCSi ≥ 11 GCS ≤ 10 Bilaterally fixed pupils
Endocrine (0-1 point)
   Blood Glucose (mg/dL) 50 ≤ Blood Glucose ≤ 150 < 50; or > 150
Immunologic (0-1 point; point from ANC and/or ALC)
   ANC (cells/mm3) ≥ 500 < 500
   ALC (cells/mm3) ≥ 1000 < 1000
Renal (0-1 point)
   Agee (months) adjusted Creatinine (mg/dL)
     0 ≤ Age < 1 < 0.8 ≥ 0.8
     1 ≤ Age < 12 < 0.3 ≥ 0.3
     12 ≤ Age < 24 < 0.4 ≥ 0.4
     24 ≤ Age < 60 < 0.6 ≥ 0.6
     60 ≤ Age < 144 < 0.7 ≥ 0.7
     144 ≤ Age < 216 < 1.0 ≥ 1.0
Hepatic (0-1 point; point from total bilirubin and/or ALT)
   Total Bilirubin (mg/dL) < 4 ≥ 4
   ALT (IU/L) ≤ 102 > 102
aAbbreviations: ALC: Absolute lymphocyte count; ALT: alanine aminotransferase; ANC: Absolute neutrophil count; FEU: fibrinogen equivalent units; FiO2: fraction of inspired oxygen; GCS: Glasgow Coma Score; IMV: invasive mechanical ventilation; INR: International normalized ratio; MAP: mean arterial pressure; PaO2: arterial oxygen pressure; SpO2: pulse oximetry oxygen saturation;

bSpO2:FiO2 is only valid when SpO2 ≤ 97.

cVasoactive medications: any systemic dose of dobutamine, dopamine, epinephrine, milrinone, norepinephrine, and/or vasopressin.

dLactate can be arterial or venous. Reference range 0.5 - 2.2 mmol/L

eAge: measured in months and is not adjusted for prematurity.

fMAP - Use measured mean arterial pressure preferentially (invasive arterial if available, or non-invasive oscillometric), alternatively use the calculation diastolic + (systolic - diastolic) / 3

gCoagulation variable reference ranges: platelets, 150-450 103/μL; D-dimer, < 0.5 mg/L FEU; fibrinogen, 180-410 mg/dL. International normalized ratio reference range is based on local reference prothrombin time.

hNeurologic dysfunction scoring was pragmatically validated in both sedated and on sedated patients and those with and without IMV.

iGCS measures level of consciousness based on verbal, eye, and motor response. Values are integers from 3 to 15 with higher scores indicating better neurologic function.

Software

Example use of the Python Module

import numpy as np
import pandas as pd
import importlib.resources

import phoenix as phx

Example Data set

There is an example data set included in the package in a file called sepsis.csv. Load that file to use in the following examples.

# read in the example data set
path = importlib.resources.files('phoenix')
sepsis = pd.read_csv(path.joinpath('data').joinpath('sepsis.csv'))
print(sepsis.head())
##    pid     age  fio2  pao2  spo2  vent  gcs_total          pupil  platelets   inr  ...  epinephrine  milrinone  norepinephrine  vasopressin  glucose     anc    alc  creatinine  bilirubin    alt
## 0    1    0.06  0.75   NaN  99.0     1        NaN            NaN      199.0  1.46  ...            1          1               0            0      NaN     NaN    NaN        1.03        NaN   36.0
## 1    2  201.70  0.75  75.3  95.0     1        5.0  both-reactive      243.0  1.18  ...            0          0               1            0    110.0  14.220  2.220        0.51        0.2   32.0
## 2    3   20.80  1.00  49.5   NaN     1       15.0  both-reactive       49.0  1.60  ...            0          0               0            0     93.0   2.210  0.190        0.33        0.8  182.0
## 3    4  192.50   NaN   NaN   NaN     0       14.0            NaN        NaN  1.30  ...            0          0               0            0    110.0   3.184  0.645        0.31        8.5   21.0
## 4    5  214.40   NaN  38.7  95.0     0        NaN            NaN      393.0   NaN  ...            0          0               0            0      NaN     NaN    NaN        0.52        NaN    NaN
## 
## [5 rows x 27 columns]

Organ Dysfunction Scoring

There is one function for each of the eight component organ dysfunction scores. Each of these functions return a numpy array of integers.

Respiratory Dysfunction Scoring

# Expected Units:
#   PaO2: mmHg
#   FiO2: reported as a decimal, 0.21 to 1.00
#   Spo2: percentage, values from 0 to 100
resp = phx.phoenix_respiratory(
    pf_ratio = sepsis["pao2"] / sepsis["fio2"],
    sf_ratio = np.where(sepsis["spo2"] <= 97, sepsis["spo2"] / sepsis["fio2"], np.nan),
    imv      = sepsis["vent"],
    other_respiratory_support = (sepsis["fio2"] > 0.21).astype(int).to_numpy()
    )
print(type(resp))
## <class 'numpy.ndarray'>
print(resp)
## [0 3 3 0 0 3 3 0 3 3 3 1 0 2 3 0 2 3 2 0]

Cardiovascular Dysfunction Scoring

# Expected Units:
#   vasoactives: vector is expected to be integer values 0, 1, 2, 3, 4, 5, 6.
#                In this example each of the six possible vasoactive medication
#                columns are integer value 0 or 1 indicators
#
#   lactate: mmol/L
#
#   map (mean arterial pressure): mmHg.
#                                 In the example below we report the map as the
#                                 weighted average of systolic (sbp) and
#                                 diastolic (dbp) pressures, also reported in
#                                 mmHg.

card = phx.phoenix_cardiovascular(
    vasoactives = sepsis["dobutamine"] + sepsis["dopamine"]       + sepsis["epinephrine"] +
                  sepsis["milrinone"]  + sepsis["norepinephrine"] + sepsis["vasopressin"],
    lactate = sepsis["lactate"],
    age = sepsis["age"],
    map = sepsis["dbp"] + (sepsis["sbp"] - sepsis["dbp"]) / 3
)
print(type(card))
## <class 'numpy.ndarray'>
print(card)
## [2 2 1 0 0 1 4 0 3 0 3 0 0 2 3 2 2 2 2 1]

Coagulation Dysfunction Scoring

# Expected units:
#   platelets: 1000/μL
#   inr: 
#   D-Dimer: (mg/L FEU)
#   Fibrinogen: mg/dL
coag = phx.phoenix_coagulation(
    platelets = sepsis['platelets'],
    inr = sepsis['inr'],
    d_dimer = sepsis['d_dimer'],
    fibrinogen = sepsis['fibrinogen']
)
print(type(coag))
## <class 'numpy.ndarray'>
print(coag)
## [1 1 2 1 0 2 2 1 1 0 1 0 0 1 2 1 1 2 0 1]

Neurologic Dysfunction Scoring

# Expected Units:
#   GCS - Glascow Coma Score: Integers in 3, 4, ..., 14, 15
#   fixed pupils: 0 or 1 integer values. 1 for bilaterally fixed pupils, 0
#                 otherwise
neuro = phx.phoenix_neurologic(
    gcs = sepsis["gcs_total"],
    fixed_pupils = (sepsis["pupil"] == "both-fixed").astype(int)
)
print(type(neuro))
## <class 'numpy.ndarray'>
print(neuro)
## [0 1 0 0 0 1 0 0 1 1 2 0 0 0 0 0 0 0 0 0]

Endocrine Dysfunction Scoring

# Expected units:
#   glucose: mg/dL
endo = phx.phoenix_endocrine(sepsis["glucose"])
print(type(endo))
## <class 'numpy.ndarray'>
print(endo)
## [0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1]

Immunologic Dysfunction Scoring

# Expected Units:
#   ANC: 1000 cells / mm³
#   ALC: 1000 cells / mm³
immu = phx.phoenix_immunologic(sepsis["anc"], sepsis["alc"])
print(type(immu))
## <class 'numpy.ndarray'>
print(immu)
## [0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0]

Renal Dysfunction Scoring

# Expected Units:
#   age: months
#   creatinine: mg/dL
renal = phx.phoenix_renal(sepsis["creatinine"], sepsis["age"])
print(type(renal))
## <class 'numpy.ndarray'>
print(renal)
## [1 0 0 0 0 1 1 0 1 0 1 0 0 0 1 0 0 1 1 0]

Hepatic Dysfunction Scoring

# Expected Units:
#   (total) Bilirubin: mg/dL
#   ALT: IU/L
hepatic = phx.phoenix_hepatic(sepsis["bilirubin"], sepsis["alt"])
print(type(hepatic))
## <class 'numpy.ndarray'>
print(hepatic)
## [0 0 1 1 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0]

Phoenix Scoring

The Phoenix score is the sum of the respiratory, cardiovascular, coagulation, and neurologic scores. Sepsis is defined as a total score of at least two points and septic shock is defined as sepsis with at least one cardiovascular point.

# Expected Units: please review the scoring for specific organ systems

phoenix = phx.phoenix(
   # Respiratory
    pf_ratio = sepsis["pao2"] / sepsis["fio2"],
    sf_ratio = sepsis["spo2"] / sepsis["fio2"],
    imv      = sepsis["vent"],
    other_respiratory_support = (sepsis["fio2"] > 0.21).astype(int).to_numpy(),
  # Cardiovascular
    vasoactives = sepsis["dobutamine"] + sepsis["dopamine"] + sepsis["epinephrine"] + sepsis["milrinone"] + sepsis["norepinephrine"] + sepsis["vasopressin"],
    lactate = sepsis["lactate"],
    age = sepsis["age"],
    map = sepsis["dbp"] + (sepsis["sbp"] - sepsis["dbp"]) / 3,
  # Coagulation
    platelets = sepsis['platelets'],
    inr = sepsis['inr'],
    d_dimer = sepsis['d_dimer'],
    fibrinogen = sepsis['fibrinogen'],
  # Neurologic
    gcs = sepsis["gcs_total"],
    fixed_pupils = (sepsis["pupil"] == "both-fixed").astype(int))
print(phoenix.info())
## <class 'pandas.core.frame.DataFrame'>
## RangeIndex: 20 entries, 0 to 19
## Data columns (total 7 columns):
##  #   Column                        Non-Null Count  Dtype
## ---  ------                        --------------  -----
##  0   phoenix_respiratory_score     20 non-null     int64
##  1   phoenix_cardiovascular_score  20 non-null     int64
##  2   phoenix_coagulation_score     20 non-null     int64
##  3   phoenix_neurologic_score      20 non-null     int64
##  4   phoenix_sepsis_score          20 non-null     int64
##  5   phoenix_sepsis                20 non-null     int64
##  6   phoenix_septic_shock          20 non-null     int64
## dtypes: int64(7)
## memory usage: 1.2 KB
## None
print(phoenix.head())
##    phoenix_respiratory_score  phoenix_cardiovascular_score  phoenix_coagulation_score  phoenix_neurologic_score  phoenix_sepsis_score  phoenix_sepsis  phoenix_septic_shock
## 0                          3                             2                          1                         0                     6               1                     1
## 1                          3                             2                          1                         1                     7               1                     1
## 2                          3                             1                          2                         0                     6               1                     1
## 3                          0                             0                          1                         0                     1               0                     0
## 4                          0                             0                          0                         0                     0               0                     0

Phoenix-8 Scoring

Phoenix-8 is an extended score using all eight organ dysfunction scores.

# Expected Units: please review the scoring for specific organ systems

phoenix8_scores = phx.phoenix8(

   # Respiratory
    pf_ratio = sepsis["pao2"] / sepsis["fio2"],
    sf_ratio = np.where(sepsis["spo2"] <= 97, sepsis["spo2"] / sepsis["fio2"], np.nan),
    imv      = sepsis["vent"],
    other_respiratory_support = (sepsis["fio2"] > 0.21).astype(int).to_numpy(),

  # Cardiovascular
    vasoactives = sepsis["dobutamine"] + sepsis["dopamine"] + sepsis["epinephrine"] + sepsis["milrinone"] + sepsis["norepinephrine"] + sepsis["vasopressin"],
    lactate = sepsis["lactate"],
    map = sepsis["dbp"] + (sepsis["sbp"] - sepsis["dbp"]) / 3,
    age = sepsis["age"],

  # Coagulation
    platelets = sepsis['platelets'],
    inr = sepsis['inr'],
    d_dimer = sepsis['d_dimer'],
    fibrinogen = sepsis['fibrinogen'],

  # Neurologic
    gcs = sepsis["gcs_total"],
    fixed_pupils = (sepsis["pupil"] == "both-fixed").astype(int),

  # Endocrine
    glucose = sepsis["glucose"],

  # Immunologic
    anc = sepsis["anc"],
    alc = sepsis["alc"],

  # Renal
    creatinine = sepsis["creatinine"],
    # age needed here too, already noted with cardiovascular

  # Hepatic
    bilirubin = sepsis["bilirubin"],
    alt = sepsis["alt"])
print(phoenix8_scores.info())
## <class 'pandas.core.frame.DataFrame'>
## RangeIndex: 20 entries, 0 to 19
## Data columns (total 12 columns):
##  #   Column                        Non-Null Count  Dtype
## ---  ------                        --------------  -----
##  0   phoenix_respiratory_score     20 non-null     int64
##  1   phoenix_cardiovascular_score  20 non-null     int64
##  2   phoenix_coagulation_score     20 non-null     int64
##  3   phoenix_neurologic_score      20 non-null     int64
##  4   phoenix_sepsis_score          20 non-null     int64
##  5   phoenix_sepsis                20 non-null     int64
##  6   phoenix_septic_shock          20 non-null     int64
##  7   phoenix_endocrine_score       20 non-null     int64
##  8   phoenix_immunologic_score     20 non-null     int64
##  9   phoenix_renal_score           20 non-null     int64
##  10  phoenix_hepatic_score         20 non-null     int64
##  11  phoenix8_sepsis_score         20 non-null     int64
## dtypes: int64(12)
## memory usage: 2.0 KB
## None
print(phoenix8_scores.head())
##    phoenix_respiratory_score  phoenix_cardiovascular_score  phoenix_coagulation_score  ...  phoenix_renal_score  phoenix_hepatic_score  phoenix8_sepsis_score
## 0                          0                             2                          1  ...                    1                      0                      4
## 1                          3                             2                          1  ...                    0                      0                      7
## 2                          3                             1                          2  ...                    0                      1                      8
## 3                          0                             0                          1  ...                    0                      1                      3
## 4                          0                             0                          0  ...                    0                      0                      0
## 
## [5 rows x 12 columns]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phoenix_sepsis-1.1.3.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phoenix_sepsis-1.1.3-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file phoenix_sepsis-1.1.3.tar.gz.

File metadata

  • Download URL: phoenix_sepsis-1.1.3.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for phoenix_sepsis-1.1.3.tar.gz
Algorithm Hash digest
SHA256 a3ebd1f57119e9dac813e093093a18396c6f39e39354d2d46c95a730b7bfa97c
MD5 1b6cf62a95a22f8b6ae1d34ea8634c3c
BLAKE2b-256 6c806c888beb4de0c71a11a5a442d48ae952946728871883355befc15edc33bf

See more details on using hashes here.

File details

Details for the file phoenix_sepsis-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: phoenix_sepsis-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for phoenix_sepsis-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 23ed905e3192e448c4dd24342f47911c75c8e7278169e7124396c7d96075a7a1
MD5 8fe0af01f12584e8033de66b0c4d7a6b
BLAKE2b-256 864ddc090e7f37b9c3f52bcae1e959df5f4e24d8792b0e29dc9d9587d8318486

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page