<?php /** * Created by HCV-TARGET for HCV-TARGET. * User: kbergqui * Date: 10-26-2013 */ /** * debug */ $getdebug = $_GET['debug'] ? (bool) $_GET['debug'] : false; $debug = $getdebug ? true : false; $subjects = $_GET['id'] ? $_GET['id'] : ''; /** * 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 . '/ProjectGeneral/header.php'; /** * restricted use */ $allowed_pids = array('38'); REDCap::allowProjects($allowed_pids); Kint::enabled($debug); global $Proj, $project_id; /** * Proton pump inhibitor? */ set_ppi(null, null, $debug);
/** * XFSN_SUPPCM_ATCNAME * XFSN_SUPPCM_ATC2NAME */ $fields = array("xfsn_cmdecod", "xfsn_suppcm_atcname", "xfsn_suppcm_atc2name"); $data = REDCap::getData('array', $record, $fields, $redcap_event_name); foreach ($data as $subject_id => $subject) { foreach ($subject as $event_id => $event) { code_atc_xfsn($project_id, $subject_id, $event_id, $event['xfsn_cmdecod'], $event['xfsn_suppcm_atcname'], $event['xfsn_suppcm_atc2name'], $debug, $recode_atc); if ($debug) { error_log("DEBUG: Coded XFSN ATCs: subject={$subject_id}, event={$event_id} for CONMED {$event['xfsn_cmdecod']}"); } } } set_immunosuppressant($record, $redcap_event_name, $debug); set_ppi($record, $redcap_event_name, $debug); if ($debug) { $timer['main_end'] = microtime(true); error_log(benchmark_timing($timer)); } break; case 'ex_coding': $debug = false; $recode_llt = false; $recode_pt = true; $recode_soc = true; $recode_atc = false; $recode_cm = true; $tx_prefixes[] = 'eot'; /** * PREFIX_AEDECOD