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 . '>';
                break;
             $data_array['encounter_nr'] = $pn;
             $data_array['date'] = $date;
             $data_array['time'] = $time;
             $data_array['personell_name'] = $encoder;
             $enc_obj->saveDischargeNotesFromArray($data_array);
         }
         # If patient died
         if ($relart == 7) {
             include_once $root_path . 'include/care_api_classes/class_person.php';
             $person = new Person();
             $death['death_date'] = $date;
             $death['death_encounter_nr'] = $pn;
             $death['history'] = $enc_obj->ConcatHistory("Discharged (cause: death) " . date('Y-m-d H:i:s') . " {$encoder}\n");
             $death['modify_id'] = $encoder;
             $death['modify_time'] = date('YmdHis');
             @$person->setDeathInfo($enc_obj->PID(), $death);
             //echo $person->getLastQuery();
         }
         //echo ("location:$thisfile?sid=$sid&lang=$lang&pn=$pn&bd=$bd&rm=$rm&pyear=$pyear&pmonth=$pmonth&pday=$pday&mode=$mode&released=1&lock=1&x_date=$x_date&x_time=$x_time&relart=$relart&encoder=".strtr($encoder," ","+")."&info=".strtr($info," ","+")."&station=$station&ward_nr=$ward_nr");
         header("location:{$thisfile}?sid={$sid}&lang={$lang}&pn={$pn}&bd={$bd}&rm={$rm}&pyear={$pyear}&pmonth={$pmonth}&pday={$pday}&mode={$mode}&released=1&lock=1&x_date={$x_date}&x_time={$x_time}&relart={$relart}&encoder=" . strtr($encoder, " ", "+") . "&info=" . strtr($info, " ", "+") . "&station={$station}&ward_nr={$ward_nr}");
         exit;
     }
 }
 // end of if (mode=release)
 include_once $root_path . 'include/care_api_classes/class_globalconfig.php';
 $GLOBAL_CONFIG = array();
 $glob_obj = new GlobalConfig($GLOBAL_CONFIG);
 $glob_obj->getConfig('patient_%');
 $glob_obj->getConfig('person_%');
 $result =& $enc_obj->encounter;
 /* Check whether config foto path exists, else use default path */
            }
            # If patient died
            //$db->debug=1;
            if ($relart == 7) {
                include_once $root_path . 'include/care_api_classes/class_person.php';
                $person = new Person();
                $death['death_date'] = $date;
                $death['death_encounter_nr'] = $pn;
                if ($dbtype == 'mysql') {
                    $death['history'] = "CONCAT(history,'Discharged " . date('Y-m-d H:i:s') . " {$encoder}\n')";
                } else {
                    $death['history'] = "history || 'Discharged " . date('Y-m-d H:i:s') . " {$encoder}\n' ";
                }
                $death['modify_id'] = $encoder;
                $death['modify_time'] = date('YmdHis');
                @$person->setDeathInfo($enc_obj->PID(), $death);
                //echo $person->getLastQuery();
            }
            if (!$ward) {
                header("location:{$thisfile}?sid={$sid}&lang={$lang}&pn={$pn}&backpath={$backpath}&bd={$bd}&rm={$rm}&pyear={$pyear}&pmonth={$pmonth}&pday={$pday}&mode={$mode}&released=1&lock=1&x_date={$x_date}&x_time={$x_time}&relart={$relart}&encoder=" . strtr($encoder, " ", "+") . "&info=" . strtr($info, " ", "+") . "&station={$station}&dept_nr={$dept_nr}");
            } else {
                echo '
				<script  language="javascript">
					opener.focus();opener.location.reload();window.close();
				</script>';
            }
            exit;
        }
    }
    include_once $root_path . 'include/care_api_classes/class_globalconfig.php';
    $GLOBAL_CONFIG = array();
Example #4
0
         }
         # If patient died
         //$db->debug=1;
         if ($relart == 7) {
             include_once $root_path . 'include/care_api_classes/class_person.php';
             $person = new Person();
             $death['death_date'] = $date;
             $death['death_encounter_nr'] = $pn;
             if ($dbtype == 'mysql') {
                 $death['history'] = "CONCAT(history,'Discharged " . date('Y-m-d H:i:s') . " {$encoder}\n')";
             } else {
                 $death['history'] = "history || 'Discharged " . date('Y-m-d H:i:s') . " {$encoder}\n' ";
             }
             $death['modify_id'] = $encoder;
             $death['modify_time'] = date('YmdHis');
             $person->setDeathInfo($enc_obj->PID(), $death);
             //echo $person->getLastQuery();
         }
         header("location:{$thisfile}?sid={$sid}&lang={$lang}&pn={$pn}&backpath={$backpath}&bd={$bd}&rm={$rm}&pyear={$pyear}&pmonth={$pmonth}&pday={$pday}&mode={$mode}&released=1&lock=1&x_date={$x_date}&x_time={$x_time}&relart={$relart}&encoder=" . strtr($encoder, " ", "+") . "&info=" . strtr($info, " ", "+") . "&station={$station}&dept_nr={$dept_nr}");
         exit;
     }
 }
 include_once $root_path . 'include/care_api_classes/class_globalconfig.php';
 $GLOBAL_CONFIG = array();
 $glob_obj = new GlobalConfig($GLOBAL_CONFIG);
 $glob_obj->getConfig('patient_%');
 $glob_obj->getConfig('person_%');
 $result = $enc_obj->encounter;
 /* Check whether config foto path exists, else use default path */
 $default_photo_path = 'fotos/registration';
 $photo_filename = $result['photo_filename'];