$username = $_GET['username'];
$ro = new database1();
$ro->getBatchNo();
$myFile = $ro->getReportInformation("homeRoot") . "/COCONUT/trackingNo/batchNo.dat";
$fh = fopen($myFile, 'r');
$batchNo = fread($fh, 100);
fclose($fh);
echo "\r\n\r\n<style type='text/css'>\r\na \r\n{ \r\ntext-decoration:none;\r\ncolor:black;\r\nfont-weight:bold;\r\n }\r\nul { list-style-type:none; }\r\ndisplay: block;\r\n</style>\r\n\r\n";
$ro->getPatientProfile($registrationNo);
if ($ro->selectNow("registeredUser", "module", "username", $ro->getRegistrationDetails_registeredBy()) == "MI") {
    echo "<br><hr><font size=2 color=blue>" . $ro->getPatientRecord_lastName() . " " . $ro->getPatientRecord_firstName() . " " . $ro->getPatientRecord_middleName() . ".</font><hr>";
} else {
    echo "<br><hr><font size=2 color=red>" . $ro->getPatientRecord_lastName() . " " . $ro->getPatientRecord_firstName() . " " . $ro->getPatientRecord_middleName() . "</font><hr>";
}
echo "<ul>";
echo "<li><a href='http://" . $ro->getMyUrl() . "/COCONUT/patientProfile/patientProfile_right.php?registrationNo=" . $ro->getRegistrationDetails_registrationNo() . "' target='rightFrame'><font size=2>Information</font></a></li>";
if ($ro->getRegistrationDetails_caseType() != "") {
    echo "<li><a href='http://" . $ro->getMyUrl() . "/COCONUT/patientProfile/phicLimit/show_phicLimit.php?registrationNo={$registrationNo}&casetype=" . $ro->getRegistrationDetails_caseType() . "' target='rightFrame'><font size=2>Credit Limit</font></a></li>";
} else {
    echo "";
}
/*
if($ro->getRegistrationDetails_room() != "OPD_OPD") {
echo "<li><a href='http://".$ro->getMyUrl()."/COCONUT/patientProfile/creditLimit/viewCreditLimit.php?registrationNo=$registrationNo&username=$username' target='rightFrame'><font size=2>Credit Limit</font></a></li>";
}else {
echo "";
}
*/
echo "<li><a href='http://" . $ro->getMyUrl() . "/COCONUT/patientProfile/patientCharges.php?registrationNo=" . $ro->getRegistrationDetails_registrationNo() . "&username={$username}&show=All&desc=' target='rightFrame'><font size=2>Charges</font></a></li>";
echo "<li><a href='http://" . $ro->getMyUrl() . "/COCONUT/patientProfile/patientChargesTitle.php?registrationNo={$registrationNo}&title=PROFESSIONAL FEE&username={$username}&show=&desc=' target='rightFrame'><font size=2>Doctor</font></a></li>";
echo "<li><a href='http://" . $ro->getMyUrl() . "/COCONUT/patientProfile/patientChargesTitle.php?registrationNo={$registrationNo}&title=LABORATORY&username={$username}&show=&desc=' target='rightFrame'><font size=2>Laboratory</font></a></li>";
include "../../myDatabase1.php";
$registrationNo = $_GET['registrationNo'];
$ro = new database1();
$ro->getPatientProfile($registrationNo);
$ro->setPatientRecord($ro->getRegistrationDetails_patientNo());
echo "\r\n<style type='text/css'>\r\n.informationLabel {\r\nfont-size:15px;\r\nfont-weight:bold;\r\n}\r\n\r\n.initialDiagnosis {\r\n\tborder: 1px solid #CCC;\r\n\tcolor: #000;\r\n\theight:80px;\r\n\twidth: 350px;\r\n\tpadding:4px 4px 4px 2px;\r\n}\r\n\r\n\r\n</style>";
$room = preg_split("/\\_/", $ro->getRegistrationDetails_room());
echo "<br>";
if ($ro->getRegistrationDetails_dateUnregistered() == "") {
    echo "<a href='http://" . $ro->getMyUrl() . "/COCONUT/patientProfile/discharged/discharged.php?registrationNo={$registrationNo}&protoType=Discharged&room=" . $ro->getRegistrationDetails_room() . "'><img src='http://" . $ro->getMyUrl() . "/COCONUT/myImages/unlock.jpeg'></a>&nbsp;&nbsp;<font size=2 color=red><b>" . $ro->getRegistrationDetails_type() . "</b></font><br>";
} else {
    echo "<a href='http://" . $ro->getMyUrl() . "/COCONUT/patientProfile/discharged/discharged.php?registrationNo={$registrationNo}&protoType=Undischarged&room='><img src='http://" . $ro->getMyUrl() . "/COCONUT/myImages/locked1.jpeg'></a>&nbsp;&nbsp;<font size=2 color=red><b>" . $ro->getRegistrationDetails_type() . "</b></font><br>";
}
echo "<font class='informationLabel'>Patient No:</font>&nbsp;" . $ro->getRegistrationDetails_patientNo();
echo "<br><font class='informationLabel'>Registration No:</font>&nbsp;" . $ro->getRegistrationDetails_registrationNo();
echo "<br><font class='informationLabel'>Age:</font>&nbsp;" . $ro->getPatientRecord_age();
echo "<br><font class='informationLabel'>Gender:</font>&nbsp;" . $ro->getPatientRecord_gender();
echo "<br><font class='informationLabel'>Civil Status:</font>&nbsp;" . $ro->getPatientRecord_civilStatus();
echo "<br><font class='informationLabel'>Birth Date:</font>&nbsp;" . $ro->getPatientRecord_Birthdate();
echo "<br><font class='informationLabel'>Contact No#:</font>&nbsp;" . $ro->getPatientRecord_contactNo();
echo "<br><font class='informationLabel'>Senior:</font>&nbsp;" . $ro->getPatientRecord_senior();
echo "<br><font class='informationLabel'>PhilHealth:</font>&nbsp;" . $ro->getPatientRecord_phic();
echo "<br><font class='informationLabel'>PhilHealth Type:</font>&nbsp;" . $ro->getPHICtype_patientRecord();
echo "<br><font class='informationLabel'>Company:</font>&nbsp;" . $ro->getRegistrationDetails_company();
echo "<br><font class='informationLabel'>Time Registered:</font>&nbsp;" . $ro->getRegistrationDetails_timeRegistered();
echo "<br><font class='informationLabel'>Date Registered:</font>&nbsp;" . $ro->getRegistrationDetails_dateRegistered();
echo "<br><font class='informationLabel'>Branch Registered:</font>&nbsp;" . $ro->getRegistrationDetails_branch();
echo "<br><font class='informationLabel'>Case Type:</font>&nbsp;<a href='#' style='text-decoration:none; color:black;'>" . $ro->getRegistrationDetails_caseType() . "</a>";
echo "<br><font class='informationLabel'>Package:</font>&nbsp;<a href='#' style='text-decoration:none; color:black;'>" . $ro->getRegistrationDetails_package() . "</a>";
echo "<br><font class='informationLabel'>Room:</font>&nbsp;" . $room[0];