When you want to resync the data in the protocol, you can clear the tables DB where the data is stored using the ‘Delete Data' feature. Once you clean the table via UI, you can delete the patients, visits, and specimens.
Go to the OpenClinica Configuration page of the study for which you wish to delete the study mapping. Click on 'More' → Delete Data.
You will get a popup like below where you will need to confirm whether you wish to delete the existing data in the protocol.
Once you click on the ‘Yes' on the above popup, study data will be deleted, and you will get a notification 'Study data deleted’.
To verify if the tables are cleaned in the database. You can create a query and ensure that it returns null results.
Patient Table
select * from os_oc_subjects where study_id in (select identifier from os_oc_studies where cp_id = {CP_ID});
Visit Table
select * from os_oc_visits where subject_id in (select identifier from os_oc_subjects where study_id in (select identifier from os_oc_studies where cp_id = {CP_ID}));