<?php 
    echo $pagen->makeSortLink($LDZipCode, 'selian_pid', $oitem, $odir, $append);
    ?>
</b></td>
    <td background="<?php 
    echo createBgSkin($root_path, 'tableHeaderbg.gif');
    ?>
" align=center><font color="#ffffff"><b><?php 
    echo $LDSelect;
    ?>
</td>
					</tr>
<?php 
    while ($row = $encounter->FetchRow()) {
        $full_en = $row['encounter_nr'];
        $enc_obj->loadEncounterData($full_en);
        $pid = $enc_obj->PID();
        echo "\n\t\t\t\t\t\t\t<tr class=";
        if ($toggle) {
            echo '"wardlistrow1">';
            $toggle = 0;
        } else {
            echo '"wardlistrow2">';
            $toggle = 1;
        }
        echo "<td>";
        echo "&nbsp;" . $pid;
        echo '&nbsp;</td><td>';
        switch ($row['sex']) {
            case 'f':
                echo '<img ' . $img_female . '>';
    <TR bgColor=#dddddd height=1>
                    <TD colSpan=3><IMG height=1
                      src="../../gui/img/common/default/pixel.gif"
                      width=5></TD></TR>
    <?php
    */
}
/* Establish db connection */
if (!isset($db) || !$db) {
    include $root_path . 'include/inc_db_makelink.php';
}
if ($dblink_ok) {
    /* Load date formatter */
    include_once $root_path . 'include/inc_date_format_functions.php';
    $enc_obj->where = " encounter_nr={$pn}";
    if ($enc_obj->loadEncounterData($pn)) {
        /*			switch ($enc_obj->EncounterClass())
        				{
        			    	case '1': $full_en = ($pn + $GLOBAL_CONFIG['patient_inpatient_nr_adder']);
        			                   break;
        					case '2': $full_en = ($pn + $GLOBAL_CONFIG['patient_outpatient_nr_adder']);
        								break;
        					default: $full_en = ($pn + $GLOBAL_CONFIG['patient_inpatient_nr_adder']);
        				}
        	*/
        $full_en = $pn;
        if ($enc_obj->is_loaded) {
            $result =& $enc_obj->encounter;
            $rows = $enc_obj->record_count;
            if ($result['is_discharged']) {
                $edit = 0;
                $patient[$buf['room_nr']][$buf['bed_nr']] = $buf;
            }
            $patients_ok = true;
        } else {
            $patients_ok = false;
        }
        $ward_ok = true;
        # Load global person photo source path
        include_once $root_path . 'include/care_api_classes/class_globalconfig.php';
        $GLOBAL_CONFIG = array();
        $glob_obj = new GlobalConfig($GLOBAL_CONFIG);
        $glob_obj->getConfig('person_foto_path');
        $photo_path = is_dir($root_path . $GLOBAL_CONFIG['person_foto_path']) ? $GLOBAL_CONFIG['person_foto_path'] : $default_photo_path;
        #Create encounter object and load encounter info
        $enc_obj = new Encounter($pn);
        $enc_obj->loadEncounterData();
        if ($enc_obj->is_loaded) {
            $encounter =& $enc_obj->encounter;
        }
        # Set the foto filename
        $photo_filename = $encounter['photo_filename'];
        /* Prepare the photo filename */
        require_once $root_path . 'include/inc_photo_filename_resolve.php';
        # Get billing type
        $billing_type =& $enc_obj->getInsuranceClassInfo($encounter['insurance_class_nr']);
    } else {
        $ward_ok = false;
    }
}
if (isset($transfer) && $transfer) {
    $TP_TITLE = $LDTransferPatient;
    function DisplayArchivedBillHeadline($bill_nr, $batch_nr)
    {
        global $LDBatchFileNr, $LDFileNo, $LDEncounterNr, $LDLastName, $LDFirstName, $LDBday, $LDSex, $LDBillNumber, $LDWard, $LDdepartment, $db;
        // Maybe optional parameter given to this funciton: Is it a print-out-page or not (For table resize)
        if (func_num_args() > 2) {
            $printout = func_get_arg(2);
        }
        $enc_obj = new Encounter();
        $encoded_batch_number = $enc_obj->ShowPID($batch_nr);
        $enc_number = $enc_obj->GetEncounterFromBatchNumber($batch_nr);
        $bill_address = $enc_obj->GetHospitalAddress();
        $bill_logo = $enc_obj->GetHospitalLogo();
        $bill_name = $enc_obj->GetHospitalName();
        $address_line = explode(",", $bill_address);
        $hosp_name = $address_line[0];
        $hosp_address = $address_line[1];
        $hosp_address_city = $address_line[2];
        $bill_date_sql = "SELECT FROM_UNIXTIME(date_change) AS tarehe FROM care_tz_billing_archive_elem WHERE nr=" . $bill_nr;
        $bill_date_result = $db->Execute($bill_date_sql);
        if ($bill_date_row = $bill_date_result->FetchRow()) {
            $bill_date_archived = $bill_date_row['tarehe'];
        }
        if ($enc_obj->EncounterExists($enc_number)) {
            // Load the encounter data:
            $enc_data = $enc_obj->loadEncounterData($enc_number);
            $file_no = $enc_obj->SelianPID($enc_number);
            echo $printout ? '<table width="100%"  border="0" cellspacing=0 cellpadding=0 align="center" >' : '<table width="100%" border="0" cellspacing=1 cellpadding=0 >';
            echo '<tr><td align="center">' . $hosp_name . '<br>' . $hosp_address . '<br>' . $hosp_address_city . '</td></tr>

<tr><td align="right"><img src="../../' . $bill_logo . '" border=0 align="absmiddle" alt=""></td></tr></table>';
            echo $printout ? '<table width="100%"  border="0" cellspacing=0 cellpadding=0 >' : '<table width="100%"  border="0" cellspacing=1 cellpadding=0 >';
            echo '

  	  		<tr><td></td></tr>



  				<td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="3"><b>' . $LDBatchFileNr . '</b></font></span></span></td>

  					<td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="3">' . $encoded_batch_number . '</font></span></span></b></td>



  				</tr>





  				 <tr>

  					<td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="3">Admission-Nr.:</font></span></span></td>

  					<td bgcolor="#ffffee" class="vi_data"><span style="font-family:&quot;20 cpi&quot;"><font size="3">' . $enc_number . '</font></span></span></b></td>

  					</tr>



				<tr>

  					<td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="3">File No.:</font></span></span></td>

  					<td bgcolor="#ffffee" class="vi_data"><span style="font-family:&quot;20 cpi&quot;"><font size="3">' . $file_no . '</font></span></span></b></td>

  					</tr>



  				<tr>

  					<td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="3">Names:</font></span></span></td>

  					<td bgcolor="#ffffee" class="vi_data"><span style="font-family:&quot;20 cpi&quot;"><font size="3">' . $enc_obj->LastName($enc_number) . ', ' . $enc_obj->FirstName($enc_number) . '</font></span></span></b></td>

  					</tr>';
            /*
            
            			  	if ($enc_data['in_dept']==0)
            
              				echo '<tr>
            
              					<td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="4">'.$LDWard.'</font></span></span></td>
            
              					<td bgcolor="#ffffee" class="vi_data"><span style="font-family:&quot;20 cpi&quot;"><font size="4">'.$enc_obj->CurrentWardName($enc_number).'</font></span></span></b></td>
            
              					</tr>';
            
            				 else
            
            				 echo '<tr>
            
              					<td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="4">'.$LDdepartment.'</font></span></span></td>
            
              					<td bgcolor="#ffffee" class="vi_data"><span style="font-family:&quot;20 cpi&quot;"><font size="4">'.$enc_obj->CurrentDeptName($enc_number).'</font></span></span></b></td>
            
              					</tr>';
            */
            /*
            
              				<tr>
            
              					<td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="4">First name:</font></span></span></td>
            
              					<td bgcolor="#ffffee" class="vi_data"><span style="font-family:&quot;20 cpi&quot;"><font size="4">'.$enc_obj->FirstName($enc_number).'</font></span></span></td>
            
              					</tr>
            */
            echo '<tr>



  					<td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="3">RECEIPT DATE</font></span></span></td>

  					<td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="3">' . $bill_date_archived . '</font></span></span></td>

  				</tr>

  				<tr>

  					<td class="headline"><b><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="3">' . $LDBillNumber . '</font></span></span></b></td>

  					<td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="3">' . $bill_nr . '</font></span></span></b></td>

  				</tr>

		<tr>



  				</table>';
            return TRUE;
        }
        return FALSE;
    }
Пример #5
0
$debug ? $db->debug = true : ($db->debug = FALSE);
if (!$encounter_nr) {
    header('Location:' . $root_path . 'language/' . $lang . '/lang_' . $lang . '_invalid-access-warning.php');
    exit;
}
if (!isset($user_origin) || empty($user_origin)) {
    $user_origin = 'lab';
}
# Create encounter object
require_once $root_path . 'include/care_api_classes/class_encounter.php';
$encounter = new Encounter($encounter_nr);
$enc_obj = new Encounter($encounter_nr);
if ($encounter =& $enc_obj->getBasic4Data($encounter_nr)) {
    $patient = $encounter->FetchRow();
}
$enc_obj->loadEncounterData($encounter_nr);
$pid = $enc_obj->PID();
if ($debug) {
    echo "Parameterselect is set to:" . $parameterselect . "<br>";
    echo "mode is set to:" . $mode . "<br>";
    echo "allow update is set to:" . $allow_update . "<br>";
    echo "job id is set to:" . $job_id . "<br>";
    echo "encounter number is: " . $encounter_nr . "<br>";
}
$thisfile = 'labor_datainput.php';
# Create lab object
require_once $root_path . 'include/care_api_classes/class_lab.php';
$lab_obj = new Lab($encounter_nr);
$lab_obj_sub = new Lab($encounter_nr, true);
//to avoid reinserting allready done analysis
if ($result =& $lab_obj->getResult($job_id, $parameterselect)) {
 	$smarty->assign('sName',$sAstart.$sNameBuffer.$sAend);
 }
 */
 if ($bed['date_birth']) {
     if (isset($sg) && $sg) {
         $smarty->assign('sBirthDate', eregi_replace($sg, "<font color=#ff0000><b>" . ucfirst($sg) . "</b></font>", formatDate2Local($bed['date_birth'], $date_format)));
     } else {
         $smarty->assign('sBirthDate', formatDate2Local($bed['date_birth'], $date_format));
     }
 }
 //if ($bed['encounter_nr']) $smarty->assign('sPatNr',$bed['encounter_nr']);
 if ($bed['encounter_nr']) {
     # Create encounter object
     require_once $root_path . 'include/care_api_classes/class_encounter.php';
     $enc_obj = new Encounter($bed['encounter_nr']);
     $enc_obj->loadEncounterData($bed['encounter_nr']);
     $pid = $enc_obj->SelianPID();
     $date = $enc_obj->EncounterDate();
     $dateArr = date_parse($date);
     $smarty->assign('sPatNr', $pid);
     $smarty->assign('sAdmDate', formatDate2Local($date, $date_format) . ' ' . $dateArr['hour'] . ':' . $dateArr['minute']);
 }
 $insurance_name = '';
 if ($bed['insurance_ID']) {
     if ($ins_obj->CheckCurrentContractValidity($bed['insurance_ID'])) {
         $insurance_name = $ins_obj->GetName_insurance_from_id($bed['insurance_ID']);
     }
     $smarty->assign('sInsuranceType', substr($insurance_name, 0, 15));
 } else {
     $smarty->assign('sInsuranceType', substr($insurance_name, 0, 15));
 }
Пример #7
0
    function DisplayBillHeadline($bill_nr, $batch_nr)
    {
        global $LDBatchFileNr, $LDEncounterNr, $LDLastName, $LDFirstName, $LDBday, $LDSex, $LDBillNumber, $LDWard;
        // Maybe optional parameter given to this funciton: Is it a print-out-page or not (For table resize)
        if (func_num_args() > 2) {
            $printout = func_get_arg(2);
        }
        $enc_obj = new Encounter();
        $encoded_batch_number = $enc_obj->ShowPID($batch_nr);
        $enc_number = $enc_obj->GetEncounterFromBatchNumber($batch_nr);
        $bill_head = $enc_obj->GetHospitalAddress();
        $bill_logo = $enc_obj->GetHospitalLogo();
        $bill_name = $enc_obj->GetHospitalName();
        if ($enc_obj->EncounterExists($enc_number)) {
            // Load the encounter data:
            $enc_data = $enc_obj->loadEncounterData($enc_number);
            echo $printout ? '<table width="100%"  border="0" cellspacing=1 cellpadding=0 align="center" >' : '<table width="100%" border="0" cellspacing=1 cellpadding=0 >';
            echo '<tr><td></td></td><td width="40%"><b><table border=0 width="100%" align="left"><tr><td align="center"><b>' . $bill_head . '</td></tr></table></td><td align="right"><img src="../../' . $bill_logo . '" border=0 align="absmiddle" alt=""></td></tr>	';
            echo $printout ? '<table width="200"  border="0" cellspacing=1 cellpadding=0 >' : '<table width="100%"  border="0" cellspacing=1 cellpadding=0 >';
            echo '
  	  		<tr><td></td></tr>

  				<td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="4"><b>' . $LDBatchFileNr . '</b></font></span></span></td>
  					<td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="4">' . $encoded_batch_number . '</font></span></span></b></td>

  				</tr>';
            /*
              				 <tr>
            <td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="4">Admission-Nr.:</font></span></span></td>
            <td bgcolor="#ffffee" class="vi_data"><span style="font-family:&quot;20 cpi&quot;"><font size="4">'.$enc_number.'</font></span></span></b></td>
            </tr>
            
            echo '			<tr>
            <td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="4">Patient Names:</font></span></span></td>
            <td bgcolor="#ffffee" class="vi_data"><span style="font-family:&quot;20 cpi&quot;"><font size="4">'.$enc_obj->LastName($enc_number).', '.$enc_obj->FirstName($enc_number).'</font></span></span></b></td>
            </tr>
            
            <tr>
            <td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="4">Encounter Location:</font></span></span></td>
            <td bgcolor="#ffffee" class="vi_data"><span style="font-family:&quot;20 cpi&quot;"><font size="4">'.$enc_obj->LocationTypeNumber($type_nr).', '.$enc_obj->LocationNumber($loc_nr).' </font></span></span></b></td>
            </tr>';
            
            /*
            <tr>
            <td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="4">First name:</font></span></span></td>
            <td bgcolor="#ffffee" class="vi_data"><span style="font-family:&quot;20 cpi&quot;"><font size="4">'.$enc_obj->FirstName($enc_number).'</font></span></span></td>
            </tr>'
            ;
            */
            /*
              				 <tr>
            <td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="4">Date of birth:</font></span></span></td>
            <td bgcolor="#ffffee" class="vi_data"><span style="font-family:&quot;20 cpi&quot;"><font size="4">'.$enc_obj->BirthDate($enc_number).'</font></span></span></td>
            </tr>
            <tr>
            <td class="headline""><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="4">'.$LDSex.':</font></span></span></td>
            <td class="adm_input"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="4">'.$enc_obj->Sex($enc_number).'</font></span></span></td>
            </tr>
            */
            echo '		<tr>
  					<td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="4">Bill Date</font></span></span></td>
  					<td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="4">' . date('d-m-Y') . '</font></span></span></td>
  				</tr>
  				<tr>
  					<td class="headline"><b><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="4">' . $LDBillNumber . '</font></span></span></b></td>
  					<td class="headline"><span class=SpellE><span style="font-family:&quot;20 cpi&quot;"><font size="4">' . $bill_nr . '</font></span></span></b></td>
  				</tr>
		<tr>




  				</table>';
            return TRUE;
        }
        return FALSE;
    }
Пример #8
0
define('NO_2LEVEL_CHK', 1);
require_once $root_path . 'include/inc_front_chain_lang.php';
$breakfile = $root_path . "modules/nursing/nursing-station-patientdaten.php" . URL_REDIRECT_APPEND . "&edit={$edit}&station={$station}&pn={$pn}";
require $root_path . 'global_conf/inc_remoteservers_conf.php';
if ($disc_pix_mode) {
    $final_path = "{$root_path}{$fotoserver_localpath}{$pn}/";
} else {
    $final_path = "{$fotoserver_http}{$pn}/";
}
//$db->debug=1;
/* Load date formatter */
include_once $root_path . 'include/inc_date_format_functions.php';
/* Create encounter object */
require_once $root_path . 'include/care_api_classes/class_encounter.php';
$encounter = new Encounter();
$encounter->loadEncounterData($pn);
/* Create image object */
require_once $root_path . 'include/care_api_classes/class_image.php';
$img = new Image();
$all_image = $img->getAllImageData($pn);
# Start Smarty templating here
/**
 * LOAD Smarty
 */
# Note: it is advisable to load this after the inc_front_chain_lang.php so
# that the smarty script can use the user configured template theme
require_once $root_path . 'gui/smarty_template/smarty_care.class.php';
$smarty = new smarty_care('nursing', TRUE, FALSE);
# Title in toolbar
$smarty->assign('sToolbarTitle', $LDPhotos);
# hide return button
Пример #9
0
        $sql = "SELECT o.nr " . $sql2;
        if ($cresult = $db->Execute($sql)) {
            $totalcount = $cresult->RecordCount();
        }
        $pagen->setTotalDataCount($totalcount);
    }
    $pagen->setSortItem($oitem);
    $pagen->setSortDirection($odir);
} elseif ($mode == 'select') {
    $dbtable = 'care_op_med_doc';
    $sql = "SELECT * FROM {$dbtable} WHERE nr='{$nr}'";
    if ($ergebnis = $db->Execute($sql)) {
        if ($rows = $ergebnis->RecordCount()) {
            //echo $sql;
            $row = $ergebnis->FetchRow();
            $enc_obj->loadEncounterData($row['encounter_nr']);
            $patientselected = TRUE;
        }
    } else {
        echo "{$LDDbNoRead}<p> {$sql} <p>";
    }
} else {
    if ($_COOKIE['ck_login_logged' . $sid]) {
        $mode = 'dummy';
    }
}
# Start the smarty templating
/**
 * LOAD Smarty
 */
# Note: it is advisable to load this after the inc_front_chain_lang.php so
Пример #10
0
 }
 # Assign the family and first names together with the <a href></a> tags
 # omit <a href></a> tags
 $smarty->assign('sFamilyName', $sFamNameBuffer);
 $smarty->assign('sName', $sNameBuffer);
 # old code
 # $smarty->assign('sFamilyName',$sAstart.$sFamNameBuffer.$sAend);
 # $smarty->assign('sName',$sAstart.$sNameBuffer.$sAend);
 if ($patient['date_birth']) {
     if (isset($sg) && $sg) {
         $smarty->assign('sBirthDate', eregi_replace($sg, "<font color=#ff0000><b>" . ucfirst($sg) . "</b></font>", formatDate2Local($patient['date_birth'], $date_format)));
     } else {
         $smarty->assign('sBirthDate', formatDate2Local($patient['date_birth'], $date_format));
     }
 }
 $enc_obj->loadEncounterData($patient['encounter_nr']);
 $pid = $enc_obj->PID();
 if ($patient['selian_pid']) {
     if (isset($sg) && $sg) {
         $smarty->assign('sPatNr', '=====' . eregi_replace($sg, "<font color=#ff0000><b>" . ucfirst($sg) . "</b></font>", $patient['selian_pid']));
     } else {
         $smarty->assign('sPatNr', $patient['selian_pid']);
     }
 }
 $enc_obj->loadEncounterData($patient['encounter_nr']);
 $encounter_date = $enc_obj->EncounterDate();
 if ($patient['encounter_nr']) {
     $smarty->assign('sAdmissionDate', $encounter_date);
 }
 $sBuffer = '';
 $insurance_name = '';
Пример #11
0
             $sql = "INSERT INTO {$dbtable}\n\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\tyear,\n\t\t\t\t\t\t\t\t\t\tdept_nr,\n\t\t\t\t\t\t\t\t\t\top_room,\n\t\t\t\t\t\t\t\t\t\top_nr,\n\t\t\t\t\t\t\t\t\t\top_date,\n\t\t\t\t\t\t\t\t\t\top_src_date,\n\t\t\t\t\t\t\t\t\t\tencounter_nr,\n\t\t\t\t\t\t\t\t\t\tdiagnosis,\n\t\t\t\t\t\t\t\t\t\tanesthesia,\n\t\t\t\t\t\t\t\t\t\top_therapy,\n\t\t\t\t\t\t\t\t\t\tresult_info,\n\t\t\t\t\t\t\t\t\t\tentry_out,\n\t\t\t\t\t\t\t\t\t\tcut_close,\n\t\t\t\t\t\t\t\t\t\tencoding,\n\t\t\t\t\t\t\t\t\t\tdoc_date,\n\t\t\t\t\t\t\t\t\t\tdoc_time,\n\t\t\t\t\t\t\t\t\t\thistory,\n\t\t\t\t\t\t\t\t\t\tcreate_id,\n\t\t\t\t\t\t\t\t\t\tcreate_time\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t \tVALUES\n\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t'{$pyear}',\n\t\t\t\t\t\t\t\t\t\t'{$dept_nr}',\n\t\t\t\t\t\t\t\t\t\t'{$saal}',\n\t\t\t\t\t\t\t\t\t\t'{$op_nr}',\n\t\t\t\t\t\t\t\t\t\t'{$op_date}',\n\t\t\t\t\t\t\t\t\t\t'" . date(Ymd) . "',\n\t\t\t\t\t\t\t\t\t\t'{$enc_nr}',\n\t\t\t\t\t\t\t\t\t\t'" . htmlspecialchars($diagnosis) . "\n',\n\t\t\t\t\t\t\t\t\t\t'{$anesthesia}',\n\t\t\t\t\t\t\t\t\t\t'" . htmlspecialchars($op_therapy) . "\n',\n\t\t\t\t\t\t\t\t\t\t'" . htmlspecialchars($result_info) . "\n',\n\t\t\t\t\t\t\t\t\t\t'" . strtr($eobuf, ':', '.') . "',\n\t\t\t\t\t\t\t\t\t\t'" . strtr($ccbuf, ':', '.') . "',\n\t\t\t\t\t\t\t\t\t\t'e=" . $encoder . "&d=" . date('Y-m-d') . "&t=" . date('H:i:s') . "',\n\t\t\t\t\t\t\t\t\t\t'" . date('Y-m-d') . "',\n\t\t\t\t\t\t\t\t\t\t'" . date('H:i:s') . "',\n\t\t\t\t\t\t\t\t\t\t'Create " . date('Y-m-d H:i:s') . " " . $_SESSION['sess_user_name'] . "\n',\n\t\t\t\t\t\t\t\t\t\t'" . $_SESSION['sess_user_name'] . "',\n\t\t\t\t\t\t\t\t\t\t'" . date('YmdHis') . "'\n\t\t\t\t\t\t\t\t\t\t)";
             if ($ergebnis = $enc_obj->Transact($sql)) {
                 //echo $sql." new insert <br>";
                 header("location:{$thisfile}?sid={$sid}&lang={$lang}&mode=saveok&enc_nr={$enc_nr}&dept_nr={$dept_nr}&saal={$saal}&thisday={$thisday}&op_nr={$op_nr}");
             } else {
                 echo "{$sql}<br>{$LDDbNoSave}<br>";
             }
         }
         //end of else
     }
     // end of if ergebnis
     break;
     // end of case 'save'
 // end of case 'save'
 case 'get':
     if ($enc_obj->loadEncounterData($enc_nr)) {
         $rows = $enc_obj->record_count;
         $pdata = $enc_obj->encounter;
         $lname = $pdata['name_last'];
         $fname = $pdata['name_first'];
         $bdate = $pdata['date_birth'];
         //$datafound=1;
         $patientfound = TRUE;
         //echo $sql."<br>";
     }
     break;
     // end of case search
 default:
     if ($mode == 'saveok' || $mode == 'edit' || $mode == 'notimereset') {
         if ($enc_obj->loadEncounterData($enc_nr)) {
             $rows = $enc_obj->record_count;