Skip to content

Timeline-followback application developed for the Center for Addiction Medicine. Integrates with REDCap.

License

Notifications You must be signed in to change notification settings

MichaelPascale/tlfb

Repository files navigation

Multisubstance Online Timeline Follow-Back

The timeline follow-back is a method for retrospectively ascertaining recent alcohol and other drug use patterns developed by Linda C. and Mark B. Sobell. This web-based timeline form was developed for the MGH Center for Addiction Medicine and is designed for use with REDCap databases in clinical research.

A major revision in Typescript was completed in 2024 by Ivy Zhu. The original application was developed by Michael Pascale.

TLFB Application Screenshot

Prerequisites

Download and copy the following libraries to the static/ directory.

You'll also need to install Node.js which provides npm (Node Package Manager). You'll need this to install TypeScript and Webpack.

On MacOS, the easist way to install Node is with brew (Homebrew). Alternatively, you can use nvm (Node Version Manager).

brew install node@18

Using npm, we can now automatically install all the packages listed in package.json.

npm install

Running the App

The application consists of what you see in index.html and the TypeScript under src/.

We won't be using the TypeScript compiler tsc directly. Instead, Webpack will compile and then bundle all of our code into a single JavaScript file under static/tlfb-v3-bundle.js.

For development purposes

webpack-dev-server provides hot reload each time you save a TypeScript file. See the head of index.html to correct the path, then run webpack.

npx webpack serve

This will start the development server, and you should be able to open the webpage by going tolocalhost:8080 in your web browser.

To bundle for production

See the head of index.html to correct the script paths, then run webpack.

npx webpack

This will create the final bundle under static/tlfb-v3-bundle.js.

Simply copy index.html and the static/ directory onto your production webserver.

Credits

Sobell L.C., Sobell M.B. (1992) Timeline Follow-Back.

Adapted from the timeline follow-back application developed for the Adolescent Brain Cognitive Development study.

Made possible with FullCalendar, Bulma, TypeScript and Webpack.

References

Lisdahl, K. M., Sher, K. J., Conway, K. P., Gonzalez, R., Feldstein Ewing, S. W., Nixon, S. J., Tapert, S., Bartsch, H., Goldstein, R. Z., & Heitzeg, M. (2018). Adolescent brain cognitive development (ABCD) study: Overview of substance use assessment methods. Developmental Cognitive Neuroscience, 32, 80–96. https://doi.org/10.1016/j.dcn.2018.02.007

Nova Southeastern University. (n.d.). Timeline Followback Forms and Related Materials. NSU Guided Self-Change. Retrieved August 9, 2021, from https://www.nova.edu/gsc/forms/timeline-followback-forms.html

Robinson, S. M., Sobell, L. C., Sobell, M. B., & Leo, G. I. (2014). Reliability of the Timeline Followback for cocaine, cannabis, and cigarette use. Psychology of Addictive Behaviors, 28(1), 154–162. https://doi.org/10.1037/a0030992

Sobell, L. C., Brown, J., Leo, G. I., & Sobell, M. B. (1996). The reliability of the Alcohol Timeline Followback when administered by telephone and by computer. Drug and Alcohol Dependence, 42(1), 49–54. https://doi.org/10.1016/0376-8716(96)01263-X

Sobell, L. C., & Sobell, M. B. (1992). Timeline Follow-Back. In R. Z. Litten & J. P. Allen (Eds.), Measuring Alcohol Consumption: Psychosocial and Biochemical Methods (pp. 41–72). Humana Press. https://doi.org/10.1007/978-1-4612-0357-5_3


Source code is copyright (c) 2024, Ivy Zhu and Michael Pascale and distributed under the MIT License.