deyo: Produces a Charlson Score based on the Deyo ICD-9-CM...

Description Usage Arguments Details Value Warning Author(s) References Examples

View source: R/deyo.R

Description

This function take as input a data frame structured such that each row contains a list of ICD-9-CM codes attributed to a single patient. The function goes from row to row comparing the ICD-9-CM codes a patient has with the Deyo comorbidity index diagnosis codes. If a patient has a diagnosis (as indicated by ICD-9-CM code) that belongs to one of the Deyo diagnoses, then the patient is considered to have this diagnosis. Regardless of how many different ICD-9-CM codes a patient has corresponding to a particular comorbidity category, a comorbidity is only counted once.

Usage

1
deyo(input.frame)

Arguments

input.frame

This is a data frame with 5 character ICD-9-CM codes without decimal points.

Details

The value returned consists of a vector and two data frames. The vector is the total Charlson score. In the first data frame returned each row in the data frame is devoted to a particular patient, and each column is a diagnosis. The data frame codes a 0 if the patient does not have that diagnosis and 1 if the patient does have that diagnosis. The second data frame, which codes the point value of that particular diagnosis in the Charlson score rather than a 1.

The ICD-9-CM codes must be 5 characters long and have no decimal poinst.If any codes are less than 5 digits, then they must be led by zeroes or followed by the letter "X" to create a 5 character code. No more than 2 "X" ' s can be used at the tail end, or a meaningful ICD-9-CM code cannot be derived. If your ICD-9-CM codes contain decimals or some other filler character, then they must be converted to the format above for this function to work properly.

Value

A list of one vector and 2 data frames

CHARLSON.SCORE

A vector containing the Charlson score for each patient

COMORBIDITIES

A data frame denoting which diagnoses each patient has with a 1

COMORBIDITIES.POINTS

A data frame denoting which diagnoses each patient has with the point value of that diagnosis

Warning

This function is deprecated. We recommend you switch to the more general cmrbdt.calc function instead.

Author(s)

Paul Gerrard, Max Gordon

References

Deyo RA, Cherkin DC, Ciol MA. (1992) Adapting a clinical comorbidity index for use with ICD-9-CM administrative databases. J Clin Epidemiol. 45(6):613-9.

Examples

1
2
3
4
5
6
x <- matrix(NA, nrow = 3, ncol = 2)
x[1,] <- c("41000", "42800")
x[2,] <- c("57220", "1961X")
x[3,1] <- "042XX"
x <- as.data.frame(x)
deyo(x)

gforge/comorbidities.icd10 documentation built on May 17, 2019, 2:12 a.m.