示例#1
0
 public function loadFromDet()
 {
     // Get parameters from REDCap DET Post
     $this->project_id = voefr('project_id');
     $this->instrument = voefr('instrument');
     $this->record = voefr('record');
     $this->redcap_event_name = voefr('redcap_event_name');
     if (REDCap::isLongitudinal()) {
         $events = REDCap::getEventNames(true, false);
         $this->event_id = array_search($this->redcap_event_name, $events);
     }
     $this->redcap_data_access_group = voefr('redcap_data_access_group');
     $this->instrument_complete = voefr($instrument . '_complete');
     self::loadEncodedConfig(voefr('an'));
     //error_log('Loaded from DET: '.print_r($this,true));
 }
示例#2
0
$randomized_groups = array(
	array('name'=>'A', 'event'=>'baseline_arm_2'),
	array('name'=>'B', 'event'=>'baseline_arm_3'),
	array('name'=>'C', 'event'=>'baseline_arm_4')
);


logIt('----------- Starting -------------', 'DEBUG');

// Obtain details from DET post (this is what is passed from REDCap)
$project_id = voefr('project_id');
$instrument = voefr('instrument');
$record = voefr('record');
$redcap_event_name = voefr('redcap_event_name');
$redcap_data_access_group = voefr('redcap_data_access_group');
$instrument_complete = voefr($instrument . "_complete");
if (!$record) {
	logIt('No record id parsed.');
	exit;
}

// Only fire if the screening arm/form triggered the DET
if ($redcap_event_name != $screening_event || $instrument != $screening_form) {
	logIt("Skipping det - $instrument / $redcap_event_name is not $screening_form / $screening_event","DEBUG");
	exit;
}

// Get current randomization status
$randomized = queryAPI(array(
	'content'=>'record',
	'records'=>$record,