Package: sdtmchecks 1.0.0

Will Harris

sdtmchecks: Data Quality Checks for Study Data Tabulation Model (SDTM) Datasets

A series of checks to identify common issues in Study Data Tabulation Model (SDTM) datasets. These checks are intended to be generalizable, actionable, and meaningful for analysis.

Authors:Will Harris [aut, cre], Sara Bodach [aut], Edgar Manukyan [aut], Adrian Waddell [aut], Ross Farrugia [aut], F. Hoffmann-La Roche AG [cph, fnd]

sdtmchecks_1.0.0.tar.gz
sdtmchecks_1.0.0.zip(r-4.5)sdtmchecks_1.0.0.zip(r-4.4)sdtmchecks_1.0.0.zip(r-4.3)
sdtmchecks_1.0.0.tgz(r-4.4-any)sdtmchecks_1.0.0.tgz(r-4.3-any)
sdtmchecks_1.0.0.tar.gz(r-4.5-noble)sdtmchecks_1.0.0.tar.gz(r-4.4-noble)
sdtmchecks_1.0.0.tgz(r-4.4-emscripten)sdtmchecks_1.0.0.tgz(r-4.3-emscripten)
sdtmchecks.pdf |sdtmchecks.html
sdtmchecks/json (API)
NEWS

# Install 'sdtmchecks' in R:
install.packages('sdtmchecks', repos = c('https://pharmaverse.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/pharmaverse/sdtmchecks/issues

Datasets:

On CRAN:

7.82 score 21 stars 15 scripts 137 downloads 128 exports 20 dependencies

Last updated 2 months agofrom:ccb59be39c. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 04 2024
R-4.5-winOKNov 04 2024
R-4.5-linuxOKNov 04 2024
R-4.4-winOKNov 04 2024
R-4.4-macOKNov 04 2024
R-4.3-winOKNov 04 2024
R-4.3-macOKNov 04 2024

Exports:%has_all%%has_any%%lacks_all%%lacks_any%check_ae_aeacn_ds_disctx_covidcheck_ae_aeacnothcheck_ae_aeacnoth_ds_disctxcheck_ae_aeacnoth_ds_stddisc_covidcheck_ae_aedecodcheck_ae_aedthdtc_aesdthcheck_ae_aedthdtc_ds_deathcheck_ae_aelatcheck_ae_aeoutcheck_ae_aeout_aeendtc_aedthdtccheck_ae_aeout_aeendtc_nonfatalcheck_ae_aerelcheck_ae_aesdth_aedthdtccheck_ae_aestdtc_after_aeendtccheck_ae_aestdtc_after_ddcheck_ae_aetoxgrcheck_ae_deathcheck_ae_death_ds_disconcheck_ae_ds_partial_death_datescheck_ae_dupcheck_ae_fatalcheck_ae_withdr_ds_disconcheck_ce_missing_monthcheck_cm_cmdecodcheck_cm_cmindccheck_cm_cmlatcheck_cm_cmlat_prior_ocularcheck_cm_missing_monthcheck_dd_ae_aedthdtc_ds_dsstdtccheck_dd_ae_aeout_aedthdtccheck_dd_death_datecheck_dm_actarm_armcheck_dm_ae_ds_deathcheck_dm_age_missingcheck_dm_armcdcheck_dm_dthfl_dthdtccheck_dm_usubjid_ae_usubjidcheck_dm_usubjid_dupcheck_ds_ae_disconcheck_ds_dsdecod_deathcheck_ds_dsdecod_dsstdtccheck_ds_dsscatcheck_ds_dsterm_death_due_tocheck_ds_duplicate_randomizationcheck_ds_ex_after_disconcheck_ds_multdeath_dsstdtccheck_ds_sc_stratcheck_dv_ae_aedecod_covidcheck_dv_covidcheck_ec_sc_latcheck_eg_egdtc_visit_ordinal_errorcheck_ex_dupcheck_ex_exdose_exoccurcheck_ex_exdose_pos_exoccur_nocheck_ex_exdosucheck_ex_exoccur_exdose_exstdtccheck_ex_exoccur_mis_exdose_nonmischeck_ex_exstdtc_after_ddcheck_ex_exstdtc_after_exendtccheck_ex_exstdtc_visit_ordinal_errorcheck_ex_extrt_exoccurcheck_ex_infusion_exstdtc_exendtccheck_ex_visitcheck_lb_lbdtc_after_ddcheck_lb_lbdtc_visit_ordinal_errorcheck_lb_lbstnrlo_lbstnrhicheck_lb_lbstresc_charcheck_lb_lbstresn_missingcheck_lb_lbstresucheck_lb_missing_monthcheck_mh_missing_monthcheck_mi_mispeccheck_oe_bcva_1m_late_early_totcheck_oe_bcva_4m_late_early_totcheck_oe_bcva_4m_vs_1m_reqcheck_oe_bcva_tot_mismatchcheck_oe_sc_lat_count_fingerscheck_pr_missing_monthcheck_pr_prlatcheck_qs_dupcheck_qs_qsdtc_after_ddcheck_qs_qsdtc_visit_ordinal_errorcheck_qs_qsstat_qsreasndcheck_qs_qsstat_qsstresccheck_rs_rscat_rsscatcheck_rs_rsdtc_across_visitcheck_rs_rsdtc_visitcheck_rs_rsdtc_visit_ordinal_errorcheck_sc_dm_eligcritcheck_sc_dm_seyeselccheck_ss_ssdtc_alive_dmcheck_ss_ssdtc_dead_dscheck_ss_ssdtc_dead_dthdtccheck_ss_ssstat_ssorrescheck_tr_dupcheck_tr_trdtc_across_visitcheck_tr_trdtc_visit_ordinal_errorcheck_tr_trstresn_ldiamcheck_ts_aedictcheck_ts_cmdictcheck_ts_sstdtc_ds_consentcheck_tu_rs_new_lesionscheck_tu_tudtccheck_tu_tudtc_across_visitcheck_tu_tudtc_visit_ordinal_errorcheck_tu_tuloc_missingcheck_vs_heightcheck_vs_sbp_lt_dbpcheck_vs_vsdtc_after_ddconvert_var_to_asciicreate_R_scriptdiff_reportsdtc_dupl_earlyfailimpute_day01is_sas_nalacks_msgmissing_monthpassreport_to_xlsxroche_derive_rave_rowrun_all_checksrun_checktruncate_var_strings

Dependencies:clidplyrfansigenericsgluelifecyclemagrittropenxlsxpillarpkgconfigR6Rcpprlangstringitibbletidyselectutf8vctrswithrzip

Frequently Asked Questions (FAQs)

Rendered fromfaqs.Rmdusingknitr::rmarkdownon Nov 04 2024.

Last update: 2023-12-22
Started: 2023-06-22

Introduction to sdtmchecks

Rendered fromsdtmchecks.Rmdusingknitr::rmarkdownon Nov 04 2024.

Last update: 2023-08-26
Started: 2022-12-02

Search Data Check Functions

Rendered fromsearch_checks.Rmdusingknitr::rmarkdownon Nov 04 2024.

Last update: 2023-06-16
Started: 2023-06-16

Writing a New Check

Rendered fromwrite_a_check.Rmdusingknitr::rmarkdownon Nov 04 2024.

Last update: 2023-08-31
Started: 2022-10-26

Readme and manuals

Help Manual

Help pageTopics
Check for COVID-19 AE with DRUG WITHDRAWN action without "ADVERSE EVENT" for DS Trt Disconcheck_ae_aeacn_ds_disctx_covid
Check for null AEACNOT1/2 when AEACNOTH = 'MULTIPLE'check_ae_aeacnoth
Check if, whenever a patient experiences an AE leading to study discontinuation, they also have a DS record indicating this.check_ae_aeacnoth_ds_disctx
Check for COVID-19 AE leading to Study Discon without DS Study Disconcheck_ae_aeacnoth_ds_stddisc_covid
Check for missing AEDECOD valuescheck_ae_aedecod
Check AEs with AEDTHDTC value but AESDTH not "Y"check_ae_aedthdtc_aesdth
Check for missing AEDTHDTC where DS indicates death due to AEcheck_ae_aedthdtc_ds_death
Check if AESOC has Eye, and Affected Eye is missingcheck_ae_aelat
Check for inconsistency between AE outcome (AEOUT) and death date (AEDTHDTC)check_ae_aeout
Check for AE outcome (AEOUT) of 'FATAL' with non-missing resolution date that is not equal to the death datecheck_ae_aeout_aeendtc_aedthdtc
Check for non-fatal AEs with inconsistent AEOUT and AEENDTCcheck_ae_aeout_aeendtc_nonfatal
Check for AEREL1 - AERELN when AEREL is missing and when AEREL is unexpectedcheck_ae_aerel
Check AEs with AESDTH of "Y" but No AEDTHDTC Valuecheck_ae_aesdth_aedthdtc
Check that all AE start dates are on or before AE end datescheck_ae_aestdtc_after_aeendtc
Check for AE dates occurring after death datecheck_ae_aestdtc_after_dd
Check for missing AETOXGR and/or AESEV valuescheck_ae_aetoxgr
Check for Grade 5 AE death variable consistencycheck_ae_death
Check if death in AE then there should be a study discon formcheck_ae_death_ds_discon
Check for partial death dates in AE and DScheck_ae_ds_partial_death_dates
Check for duplicate AE entriescheck_ae_dup
Check for death variable consistency when AEOUT=="FATAL"check_ae_fatal
Check if an AE leading to drug being withdrawn is reflected in DScheck_ae_withdr_ds_discon
Check for clinical events dates with year and day known but month unknowncheck_ce_missing_month
Check for missing CMDECOD valuescheck_cm_cmdecod
Check for concomitant medication indication with text string "PROPHYL" when not given for prophylaxischeck_cm_cmindc
Check if ocular concomitant medication has laterality missing or laterality field is populated but route is not eye-related.check_cm_cmlat
Check if ocular concomitant medication has laterality missing for specific "PRIOR OCULAR THERAPIES AND TREATMENTS" (or similar names) CRF page.check_cm_cmlat_prior_ocular
Check for conmed dates with year and day known but month unknowncheck_cm_missing_month
Check if death date is the same in AE and DS domainscheck_dd_ae_aedthdtc_ds_dsstdtc
Check if there is a death date and AEOUT='FATAL' agreementcheck_dd_ae_aeout_aedthdtc
Check if patient with Death due to AE also has Death record in DScheck_dd_death_date
Check DM where ARM is not equal to ACTARMcheck_dm_actarm_arm
Check if death reported in DM then death indicator also present in DS or AEcheck_dm_ae_ds_death
Check for patients with suspicious age valuescheck_dm_age_missing
Check for missing ARM or ARMCD values in DMcheck_dm_armcd
Check that when DM.DTHFL is Y, DM.DTHDTC does not have a missing value, and vice versacheck_dm_dthfl_dthdtc
Check patients in the DM dataset who do not have records in the AE datasetcheck_dm_usubjid_ae_usubjid
Check duplicate patient records in DM based on USUBJIDcheck_dm_usubjid_dup
Check for treatment discontinuation consistency between DS and AEcheck_ds_ae_discon
Check for study discontinuation record if death indicatedcheck_ds_dsdecod_death
Check DS with death record but no death datecheck_ds_dsdecod_dsstdtc
Check for patients with more than one study discontinuation recordscheck_ds_dsscat
Check missing cause of death information in DScheck_ds_dsterm_death_due_to
Check for duplicate randomization records for a patientcheck_ds_duplicate_randomization
Check for patients who had Start/End date of treatment after study discontinuation datecheck_ds_ex_after_discon
Check DS with multiple death records with death dates, where death dates do not matchcheck_ds_multdeath_dsstdtc
Check if randomized patients are missing stratification factor datacheck_ds_sc_strat
Check for consistency between DV and AE for COVID-19 eventscheck_dv_ae_aedecod_covid
Check for consistency in COVID-19 DV variables, DVREAS and DVEPRELIcheck_dv_covid
Check if Study Drug is not administered in the Study Eyecheck_ec_sc_lat
Check that all ECG datetimes are earlier than last visit's (possible datetime data entry error)check_eg_egdtc_visit_ordinal_error
Check for duplicate EX recordscheck_ex_dup
Check for Missing EXDOSE.check_ex_exdose_exoccur
Check for EXDOSE>0 When EXOCCUR is not "Y"check_ex_exdose_pos_exoccur_no
Check for missing EXDOSU recordscheck_ex_exdosu
Check for Invalid EXDOSE (Dose per Administration) and Missing/Incomplete EXSTDTC (Start Date) Values for valid exposurescheck_ex_exoccur_exdose_exstdtc
Check for missing EXOCCUR but EXDOSE not missingcheck_ex_exoccur_mis_exdose_nonmis
Check for EX dates occurring after death datecheck_ex_exstdtc_after_dd
Check that all exposure start dates are on or before exposure end datescheck_ex_exstdtc_after_exendtc
Check that all EX start dates are earlier than last visit's (possible datetime data entry error)check_ex_exstdtc_visit_ordinal_error
Check for EX records where EXTRT is missingcheck_ex_extrt_exoccur
Check that an infusion drug has same start/end exposure dates, also including missing start/end datescheck_ex_infusion_exstdtc_exendtc
Check for missing EX.VISITcheck_ex_visit
Check for LB dates occurring after death datecheck_lb_lbdtc_after_dd
Check that all LB dates are duplicated or earlier than last visit's (possible datetime data entry error)check_lb_lbdtc_visit_ordinal_error
Check for missing lab reference ranges (LBSTNRLO, LBSTNRHI)check_lb_lbstnrlo_lbstnrhi
Check LBORRES/LBSTRESC populated with number beginning with character '>' or '<', which will yield missing AVAL in ADaM and records will be omitted in analyses such as Hy's Lawcheck_lb_lbstresc_char
Check missing standard lab values (LBSTRESN/LBSTRESC)check_lb_lbstresn_missing
Check for missing lab units (LBSTRESU)check_lb_lbstresu
Check for lab dates with year and day known but month unknowncheck_lb_missing_month
Check for MH dates with year and day known but month unknowncheck_mh_missing_month
Check for missing values in the MISPEC variablecheck_mi_mispec
Check if 1m BCVA test stops too late, too early and has correct totalcheck_oe_bcva_1m_late_early_tot
Check if 4m BCVA test stops too late, too early and has correct totalcheck_oe_bcva_4m_late_early_tot
Check if 1m BCVA test is completed per BCVA 4m resultcheck_oe_bcva_4m_vs_1m_req
Check mismatch between Derived BCVA Total Score & Total BCVA Score from Datacheck_oe_bcva_tot_mismatch
Check if Post Treatment Count Fingers in Study Eye laterality does not match with Subject Characteristics Study Eye lateralitycheck_oe_sc_lat_count_fingers
Check for procedure dates with year and day known but month unknowncheck_pr_missing_month
Check if ocular procedures/surgeries has laterality missing for CRF pages which contain the word "OCULAR" (and not "NON-OCULAR").check_pr_prlat
Check for multiple dates at the same visit in QScheck_qs_dup
Check for QS dates occurring after death datecheck_qs_qsdtc_after_dd
Check that all QS dates are duplicated or earlier than last visit's (possible datetime data entry error)check_qs_qsdtc_visit_ordinal_error
Check to confirm that there is a reason for a questionnaire being marked as not donecheck_qs_qsstat_qsreasnd
Check for non-missing QSSTRESC if QSSTAT is NOT DONEcheck_qs_qsstat_qsstresc
Check for patients with populated RSSCAT but missing RSCAT.check_rs_rscat_rsscat
Check RS records where the same date occurs across multiple visitscheck_rs_rsdtc_across_visit
Check missing RSDTC and VISITcheck_rs_rsdtc_visit
Check that all RS dates for INV Overall Response are duplicated or earlier than last visit's (possible date entry error)check_rs_rsdtc_visit_ordinal_error
Check SC Eye Meeting Eligibility Criteria assignments among DM patientscheck_sc_dm_eligcrit
Check SC Study Eye Selection assignments among DM patientscheck_sc_dm_seyeselc
Check non-missing last ALIVE status date in SS is before than death date in DMcheck_ss_ssdtc_alive_dm
Check non-missing DEAD status date in SS and non-missing according DS record with death date where status date is greater or equal to death datecheck_ss_ssdtc_dead_ds
Check non-missing DEAD status date in SS and an according DM record with death date where status date is greater or equal to death datecheck_ss_ssdtc_dead_dthdtc
Check for non-missing SSORRES if SSSTAT is NOT DONEcheck_ss_ssstat_ssorres
Check for duplicate TR recordscheck_tr_dup
Check TR Longest Diameter Records where the same date occurs across multiple visitscheck_tr_trdtc_across_visit
Check that all TR dates by INV are duplicated or earlier than last visit's (possible date entry error)check_tr_trdtc_visit_ordinal_error
Check for TR records with missing TRSTRESN for Longest Diameter (LDIAM)check_tr_trstresn_ldiam
Check for missing MedDRA version in TScheck_ts_aedict
Check for missing WHODrug version in TScheck_ts_cmdict
Check for missing SSTDTC (Study Start Date) in TScheck_ts_sstdtc_ds_consent
Check for consistency between new lesions and overall PD responsecheck_tu_rs_new_lesions
Check for missing TUDTC valuescheck_tu_tudtc
Check TU Records where the same date occurs across multiple visitscheck_tu_tudtc_across_visit
Check that all TU dates are duplicated or earlier than last visit's (possible datetime data entry error)check_tu_tudtc_visit_ordinal_error
Check for missing TULOC valuescheck_tu_tuloc_missing
Check for missing height valuescheck_vs_height
Check that DBP is not higher than SBP in VScheck_vs_sbp_lt_dbp
Check for VS dates occurring after death datecheck_vs_vsdtc_after_dd
Create .R file with sdtmchecks function callscreate_R_script
Create a sdtmchecks list object with column indicating whether the issue was previously seendiff_reports
Run all data checks in sdtmchecks package using parallel processingrun_all_checks
Run a single check in sdtmchecks packagerun_check
Metadata for sdtmcheckssdtmchecksmeta