Skip to contents

Helper function to save review in database. All old data will not be changed. New rows with the new/updated review data will be added to the applicable database tables.

Usage

db_save_review(
  rv_row,
  db_path,
  tables = c("all_review_data"),
  common_vars = c("subject_id", "event_name", "item_group", "form_repeat", "item_name"),
  review_by = c("subject_id", "item_group")
)

Arguments

rv_row

A data frame containing the row of the data that needs to be checked.

db_path

Character vector. Path to the database.

tables

Character vector. Names of the tables within the database to save the review in.

common_vars

A character vector containing the common key variables.

review_by

A character vector, containing the key variables to perform the review on. For example, the review can be performed on form level (writing the same review to all items in a form), or on item level, with a different review per item.

Value

Review information will be written in the database. No local objects will be returned.