Source code for the SPAN study database system