ParticipantVisit records exist after deleting all participant data from datasets

Study Forum (Inactive)
ParticipantVisit records exist after deleting all participant data from datasets Anthony Corbett  2012-10-17 07:17
Status: Closed
 
When I started setting up a study we only had a production system so all development happened on the production study. Before the study was activated (they started enrolling subjects) I wiped all datasets (no specimens in repository) and cleared all cohort assignments. The study reported 'No participants in study' on the study's main page.

However, the ParticipantVisit table still has rows from the development testing that I had done. Is there a way to clear or recalculate this table? Perhaps based on a summary of StudyData table (which is correct)?


Thanks,

Anthony
 
 
Matthew Bellew responded:  2012-10-17 08:52
On the "manage timepoints" page there is a "recompute timepoints" button. Try running that.
 
Anthony Corbett responded:  2012-10-17 11:42
This is a visit based study so I don't have an option to recompute timepoints. Trying 'recalculate Visit Dates' doesn't help.

P.S. should the 'recalculate Visit Dates' update the ParticipantVisit VisitDate column from the visit's associated dataset/VisitDatePropertyName column's value? That currently isn't happening either.
 
ymei responded:  2012-11-30 10:45
I also hit the same issue. I deleted some participants from the datasets. But in the participant list (Tab participants), those deleted participants still present.

I further check the study/participant table/view from the Schema browser. It seems that table/view is not updated appropriately after the deletions of dataset rows.

Is there a solution for this problem? I am now directly going to database to delete those obsoleted participants.

Thanks,
Yongguo
 
jeckels responded:  2012-12-06 10:54
First, a little background:

For visit-based studies, Manage Visits->Recalculate Visit Dates is equivalent to the Manage Timepoints link in date-based studies.

When inserting dataset and specimen data, we always check if new participants are present and create the records for them immediately. For performance reasons, we don't purge old participants immediately, but instead do it on a timer that runs every five minutes. Therefore, you may see a delay before rows disappear from study.participant or study.participantvisit. Additionally, we have a maintenance task that runs daily to make sure that everything is in sync. Please verify that the participant purge task is enabled in Admin Console->System Maintenance.

In my testing, I was able to reproduce the problem where rows were not deleted from study.participantvisit when the participant was deleted, even after the timed event ran. They would be deleted when a future dataset insert/update/delete happened though.

https://www.labkey.org/issues/home/Developer/issues/details.view?issueId=16722

However, I was not able to reproduce the problem where manually running Manage Visits->Recalculate Visit Dates failed to clean up the orphaned rows in study.participantvisit.

Thanks,
Josh
 
jeckels responded:  2012-12-07 17:19
I just checked a fix into 12.3 for the failure to clean up rows in participantvisit.

Thanks,
Josh
 
Anthony Corbett responded:  2012-12-08 09:28
Thanks Josh! I will update my local build and test this when I get in the office on Monday. Glad to see this get into 12.3