示例#1
0
<?php 
$dbconnection = cohortdb_connect($cohort_db_server, $cohort_db_username, $cohort_db_password);
$db_selected = mysql_select_db($cohort_db_name, $dbconnection);
if (!$db_selected) {
    die('Can\'t use ' . $cohort_db_name . ' : ' . mysql_error());
}
//if ($_GET['code'] == "" || !is_numeric($_GET['code']))
//{ die('Πρέπει να δωσετε ένα σωστό Κωδικό Ασθενή!'); }
check_patient($_GET['code']);
$sql = "UPDATE hbv_antiiikes_treatments_dosages SET EndDate='" . join_date($_GET, 'EndDate1') . "'";
$sql .= " WHERE PatientCode='" . $_GET['code'] . "' AND StartDate='" . $_GET['start1'] . "'";
$sql .= " AND Medicine='" . $_GET['Medicine'] . "' AND link_id='" . $_GET['link_id'] . "'";
execute_query($sql);
//echo "<pre>$sql";
//echo mysql_error();
$sql = "INSERT INTO hbv_antiiikes_treatments_dosages VALUES('" . $_GET['code'] . "', '" . $_GET['Medicine'] . "', ";
if ($_GET['dosage1'] != "") {
    $sql .= "'" . replacecomma($_GET['dosage1']) . "', '" . $_GET['dosage1type'] . "', '" . $_GET['dosage2type'] . "', '";
} else {
    $sql .= "NULL, NULL, NULL, '";
}
$sql .= join_date($_GET, 'StartDate2') . "', '" . $_GET['end2'] . "', '" . $_GET['link_id'] . "')";
execute_query($sql);
//echo "<pre>$sql";
//echo mysql_error();
mysql_close($dbconnection);
perform_post_insert_actions("", "hbv_show_antiiikes_data.php?code=" . $_GET['code'], "");
?>
</BODY></HTML>
示例#2
0
        execute_query($sql);
        $j = 0;
        if ($_GET[$exams[$i]['Code'] . '_Unit'] == $exams[$i]['Unit1']) {
            $j = 1;
        }
        if ($_GET[$exams[$i]['Code'] . '_Unit'] == $exams[$i]['Unit2']) {
            $j = 2;
        }
        if ($_GET[$exams[$i]['Code'] . '_Unit'] == $exams[$i]['Unit3']) {
            $j = 3;
        }
        if ($_GET[$exams[$i]['Code'] . '_Unit'] == $exams[$i]['Unit4']) {
            $j = 4;
        }
        if ($_GET[$exams[$i]['Code'] . '_Unit'] == $exams[$i]['Unit5']) {
            $j = 5;
        }
        if (replacecomma($_GET[$exams[$i]['Code'] . '_Lower']) != $exams[$i]['Lower' . $j] || replacecomma($_GET[$exams[$i]['Code'] . '_Upper']) != $exams[$i]['Upper' . $j]) {
            //			echo "<BR>".$_GET[$exams[$i]['Code'].'_Lower']." != ".$exams[$i]['Lower']."<BR>".$_GET[$exams[$i]['Code'].'_Upper']." != ".$exams[$i]['Upper']."<BR>";
            $sql = "UPDATE `other_exams_list` SET Lower" . $j . "='" . replacecomma($_GET[$exams[$i]['Code'] . '_Lower']) . "', Upper" . $j . "='" . replacecomma($_GET[$exams[$i]['Code'] . '_Upper']) . "' WHERE Code='" . $exams[$i]['Code'] . "'";
            //			echo "<BR>$sql<BR>";
            execute_query($sql);
            //			echo mysql_error();
        }
    }
}
mysql_close($dbconnection);
perform_post_insert_actions("exams_other", "other_exams.php?code=" . $_GET['PatientCode'], "");
?>
</BODY></HTML>
示例#3
0
?>

<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>

<?php 
$dbconnection = cohortdb_connect($cohort_db_server, $cohort_db_username, $cohort_db_password);
$db_selected = mysql_select_db($cohort_db_name, $dbconnection);
if (!$db_selected) {
    die('Can\'t use ' . $cohort_db_name . ' : ' . mysql_error());
}
//validate_data("exams_iologikes", $_GET);
$data_array2 = $_GET;
$names = array_keys($data_array2);
$data_array2['Value'] = replacecomma($data_array2['Value']);
if ($_GET['Result'] == "-1") {
    $data_array2['Operator'] = $_GET['Operator1'];
} else {
    $data_array2['Operator'] = $_GET['Operator2'];
}
$sql = "";
$sql = "INSERT INTO `hcv_iologikes` ( `PatientCode` , `ExamDate` , `Result` , `Value` , `Units`, `Operator`, `Method`)";
$sql .= " VALUES ( '" . $_GET['PatientCode'] . "', '" . join_date($data_array2, 'ExamDate') . "', '" . $data_array2['Result'] . "', ";
//if (is_numeric($data_array2['Value']))
//{
$sql .= "'" . $data_array2['Value'] . "', '" . $data_array2['Units'] . "', '" . $data_array2['Operator'] . "', ";
//}
//else
//{
//	$sql .= "NULL, NULL, NULL, ";
示例#4
0
    echo "<br><br><br><br><br><br>";
    echo "<div class='img-shadow'>";
    show_errormsg("");
    echo "</div>";
}
mysql_free_result($result);
// INSERT Medicines in table antiiikes_treatments and antiiikes_treatments_dosages
$sql = "";
for ($i = 0; $i < count($meds); $i++) {
    $sql = "INSERT INTO hcv_antiiikes_treatments VALUES('" . $_GET['PatientCode'] . "', '" . $meds[$i]['id'] . "', '" . join_date($_GET, 'StartDate') . "', '" . $enddate . "', '" . $link_id . "')";
    echo $sql . "<BR>";
    $what_happened = execute_query($sql);
    if ($_GET['dosage1' . $meds[$i]['id']] == '') {
        $sql = "INSERT INTO hcv_antiiikes_treatments_dosages VALUES('" . $_GET['PatientCode'] . "', '" . $meds[$i]['name'] . "', NULL, NULL, '0', '" . join_date($_GET, 'StartDate') . "', '" . $enddate . "', '" . $link_id . "')";
    } else {
        $sql = "INSERT INTO hcv_antiiikes_treatments_dosages VALUES('" . $_GET['PatientCode'] . "', '" . $meds[$i]['name'] . "', '" . replacecomma($_GET['dosage1' . $meds[$i]['id']]) . "', '" . $_GET['dosage1type' . $meds[$i]['id']] . "', '" . $_GET['dosage2type' . $meds[$i]['id']] . "', '" . join_date($_GET, 'StartDate') . "', '" . $enddate . "', '" . $link_id . "')";
    }
    echo $sql . "<BR>";
    $what_happened = execute_query($sql);
    $link_id++;
}
// INSERT Medicine Schemas
$today = getdate();
$now_days = round(strtotime("now") / 86400);
$th_days = round(strtotime($enddate) / 86400);
if ($now_days < $th_days + 28) {
    $_GET['Bioximiki_polu_prwimi'] = '-1';
    $_GET['Iologiki_polu_prwimi'] = '-1';
}
if ($now_days < $th_days + 84) {
    $_GET['Bioximiki_prwimi'] = '-1';
示例#5
0
PrintMenu();
?>

<P>&nbsp;</P>
<P>&nbsp;</P>

<?php 
$dbconnection = cohortdb_connect($cohort_db_server, $cohort_db_username, $cohort_db_password);
$db_selected = mysql_select_db($cohort_db_name, $dbconnection);
if (!$db_selected) {
    die('Can\'t use ' . $cohort_db_name . ' : ' . mysql_error());
}
//if ($_GET['code'] == "" || !is_numeric($_GET['code']))
//{ die('Πρέπει να δωσετε ένα σωστό Κωδικό Ασθενή!'); }
check_patient($_GET['code']);
$sql = "UPDATE hbv_antiiikes_treatments_dosages SET ";
if ($_GET['dosage1'] != "") {
    $sql .= "Dosage1='" . replacecomma($_GET['dosage1']) . "', Dosage1Type='" . $_GET['dosage1type'] . "', Dosage2Type='" . $_GET['dosage2type'] . "' ";
} else {
    $sql .= "Dosage1=NULL, Dosage1Type=NULL, Dosage2Type=NULL ";
}
$sql .= " WHERE PatientCode='" . $_GET['code'] . "' AND StartDate='" . $_GET['start'] . "' AND EndDate='" . $_GET['end'] . "'";
$sql .= " AND Medicine='" . $_GET['Medicine'] . "' AND link_id='" . $_GET['link_id'] . "'";
execute_query($sql);
//echo "<pre>$sql";
//echo mysql_error();
mysql_close($dbconnection);
perform_post_insert_actions("", "hbv_show_antiiikes_data.php?code=" . $_GET['code'], "");
?>
</BODY></HTML>
示例#6
0
        execute_query($sql);
        $j = 0;
        if ($_GET[$exams[$i]['Code'] . '_Unit'] == $exams[$i]['Unit1']) {
            $j = 1;
        }
        if ($_GET[$exams[$i]['Code'] . '_Unit'] == $exams[$i]['Unit2']) {
            $j = 2;
        }
        if ($_GET[$exams[$i]['Code'] . '_Unit'] == $exams[$i]['Unit3']) {
            $j = 3;
        }
        if ($_GET[$exams[$i]['Code'] . '_Unit'] == $exams[$i]['Unit4']) {
            $j = 4;
        }
        if ($_GET[$exams[$i]['Code'] . '_Unit'] == $exams[$i]['Unit5']) {
            $j = 5;
        }
        if (replacecomma($_GET[$exams[$i]['Code'] . '_Lower']) != $exams[$i]['Lower' . $j] || replacecomma($_GET[$exams[$i]['Code'] . '_Upper']) != $exams[$i]['Upper' . $j]) {
            //			echo "<BR>".$_GET[$exams[$i]['Code'].'_Lower']." != ".$exams[$i]['Lower']."<BR>".$_GET[$exams[$i]['Code'].'_Upper']." != ".$exams[$i]['Upper']."<BR>";
            $sql = "UPDATE `laboratory_codes` SET Lower" . $j . "='" . replacecomma($_GET[$exams[$i]['Code'] . '_Lower']) . "', Upper" . $j . "='" . replacecomma($_GET[$exams[$i]['Code'] . '_Upper']) . "' WHERE Code='" . $exams[$i]['Code'] . "'";
            //			echo "<BR>$sql<BR>";
            execute_query($sql);
            //			echo mysql_error();
        }
    }
}
mysql_close($dbconnection);
perform_post_insert_actions("exams_bioximikes", "bioximikes.php?code=" . $_GET['PatientCode'], "");
?>
</BODY></HTML>
示例#7
0
*/
$dbconnection = cohortdb_connect($cohort_db_server, $cohort_db_username, $cohort_db_password);
$db_selected = mysql_select_db($cohort_db_name, $dbconnection);
if (!$db_selected) {
    die('Can\'t use ' . $cohort_db_name . ' : ' . mysql_error());
}
//validate_data("exams_anosologikes", $_GET);
check_patient($_GET['PatientCode']);
$data_array2 = prepare_data("exams_anosologikes", $_GET);
$names = array_keys($data_array2);
$sql = "";
for ($k = 0; $k < $_GET['exams']; $k++) {
    $sql = "INSERT INTO `exams_anosologikes` ( `PatientCode` , `ExamDate` , `AbsoluteLemf` , `AbsoluteCD4` , `PercentCD4` , `AbsoluteCD8` , `PercentCD8`)";
    $sql .= " VALUES ('" . $data_array2['PatientCode'] . "', '" . $data_array2['ExamDate' . $k] . "', ";
    $sql .= "'" . replacecomma($data_array2['AbsoluteLemf' . $k]) . "', '" . replacecomma($data_array2['AbsoluteCD4' . $k]) . "', '" . replacecomma($data_array2['PercentCD4' . $k]);
    $sql .= "', '" . replacecomma($data_array2['AbsoluteCD8' . $k]) . "', '" . replacecomma($data_array2['PercentCD8' . $k]) . "');";
    //echo $sql;
    $sql = replace2null($sql);
    $what_happened = execute_query($sql);
    echo mysql_error();
    /*
    if ($what_happened == 1)
        {
            echo "<P>Τα δεδομένα καταχωρήθηκαν με επιτυχία!</P>";
        }
    else
        {
            echo "<P>$what_happened</P>";
        }*/
}
/*
示例#8
0
 error_reporting(E_ALL ^ E_NOTICE);
 echo "<table border='0'>";
 echo "<tr><th class=result>a/a</th>";
 for ($j = 1; $j <= $columns; $j++) {
     echo "<th class=result>" . $data->sheets[0]['cells'][1][$j] . "</th>";
 }
 echo "<th class=result>Error</th><th class=result>SQL</th></tr>";
 for ($i = 2; $i <= $data->sheets[0]['numRows']; $i++) {
     echo "<tr><td class=result>" . $i . "</td>";
     $sql = "INSERT INTO `" . $_REQUEST['table'] . "` VALUES (";
     for ($j = 1; $j <= $columns; $j++) {
         echo "<td class=result>" . $data->sheets[0]['cells'][$i][$j] . "</td>";
         if ($data->sheets[0]['cells'][$i][$j] == "NULL") {
             $sql .= "NULL, ";
         } else {
             $sql .= "'" . replacecomma($data->sheets[0]['cells'][$i][$j]) . "', ";
         }
     }
     $sql = substr($sql, 0, strlen($sql) - 2);
     $sql .= ");";
     if (is_numeric($data->sheets[0]['cells'][$i][1])) {
         execute_query($sql);
         echo "<td class=result>" . mysql_error() . "</td>";
         echo "<td class=result>" . $sql . "</td>";
     } else {
         echo "<td class=result></td>";
         echo "<td class=result></td>";
     }
     echo "</tr>\n";
 }
 echo "</table>";
示例#9
0
<P>&nbsp;</P>

<?php 
$dbconnection = cohortdb_connect($cohort_db_server, $cohort_db_username, $cohort_db_password);
$db_selected = mysql_select_db($cohort_db_name, $dbconnection);
if (!$db_selected) {
    die('Can\'t use ' . $cohort_db_name . ' : ' . mysql_error());
}
check_patient($_GET['PatientCode']);
$data_array2 = prepare_data("exams_aimatologikes", $_GET);
$names = array_keys($data_array2);
$sql = "";
for ($k = 0; $k < $_GET['exams']; $k++) {
    $sql = "INSERT INTO `exams_aimatologikes` ( `PatientCode` , `ExamDate` , `Leuka` , `Aimosfairini` , `Aimopetalia` , `Aimatokritis`)";
    $sql .= " VALUES ('" . $data_array2['PatientCode'] . "', '" . $data_array2['ExamDate' . $k];
    $sql .= "', '" . replacecomma($data_array2['Leuka' . $k]) . "', '" . replacecomma($data_array2['Aimosfairini' . $k]) . "', '" . replacecomma($data_array2['Aimopetalia' . $k]) . "', '" . replacecomma($data_array2['Aimatokritis' . $k]);
    $sql .= "');";
    //echo $sql;
    $sql = replace2null($sql);
    $what_happened = execute_query($sql);
    if ($what_happened == 1) {
        //        echo "<P>Τα δεδομένα καταχωρήθηκαν με επιτυχία!</P>";
    } else {
        //        echo "<P>$what_happened</P>";
    }
}
//form_data2table($_GET);
mysql_close($dbconnection);
perform_post_insert_actions("aimatologikes", "aimatologikes.php?code=" . $_GET['PatientCode'], "");
?>