1 PHPCap and Software patterns for the College Toolbox Project Andy Arenson Advanced Biomedical IT Core Indiana University November 13, 2015
2 College Toolbox Project Indiana University has been selected by Glenn Close and her non- profit organization, U Bring Change 2 Mind, to be the national site to create a 'toolbox' of activities and events, designed by students for students to end the stigma that people with mental illness often face, and to make college campuses safer and more welcoming places. At the end of the 4-year project, U Bring Change 2 Mind will package and market the final toolbox to colleges and universities free of charge. 7,000 freshman at IU Bloomington invited to participate: – Initial survey, Swag pickup, Events, Follow-up surveys
3 Challenge: Can’t store identifiers in same database as survey results Solution : Use separate project to store identifiers NOTE: No need to use another database management system
4 Challenge: Only freshman students at IU Bloomington may take survey Solution : Use Launcher to authenticate respondents
5 Challenge: Only students who complete survey may pick up swag Solution : Use Card Reader to read student IDs
6 Combined Workflow
7 Pattern: REDCap project as data store component
8 Pattern: REDCap project as survey component
9 PHPCap: Architecture
10 PHPCap: Architecture PHPCap – Easier methods for common API tasks – Sends if errors are found trying to use the API Connection – Common library for multiple programs working together – Translates business logic into Database persistence Object/Relational mapping Applications know about Surveys and Users Connection class knows about REDCap projects.
11 PHPCap: Methods Export – get_records_all – get_ids_all – get_partials_all – get_records_by_ids – get_partials_by_ids – get_records_by_fields – get_ids_by_fields – get_partials_by_fields Import – import_records Advanced Authentication – check_advanced_link_auth Handling DETs – check_allowed_servers – check_det_id
12 PHPCap: Examples A simple command line program – The Connection class, which uses PHPCap – nection.php nection.php Using REDCap’s advanced authentication – auth.php auth.php