cpt_stay: cpt_stay: Flag residents by stay length

Description Usage Arguments Value References Examples

Description

Scans a data.frame of minimum dataset assessments, assigns an indicator according to an arbitrary length of stay. 100 days with no more than 10 days out is a standard "long-stay" definition.

Usage

1
2
3
4
cpt_stay(mds_obj,
                .stay_min = 100L,
                .stay_maxout,
                .report=T)

Arguments

.stay_min

A integer of length one. The length of stay to flag. 100 days is the default.

.stay_maxout

A integer of length one. The maximum allowable days outside of nursing home. 10 days is default.

.report

A logical indicating a short report on cohort construction. Default is true.

mds_obj

A data.frame class object which is "mds canon". See ?mds_as_canon

.keep_all

A logical indicates whether to keep all the patients, or if false only those meeting .stay_* rules. Default is false.

Value

A dataframe with one row per resident, cohort entry, cohort exit, flag for rules equals T if .stay_* rules met,

References

ADD LATER

Examples

1
2
3
require(mdsR)
mds_dta <- mdsR::mds_cohort
longstay <- cpt_stay(mds_dta, .keep_all=T)

kmcconeghy/mdsr documentation built on May 3, 2019, 1:47 p.m.