the national consortium on alcohol and neurodevelopment in adolescence ( n - canda ; http://ncanda.org/ ) , funded by the national institute on alcohol abuse and alcoholism , is a consortium tasked with investigating the extent to which structural and functional deficits in neurodevelopmental maturation are caused or exacerbated by adolescent alcohol use . here , we describe the data collection infrastructure for the n - canda consortium , implemented wherever possible using freely available , open - source software components .
all software tools and documentation materials created by us are also freely available at http://nitrc.org / projects / ncanda - datacore/. the following requirements drove the selection of components for the infrastructure and their specific setup : 
 1 . 
automation : transfer of data from the collection sites to the consortium server should require as little human interaction as possible.2 . 
security : all storage and transmission systems must use state - of - the - art encryption and access control.3 . 
accountability : changes to existing data must create an audit trail with user names and time stamps.5
.  incremental deployment : due to a tight project schedule , data collection had to begin before the infrastructure ( eg , database representations of acquired instruments ) was fully in place . 1 . 
automation : transfer of data from the collection sites to the consortium server should require as little human interaction as possible .
security : all storage and transmission systems must use state - of - the - art encryption and access control .
3 .  persistence : safeguard against loss of data due to overwriting or deletion .
4 .  accountability : changes to existing data must create an audit trail with user names and time stamps .
incremental deployment : due to a tight project schedule , data collection had to begin before the infrastructure ( eg , database representations of acquired instruments ) was fully in place .
as it turns out , using a networked revision control system for data transmission naturally satisfies all of these demands .
security is provided by access control to the repository and encryption of all data transfers .
persistence and accountability result from the principle of revision control to track changes to all files ( and their authors ) .
play back the history of a repository , one change at a time , either globally or for selected files . based on these insights
, we implemented n - canda 's data collection , transmission , and integration system using a networked subversion ( https://subversion.apache.org/ ) repository and a moderate number of custom perl and python scripts .
asynchronous in the sense that data transmission and database import do not have to occur hand - in - hand , but can be separated by an arbitrary time interval . by reporting the time course of data collected over the first year of funding for the n - canda project
, we demonstrate the benefits of our system : n - canda data collection sites successfully collected data within less than 3  months from the beginning of funding , within about 1  month of finalizing the experimental protocol , and up to 9  months before the database infrastructure was fully in place . for several instruments ,
mac and pc laptops with software applications for a variety of neuropsychological tests were centrally prepared and deployed to the collection sites .
a partial list of instruments collected by the laptops is provided in table 1 , which includes each instrument 's details , the data collection software used , and the necessary tools for data conversion . in addition , a number of computerized neuropsychological tests are administered using the web - based computerized neuropsychological testing ( webcnp ) system at the university of pennsylvania school of medicine.5 data captured by the n - canda data collection laptops ; the  data conversion steps are automatically executed by the consortium server running linux , with no user interaction all custom scripts referenced in this table are available for download at https://www.nitrc.org/frs/?group_id=672 .
csv , comma - separated - value ; n - canda , national consortium on neurodevelopment in adolescence . for central data management
, we chose the research electronic data capture ( redcap ; http://project-redcap.org/ ) system6 for its web - based design of data collection instruments , secure architecture , and data audit trails , which were shown in an independent evaluation to provide a variety of benefits.7 redcap allows us to provide all consortium sites with secure , interactive access to the consortium database for queries , data entry , and editing . crucially , redcap also provides an application programming interface ( api ) to import and export data automatically , without user interaction .
transmission of data from the collection laptops into a revision control system is the first innovation of our infrastructure , illustrated in figure 1 .
we use a networked subversion repository , but the benefits outlined below are not specific to subversion . any other modern , networked revision control system ( eg , git , mercurial ) would be equally suitable and would also provide the following advantages .
illustration of the laptop data transmission and import procedure using a networked subversion repository and the 
first , repeated upload of a file under the same name will create a sequence of revisions , but will not remove any existing contents .
together , these properties satisfy the design goals persistence and accountability , albeit the latter with some limitations in our current setup , where collected data can be traced to the originating laptop , but is not tied to a specific user account on that laptop .
second , subversion provides networked operation over a secure , encrypted link ( https ; via an apache web server , http://apache.org/ ) , error handling , and access control , without any custom software components .
the third advantage of using a revision control system is that the history of stored files can be 
played back step by step , from any chosen point in time , either globally or for selected files .
this feature allowed the n - canda data collection sites to begin transmitting data as soon as the collection laptops were in operation 
long before all databases and import scripts were deployed on the server ( see  results below ) .
multiple output files are created on the laptops for each subject by some of the applications used for clinical interviews and neuropsychology tests .
the output paths for all these applications are hard - coded , thus resulting in a large number of files distributed across each laptop 's file system on completion of each subject session .
custom perl scripts automate the collection , collation , and uploading of the output files and updated databases to the subversion repository .
this eliminates the possibility that research assistants will miss or accidentally overwrite files when preparing to submit data and simplifies the transmission process to the degree that simply clicking an 
upload desktop icon performs the entire upload procedure . on the n - canda server ,
a working copy is kept of the aforementioned subversion repository and periodically updated by a python script called 
harvester. any updated or newly added files are forwarded to format - specific scripts that convert them into standardized , comma - separated - value ( csv ) files .
these may be files for which database and import procedure have not yet been implemented .
whenever support for another collected instrument is added to the system , its existing files are removed from the local subversion working copy on the server .
they will then be imported on the next update , as the  harvester script restores the files and converts them to csv format .
finally , all csv files are imported into redcap using the pycap library ( http://sburns.org/pycap/ ) , which provides a convenient wrapper for redcap 's api . as the n - canda study is longitudinal , with a baseline and up to four annual follow - up visits per subject
this means that a number of  events were defined , each with a specific subset from a list of data collection instruments .
a problem arises with the assignment of collected data to the correct event ( and subject ) , which requires not only the subject i d but also an event name ( eg ,  baseline , or  1-year follow - up ) . if an error was made entering either , then the record would be imported into the wrong subject and/or event in redcap .
unfortunately , redcap s web front - end does not allow for the selective moving of a single instrument from one subject or event to another .
in addition , most third - party software instruments do not allow the entry of an event , but only accept a subject i d .
thus , subject i d and collection date are two identifying fields that we are able to collect from all instruments .
to assign a record to the correct subject and event , we use a two - stage import procedure ( figure 2 ) .
, each record is identified by a unique , persistent identifier , which is the concatenation of subject i d and collection date as recorded on the laptop ( eg , a record of subject a-00001-f-0 collected on april 1 , 2013 would receive the persistent identifier 
this identifier can not be modified , even if i d and/or date are incorrect .
instead , two separate fields for i d and date are provided for corrections , and these are initialized with the recorded values .
illustration of the two - stage import procedure for data from n - canda data collection laptop or webcnp system into the longitudinal redcap project database .
n - canda , national consortium on alcohol and neurodevelopment in adolescence ; webcnp , web - based computerized neuropsychological testing .
these fields then determine the assignment of each record to the correct subject and event in the longitudinal redcap project , which is performed by a python script that periodically runs on the server .
it exports records from the staging project , assigns them to the correct subject and event ( based on a predefined time window for each event ) , and imports them into the final , longitudinal project .
the webcnp system ( https://webcnp.med.upenn.edu/ ) stores all test scores and does not require the asynchronous laptop data transmission procedure .
however , the webcnp does not provide an api to automate score retrieval , rather a csv file must be manually downloaded through the web interface .
we were able to automate this process by  driving a firefox web browser using the selenium plug - in ( http://seleniumhq.org/ ) and the 
the downloaded files are imported into a redcap staging project analogous to the one used for data from the collection laptops and then assigned to the correct subject and event .
we chose to use a separate staging redcap project for webcnp simply for convenience and conceptual separation .
our custom scripts for webcnp data retrieval and redcap import are available for download at https://www.nitrc.org/frs/?group_id=672 .
transmission of data from the collection laptops into a revision control system is the first innovation of our infrastructure , illustrated in figure 1 .
we use a networked subversion repository , but the benefits outlined below are not specific to subversion . any other modern , networked revision control system ( eg , git , mercurial ) would be equally suitable and would also provide the following advantages .
illustration of the laptop data transmission and import procedure using a networked subversion repository and the 
first , repeated upload of a file under the same name will create a sequence of revisions , but will not remove any existing contents .
together , these properties satisfy the design goals persistence and accountability , albeit the latter with some limitations in our current setup , where collected data can be traced to the originating laptop , but is not tied to a specific user account on that laptop .
second , subversion provides networked operation over a secure , encrypted link ( https ; via an apache web server , http://apache.org/ ) , error handling , and access control , without any custom software components .
the third advantage of using a revision control system is that the history of stored files can be 
played back step by step , from any chosen point in time , either globally or for selected files .
this feature allowed the n - canda data collection sites to begin transmitting data as soon as the collection laptops were in operation 
long before all databases and import scripts were deployed on the server ( see  results below ) .
multiple output files are created on the laptops for each subject by some of the applications used for clinical interviews and neuropsychology tests .
the output paths for all these applications are hard - coded , thus resulting in a large number of files distributed across each laptop 's file system on completion of each subject session .
custom perl scripts automate the collection , collation , and uploading of the output files and updated databases to the subversion repository .
this eliminates the possibility that research assistants will miss or accidentally overwrite files when preparing to submit data and simplifies the transmission process to the degree that simply clicking an 
on the n - canda server , a working copy is kept of the aforementioned subversion repository and periodically updated by a python script called 
harvester. any updated or newly added files are forwarded to format - specific scripts that convert them into standardized , comma - separated - value ( csv ) files .
these may be files for which database and import procedure have not yet been implemented . whenever support for another collected instrument is added to the system , its existing files are removed from the local subversion working copy on the server .
they will then be imported on the next update , as the  harvester script restores the files and converts them to csv format .
finally , all csv files are imported into redcap using the pycap library ( http://sburns.org/pycap/ ) , which provides a convenient wrapper for redcap 's api .
as the n - canda study is longitudinal , with a baseline and up to four annual follow - up visits per subject , we configured a longitudinal project in redcap to integrate all incoming data .
this means that a number of  events were defined , each with a specific subset from a list of data collection instruments .
a problem arises with the assignment of collected data to the correct event ( and subject ) , which requires not only the subject i d but also an event name ( eg ,  baseline , or 
if an error was made entering either , then the record would be imported into the wrong subject and/or event in redcap .
unfortunately , redcap s web front - end does not allow for the selective moving of a single instrument from one subject or event to another .
in addition , most third - party software instruments do not allow the entry of an event , but only accept a subject i d .
all instruments do , however , record the date of data collection . thus , subject i d and collection date are two identifying fields that we are able to collect from all instruments . to assign a record to the correct subject and event
, each record is identified by a unique , persistent identifier , which is the concatenation of subject i d and collection date as recorded on the laptop ( eg , a record of subject a-00001-f-0 collected on april 1 , 2013 would receive the persistent identifier 
this identifier can not be modified , even if i d and/or date are incorrect . instead , two separate fields for i d and date are provided for corrections , and these are initialized with the recorded values .
illustration of the two - stage import procedure for data from n - canda data collection laptop or webcnp system into the longitudinal redcap project database .
n - canda , national consortium on alcohol and neurodevelopment in adolescence ; webcnp , web - based computerized neuropsychological testing .
these fields then determine the assignment of each record to the correct subject and event in the longitudinal redcap project , which is performed by a python script that periodically runs on the server .
it exports records from the staging project , assigns them to the correct subject and event ( based on a predefined time window for each event ) , and imports them into the final , longitudinal project .
the webcnp system ( https://webcnp.med.upenn.edu/ ) stores all test scores and does not require the asynchronous laptop data transmission procedure .
however , the webcnp does not provide an api to automate score retrieval , rather a csv file must be manually downloaded through the web interface .
driving a firefox web browser using the selenium plug - in ( http://seleniumhq.org/ ) and the  selenium python package ( https://pypi.python.org/pypi/selenium ) .
the downloaded files are imported into a redcap staging project analogous to the one used for data from the collection laptops and then assigned to the correct subject and event .
we chose to use a separate staging redcap project for webcnp simply for convenience and conceptual separation .
our custom scripts for webcnp data retrieval and redcap import are available for download at https://www.nitrc.org/frs/?group_id=672 .
to illustrate the importance of the infrastructure described herein for the n - canda data collection , we show the timelines of collected records for several instruments in figure 3 .
for each instrument , the date when the database and import procedure were ready for that instrument is marked , as is the date when the protocol was finalized ( ie , when the final selection of instruments was made ) .
number of records collected over time after funding began ( september 15 , 2012 ) for different instruments of the n - canda protocol .
the protocol was finalized during a consortium meeting november 5 and 6 , 2012 ( day 51 ; marked by dotted line across graphs ) . in the graph for each instrument , an arrow marks the day when the first record was collected , and the dashed gray line marks the date when the redcap database and import procedure were ready for that instrument .
as figure 3 shows , revision - controlled data transfer has allowed n - canda to begin data collection very quickly , as soon as the collection laptops had been configured and deployed to the consortium sites .
this is further illustrated by table 2 , which shows the number of records collected for a selection of instruments by the time the database and import systems were ready for each . while work was ongoing ,
the n - canda data collection sites were able to collect at least 46 records (  delay discounting ) , and as many as 173 records (  youth report 1 ) .
instruments collected by the n - canda consortium ( partial list as reported in this article ) , showing date of first collected record , date when database and import were ready for each instrument , and number of records collected by the time database and import were ready 
day is the number of days after project funding was received ( september 15 , 2012 ) .
mts , match to sample ; n - canda , national consortium on alcohol and neurodevelopment in adolescence ; pasat , paced auditory serial - addition task ; ssaga , semi - structured assessment for the genetics of alcoholism .
we have implemented a data collection and management system for a multi - site , longitudinal neuroscience study of adolescent drinking .
the innovative use of a revision control system for data transmission enabled data collection within 3  months of funding , thus eliminating the need to wait until a data management system was fully in place . to accommodate the longitudinal study design
, we implemented an automated system , based on redcap and a number of custom python scripts , to collect data identified by subject i d and collection date and assign these data to the correct events .
third , a script - driven web browser allows us to automatically retrieve data from a third - party , web - based neuropsychological test system that does not offer an api for data downloads .
a potential weakness of our system is that collecting data prior to availability of the receiving infrastructure carries an increased risk of data loss or corruption due to the lack of immediate feedback .
thus , errors in collected data may go undetected for longer than they otherwise would .
we have found , however , that the benefits of acquiring data at all greatly outweigh the potential risks .
 the infrastructure for data collection implemented by the national consortium on alcohol and neurodevelopment in adolescence ( n - canda ) for data collection comprises several innovative features : ( a ) secure , asynchronous transfer and persistent storage of collected data via a revision control system ; ( b ) two - stage import into a longitudinal database ; and ( c ) use of a script - controlled web browser for data retrieval from a third - party , web - based neuropsychological test battery . 
 the asynchronous operation of data transmission and import is of particular benefit , as it has allowed the consortium sites to begin data collection before the receiving database infrastructure had been deployed . 
 records were collected within 86  days of funding , 35  days after finalizing the collected instruments . 
 final instruments were added to the database import 225  days after instrument selection , with up to 173 records already collected at that time . 
 thus , the concepts implemented in n - canda s data collection system helped reduce project start - up time by several months . 
Introduction
Materials and methods
Laptop data collection: client
Laptop data collection: server
Two-stage longitudinal data import
WebCNP data retrieval
Results
Discussion