Exemplo n.º 1
0
	else
	{
		$sql .= "NULL, ";
	}
	$sql .= "`NewClinic`=";
	if ($_GET['Lost2FollowUp'] == 3)
	{
		$sql .= "'".$_GET['NewClinic']."', ";	
	}
	else
	{
		$sql .= "NULL, ";
	}	
	$sql .= "`Notes`='".$_GET['Notes_lost']."', ";
	$sql .= "DeathDate=NULL, Immediate=NULL, Contributing1=NULL, Contributing2=NULL, Contributing3=NULL, Contributing4=NULL, Underlying=NULL ";
	$sql .= " WHERE `PatientCode`='".$_GET['PatientCode']."'";
//	echo $sql;
	execute_query($sql);
	echo mysql_error();	
}
*/
?>

<?php 
echo mysql_error();
mysql_close($dbconnection);
perform_post_insert_actions("last_state", "last_state.php?code=" . $_GET['PatientCode'], "");
?>

</BODY></HTML>
Exemplo n.º 2
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>
Exemplo n.º 3
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>
Exemplo n.º 4
0
            $sql .= " WHERE PatientCode=" . $_GET['code'] . " AND NososSyndrom=" . $_GET['del_syndr_id_' . $i];
            $sql .= " AND NososSyndromDate='" . $_GET['del_syndr_date_' . $i] . "';";
            echo "<BR>" . $sql . "<BR><BR>";
            $what_happened = execute_query($sql);
            /*					if ($what_happened == 1)
                				{
                    				echo "<P>Τα δεδομένα καταχωρήθηκαν με επιτυχία!</P>";
            	    			}
            					else
                				{
                    				echo "<P>".mysql_error()."$what_happened</P>";
            	    			}
            */
        }
    }
}
mysql_close($dbconnection);
perform_post_insert_actions("aids_clinical_status", "clinical_status.php?code=" . $_GET['code'], "");
?>
<!--
<p><a href='clinical_status.php?code=<?php 
echo $_GET['code'];
?>
'>Κάντε click εδώ για επιστροφή</a></p>
<p><a href='atomic.php?code=<?php 
echo $_GET['code'];
?>
'>Κάντε click εδώ για να καταχωρήσετε το ατομικό αναμνηστικό</a></p>

</BODY></HTML> -->
Exemplo n.º 5
0
if (!$db_selected) {
    die('Can\'t use ' . $cohort_db_name . ' : ' . mysql_error());
}
check_patient($_GET['PatientCode']);
//print_r($_GET);
//print_r($data_array2);
if ($_GET['EndDate_year'] == "") {
    $enddate = "0000-00-00";
} else {
    $enddate = join_date($_GET, 'EndDate');
}
$sql = "";
$sql = "INSERT INTO `iris` ( `PatientCode` , `StartDate` , `EndDate` , `What` , `Type` , `Antimetopisi`)";
$sql .= " VALUES ('" . $_GET['PatientCode'] . "', '" . join_date($_GET, 'StartDate');
$sql .= "', '" . $enddate . "', '" . $_GET['What'] . "', '" . $_GET['Type'] . "', '" . $_GET['Antimetopisi'];
$sql .= "');";
echo $sql;
$what_happened = execute_query($sql);
if ($what_happened == 1) {
    echo "<P>Τα δεδομένα καταχωρήθηκαν με επιτυχία!</P>";
} else {
    echo "<P>{$what_happened}</P>";
}
echo mysql_error();
//form_data2table($_GET);
mysql_close($dbconnection);
perform_post_insert_actions("iris", "iris.php?code=" . $_GET['PatientCode'], "");
?>

</BODY></HTML>
Exemplo n.º 6
0
} 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, ";
//}
$sql .= " '" . $data_array2['Method'] . "')";
$sql = replace2null($sql);
//echo $sql;
$what_happened = execute_query($sql);
if ($what_happened == 1) {
    //        echo "<P>Τα δεδομένα καταχωρήθηκαν με επιτυχία!</P>";
} else {
    //        echo "<P>$what_happened</P>".mysql_error();
}
//form_data2table($_GET);
mysql_close($dbconnection);
perform_post_insert_actions("hcv_iologikes", "hcv_iolog_observe.php?code=" . $_GET['PatientCode'], "");
//echo "<p><a href='iologikes.php?code=".$_GET['PatientCode']."'>Καντε click εδώ για να καταχωρήσετε κι άλλη εξέταση</a></p>";
?>

</BODY></HTML>
Exemplo n.º 7
0
} else {
    $sql .= " Heroin='-1',  Hash='-1',  Cocaine='-1', ";
    $sql .= " OtherDrugName='',  OtherDrugValue='-1', ";
}
if ($lipoatrofia != 0 && join_date($_GET, 'DateOfVisit') > $lipoatrofia) {
    $sql .= " Lipoatrofia='" . $_GET['Lipoatrofia'] . "', ";
} else {
    $sql .= " Lipoatrofia=NULL, ";
}
if ($enapothesi != 0 && join_date($_GET, 'DateOfVisit') > $enapothesi) {
    $sql .= " Enapothesi='" . $_GET['Enapothesi'] . "', ";
} else {
    $sql .= " Enapothesi=NULL, ";
}
$sql .= " PressureSystolic='" . $_GET['sad'] . "',  PressureDiastolic='" . $_GET['dap'] . "' ";
$sql .= " WHERE PatientCode='" . $_GET['PatientCode'] . "' AND Clinic='" . $_GET['clinicid'] . "' AND DateofVisit='" . $_GET['visitdate'] . "';";
//    echo $sql;
//echo "<BR><BR>";
$what_happened = execute_query($sql);
if ($what_happened == 1) {
    //        echo "<P>Τα δεδομένα καταχωρήθηκαν με επιτυχία!</P>";
    //       echo "<P><a href='clinical_status.php?code=".$data_array2['PatientCode']."'>Κάντε click εδώ για να εισάγετε την κλινική κατάσταση του ασθενή</a></P>";
} else {
    echo mysql_error();
}
mysql_close($dbconnection);
perform_post_insert_actions("clinic_visits", "main.php?code=" . $_GET['PatientCode'], "");
?>

</BODY></HTML>
Exemplo n.º 8
0
        $meds = substr($meds, 0, strlen($meds) - 3);
        $sql = "";
        $sql = "INSERT INTO `prophylactic_therapies` ";
        $sql .= " VALUES ('" . $_GET['code'] . "', '" . $new_therapies[$i]['therapy'] . "', '" . $new_therapies[$i]['type'] . "', '" . $new_therapies[$i]['start'];
        $sql .= "', '" . $new_therapies[$i]['end'] . "', '" . $new_therapies[$i]['reason'] . "', '" . $meds . "', '" . $new_therapies[$i]['note'] . "');";
        echo $sql;
        execute_query($sql);
    }
}
/*
		$sql = "";
		$sql = "INSERT INTO `prophylactic_therapies` ( `PatientCode` , `Therapy` , `Type` , `StartDate` , `EndDate` , `Reason`)";
		$sql .= " VALUES ('".$data_array2['PatientCode']."', '".$data_array2['Therapy'.$k]."', '".$data_array2['Type'.$k]."', '".$data_array2['StartDate'.$k];
		$sql .="', '".$data_array2['EndDate'.$k]."', '".$data_array2['Reason'.$k]."');";
		echo $sql;
		$what_happened = execute_query($sql);
		if ($what_happened == 1)
    	{
        	echo "<P>Τα δεδομένα καταχωρήθηκαν με επιτυχία!</P>";
	    }
		else
    	{
        	echo "<P>$what_happened</P>";
    	}
*/
mysql_close($dbconnection);
perform_post_insert_actions("prophylactic_therapies", "prophylactic.php?code=" . $_GET['code'], "");
?>

</BODY></HTML>
Exemplo n.º 9
0
    if ($_GET['GP120_' . $i . '_1'] != "") {
        execute_query($sql);
    }
}
// INSERT Medicine Resistance
for ($i = 0; $i < count($atccodes); $i++) {
    if ($_GET['Score_' . $atccodes[$i]] != "-") {
        $score = $_GET['Score_' . $atccodes[$i]];
        if (isset($_GET['Boosting_' . $atccodes[$i]]) && $_GET['Boosting_' . $atccodes[$i]] == "on") {
            $boosting = '1';
        } else {
            $boosting = '0';
        }
        $sql = "INSERT INTO `hiv_resistance_meds` VALUES('" . $_GET['PatientCode'] . "', '" . $_GET['SampleID'] . "', ";
        $sql .= "'" . join_date($_GET, 'SeqDate') . "', '" . $atccodes[$i] . "', '" . $boosting . "', '" . $_GET['Score_' . $atccodes[$i]] . "')";
        execute_query($sql);
    }
}
// INSERT Extra Data
$sql = "INSERT INTO `hiv_resistance` VALUES('" . $_GET['PatientCode'] . "', '" . $_GET['SampleID'] . "', ";
$sql .= "'" . join_date($_GET, 'SampleDate') . "', '" . join_date($_GET, 'SeqDate') . "', '" . $_GET['Lab'] . "', '" . $_GET['Algorithm'] . "',  ";
$sql .= "'" . $_GET['TestType'] . "')";
//echo $sql;
$what_happened = execute_query($sql);
echo mysql_error();
mysql_close($dbconnection);
perform_post_insert_actions("hiv_subtype", "hiv_resistance.php?code=" . $_GET['PatientCode'], "");
?>

</BODY></HTML>
Exemplo n.º 10
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>
Exemplo n.º 11
0
        $sql .= "'" . $_POST['Note' . $i] . "');";
        //	echo $sql."<BR>";
        $what_happened = execute_query($sql);
        if ($what_happened == 1) {
            //        echo "<P>Τα δεδομένα καταχωρήθηκαν με επιτυχία!</P>";
        } else {
            //        echo "<P>$what_happened</P>";
        }
    }
}
session_start();
session_unregister("antiretro_startdate");
$sql = "SELECT StartDate FROM antiretro_treatments WHERE PatientCode=" . $_GET['code'] . " GROUP BY StartDate";
$result = execute_query($sql);
if (mysql_num_rows($result) == 0) {
    $_SESSION['antiretro_startdate'] = "3000-01-01";
} else {
    $row = mysql_fetch_assoc($result);
    $_SESSION['antiretro_startdate'] = $row['StartDate'];
}
mysql_free_result($result);
mysql_close($dbconnection);
perform_post_insert_actions("", "fix_antiretro.php?code=" . $_POST['code'], "");
//perform_post_insert_actions("", "antiretro.php?code=".$_POST['code'], "");
?>
<p><a href="javascript:location.href = 'antiretro.php?code=<?php 
echo $_POST['code'];
?>
';">Καντε click εδώ για να εισάγετε και άλλα δεδομένα αντιρετροϊκών θεραπειών </a></p>
</BODY></HTML>
Exemplo n.º 12
0
$exams_sql = "SELECT * FROM orologikes_list";
$result = execute_query($exams_sql);
$exams = array();
for ($i = 0; $i < mysql_num_rows($result); $i++) {
    $row = mysql_fetch_assoc($result);
    $exams[$i] = $row['Code'];
}
mysql_free_result($result);
$jump2conifection = 0;
for ($i = 0; $i < count($exams); $i++) {
    if ($_GET[$exams[$i]] != "0") {
        $sql = "";
        $sql .= "INSERT INTO exams_orologikes VALUES (";
        $sql .= "'" . $_GET['PatientCode'] . "', '" . join_date($_GET, $exams[$i] . 'Date') . "', '" . $exams[$i] . "', ";
        $sql .= "'" . $_GET[$exams[$i]] . "');";
        //		echo $sql."<BR>";
        execute_query($sql);
        if (($exams[$i] == 'HBsAg' || $exams[$i] == 'Anti-HCV') && $_GET[$exams[$i]] == 1) {
            $jump2conifection = 1;
        }
    }
}
mysql_close($dbconnection);
if ($jump2conifection) {
    perform_post_insert_actions("exams_orologikes", "coinfection.php?code=" . $_GET['PatientCode'], "");
} else {
    perform_post_insert_actions("exams_orologikes", "orologikes.php?code=" . $_GET['PatientCode'], "");
}
?>
</BODY></HTML>
Exemplo n.º 13
0
    $_GET['Diagnosis'] = $_GET['DiagnosisICD'];
}
$sql = "";
$sql = "INSERT INTO `hospitalization` ( `PatientCode` , `EntryDate` , `ExitDate` , `Diagnosis` , `Ekbasi`)";
$sql .= " VALUES ('" . $data_array2['PatientCode'] . "', '" . join_date($data_array2, 'EntryDate') . "', '" . join_date($data_array2, 'ExitDate') . "'";
$sql .= ", '" . $data_array2['Diagnosis'] . "', '" . $data_array2['Ekbasi'] . "');";
//echo $sql;
$what_happened = execute_query($sql);
if ($what_happened == 1) {
    //   	echo "<P>Τα δεδομένα καταχωρήθηκαν με επιτυχία!</P>";
} else {
    //   	echo "<P>$what_happened</P>";
}
//form_data2table($_GET);
/*
$what_happened = execute_query($sql);
if ($what_happened == 1)
    {
        echo "<P>Τα δεδομένα καταχωρήθηκαν με επιτυχία!</P>";
    }
else
    {
        echo "<P>$what_happened</P>";
    }
*/
mysql_close($dbconnection);
perform_post_insert_actions("", "hospitalization.php?code=" . $_GET['PatientCode'], "");
?>

</BODY></HTML>
Exemplo n.º 14
0
check_patient($_GET['code']);
if (isset($_GET['count'])) {
    for ($i = 0; $i < $_GET['count']; $i++) {
        if (isset($_GET['del_therapy_sw_' . $i])) {
            $sql = "";
            $sql .= " DELETE FROM `other_treatments` ";
            $sql .= " WHERE PatientCode=" . $_GET['code'];
            $sql .= " AND Therapy='" . $_GET['del_therapy_id_' . $i] . "'";
            $sql .= " AND StartDate='" . $_GET['del_therapy_startdate_' . $i] . "'";
            $sql .= " AND EndDate='" . $_GET['del_therapy_enddate_' . $i] . "'";
            //			echo "<BR>".$sql."<BR><BR>";
            $what_happened = execute_query($sql);
            if ($what_happened == 1) {
                //    			echo "<P>Τα δεδομένα διαγράφτηκαν με επιτυχία!</P>";
            } else {
                //    			echo "<P>$what_happened</P>";
            }
        }
    }
}
perform_post_insert_actions("delete_therapies_other", getenv('HTTP_REFERER'), "");
mysql_close($dbconnection);
?>

<p><a href="javascript:location.href = '<?php 
echo getenv('HTTP_REFERER');
?>
';">Κάντε click εδώ για επιστροφή</a></p>


</BODY></HTML>
Exemplo n.º 15
0
            $sql .= " WHERE PatientCode='" . $_GET['code'] . "' AND ClinicalStatusID='" . $_GET['del_state_id_' . $i] . "'";
            $sql .= " AND ClinicalStatusDate='" . $_GET['del_state_date_' . $i] . "'";
            //			echo "<BR>".$sql."<BR><BR>";
            $what_happened = execute_query($sql);
            /*			if ($what_happened == 1)
                		{
                			echo "<P>Τα δεδομένα διαγράφτηκαν με επιτυχία!</P>";
            			}
            			else
                		{
                			echo "<P>$what_happened</P>";
            			} */
        }
    }
}
mysql_close($dbconnection);
perform_post_insert_actions("atomiko_anamnistiko", "atomic.php?code=" . $_GET['code'], "");
?>
<!--
<p><a href='atomic.php?code=<?php 
echo $_GET['code'];
?>
'>Κάντε click εδώ για επιστροφή</a></p>
<p><a href='anosologikes.php?code=<?php 
echo $_GET['code'];
?>
'>Κάντε click εδώ για να καταχωρήσετε ανοσολογικές εξετάσεις</a></p>


</BODY></HTML>
-->
Exemplo n.º 16
0
<?php

require_once './include/basic_defines.inc.php';
require_once './include/basic_functions.inc.php';
require_once './include/form_functions.inc.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());
}
$code = $_GET['code'];
check_patient($code);
$query3 = "SELECT clinic_visits.PatientCode, Name, Surname, BirthDate, MAX(DateOfVisit) ";
$query3 .= "FROM clinic_visits, patients,last_state ";
$query3 .= "WHERE patients.PatientCode=clinic_visits.PatientCode AND patients.PatientCode=last_state.PatientCode AND ";
$query3 .= "last_state.LastState=1 AND clinic_visits.PatientCode='" . $code . "' ";
$query3 .= "GROUP BY PatientCode ";
$query3 .= "HAVING DATEDIFF(NOW(), MAX(DateOfVisit)) > 364";
$result = execute_query($query3);
//echo mysql_error();
$num = mysql_num_rows($result);
if ($num > 0) {
    perform_post_insert_actions("", "jail.php?code=" . $code, "");
} else {
    perform_post_insert_actions("", "main.php?code=" . $code, "");
}
mysql_close($dbconnection);
Exemplo n.º 17
0
$data_array2['ExamDate'] = join_date($_GET, 'ExamDate');
$data_array2['System1'] = $_GET['System1'];
$data_array2['System2'] = $_GET['System2'];
if ($_GET['System1'] == 1) {
    $data_array2['Score1'] = $_GET['Grade1_1'];
} else {
    $data_array2['Score1'] = $_GET['Grade1_2'];
}
if ($_GET['System2'] == 1) {
    $data_array2['Score2'] = $_GET['Grade2_1'];
} else {
    $data_array2['Score2'] = $_GET['Grade2_2'];
}
$sql = "INSERT INTO `" . $_GET['table'] . "` ( `PatientCode` , `ExamDate` , `System1` , `Score1` , `System2` , `Score2`)";
$sql .= " VALUES ('" . $data_array2['PatientCode'] . "', '" . $data_array2['ExamDate'];
$sql .= "', '" . $data_array2['System1'] . "', '" . $data_array2['Score1'] . "', '" . $data_array2['System2'] . "', '" . $data_array2['Score2'];
$sql .= "');";
echo $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($_GET['table'], $_GET['table'] . ".php?code=" . $_GET['PatientCode'], "");
?>

</BODY></HTML>
Exemplo n.º 18
0
mysql_free_result($result);
if ($therapies[0] == -1) {
    $delete_all = 1;
    $sql = "SELECT antiretro_treatments_compliance.Schema, antiretro_treatments_compliance.StartDate, antiretro_treatments_compliance.EndDate, antiretro_treatments_compliance.Compliance, antiretro_reasons.description as Reason1, antiretro_treatments_compliance.Reason2, antiretro_treatments_compliance.Notes FROM antiretro_reasons, antiretro_treatments_compliance WHERE antiretro_reasons.id=antiretro_treatments_compliance.Reason1 AND PatientCode=" . $_GET['code'] . " GROUP BY antiretro_treatments_compliance.StartDate";
    $result = execute_query($sql);
    $num_rows = mysql_num_rows($result);
    for ($j = 0; $j < $num_rows; $j++) {
        $resultrow = mysql_fetch_assoc($result);
        $extra[$j]['start'] = $resultrow['StartDate'];
        $extra[$j]['end'] = $resultrow['EndDate'];
        $sql = "DELETE FROM antiretro_treatments_compliance WHERE PatientCode='" . $_GET['code'] . "' AND StartDate='" . $extra[$j]['start'] . "' AND EndDate='" . $extra[$j]['end'] . "'";
        execute_query($sql);
        //		echo "<p>$sql</p>";
        //		echo "<p>".mysql_error()."</p>";
    }
    perform_post_insert_actions("delete_all_antiretro", "antiretro.php?code=" . $_GET['code'], "");
} else {
    $delete_all = 0;
    for ($i = 0; $i < count($therapies); $i++) {
        $old_dates[2 * $i] = $therapies[$i]['start'];
        $old_dates[2 * $i + 1] = $therapies[$i]['end'];
    }
    $temp = array_unique($old_dates);
    $old_dates = array_values($temp);
    sort($old_dates);
    reset($old_dates);
    for ($i = 0; $i < 2 * count($therapies) - 1; $i++) {
        for ($j = 0; $j < count($therapies); $j++) {
            if ($old_dates[$i] == $therapies[$j]['start']) {
                $old_schema[$i] .= $therapies[$j]['med'] . " / ";
            }
Exemplo n.º 19
0
    $_GET['Iologiki_24'] = '-1';
}
if ($enddate == "3000-01-01") {
    $_GET['Bioximiki_end'] = '-1';
    $_GET['Iologiki_end'] = '-1';
    $_GET['Info1'] = '';
    $_GET['Info2'] = '';
}
if ($enddate == "3000-01-01" || $now_days < $th_days_end + 182) {
    $_GET['Bioximiki_longterm'] = '-1';
    $_GET['Iologiki_longterm'] = '-1';
}
$sql = "INSERT INTO hcv_antiiikes_treatments_antapokrisi VALUES('" . $_GET['PatientCode'] . "', '" . $schema . "', '" . join_date($_GET, 'StartDate') . "', '" . $enddate . "', ";
$sql .= "'" . $_GET['Bioximiki_polu_prwimi'] . "', '" . $_GET['Bioximiki_prwimi'] . "', '" . $_GET['Bioximiki_24'] . "', '" . $_GET['Bioximiki_end'] . "', '" . $_GET['Bioximiki_longterm'] . "', ";
$sql .= "'" . $_GET['Iologiki_polu_prwimi'] . "', '" . $_GET['Iologiki_prwimi'] . "', '" . $_GET['Iologiki_24'] . "', '" . $_GET['Iologiki_end'] . "', '" . $_GET['Iologiki_longterm'] . "', '" . $_GET['Info1'] . "', ";
if ($_GET['Info1'] == 1) {
    $sql .= "NULL, ";
} else {
    $sql .= "'" . $_GET['Info2'] . "', ";
}
$sql .= "'" . $_GET['Note'] . "');";
$sql = replace2null($sql);
echo $sql;
$what_happened = execute_query($sql);
//	echo mysql_error();
mysql_close($dbconnection);
perform_post_insert_actions("hcv_antiiikes_treatments", "hcv_antiiikes.php?code=" . $_GET['code'], "");
?>
</BODY>
</HTML>
Exemplo n.º 20
0
$exams = array();
for ($i = 0; $i < mysql_num_rows($result); $i++) {
    $row = mysql_fetch_assoc($result);
    $exams[$i] = $row['Code'];
}
mysql_free_result($result);
for ($i = 0; $i < count($exams); $i++) {
    $sql = "";
    $sql .= "UPDATE laboratory_codes SET `Upper1`='" . $_GET[$exams[$i] . '_Upper1'] . "', `Lower1`='" . $_GET[$exams[$i] . '_Lower1'] . "', ";
    $sql .= "`Upper2`='" . $_GET[$exams[$i] . '_Upper2'] . "', `Lower2`='" . $_GET[$exams[$i] . '_Lower2'] . "', ";
    $sql .= "`Upper3`='" . $_GET[$exams[$i] . '_Upper3'] . "', `Lower3`='" . $_GET[$exams[$i] . '_Lower3'] . "', ";
    $sql .= "`Upper4`='" . $_GET[$exams[$i] . '_Upper4'] . "', `Lower4`='" . $_GET[$exams[$i] . '_Lower4'] . "', ";
    $sql .= "`Upper5`='" . $_GET[$exams[$i] . '_Upper5'] . "', `Lower5`='" . $_GET[$exams[$i] . '_Lower5'] . "', ";
    $sql .= "`Unit1`='" . $_GET[$exams[$i] . '_Unit1'] . "', `Unit2`='" . $_GET[$exams[$i] . '_Unit2'] . "', ";
    $sql .= "`Unit3`='" . $_GET[$exams[$i] . '_Unit3'] . "', `Unit4` ='" . $_GET[$exams[$i] . '_Unit4'] . "', ";
    $sql .= "`Unit5`='" . $_GET[$exams[$i] . '_Unit5'] . "' WHERE `Code`='" . $exams[$i] . "'";
    //		echo $sql."<BR>";
    execute_query($sql);
    //		echo mysql_error();
}
$result = execute_query("SELECT * FROM setup");
if (mysql_num_rows($result) > 0) {
    execute_query("UPDATE setup SET Value='" . $_GET['Clinic'] . "' WHERE Setting='Clinic'");
} else {
    execute_query("INSERT INTO setup VALUES('clinic', '" . $_GET['Clinic'] . "')");
}
mysql_close($dbconnection);
perform_post_insert_actions("exams_bioximikes", "setup.php", "");
?>
</BODY></HTML>
Exemplo n.º 21
0
}
//form_data2table($_GET);
check_patient($_GET['code']);
if (isset($_GET['count'])) {
    for ($i = 0; $i < $_GET['count']; $i++) {
        if (isset($_GET['del_exam_sw_' . $i])) {
            $sql = "";
            $sql .= " DELETE FROM `" . $_GET['examtable'] . "` ";
            $sql .= " WHERE PatientCode=" . $_GET['code'];
            $sql .= " AND ExamDate='" . $_GET['del_exam_date_' . $i] . "'";
            //			echo "<BR>".$sql."<BR><BR>";
            $what_happened = execute_query($sql);
            if ($what_happened == 1) {
                //    			echo "<P>Τα δεδομένα διαγράφτηκαν με επιτυχία!</P>";
            } else {
                //    			echo "<P>$what_happened</P>";
            }
        }
    }
}
mysql_close($dbconnection);
perform_post_insert_actions("", getenv('HTTP_REFERER'), "");
?>

<p><a href="javascript:location.href = '<?php 
echo getenv('HTTP_REFERER');
?>
';">Κάντε click εδώ για επιστροφή</a></p>


</BODY></HTML>
Exemplo n.º 22
0
        $sql .= "`" . $names[$i] . "` = '" . $data_array2[$names[$i]] . "', ";
    }
    $sql .= "`" . $names[$i] . "` = '" . $data_array2[$names[$i]] . "' ";
    if ($data_array2['PossibleSourceInfection'] != '6') {
        $sql .= ", `TransfusionPlace`=NULL, `TransfusionDate`=NULL ";
    }
    if ($data_array2['PossibleSourceInfection'] != '7') {
        $sql .= ", `Country`=NULL, `Sailor`=NULL, `PartnerCountry`=NULL, `PartnerDrugs`=NULL ";
        $sql .= ", `PartnerBi`=NULL, `PartnerTransfusion`=NULL, `PartnerTransfusionAfter78`=NULL ";
        $sql .= ", `PartnerHIVPlus`=NULL, `Undefined`=NULL ";
    }
    if ($data_array2['KnownDateOrometatropi'] == '0') {
        $sql .= ", `LastNegativeSample`=NULL, `SeroconversionDate`=NULL ";
    }
    $sql .= "WHERE `PatientCode`='" . $data_array2['PatientCode'] . "' LIMIT 1";
    //    echo $sql;
    //	  echo "<BR><BR>";
    $what_happened = execute_query($sql);
    if ($what_happened == 1) {
        //        echo "<P>Τα δεδομένα καταχωρήθηκαν με επιτυχία!</P>";
        //        echo "<P><a href='clinical_status.php?code=".$data_array2['PatientCode']."'>Κάντε click εδώ για να εισάγετε την κλινική κατάσταση του ασθενή</a></P>";
    } else {
        echo mysql_error();
    }
}
mysql_close($dbconnection);
perform_post_insert_actions("demographic_data", "demographic.php?code=" . $_GET['PatientCode'], "");
?>

</BODY></HTML>
Exemplo n.º 23
0
}
//form_data2table($_GET);
check_patient($_GET['code']);
if (isset($_GET['count'])) {
    for ($i = 0; $i < $_GET['count']; $i++) {
        if (isset($_GET['del_exam_sw_' . $i])) {
            $sql = "";
            $sql .= " DELETE FROM `hiv_subtype` ";
            $sql .= " WHERE PatientCode=" . $_GET['code'];
            $sql .= " AND HIVSubtype='" . $_GET['del_subtype_' . $i] . "'";
            //			echo "<BR>".$sql."<BR><BR>";
            $what_happened = execute_query($sql);
            if ($what_happened == 1) {
                //    			echo "<P>Τα δεδομένα διαγράφτηκαν με επιτυχία!</P>";
            } else {
                //    			echo "<P>$what_happened</P>";
            }
        }
    }
}
mysql_close($dbconnection);
perform_post_insert_actions("", "hiv_resistance.php?code=" . $_GET['code'], "");
?>

<p><a href="javascript:location.href = '<?php 
echo getenv('HTTP_REFERER');
?>
';">Κάντε click εδώ για επιστροφή</a></p>


</BODY></HTML>
Exemplo n.º 24
0
$sql_query = replace2quote($sql_query);
$sql_query = str_replace("gr-day=''", "gr-day IS NULL", $sql_query);
$sql_query = str_replace("StartDate=''", "StartDate IS NULL", $sql_query);
$sql_query = str_replace("EndDate=''", "EndDate IS NULL", $sql_query);
$sql_query = str_replace("OtherNosima=''", "OtherNosima IS NULL", $sql_query);
//	echo $sql_query;
//	echo "<BR><BR>";
$results = execute_query($sql_query);
//	echo mysql_error();
//	print_r($results);
//	echo "<BR><BR>";
/*	
	if ($results == "1")
	{
		echo "<table><tr><td>Query Successful!</td></tr></table>";
	}
	else
	{
		query2table($results);
		$result2 = execute_query($sql_query);
		query2xls($result2, 'query.xls');
		$result3 = execute_query($sql_query);
		query2csv($result3, 'query.csv');
?>
<P><A HREF="query.xls">Αποτελέσματα σε Excel</A></P>
<P><A HREF="query.csv">Αποτελέσματα σε CSV</A></P>
<?
	}
*/
perform_post_insert_actions("", $_GET['table'] . "?code=" . $_GET['code'], "");
mysql_close($dbconnection);
Exemplo n.º 25
0
        case 10:
            $sql .= "(`PatientCode`, `Egkefalopatheia`) VALUES ('" . $_GET['PatientCode'] . "', '" . join_date($_GET, 'NonKirosiDate') . "')";
            break;
        case 11:
            $sql .= "(`PatientCode`, `Nefriki`) VALUES ('" . $_GET['PatientCode'] . "', '" . join_date($_GET, 'NonKirosiDate') . "')";
            break;
        case 12:
            $sql .= "(`PatientCode`, `Peritonitis`) VALUES ('" . $_GET['PatientCode'] . "', '" . join_date($_GET, 'NonKirosiDate') . "')";
            break;
    }
}
//echo $sql;
$what_happened = execute_query($sql);
/*
if ($what_happened == 1)
    {
        echo "<script>alert('Τα δεδομένα τροποποιήθηκαν με επιτυχία!')</script>\n";
        //echo $data_array['PatientCode'];
    }
else 
	{
		echo "<script>alert('Τα δεδομένα ΔΕΝ τροποποιήθηκαν!')</script>\n";
		echo mysql_error();
	}*/
//echo "<p><a href='hbv_clinical_status.php?code=".$_GET['PatientCode']."'>Κάντε click εδώ για να εισάγετε κι άλλη κλινική κατάσταση</a></p>";
mysql_close($dbconnection);
perform_post_insert_actions("hbv_clinical_status", "hbv_clinical_status.php?code=" . $_GET['PatientCode'], "");
?>

</BODY></HTML>
Exemplo n.º 26
0
check_patient($_GET['code']);
if (isset($_GET['count'])) {
    for ($i = 0; $i < $_GET['count']; $i++) {
        if (isset($_GET['del_therapy_sw_' . $i])) {
            $sql = "";
            $sql .= " DELETE FROM `" . $_GET['examtable'] . "` ";
            $sql .= " WHERE PatientCode=" . $_GET['code'];
            $sql .= " AND Sxima='" . $_GET['del_therapy_id_' . $i] . "'";
            $sql .= " AND StartDate='" . $_GET['del_therapy_startdate_' . $i] . "'";
            $sql .= " AND EndDate='" . $_GET['del_therapy_enddate_' . $i] . "'";
            echo "<BR>" . $sql . "<BR><BR>";
            $what_happened = execute_query($sql);
            if ($what_happened == 1) {
                echo "<P>Τα δεδομένα διαγράφτηκαν με επιτυχία!</P>";
            } else {
                echo "<P>{$what_happened}</P>";
            }
        }
    }
}
mysql_close($dbconnection);
perform_post_insert_actions("delete_other_treatments", $_GET['examtable'] . "?code=" . $_GET['code'], "");
?>

<p><a href="javascript:location.href = '<?php 
echo getenv('HTTP_REFERER');
?>
';">Κάντε click εδώ για επιστροφή</a></p>


</BODY></HTML>
Exemplo n.º 27
0
<HTML><HEAD>
<TITLE>Προβολή-Αλλαγή Αντιρετροϊκών Θεραπειών</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1253">
<link href="./include/cohort.css" rel="stylesheet" type="text/css">
</HEAD>
<?php 
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 iris SET EndDate='" . join_date($_GET, 'EndDate') . "' ";
$sql .= "WHERE PatientCode='" . $_GET['code'] . "' AND StartDate='" . $_GET['start'] . "' AND Type='" . $_GET['type'] . "'";
$sql .= " AND What='" . $_GET['what'] . "' AND Antimetopisi='" . $_GET['ant'] . "'";
execute_query($sql);
//echo $sql;
perform_post_insert_actions("", "iris.php?code=" . $_GET['code'], "");
mysql_close($dbconnection);
?>
</BODY></HTML>
Exemplo n.º 28
0
validate_data('patients', $_GET);
$data_array = prepare_data('patients', $_GET);
if ($_GET['PatientCode'] == "" && $_GET['MELCode'] == "1111111") {
    $codetype = "NOMELNOKEELCODE";
    $data_array['PatientCode'] = $_GET['next_nonmelkeelcode'];
} elseif ($_GET['PatientCode'] == "" && $_GET['MELCode'] != "") {
    $codetype = "NOKEELCODE";
    $data_array['PatientCode'] = $_GET['clinic'] * 100000 + $data_array['MELCode'];
} else {
    $codetype = "FROMKEEL";
}
$sql = "INSERT INTO `patients` (`PatientCode`, `MELCode`, `Name`, `Surname`, `BirthDate`, `CodeType`) ";
$sql .= "VALUES ( '" . $data_array['PatientCode'] . "' , '" . $data_array['MELCode'] . "' , '" . $data_array['Name'] . "' , '" . $data_array['Surname'] . "' , '" . $data_array['BirthDate'] . "', '" . $codetype . "') ";
//echo $sql;
$what_happened = execute_query($sql);
if ($what_happened == 1) {
    echo "<script>alert('Τα δεδομένα καταχωρήθηκαν με επιτυχία!')</script>\n";
    //        echo $data_array['PatientCode'];
    //        echo "<p><a href='demographic.php?code=".$data_array['PatientCode']."'>Κάντε click εδώ για να εισάγετε τα δημογραφικά δεδομένα του ασθενή</a></p>";
    $sql = "INSERT INTO last_state (`PatientCode`, `LastState`) VALUES ('" . $data_array['PatientCode'] . "', '1')";
    execute_query($sql);
    perform_post_insert_actions("patients", "demographic.php?code=" . $data_array['PatientCode'], "");
} else {
    handle_query_results("patients", mysql_error(), $data_array);
    echo "<script>alert('Τα δεδομένα ΔΕΝ καταχωρήθηκαν!')</script>\n";
}
mysql_close($dbconnection);
?>

</BODY></HTML>
Exemplo n.º 29
0
    } else {
        echo " και ημερομηνία λήξης " . $end2;
    }
    echo "<BR> και θέλετε να καταχωρήσετε <b>{$schema}</b> με ημερομηνία έναρξης " . $start;
    if ($enddate == '3000-01-01') {
        echo " και ανοιχτή ημερομηνία λήξης";
    } else {
        echo " και ημερομηνία λήξης " . $enddate;
    }
    echo "</div></p>";
    echo "<br><br><br><br><br><br>";
    echo "<div class='img-shadow'>";
    show_errormsg("");
    echo "</div>";
}
mysql_free_result($result);
// Insert Medicines
$sql = "";
for ($i = 0; $i < count($meds); $i++) {
    $sql = "INSERT INTO antiretro_treatments VALUES('" . $_GET['PatientCode'] . "', '" . $meds[$i]['id'] . "', '" . join_date($_GET, 'StartDate') . "', '" . $enddate . "')";
    //	echo $sql."<BR>";
    $what_happened = execute_query($sql);
}
// Insert Compliance, Discontinuation Reasons and Notes
$sql = "INSERT INTO antiretro_treatments_compliance VALUES('" . $_GET['PatientCode'] . "', '" . $schema . "', '" . join_date($_GET, 'StartDate') . "', '" . $enddate . "', '" . $_GET['comp'] . "', '" . $_GET['Reason1'] . "', '" . $_GET['Reason2'] . "', '" . $_GET['Notes'] . "')";
execute_query($sql);
mysql_close($dbconnection);
perform_post_insert_actions("", "antiretro.php?code=" . $_GET['PatientCode'], "");
?>

Exemplo n.º 30
0
}
elseif (($row['CD4State'] == "" || $row['CD4State'] == "1")&& ($_GET['AbsoluteCD40'] < 500 && $_GET['AbsoluteCD40'] >= 200))
{
	echo "<p>Παρατηρήθηκε αλλαγή της κατάστασης των CD4 του ασθενή";
	if ($row['CD4State'] == "1")
	{
		echo " από την κατάσταση 1 (CD4 >= 500 μL)";
	}
	echo" στην κατάσταση 2 (200 =< CD4 < 500 μL).<p>";
	echo "<p><a href='change.php?code=".$_GET['PatientCode']."&state=2'>Καντε click εδώ για να καταχωρήσετε την αλλαγή</a><p>";
}
elseif (($row['CD4State'] == "" || $row['CD4State'] == "2") && $_GET['AbsoluteCD40'] < 200)
{
	echo "<p>Παρατηρήθηκε αλλαγή της κατάστασης των CD4 του ασθενή";
	if ($row['CD4State'] == "2")
	{
		echo " από την κατάσταση 2 (200 =< CD4 < 500 μL)";
	}
	echo" στην κατάσταση 3 (CD4 < 200 μL).<p>";
	echo "<p><a href='change.php?code=".$_GET['PatientCode']."&state=3'>Καντε click εδώ για να καταχωρήσετε την αλλαγή</a><p>";
}

echo "<p>&nbsp;</p>";
echo "<p><a href='anosologikes.php?code=".$_GET['PatientCode']."'>Καντε click εδώ για να καταχωρήσετε κι άλλη εξέταση</a></p>";
echo "<p><a href='bioximikes.php?code=".$_GET['PatientCode']."'>Καντε click εδώ για να καταχωρήσετε βιοχημικές εξετάσεις</a></p>";
*/
mysql_close($dbconnection);
perform_post_insert_actions("anosologikes", "anosologikes.php?code=" . $_GET['PatientCode'], "");
?>

</BODY></HTML>