当前位置: 首页>>代码示例>>PHP>>正文


PHP check_patient函数代码示例

本文整理汇总了PHP中check_patient函数的典型用法代码示例。如果您正苦于以下问题:PHP check_patient函数的具体用法?PHP check_patient怎么用?PHP check_patient使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了check_patient函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: PrintMenu

</HEAD>
<?php 
PrintMenu();
?>

<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());
}
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) {
开发者ID:nkiourt,项目名称:amacs,代码行数:31,代码来源:iris_insert.php

示例2: die

    die('Can\'t use ' . $cohort_db_name . ' : ' . mysql_error());
}
$reasons_query = "SELECT * FROM antiretro_reasons";
$reason_result = execute_query($reasons_query);
$reasons = mysql_num_rows($reason_result);
$reasons_str = "";
for ($r = 0; $r < $reasons; $r++) {
    if ($r != 95) {
        $row = mysql_fetch_array($reason_result);
        $reasons_str .= "<option value='" . $row[0] . "'>" . $row[0] . "</option>\n";
    }
}
mysql_free_result($reason_result);
//if ($_GET['code'] == "" || !is_numeric($_GET['code']))
//{ die('Πρέπει να δωσετε ένα σωστό Κωδικό Ασθενή!'); }
check_patient($_GET['code']);
//form_data2table($_GET);
// Create Medicines Table
$schema = "";
$meds = array();
$m = 0;
$results = execute_query("SELECT * FROM medicines");
$num = mysql_num_rows($results);
for ($i = 0; $i < $num; $i++) {
    $row = mysql_fetch_assoc($results);
    if ($_GET[$row['Name']] == $row['ID']) {
        $meds[$m] = array();
        $meds[$m]['id'] = $row['ID'];
        $meds[$m]['name'] = $row['Name'];
        $schema .= $row['Name'] . ' / ';
        $m++;
开发者ID:nkiourt,项目名称:amacs,代码行数:31,代码来源:antiretro_insert.php

示例3: cohortdb_connect

<?php

require_once './include/basic_defines.inc.php';
require_once './include/basic_functions.inc.php';
require_once './include/form_functions.inc.php';
require_once './include/data_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());
}
$patient_code = $_GET['code'];
check_patient($patient_code);
$medicine_query = "SELECT ID,Name,Category FROM medicines";
$results = execute_query($medicine_query);
$num = mysql_num_rows($results);
for ($i = 0; $i < $num; $i++) {
    $row = mysql_fetch_assoc($results);
    $medicine_array[$i]['id'] = $row['ID'];
    $medicine_array[$i]['name'] = $row['Name'];
    $medicine_array[$i]['category'] = $row['Category'];
}
$reasons_query = "SELECT * FROM antiretro_reasons";
$results = execute_query($reasons_query);
$num = mysql_num_rows($results);
for ($i = 0; $i < $num; $i++) {
    $row = mysql_fetch_assoc($results);
    $reasons[$row['id']] = $row['description'];
}
// Load Saved Antiretroviral Medicines for Patient $patient_code
$query = "SELECT antiretro_treatments.Medicine as med_id,  medicines.name as med, antiretro_treatments.StartDate as StartDate, antiretro_treatments.EndDate as EndDate FROM antiretro_treatments,medicines WHERE antiretro_treatments.PatientCode=" . $patient_code . " AND antiretro_treatments.Medicine=medicines.ID";
开发者ID:nkiourt,项目名称:amacs,代码行数:31,代码来源:fix.php

示例4: PrintMenu

<?php 
PrintMenu();
?>

<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());
}
//form_data2table($_POST);
check_patient($_POST['code']);
if (isset($_POST['count'])) {
    if ($_POST['table'] == "hiv_resistance") {
        for ($i = 0; $i < $_POST['count']; $i++) {
            if (isset($_POST['del_exam_sw_' . $i])) {
                $sql = "";
                $sql .= " DELETE FROM `hiv_resistance` ";
                $sql .= " WHERE PatientCode=" . $_POST['code'];
                $sql .= " AND SampleID='" . $_POST['del_id_' . $i] . "'";
                $sql .= " AND SeqDate='" . $_POST['del_date2_' . $i] . "'";
                $sql .= " AND SampleDate='" . $_POST['del_date1_' . $i] . "'";
                $sql .= " AND Lab='" . $_POST['del_lab_' . $i] . "'";
                $sql .= " AND Algorithm='" . $_POST['del_alg_' . $i] . "'";
                //			echo "<BR>".$sql."<BR><BR>";
                $what_happened = execute_query($sql);
                if ($what_happened == 1) {
开发者ID:nkiourt,项目名称:amacs,代码行数:31,代码来源:delete_resistance.php

示例5: cohortdb_connect

<?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);
开发者ID:nkiourt,项目名称:amacs,代码行数:27,代码来源:intermediate.php

示例6: check_patient

$type = $_POST['from'];
$sql = $_POST['sql'];
$id = $_POST['id'];
$code = $_POST['code'];
function check_patient($code)
{
    $query = "SELECT * FROM patients WHERE PatientCode = " . $code;
    $result = execute_query($query);
    $row = mysql_fetch_array($result);
    $num_rows = mysql_num_rows($result);
    mysql_free_result($result);
    if ($num_rows == 1) {
        return 1;
    } else {
        return 0;
    }
}
if (check_patient($code)) {
    $result = execute_query(stripslashes($sql));
    $error = mysql_error();
    if ($error == "") {
        echo "{ \"id\": \"" . $id . "\" , \"msg\": \"Success!\" }";
    } elseif (strpos($error, "Duplicate entry") !== false) {
        echo "{ \"id\": \"" . $id . "\" , \"msg\": \"Υπάρχει εγγραφή στη βάση με ίδια ημερομηνία και εξέταση!\" }";
    } else {
        echo "{ \"id\": \"" . $id . "\" , \"msg\": \"" . $error . "\" }";
    }
    mysql_free_result($result);
} else {
    echo "{ \"id\": \"" . $id . "\" , \"msg\": \"Ο κωδικός ασθενούς δεν υπάρχει στη βάση!\" }";
}
开发者ID:nkiourt,项目名称:amacs,代码行数:31,代码来源:ajax_insert.php

示例7: prepare_data


//.........这里部分代码省略.........
        $corrected_data_array['Yperlipidaimia'] = $data_array['Yperlipidaimia'];
        if ($data_array['Yperlipidaimia'] == 1) {
            $corrected_data_array['YperlipidaimiaDate'] = join_date($data_array, 'YperlipidaimiaDate');
        }
        $corrected_data_array['Lipoatrofia'] = $data_array['Lipoatrofia'];
        if ($data_array['Lipoatrofia'] == 1) {
            $corrected_data_array['LipoatrofiaDate'] = join_date($data_array, 'LipoatrofiaDate');
        }
        $corrected_data_array['Enapothesi'] = $data_array['Enapothesi'];
        if ($data_array['Enapothesi'] == 1) {
            $corrected_data_array['EnapothesiDate'] = join_date($data_array, 'EnapothesiDate');
        }
        //        $corrected_data_array['Smoking'] = $data_array['Smoking'];
        /*        if ($data_array['Smoking'] == 1)
                {
                	$corrected_data_array['AgeStart'] = $data_array['AgeStart'];
                	$corrected_data_array['AgeFullStart'] = $data_array['AgeFullStart'];
                	$corrected_data_array['CigarretesPerDay'] = $data_array['CigarretesPerDay'];
                	$corrected_data_array['CigarsPerDay'] = $data_array['CigarsPerDay'];
                	$corrected_data_array['KapnosPipasPerDay'] = $data_array['KapnosPipasPerDay'];
                	$corrected_data_array['AgeStop'] = $data_array['AgeStop'];
                }
                if ($data_array['Smoking'] == 2)
                {
                	$corrected_data_array['AgeStart'] = $data_array['AgeStart'];
                	$corrected_data_array['AgeFullStart'] = $data_array['AgeFullStart'];
                	$corrected_data_array['CigarretesPerDay'] = $data_array['CigarretesPerDay'];
                	$corrected_data_array['CigarsPerDay'] = $data_array['CigarsPerDay'];
                	$corrected_data_array['KapnosPipasPerDay'] = $data_array['KapnosPipasPerDay'];
                } */
    }
    if ($table == 'exams_orologikes') {
        $corrected_data_array['PatientCode'] = $data_array['PatientCode'];
        check_patient($data_array['PatientCode']);
        $corrected_data_array['FTA'] = $data_array['FTA'];
        $corrected_data_array['FTADate'] = join_date($data_array, 'FTADate');
        $corrected_data_array['VDRL'] = $data_array['VDRL'];
        $corrected_data_array['VDRLDate'] = join_date($data_array, 'VDRLDate');
        $corrected_data_array['ToxoIgG'] = $data_array['ToxoIgG'];
        $corrected_data_array['ToxoIgGDate'] = join_date($data_array, 'ToxoIgGDate');
        $corrected_data_array['ToxoIgM'] = $data_array['ToxoIgM'];
        $corrected_data_array['ToxoIgMDate'] = join_date($data_array, 'ToxoIgMDate');
        $corrected_data_array['Anti-CMVIgG'] = $data_array['Anti-CMVIgG'];
        $corrected_data_array['Anti-CMVIgGDate'] = join_date($data_array, 'Anti-CMVIgGDate');
        $corrected_data_array['Anti-CMVIgM'] = $data_array['Anti-CMVIgG'];
        $corrected_data_array['Anti-CMVIgMDate'] = join_date($data_array, 'Anti-CMVIgMDate');
        $corrected_data_array['HBsAg'] = $data_array['HBsAg'];
        $corrected_data_array['HBsAgDate'] = join_date($data_array, 'HBsAgDate');
        $corrected_data_array['Anti-HBs'] = $data_array['Anti-HBs'];
        $corrected_data_array['Anti-HBsDate'] = join_date($data_array, 'Anti-HBsDate');
        $corrected_data_array['Anti-HBc'] = $data_array['Anti-HBc'];
        $corrected_data_array['Anti-HBcDate'] = join_date($data_array, 'Anti-HBcDate');
        $corrected_data_array['HBeAg'] = $data_array['HBeAg'];
        $corrected_data_array['HBeAgDate'] = join_date($data_array, 'HBeAgDate');
        $corrected_data_array['Anti-HBe'] = $data_array['Anti-HBe'];
        $corrected_data_array['Anti-HBeDate'] = join_date($data_array, 'Anti-HBeDate');
        $corrected_data_array['Anti-HCV'] = $data_array['Anti-HCV'];
        $corrected_data_array['Anti-HCVDate'] = join_date($data_array, 'Anti-HCVDate');
        $corrected_data_array['Anti-HDV'] = $data_array['Anti-HDV'];
        $corrected_data_array['Anti-HDVDate'] = join_date($data_array, 'Anti-HDVDate');
        $corrected_data_array['Mantoux'] = $data_array['Mantoux'];
        $corrected_data_array['MantouxDate'] = join_date($data_array, 'MantouxDate');
    }
    if ($table == 'exams_bioximikes') {
        $exams = $data_array['exams'];
        $corrected_data_array['PatientCode'] = $data_array['PatientCode'];
开发者ID:nkiourt,项目名称:amacs,代码行数:67,代码来源:form_functions.inc.php


注:本文中的check_patient函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。