Reuse options for parts of study folder

Study Forum (Inactive)
Reuse options for parts of study folder Andy Straw  2012-09-25 09:00
Status: Closed
 
I'm trying to understand my options for reusing portions of one study in another. We have an existing study folder (StudyA) that we've been using for a couple years. We have built a set of CRFs (about 10-12 forms) that populate about 15 clinical datasets, and use about 15 lists of reference data. The CRFs are wiki/html pages with JavaScript that use/read the lists, and do CRUD operations on the clinical datasets.

Now we're starting a new study (StudyB), and want to reuse the CRFs and associated clinical dataset schemas and lists from StudyA. There are some minor mods that will be necessary (like the code that determines what a valid subject Id is - they're different formats for the two studies), but this shouldn't be much of an issue.

I started down the path of exporting the appropriate parts of StudyA, and then importing them into StudyB. One thing I had to do for StudyB was delete all the records in the datasets that were exported from StudyA. In one case, I deleted the records in the exported tsv file before importing; in other cases, I simply deleted records in StudyB after import, using the LabKey GUI. (Not a big deal, but if there's a way around that, it would be nice.) Now I had StudyB as a copy of StudyA. But certain changes I make to StudyA now have to be manually made to StudyB, if we want them to be the same. We have JavaScript in a shared folder, so that is shared (not copied), but adding a field to a CRF and its dataset would require duplicate work.

Another option I'm looking at is to "factor" the shared parts into a file-based module. If we were starting from scratch, this seems like it might be the way to go. But StudyA is already defined NOT using a module. I'm wondering if I could use the exported study/folder files from StudyA as the starting point for defining a corresponding file-based module. Not sure how far that would get me - for example, are there things that I need that are missing in the exported datasets_metadata.xml and datasets_manifest.xml? Once I create the module, I could use it for StudyB, and then retrofit StudyA to use it (or not). Seems like this is a cleaner way to share wiki pages, JavaScript, schemas across studies/folders, but I'm wondering how much work this will be to do the "factoring" of StudyA into a file-based module.

I also see the concept of Custom Folder Types. Seems like this might be useful on top of a file-based module for additional things that might be shared across StudyA and StudyB, but I'm not sure.

Another option I noticed is "Folder Template". I haven't found clear documentation of how this works. Looks like you export one folder, and then somehow use the export as a template when creating a new folder. I couldn't tell exactly how this works, or what exactly gets used by the new folder from the template. I can experiment to find out, but thought I'd ask here before pursuing that. This would seem to have the same issue as import/export - when you use the template, you get whatever it is at that time; updates to the template don't automatically affect folders created from it before the update. Not sure if that's a good thing or a bad thing.

Any help sorting out these options, and their relative pros and cons would be appreciated.

Andy Straw
University of Rochester
 
 
kevink responded:  2012-09-28 12:44
Pulling out the wiki html/js and any queries into a file-based module is the right way to go. Exporting a study should save those resources into the exported folder which you can use as a starting point to create your module.

The study specific parts (dataset metadata xml) would be associated with the study instead of the module. I think using an exported study archive as your study template is probably the best solution. Unfortunately, we don't have any tools currently to manage changes to study/dataset metadata across all "instances" of your study template.

The folder template feature similar to the study import/export and is used to create new folders based on an existing folder in your server. It is essentially the same as exporting the folder to an archive and importing it as a new folder. You are correct in that once a folder is created from a template, it isn't updated when the source template folder changes.