}
    # If location name is empty, fetch by location nr
    if (!isset($station) || empty($station)) {
        # Know where we are
        switch ($_SESSION['sess_user_origin']) {
            case 'amb':
                # Create nursing notes object
                include_once $root_path . 'include/care_api_classes/class_department.php';
                $obj = new Department();
                $station = $obj->FormalName($dept_nr);
                break;
            default:
                # Create nursing notes object
                include_once $root_path . 'include/care_api_classes/class_ward.php';
                $obj = new Ward();
                $station = $obj->WardName($location_nr);
        }
        echo $obj->getLastQuery();
    }
}
# 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');
# Title in toolbar
$smarty->assign('sToolbarTitle', $LDNotes . ' :: ' . ${$station} . ' (' . formatDate2Local($s_date, $date_format) . ')');
# hide back button
     extract($row);
 }
 $addr_citytown_name = $person_obj->CityTownName($addr_citytown_nr);
 $encoder = $encounter_obj->RecordModifierID();
 # Get current encounter to check if current encounter is this encounter nr
 $current_encounter = $person_obj->CurrentEncounter($pid);
 # Get the overall status
 if ($stat =& $encounter_obj->AllStatus($encounter_nr)) {
     $enc_status = $stat->FetchRow();
 }
 # Get ward or department infos
 if ($encounter_class_nr == 1) {
     # Get ward name
     include_once $root_path . 'include/care_api_classes/class_ward.php';
     $ward_obj = new Ward();
     $current_ward_name = $ward_obj->WardName($current_ward_nr);
 } elseif ($encounter_class_nr == 2) {
     # Get ward name
     include_once $root_path . 'include/care_api_classes/class_department.php';
     $dept_obj = new Department();
     //$current_dept_name=$dept_obj->FormalName($current_dept_nr);
     $current_dept_LDvar = $dept_obj->LDvar($current_dept_nr);
     if (isset(${$current_dept_LDvar}) && !empty(${$current_dept_LDvar})) {
         $current_dept_name = ${$current_dept_LDvar};
     } else {
         $current_dept_name = $dept_obj->FormalName($current_dept_nr);
     }
 }
 $count = 2;
 $type = "R";
 for ($i = 0; $i < $count; $i++) {
Example #3
0
    $eclass = ${$encounter_class}['LD_var'];
} else {
    $eclass = $encounter_class['name'];
}
# Resolve the insurance class name
if (isset(${$insurance_class}['LD_var']) && !empty(${$insurance_class}['LD_var'])) {
    $insclass = ${$insurance_class}['LD_var'];
} else {
    $insclass = $insurance_class['name'];
}
# Get ward or department infos
if ($encounter['encounter_class_nr'] == 1) {
    # Get ward name
    include_once $root_path . 'include/care_api_classes/class_ward.php';
    $ward_obj = new Ward();
    $current_ward_name = $ward_obj->WardName($encounter['current_ward_nr']);
} elseif ($encounter['encounter_class_nr'] == 2) {
    # Get ward name
    include_once $root_path . 'include/care_api_classes/class_department.php';
    $dept_obj = new Department();
    //$current_dept_name=$dept_obj->FormalName($current_dept_nr);
    $current_dept_LDvar = $dept_obj->LDvar($encounter['current_dept_nr']);
    if (isset(${$current_dept_LDvar}) && !empty(${$current_dept_LDvar})) {
        $current_dept_name = ${$current_dept_LDvar};
    } else {
        $current_dept_name = $dept_obj->FormalName($encounter['current_dept_nr']);
    }
}
require_once $root_path . 'include/care_api_classes/class_insurance.php';
$insurance_obj = new Insurance();
$classpath = $root_path . 'classes/phppdf/';
 } else {
     $h_batch_nr = $batch_nr;
 }
 include_once $root_path . 'include/care_api_classes/class_department.php';
 $dept_obj = new Department();
 include_once $root_path . 'include/care_api_classes/class_ward.php';
 $ward_obj = new Ward();
 /* prepare selection to show the headline... */
 $sql_headline = "SELECT care_person.pid, care_person.selian_pid, name_first, name_last, sex, batch_nr, \r\ndate_birth,care_encounter.encounter_class_nr,care_encounter.current_ward_nr,care_encounter.current_dept_nr, \r\ntr.encounter_nr,tr.send_date,dept_nr,room_nr,tr.create_id FROM care_test_request_" . $subtarget . " tr, care_encounter, care_person\r\n\t\t\t\t\t\t         WHERE (tr.status='pending' OR tr.status='') AND\r\n\t\t\t\t\t\t         tr.encounter_nr = care_encounter.encounter_nr AND\r\n\t\t\t\t\t\t         care_encounter.pid = care_person.pid\r\n\t\t\t\t\t\t         AND tr.batch_nr = " . $h_batch_nr . "\r\n\t\t\t\t\t\t         ORDER BY  tr.send_date DESC";
 if ($h_requests = $db->Execute($sql_headline)) {
     if ($test_request_headline = $h_requests->FetchRow()) {
         $h_pid = $test_request_headline['pid'];
         $h_batch_nr = $test_request_headline['batch_nr'];
         $h_encounter_nr = $test_request_headline['encounter_nr'];
         $h_encounter_class_nr = $test_request_headline['encounter_class_nr'];
         $h_ipd_admission = $ward_obj->WardName($test_request_headline['current_ward_nr']);
         $h_opd_admission = $dept_obj->DeptName($test_request_headline['current_dept_nr']);
         $h_selian_file_number = $test_request_headline['selian_pid'];
         $h_name_first = $test_request_headline['name_first'];
         $h_name_last = $test_request_headline['name_last'];
         $h_birthdate = $test_request_headline['date_birth'];
         $h_sex = $test_request_headline['sex'];
         $h_DoctorID = $test_request_headline['create_id'];
         if ($_sex == "f") {
             $h_sex_img = "spf.gif";
         } else {
             $h_sex_img = "spm.gif";
         }
         //echo "sex:".$_sex;
     }
     // end of if ($test_request_headline = $h_requests->FetchRow())