Description Usage Arguments Value Author(s) See Also Examples
Generate glucometrics for specific ward/wards during specified time period
1 | GenGluM(dat, hypocutoffs, hypercutoffs, normalrange, hgicutoff, unitVal)
|
dat |
A data.table prepared by |
hypocutoffs |
A vector of numeric values indicating the recommended cutoffs for hypoglycemia, from mild, moderate to severe hypoglycemia. Hypoglycemia is defined as less than the specified cutoff value. |
hypercutoffs |
A vector of numeric values indicating the recommended cutoffs for hyperglycemia, from mild, moderate to severe hyperglycemia. Hyperglycemia is defined as no less than the specified cutoff value. |
normalrange |
A vector of numeric values indicating the recommended range for normal glycemia, where the first value is the lower range, and the second value is the upper range. A BG is considered in recommended range if it is no less than a lower bound and less than a upper bound at the same time. |
hgicutoff |
A numeric value indicating the cutoff used for calculating hyperglycemic index (HGI). |
unitVal |
A unit indicator. 1 stands for mmol/L, 2 stands for md/dL |
Returns a list of three data.frames:
popstat
: A vector of all the indices at population level
patientdaystat
: A vector of all the indices at patient day level
peradmissionstat
: A vector of all the indices at admission level
which will be used as input to generate glucometrics tables.
Ying Chen, Chuen Seng Tan
1 2 3 4 5 6 7 8 9 10 | # Focus on data from Ward A. First prepare example data using GenEpisode:
data("gluDat")
gluDat2 <- FormatDate(dat = gluDat[gluDat$LOCATION == "A", ], yy = 2020, mm = 7)
gluDat3 <- GenEpisode(dat = gluDat2, epiMethod = "Admininfo")
# Then generate glucometrics:
metricList <- GenGluM(dat = gluDat3, hypocutoffs = c(4, 3, 2.5),
hypercutoffs = c(14, 20, 24), normalrange = c(4, 10),
hgicutoff = 10, unitVal = 1)
# View glucometrics (round to 1 decimal place):
lapply(metricList, function(m) round(m, 1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.