Skip to contents

Assess the Phoenix endocrine organ dysfunction score. This score is not part of the Phoenix score, only part of the Phoenix-8 score.

Usage

phoenix_endocrine(glucose = NA_real_, data = parent.frame(), ...)

Arguments

glucose

numeric vector; blood glucose measured in mg/dL

data

a list, data.frame, or environment containing the input vectors

...

pass through

Value

a integer vector with values 0 or 1

As with all other Phoenix organ system scores, missing values in the data set will map to a score of zero - this is consistent with the development of the criteria.

Phoenix Endocrine Scoring

The endocrine dysfunction score is based on blood glucose with one point for levels < 50 mg/dL or > 150 mg/dL.

References

See reference details in phoenix-package or by calling citation('phoenix').

See also

vignette('phoenix') for more details and examples.

Examples


# using the example sepsis data set
endo_example <- sepsis[c("pid", "glucose")]
endo_example$score <- phoenix_endocrine(glucose, data = sepsis)
endo_example
#>    pid glucose score
#> 1    1      NA     0
#> 2    2   110.0     0
#> 3    3    93.0     0
#> 4    4   110.0     0
#> 5    5      NA     0
#> 6    6   147.0     0
#> 7    7      NA     0
#> 8    8   100.0     0
#> 9    9   264.0     1
#> 10  10    93.0     0
#> 11  11   341.0     1
#> 12  12      NA     0
#> 13  13      NA     0
#> 14  14      NA     0
#> 15  15      NA     0
#> 16  16    82.4     0
#> 17  17   130.0     0
#> 18  18      NA     0
#> 19  19   103.0     0
#> 20  20   159.8     1

# example data set to get all the possible endocrine scores
DF <- data.frame(glc = c(NA, 12, 50, 55, 100, 150, 178))
phoenix_endocrine(glucose = glc, data = DF)
#> [1] 0 1 0 0 0 0 1