Skip to contents

Compares patient names between the hand-entered item-level data and the REDCap export to identify any mismatches or inconsistencies.

Usage

check_compatibility(d1, d2)

Arguments

d1

A data frame generated by import_item_data, containing item-level data.

d2

A data frame generated by import_redcap_data, containing REDCap data.

Value

If discrepancies are found, an informative message is printed and the function stops execution (e.g., via stop()). This function is intended to be used inside prepare_data() as a consistency check.

See also

Examples

if (FALSE) { # \dontrun{
p <- data_paths("data-raw")
data <- prepare_data(p)  # Internally calls the compatibility check
} # }