Skip to contents

[Experimental]

Usage

electronicFrailtyIndexCohort(
  cdm,
  name,
  categories = list(fit = c(0, 0.12), mild = c(0.12, 0.24), moderate = c(0.24, 0.36),
    severe = c(0.36, 1)),
  conceptSet = getIndexCodelist("electronic_frailty_index"),
  subsetCohort = NULL,
  subsetCohortId = NULL
)

Arguments

cdm

A cdm_reference object.

name

Name of the new cohort table created in the cdm object.

categories

A named list of numeric vectors, each containing the lower and upper bounds of a score interval. Upper and lower bounds are both included. The name will be used to name the resultant cohort.

conceptSet

A named concept set supplied as a codelist, codelist_with_details, concept_set_expression, or named list of concept IDs. It must contain activity_limitation, anemia, arthritis, atrial_fibrillation, cerebrovascular_disease, chronic_kidney_disease, diabetes, dizziness, dyspnea, falls, foot_problem, fragility_fracture, hearing_impairment, heart_failure, heart_valve_disorder, housebound, hypertension, hypotension_syncope, ischemic_heart_disease, memory_cognitive_disorder, mobility_problems, osteoporosis, parkinsonism_tremor, peptic_ulcer, peripheral_vascular_disease, care_requirement, respiratory_disease, skin_ulcer, sleep_disturbance, social_vulnerability, thyroid_disease, urinary_incontinence, urinary_system_disease, visual_impairment, weight_loss_anorexia as concepts. By default, internal codelists are used.

subsetCohort

A character refering to a cohort table containing individuals for whom cohorts will be generated. Only individuals in this table will appear in the generated cohort. If NULL no subsetting will be performed.

subsetCohortId

Specifies cohort IDs from the subsetCohort table to include. If none are provided, all cohorts from the subsetCohort are included.

Value

A cohort table.

Details

eFI calculation is baed on Clegg et al. (2016) (doi:10.1093/ageing/afw039 )

Examples

if (FALSE) { # \dontrun{
library(omock)
library(duckdb)
library(OmopIndices)

cdm <- mockCdmFromDataset(datasetName = "GiBleed", source = "duckdb")

# Using the internal concept sets:
cdm$my_cohort <- electronicFrailtyIndexCohort(
  cdm = cdm,
  name = "my_cohort"
)

cdm$my_cohort

settings(cdm$my_cohort)
} # }