FAQ: Handling data deletion in REDCap
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

FAQ: Handling data deletion in REDCap

This page explains how deletions in REDCap and OpenSpecimen behave when both systems are integrated, and what to do in case of sync issues.

What happens in OpenSpecimen when a subject is deleted in REDCap?

During the next sync, OpenSpecimen will: If no visits collected: Participant is deleted. If visits are collected: Participant will NOT be deleted since visits and possibly specimens, forms, etc., have already been collected You have to first delete or move the visits to another participant. Delete the participant manually in OpenSpecimen (ONLY if the Subject is already deleted in REDCap)

What happens in OpenSpecimen when a visit is deleted in REDCap?

Applicable only to a longitudinal REDCap study

The visit is not deleted from OpenSpecimen

What happens if a REDCap-synced participant or visit is deleted in OpenSpecimen?

When a synced participant is deleted in OpenSpecimen, it is ignored in all subsequent syncs. The reason is that if the end user manually deletes a participant, it means they no longer want that participant in OpenSpecimen.

How to restore a deleted participant in future syncs?

This can only be achieved through database updates. Please ensure that a database backup is taken before executing any of the SQL statements below. If you know the OpenSpecimen PPID of the deleted participant : select identifier from catissue_coll_prot_reg_aud where protocol_participant_id = <input_record_id> Use the returned identifier value as the cpr_id in the following query: SELECT * FROM os_redcap_records WHERE cpr_id = <identifier>; Confirm that the above query returns only one row. DELETE FROM os_redcap_records WHERE cpr_id = <identifier>; If you know the REDCap record_id of the deleted participant : SELECT * FROM os_redcap_records WHERE record_id = <record_id> AND project_id = <redcap_project_id>; Confirm that the above query returns only one row. DELETE FROM os_redcap_records WHERE record_id = <record_id> AND project_id = <redcap_project_id>; Once the linkage record has been deleted, rerun the REDCap synchronization from the OpenSpecimen UI. OpenSpecimen will treat the REDCap record as a new participant and create a new participant record during the next synchronization.

 

Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com