Skip to contents

This function is meant to check whether a box of cryovials is overly similar to another box in that it could potentially be confused to the end user. This can also be used to quickly check if a cryovial box has already been uploaded to the database (ie. prevent duplicated uploads). This is a problem for cryovials because barcodes must only be unique within a box; they are not universally unique.

Usage

validate_box_uniqueness(
  con,
  user_data,
  row_number_col,
  cryovial_col,
  cryovial_box_col,
  similarity_tolerance = 10
)

Arguments

con

A database connection object.

user_data

The name of the table where the user data is temporarily stored in the database.

row_number_col

The column with the row number in the user_data.

cryovial_col

The column with Cryovial barcodes in the user_data.

cryovial_box_col

The column with Cryovial box IDs in the user_data.

similarity_tolerance

The percent similarity that is tolerated.

Value

An instance of the ErrorData class or NULL.