}
# Mark where we are
$_SESSION['sess_user_origin'] = 'amb';
# Load date formatter
require_once $root_path . 'include/inc_date_format_functions.php';
if ($mode == '' || $mode == 'fresh') {
    # Create encounter object
    include_once $root_path . 'include/care_api_classes/class_encounter.php';
    $enc_obj = new Encounter();
    # Get all outpatients for this dept
    if ($sort == '') {
        $sort = 'name_last';
    }
    $opat_obj =& $enc_obj->OutPatientsBasic($sort, false);
    //echo $enc_obj->getLastQuery();
    $rows = $enc_obj->LastRecordCount();
    /*
    # If dept name is empty, fetch by location nr
    if(!isset($dept)||empty($dept)){
    	# Create department object
    	include_once($root_path.'include/care_api_classes/class_department.php');
    	$dept_obj= new Department;
    	$deptLDvar=$dept_obj->LDvar($dept_nr);
    	if(isset($$deptLDvar)&&!empty($$deptLDvar)) $dept=$$deptLDvar;
    		else $dept=$dept_obj->FormalName($dept_nr);
    }
    */
    # set to edit mode
    $edit = true;
    # Create the waiting outpatients� list
    $dnr = isset($w_waitlist) && $w_waitlist ? 0 : $dept_nr;
    $pagen->setMaxCount($GLOBAL_CONFIG['pagin_patient_search_max_block_rows']);
}
if (($mode == 'search' || $mode == 'paginate') && !empty($searchkey)) {
    # Convert other wildcards
    $searchkey = strtr($searchkey, '*?', '%_');
    # Save the search keyword for eventual pagination routines
    if ($mode == 'search') {
        $_SESSION['sess_searchkey'] = $searchkey;
    }
    include_once $root_path . 'include/inc_date_format_functions.php';
    include_once $root_path . 'include/care_api_classes/class_encounter.php';
    $enc_obj = new Encounter();
    $encounter =& $enc_obj->searchLimitEncounterBasicInfo($searchkey, $pagen->MaxCount(), $pgx, $oitem, $odir);
    //echo $enc_obj->getLastQuery();
    # Get the resulting record count
    $linecount = $enc_obj->LastRecordCount();
    if ($linecount == 1 && $mode == 'search') {
        $row = $encounter->FetchRow();
        header("location:" . $root_path . "modules/nursing/nursing-station-patientdaten-doconsil-" . $target . ".php" . URL_REDIRECT_APPEND . "&pn=" . $row['encounter_nr'] . "&edit=1&status=" . $status . "&target=" . $target . "&user_origin=" . $user_origin . "&noresize=1&mode=");
        exit;
    }
    //$linecount=$address_obj->LastRecordCount();
    $pagen->setTotalBlockCount($linecount);
    # Count total available data
    if (isset($totalcount) && $totalcount) {
        $pagen->setTotalDataCount($totalcount);
    } else {
        @$enc_obj->searchEncounterBasicInfo($searchkey);
        $totalcount = $enc_obj->LastRecordCount();
        $pagen->setTotalDataCount($totalcount);
    }
Ejemplo n.º 3
0
    $TP_href_3 = $url_prepend . '_plain';
    $TP_href_4 = $url_prepend . '_data';
    $TP_selector =& $TP_obj->load('registration_admission/tp_sick_confirm_selectstyle.htm');
    eval("echo {$TP_selector};");
    exit;
}
//require_once($root_path.'include/inc_config_color.php');
require_once $root_path . 'include/inc_date_format_functions.php';
require_once $root_path . 'include/inc_editor_fx.php';
require_once $root_path . 'include/care_api_classes/class_person.php';
# Load the encounter class
require_once $root_path . 'include/care_api_classes/class_encounter.php';
$enc_obj = new Encounter($_SESSION['sess_full_en']);
if (!isset($mode) || empty($mode)) {
    $sickconfirm_obj =& $enc_obj->allSicknessConfirm();
    if ($rows = $enc_obj->LastRecordCount()) {
        $mode = 'show';
        # If $get_nr is non-empty, get the  single record
        if (isset($get_nr) && $get_nr) {
            if (!($single_obj =& $enc_obj->getSicknessConfirm($get_nr))) {
                $get_nr = 0;
            }
        } else {
            $get_nr = 0;
        }
    } else {
        $mode = '';
    }
}
# Get the insurance data of the encounter
if ($insure_obj = $enc_obj->EncounterInsuranceData()) {