$base_path = dirname(dirname(dirname(dirname(__FILE__)))); require_once $base_path . "/redcap_connect.php"; require_once $base_path . '/plugins/includes/functions.php'; require_once $base_path . '/plugins/includes/timeline_functions.php'; require_once APP_PATH_DOCROOT . '/Config/init_project.php'; /** * variables */ $subjid = $_GET['record']; $project_id = !isset($project_id) ? $_GET['pid'] : $project_id; $eventAtts = array(); /** * restrict access to one or more pids */ $allowed_pids = array('26'); REDCap::allowProjects($allowed_pids); /** * set header so browser knows it's JSON */ header('Content-Type: application/json; charset=utf-8'); /** * adverse events */ $fields = array('ae_aestdtc', 'ae_aeterm', 'ae_oth_aeterm', 'ae_aetoxgr', 'ae_aesev', 'trans_cmoccur', 'ae_aecontrt', 'ae_suppae_aexacerb', 'ae_aeser', 'ae_aesdth', 'ae_aeslife', 'ae_aeshosp', 'ae_aesdisab', 'ae_aescong', 'ae_aesmie', 'ae_suppae_aesosp', 'ae_aerel', 'ae_suppae_aeregmod', 'ifn_suppae_ifnacnd', 'rib_suppae_ribacnd', 'daa_suppae_daaacnd', 'ae_aeout', 'ae_aeendtc'); $ae_data = REDCap::getData('array', $subjid, $fields); foreach ($ae_data AS $subject) { foreach ($subject AS $event_id => $event) { $desc_array = array(); if ($event['ae_aeser'] == 'Y') { $color = 'red'; } else {
$debug = false; $subjects = ''; // '' = ALL $timer = array(); $timer['start'] = microtime(true); /** * includes */ $base_path = dirname(dirname(dirname(__FILE__))); require_once $base_path . "/redcap_connect.php"; require_once $base_path . '/plugins/includes/functions.php'; require_once APP_PATH_DOCROOT . '/Config/init_project.php'; require_once APP_PATH_DOCROOT . '/ProjectGeneral/header.php'; /** * restrict use of this plugin to the STEADFAST Labs project */ REDCap::allowProjects('26'); /** * instantiate system-level variables */ global $Proj; $first_event = $Proj->firstEventId; $site_array = array(); $stream_array = array(); $dm_usubjid_array = array(); /** * if we have a numeric file id in the query string... */ if (isset($_GET['id']) && is_numeric($_GET['id'])) { /** * cast it to an int so we can use it to retrieve the file from the repository */