*! version 1.2.1 1 Mar 2023

Title

PRISM Score -- a command to calculate the PRISM III and PRISM IV scores

Syntax

prismscore
new_varlist
[if] [in]
,
prismIII_varlist [prism4 prismIV_varlist] [unit_options] [debugging_options]

Syntax Details

New Variables

The new variables will contain the calculated scores. Depending on the scenario, you will need to specify either 1, 3, or 4 options.

Scenarios

PRISM III
3 variables new variables must follow this order: neurologic_score nonneurologic_score total_score

PRISM IV
1 variable new variable will contain only the PRISM IV score.

4 variables new variables must follow this order: neurologic_score nonneurologic_score total_score prism4_score

Variable Lists

PRISM III Variable List See Below

PRISM IV Variable List See Below

Options

PRISM III (required)

Age - Must specify either age or both dob and doa

age(varname) age variable. Requires special coding.

dob(varname) date of birth variable

doa(varname) date of admission variable

Temperature

temp(varname) temperature variable. If templow is used, then temp designates the high temperature variable

Optional

templow(varname) temperature variable. If templow is used, then temp designates the high temperature variable

Additional Vitals

sbp(varname) systolic blood pressure variable.

hr(varname) heart rate variable.

gcs(varname) Glasgow Coma Score variable.

pupils(varname) number of pupils > 3mm and fixed.

Acid-Base Status

ph(varname) pH variable; if phhigh is used, then ph designates the low pH variable.

bicarb(varname) designates the bicarbonate variable. if bicarbhigh is used, then it designates the low bicarbonate variable

pco2(varname) PCO2 variable.

pao2(varname) PaO2 variable.

Optional

phhigh(varname) pH variable; if phhigh is used, then ph designates the low pH variable.

bicarbhigh(varname) designates the bicarbonate variable. if bicarbhigh is used, then it designates the low bicarbonate variable

Laboratory Values

glucose(varname) glucose variable in mg/dL.

potassium(varname) potassium variable in mmol/L.

creatinine(varname) creatinine variable in mg/dL.

bun(varname) BUN variable in mg/dL.

wbc(varname) WBC variable in cells/mm3.

plt(varname) Platelet Count variable in cells/mm3.

PRISM IV (optional)

prismiv calculates the PRISM IV % mortality.

Required

source(varname) admission source. Requires special coding.

cpr(varname) CPR status.

cancer(varname) cancer status.

risk(varname) low-risk system of primary dysfunction status.

Additional Options

Unit Options
si will calculate scores based on SI Lab values.

pltunit(integer) allows specifying a different platelet count unit.

wbcunit(integer) allows specifying a different WBC unit.

FAHRenheit allows specifying a different temperature unit.

Debugging Options
trace enables the trace option for the command. Useful in case of unexpected errors.

suppress suppresses warnings regarding data imputation.

suppressall suppress all errors and data validation functions.

noimputation shows missing score if any variables are missing.

novalidation supresses out-of-range data checks. If this is not specified, values that are out-of-range will be considered missing.

PRISM III Variable List

Age - Must specify either age or both dob and doa
age(varname) age variable. Requires special coding.

dob(varname) date of birth variable

doa(varname) date of admission variable

Temperature
temp(varname) temperature variable. If templow is used, then temp designates the high temperature variable

Optional

templow(varname) temperature variable. If templow is used, then temp designates the high temperature variable

Additional Vitals
sbp(varname) systolic blood pressure variable.

hr(varname) heart rate variable.

gcs(varname) Glasgow Coma Score variable.

pupils(varname) number of pupils > 3mm and fixed.

Acid-Base Status
ph(varname) pH variable; if phhigh is used, then ph designates the low pH variable.

bicarb(varname) designates the bicarbonate variable; if bicarbhigh is used, then it designates the low bicarbonate variable

pco2(varname) PCO2 variable.

pao2(varname) PaO2 variable.

Optional

phhigh(varname) pH variable; if phhigh is used, then ph designates the low pH variable.

bicarbhigh(varname) designates the bicarbonate variable. if bicarbhigh is used, then it designates the low bicarbonate variable

Laboratory Values
glucose(varname) glucose variable in mg/dL.

potassium(varname) potassium variable in mmol/L.

creatinine(varname) creatinine variable in mg/dL.

bun(varname) BUN variable in mg/dL.

wbc(varname) WBC variable in cells/mm3.

plt(varname) Platelet Count variable in cells/mm3.

PRISM IV Variable List

source(varname) admission source. Requires special coding.

cpr(varname) CPR status.

cancer(varname) cancer status.

risk(varname) low-risk system of primary dysfunction status.

Description

prismscore calculates PRISM III and PRISM IV scores. The scores are outcome prognostication tools that have been used
extensively in clinical care and research to calculate the expected mortality and control for illness severity in pediatric intensive care units.

See Citation for proper attribution.

Options

For all required variables, if there is data missing you will receive a warning. The calculation will still be performed using normal values for the age group. See options suppress and suppressall for more information.

Main

prismiv will calculate a percentage mortality based on the PRISM IV score. This will require specifying admitsource(varname), cancer(varname), cpr(varname), and risk(varname).

PRISM III

age(varname numeric) designates the age variable. Age must be coded as:
0 = (<- - 14 days] | 1 = (14 days - 1 month) | 2 = [1 month - 12 months) | 3 = [12 months - 12 years) | 4 = [12 years ->). Alternatively use dob and doa for automatic calculations of age.
This is recommended if the age is not already appropriately coded.

dob(varname date) designates the date of birth variable. Date of birth must be in %td format.

doa(varname date) designates the date of admission variable. Date of admission must be in %td format.

sbp(varname numeric) designates the systolic blood pressure variable.

hr(varname numeric) designates the heart rate variable.

gcs(varname integer) designates the Glascow Coma Score variable.

pupils(varname integer) designates the variable containing the number of pupils >3mm and fixed.

temp(varname numeric) designates the temperature variable. If there is only one temperature recorded, the command will use the recorded temperature for both high and low temperature calculations. If both a high and a low
temperature value are recorded, specify templow.

templow(varname numeric) designates the low temperature variable. If both temp and templow are specified, the command will compare the values and will use the highest value for high temperature calculations and the lowest value for the low temperature calculations.

ph(varname numeric) designates the ph variable. If there is only one pH recorded, the command will use the recorded pH for
both high and low pH calculations. If both a high and a low pH value are recorded, specify phhigh.

phhigh(varname numeric) designates the high ph variable. If both ph and phhigh are specified, the command will compare the values and will use the highest value for high ph calculations
and the lowest value for the low ph calculations.

bicarb(varname numeric) designates the HCO3-/CO2 variable. If there is only one bicarbonate value recorded, the command will use the recorded bicarbonate values for both high and low bicarbonate calculations.
If both a high and a low bicarbonate value are recorded, specify bicarbhigh.

bicarbhigh(varname numeric) designates the high HCO3-/CO2 variable. If both bicarb and bicarbhigh are specified, the command will compare the values and will use the highest
value for high bicarbonate calculations and the lowest value for the low bicarbonate calculations.

pco2(varname numeric) designates the PCO2 variable; not to be confused with the bicarb variable.

po2(varname numeric) designates the PO2 variable.

glucose(varname) glucose variable in mg/dL.

potassium(varname) potassium variable in mEq/L or mmol/L. The units are identical.

creatinine(varname) creatinine variable in mg/dL.

bun(varname) BUN variable in mg/dL.

wbc(varname) WBC variable in cells/mm3.

plt(varname) Platelet Count variable in cells/mm3.

PRISM IV

source(varname) Admission Source variable. Source must be coded as: 0 = Operating Room or PACU | 1 = Another Hospital| 2 = Inpatient Unit| 3 = Emergency Department.

cpr(varname) CPR in the last 24h variable. CPR must be coded as: 0 = No | 1 = Yes.

cancer(varname) Acute or Chronic Cancer variable. Cancer must be coded as: 0 = No | 1 = Yes.

risk(varname) Low-risk systems of primary dysfunction variable. Risk must be coded as: 0 = No | 1 = Yes. Endocrine, hematologic, musculoskeletal, and renal systems are defined as low risk.

Unit Options

wbcunit(numeric) If not specified, it defaults to cells/mm3 - wbcunit(1). If data is in 1000 * cells/mm3 specify wbcunit(1000).

pltunit(numeric) If not specified, it defaults to cells/mm3 - pltunit(1). If data is in 1000 * cells/mm3 specify pltunit(1000).

si If specified, it assumes glucose is recorded as mmol/L, creatinine is recorded as umol/L and BUN is recorded as mmol/L. Otherwise it assumes glucose, creatinine and BUN are recorded as mg/dL.

fahrenheit If specified, it assumes glucose is recorded in Fahrenheit. If not specified, Celsius is assumed.

Useful

trace enables trace

suppress suppresses warnings about calculation with missing values

suppressall suppresses all warnings and data checks

noimputation calculated score will be set to missing if any of the included variables are missing

novalidation if this option is NOT specified, variables that are out of range (incompatible with known physiology) will be set to missing.

Physiologic Variable Acceptable Ranges
(min) - (max)

Systolic BP 0 - 300
Heart Rate 0 - 350
Temperature - C 25 - 45
Temperature - F 77 - 113
pH 6.5 - 7.9
Bicarbonate 0.1 - 60
PCO2 1 - 200
PaO2 1 - 600
Glucose - mg/dL 5 - 999
Glucose - mmol/L 0.2 - 55.45
Creatinine - mg/dL 0.01 - 15
Creatinine - mmol/L 0.8 - 1350
BUN - mg/dL 1 - 150
BUN - mmol/L 0.3 - 53.6
Potassium 1 - 10
GCS 3 - 15

Variable Coding Reference

Variable Value Reference

Age 0 <= 14 days
1 > 14 days & <= 1 month
2 > 1 month & <= 1 year
3 > 1 year & < 12 years
4 >= 12 years

Source 0 Operating Room or PACU
1 Another Hospital
2 Inpatient Unit
3 Emergency Department

CPR 0 No
1 Yes

Cancer 0 No
1 Yes

Risk(Low-Risk) 0 No
1 Yes

Note: 1 month - 30 days; 1 year - 365 days

Custom Implementations

Some groups have modified the coefficients attributed to each of the variables in the PRISM IV score calculation. The coefficients used in this command are the ones reported in Pollack 2016. If you wish to change them, you have to modify the
prismscore.ado file.
I am not offering a command-based option to prevent inadvertent changes by inexperienced users. If you are having issues with this, please email me and I'm happy to help.

Instructions
Open the prism.ado file. Locate the section containing the PRISM IV coefficients (line 292); alternatively search for CHANGE THIS. Modify the coefficients as needed and reload the program.
The following commands should be helpful:

1. doedit prismscore.ado

2. Make edits and save.

3. program drop prismscore

4. do prismscore.ado

References

[1] Pollack MM, Patel KM, Ruttimann UE. PRISM III: an updated Pediatric Risk of Mortality score. Crit Care Med. 1996;24(5):743-52.
[2] Pollack MM, Holubkov R, Funai T, Dean JM, Berger JT, Wessel DL, et al. The Pediatric Risk of Mortality Score: Update 2015. Pediatr Crit Care Med. 2016;17(1):2-9.

Citation

Please cite this command as:

Azamfirei, Razvan; Mennie, Colleen; Fackler, James; Kudchadkar, Sapna R. Development of a Stata Command for Pediatric Risk of Mortality Calculation. Pediatric Critical Care Medicine 24(3):p e162-e163, March 2023. | DOI: 10.1097/PCC.0000000000003149

Author

Razvan Azamfirei
Email: stata@azamfirei.com

License

Copyright 2022 Razvan Azamfirei

Licensed under the Apache License, Version 2.0 (the"License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and limitations under the License.