This article describes how to cut study SDTM data using the wrapper function within the datacutr package. Please note that, this wrapped approach may not be suitable if you wish to enable any study or project specific customization.
To start, all SDTM data to be cut needs to be read into the R environment. These datasets should be stored within a list.
The next step is to create the DCUT dataset containing the datacut date and description.
dcut <- create_dcut(dataset_ds = ds, ds_date_var = DSSTDTC, filter = DSDECOD == "RANDOMIZATION", cut_date = "2022-06-04", cut_description = "Clinical Cutoff Date")
If any pre-processing of SDTM datasets is needed, this should be done next. For example, in the case of FA, where both FASTDTC and FADTC date variables are used, we can combine these into one date variable.
Now, we can perform the datacut on each SDTM dataset. This is when we can specify the cut types for each domain (patient cut, date cut, or no cut). If a date cut is chosen, we must also specify the date variable which should be used. A “special” cut can be performed on the demography domain (dm) if the special_dm parameter is set to TRUE. As well as performing the standard patient cut, this will identify any deaths occurring after the datacut date, and set the death variables (DTHDTC, DTHFL) to missing. Please note that, if special_dm=TRUE, there is no need to specify the cut type for dm in any of the other inputs. Please ensure you have selected a cut type for all other SDTM domains.