cleanCohortData: This function eliminates patients which do not fulfill the...

View source: R/importData.R

cleanCohortDataR Documentation

This function eliminates patients which do not fulfill the inclusion criteria

Description

This function eliminates patients which do not fulfill the inclusion criteria

Usage

cleanCohortData(
  cohortData,
  mandatoryStates,
  outOfCohortAllowed = FALSE,
  mergeStates = FALSE,
  mergeThreshold = 0.5
)

Arguments

cohortData

Imported cohort data

mandatoryStates

States which have to be present in the trajectory, otherwise dropped#'

outOfCohortAllowed

boolean whether the patient trajectory can surpass the target cohort's observation-period

mergeStates

Boolean, if you want to merge states when they overlap

mergeThreshold

Value from 0 to 1. If mergeStates is TRUE the states will be label-merged given they overlap more than the specified threshold. Can be given as vector, then multiple iterations are runned,

Value

A dataframe with selected patients. Columns: cohort_definition_id, subject_id, cohort_start_date, cohort_end_date


HealthInformaticsUT/Cohort2Trajectory documentation built on March 1, 2025, 7:47 p.m.