Exemplo n.º 1
0
$allowed_pid = '26';
REDCap::allowProjects($allowed_pid);
Kint::enabled($enable_kint);
/**
 * project metadata
 */
global $Proj;
$baseline_event_id = $Proj->firstEventId;
$plugin_title = "Derive values";
/**
 * plugin title
 */
echo "<h3>$plugin_title</h3>";

$timer['set tx data'] = microtime(true);
set_tx_data($subjects, $debug);
$timer['set bmi'] = microtime(true);
set_bmi($subjects, $debug);
$timer['set cbc'] = microtime(true);
set_cbc_flags($subjects, $debug);
$timer['set cirrhosis'] = microtime(true);
set_cirrhosis($subjects, $debug);
$timer['set crcl'] = microtime(true);
set_crcl($subjects, null, 'both', $debug);
$timer['set trt exp'] = microtime(true);
set_treatment_exp($subjects, $debug);
$timer['set egfr'] = microtime(true);
set_egfr($subjects, null, 'both', $debug);
/**
 * timing
 */
 case 'telaprevir_administration':
 case 'boceprevir_administration':
 case 'simeprevir_administration':
 case 'sofosbuvir_administration':
 case 'daclatasvir_administration':
 case 'harvoni_administration':
 case 'ombitasvir_paritaprevir':
 case 'dasabuvir':
     $debug = false;
     $recode_llt = true;
     $recode_pt = true;
     $recode_soc = true;
     /**
      * set start and stop variables
      */
     set_tx_data($record, $debug);
     $tx_prefix = array_search(substr($instrument, 0, strpos($instrument, '_')), $tx_fragment_labels);
     /**
      * AE_AEMODIFY
      */
     $fields = array($tx_prefix . '_suppcm_cmncmpae', $tx_prefix . '_oth_suppcm_cmncmpae', $tx_prefix . '_aemodify');
     $data = REDCap::getData('array', $record, $fields, $redcap_event_name);
     foreach ($data as $subject_id => $subject) {
         foreach ($subject as $event_id => $event) {
             code_llt($project_id, $subject_id, $event_id, fix_case($event[$tx_prefix . '_suppcm_cmncmpae']), fix_case($event[$tx_prefix . '_oth_suppcm_cmncmpae']), $event[$tx_prefix . '_aemodify'], $tx_prefix . '_aemodify', $debug, $recode_llt);
             if ($debug) {
                 error_log("DEBUG: Coded AE_AEMODIFY {$event[$tx_prefix . '_aemodify']}: subject={$subject_id}, event={$event_id} for AE {$event[$tx_prefix . '_suppcm_cmncmpae']} - {$event[$tx_prefix . '_oth_suppcm_cmncmpae']}");
             }
         }
     }
     /**