Exemplo n.º 1
0
        $specimen_main_field_map[$i] = 0;
    }
}
# Test main fields
$test_main_field_count = 9;
$test_main_field_map = array();
for ($i = 0; $i < $test_main_field_count; $i++) {
    if (isset($_REQUEST['t_field_' . $i])) {
        $test_main_field_map[$i] = 1;
    } else {
        $test_main_field_map[$i] = 0;
    }
}
$test_main_field_map[9] = $ClinicalData;
# Custom fields (patients and specimens)
$patient_custom_field_map = array();
$specimen_custom_field_map = array();
foreach ($_REQUEST as $key => $value) {
    if (strpos($key, "p_custom_") !== false) {
        $key_parts = explode("_", $key);
        $patient_custom_field_map[] = $key_parts[2];
    } else {
        if (strpos($key, "s_custom_") !== false) {
            $key_parts = explode("_", $key);
            $specimen_custom_field_map[] = $key_parts[2];
        }
    }
}
# Update DB with this entry
ReportConfig::updateToDb($report_config, $margin_csv, $patient_main_field_map, $specimen_main_field_map, $test_main_field_map, $patient_custom_field_map, $specimen_custom_field_map);
echo "true";