Merging/Changing Participant IDs in Bulk

General Server Forum (Inactive)
Merging/Changing Participant IDs in Bulk slatour  2018-03-07 06:51
Status: Closed
 
Hi,

I have created a demographics data set in which one column corresponds to a Lab ID and the other column refers to an alias ID. The data has been imported to the study already. After multiple researchers have added data to the study we realized the ID columns require to be switched. I have previously used the Merge Participant IDs function within the Manage Study -> Manage Aliases/Alternate Participant IDs section on LabKey. My issue is that this only allows for one data overwrite at a time. considering I have 500+ Ids to change I was wondering if there is an alternate solution to doing this manually one by one?

Any help would be greatly appreciated!

Cheers,

Sara
 
 
Jon (LabKey DevOps) responded:  2018-03-09 13:32
Hi Sara,

Would it be possible to just delete all of the rows and start over?

If the columns need to be switched and you have the corrected demographics data in a spreadsheet, you could just delete all rows from the demographics dataset, then re-import all of the updated rows back in with the correct information.

Regards,

Jon
 
slatour responded:  2018-03-09 14:21
Hi Jon,


This is a dataset which multiple users have imported assay data for. We do not wish to delete anything since the data files are large and we would lose meta data associated with assays. So does LabKey not have a bulk feature to fix participant IDs?

Thank you for the clarification
 
Jon (LabKey DevOps) responded:  2018-03-09 15:08
Hi Sara,

Unfortunately, there is no bulk feature to fix participant IDs in the manner you wish to do it in. You could potentially fix this programmatically yourself by leveraging our APIs to do this, but nothing built into the system that would handle this type of work.

Regards,

Jon
 
slatour responded:  2018-03-10 03:48
Hi Jon,

When I try to use the APIs to rewrite the demographics table in a test, it will not associate the new IDs with previously linked assay data. If I am to use the API to programmatically fix this issue, how would I go about this?

Thanks,

-Sara
 
Jon (LabKey DevOps) responded:  2018-03-23 15:52
Hi Sara,

I was afraid that might be the case. Unfortunately, there is no easy solution here. If you choose to use the API route, the new IDs will also have to be programmatically associated as well to the assay information.

The aliasing function was not designed to do bulk associations in the manner you need to use it for, so beyond just deleting the data from the datasets and assays and then re-importing the data in with the correct values, manual association via the aliasing function is the only option available.

Regards,

Jon