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Njpꯍ OȁxgoLA9n̎K@C?E0>Th7Tɤ]|ppԂMkdE,8S}O:Gd}Mlx+lbpm k1\Ѡ{x mh Duh Nqq"G3R{ig%4-E>5I?i/4 ~JkK+4mPv{,"So^ַϠ*pF_@i|ǵV.9<9m%~u–, *ՠ){s}2"Ͱ:u EX4cSkߎʪRLy53d0r$ dѹYm= +RMi~Khbp0+Gbhj{7 a()ՒZױc>_l!{ @X|ZD-T P:WpjO؇ǔ(t˶ϖj5væ=GΏӖ&z}L`!=q45n@,睠4.tk+3ݓ8Xh ?TYv ңOI^DcjhI=u8n Г.svc$nG7aOS$65}-x'ygtM>Ÿ0n۠Eer/B2apIn0_f*!h]K8l˅_1c-뱾wJ![r(?X4J-6&~颺L֖}e2ށٍzrfۂyaxz^7q8ZEnG%p-i#mŹlo |`@t}!
S.#DateNameFather NameAddressContactNICEDITDetailSlipPad"; $date_= date("d-m-Y", strtotime(odbc_result( $cur, 'date_' ))); $patientID= odbc_result( $cur, 'patientID' ); $regCharges= odbc_result( $cur, 'regCharges' ); $name= odbc_result( $cur, 'name' ); $fname= odbc_result( $cur, 'fname' ); $address= odbc_result( $cur, 'address' ); $contacts= odbc_result( $cur,'contacts'); $doctorID= odbc_result( $cur,'doctorID'); $nic= odbc_result( $cur,'nic'); echo "
$cnt$date_$name$fname$address$contacts$niceditDetail" ; echo "Slip"; echo "Pad"; } echo "
"; if ($cnt==0) echo "No Record Found"; exit(); } if(isset($_POST['btnSave'])){ //$userID =$_SESSION['UserID']; $patientID= $_POST['patientID']; $name= $_POST['name']; $date_ = date('Y-m-d',strtotime($_POST['date_'])); //$dob = date('Y-m-d',strtotime($_POST['dob'])); $fname= $_POST['fname']; $contacts= $_POST['contacts']; $address= $_POST['address']; $patientType= $_POST['patientType']; $doctorID= $_POST['doctorID']; $remarks= $_POST['remarks']; $nic= $_POST['nic']; $gender= $_POST['gender']; $email= $_POST['email']; $regCharges= $_POST['regCharges']; $age= $_POST['age']; $ageStatus= $_POST['ageStatus']; $depID = $_POST['depID']; $opdCharges=0; if($patientID==""){ $patientID=getName($conn,"select isnull(max(patientID),0)+1 from patientTab"); //$visitNo=getname($conn,"select max(visitNo)+1 from patientVisits where patientID='$patientID' and date_<'$date_'"); $visitNo=1; $query="insert into patientVisits(depID,time_,userID,doctorID,Anesthesiologists,Assistant,doa,dod,patientID,visitNo,opdCharges) values('$depID',getdate(),'".$_SESSION['userID']."','$doctorID','$doctorID','$doctorID','$date_','$date_','$patientID','$visitNo','$opdCharges')"; //$query="insert into patientVisits(time_,userID,doctorID,doa,dod,patientID,visitNo,opdCharges) values(getdate(),'".$_SESSION['userID']."','$doctorID','$date_','$date_','$patientID','$visitNo','$opdCharges')"; $cur= odbc_exec( $conn, $query ); $query="insert into patientTab (age,ageStatus,regCharges,date_,dob,gender,remarks,patientType,doctorID,patientID,name,fname,address,contacts,nic,email)"; $query.=" values('$age','$ageStatus','$regCharges','$date_','$dob','$gender','$remarks','$patientType','$doctorID','$patientID','$name','$fname','$address','$contacts','$nic','$email')"; }else{ $query="update patientTab set age='$age',dob='$dob',gender='$gender',remarks='$remarks',ageStatus='$ageStatus',contacts='$contacts'"; $query.=",address='$address',nic='$nic',patientType='$patientType',email='$email',name='$name',fname='$fname',regCharges='$regCharges' "; $query.=" where patientID='$patientID' "; } //echo $query; $cur= odbc_exec( $conn, $query ); $isPrintOption=isset($_POST['isPrintOption'])?0:1; //if (isset($_POST['Status'])) $Status= 0; else $Status= 1; if (isset($_POST['isPrintOption'])) echo ""; else echo ""; //echo $query; } if(isset($_POST['btnSaveNext'])){ $patientID= $_POST['patientID']; $name= $_POST['name']; $date_ = date('Y-m-d',strtotime($_POST['date_'])); //$dob = date('Y-m-d',strtotime($_POST['dob'])); $fname= $_POST['fname']; $contacts= $_POST['contacts']; $address= $_POST['address']; $patientType= $_POST['patientType']; $doctorID= $_POST['doctorID']; $remarks= $_POST['remarks']; $nic= $_POST['nic']; $gender= $_POST['gender']; $email= $_POST['email']; $regCharges= $_POST['regCharges']; $age= $_POST['age']; $ageStatus= $_POST['ageStatus']; $depID = $_POST['depID']; if($patientID==""){ $patientID=getName($conn,"select isnull(max(patientID),0)+1 from patientTab"); //$visitNo=getname($conn,"select max(visitNo)+1 from patientVisits where patientID='$patientID' and date_<'$date_'"); $visitNo=1; //$query="insert into patientVisits(time_,investigations,Anesthesiologists,Assistant,userID,dieseas,operation,findings,history,depID,doctorID,doa,dod,patientID,visitNo,opdCharges) values(getdate(),'$investigations','$Anesthesiologists','$Assistant','".$_SESSION['userID']."','$dieseas','$operation','$findings','$history','$depID','$doctorID','$doa','$dod','$patientID','$visitNo','$opdCharges')"; $query="insert into patientVisits(depID,time_,userID,doctorID,Anesthesiologists,Assistant,doa,dod,patientID,visitNo,opdCharges) values('$depID',getdate(),'".$_SESSION['userID']."','$doctorID','$doctorID','$doctorID','$date_','$date_','$patientID','$visitNo','$opdCharges')"; $cur= odbc_exec( $conn, $query ); $query="insert into patientTab (age,ageStatus,regCharges,date_,dob,gender,remarks,patientType,doctorID,patientID,name,fname,address,contacts,nic,email)"; $query.=" values('$age','$ageStatus','$regCharges','$date_','$dob','$gender','$remarks','$patientType','$doctorID','$patientID','$name','$fname','$address','$contacts','$nic','$email')"; }else{ $query="update patientTab set age='$age',dob='$dob',gender='$gender',remarks='$remarks',ageStatus='$ageStatus',contacts='$contacts'"; $query.=",address='$address',nic='$nic',patientType='$patientType',email='$email',name='$name',fname='$fname',regCharges='$regCharges' "; $query.=" where patientID='$patientID' "; } //echo $query; $cur= odbc_exec( $conn, $query ); echo ""; } if (isset($_GET['showid'])) { $patientID = $_GET['showid']; $query = "select * from patientTab where patientID='$patientID'"; //echo $query; $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { $name= odbc_result( $cur, 'name' ); $fname= odbc_result( $cur, 'fname' ); $date_ = date('Y-m-d',strtotime(odbc_result( $cur, 'date_'))); $dob = date('Y-m-d',strtotime(odbc_result( $cur, 'dob'))); $contacts= odbc_result( $cur, 'contacts' ); $address= odbc_result( $cur, 'address' ); $patientType= odbc_result( $cur, 'patientType' ); $doctorID= odbc_result( $cur, 'doctorID' ); $email= odbc_result( $cur, 'email'); $remarks= odbc_result( $cur, 'remarks' ); $nic= odbc_result( $cur, 'nic' ); $regCharges= odbc_result( $cur, 'regCharges' ); $gender= odbc_result( $cur, 'gender' ); $age= odbc_result( $cur, "age" ); $ageStatus= odbc_result( $cur, "ageStatus" ); } } echo "
"; echo "
"; echo ""; echo "
PATIENT FORM "; echo "
"; echo ""; echo "
Date"; if($Status==0) echo " Enable"; else echo " Enable"; //echo "
Birth Date"; echo "
Patient Type +"; echo " Department : +"; if($doctorID=="") $doctorID=getName($conn,"select doctorID from patientVisits where patientID=(select max(patientID) from patientVisits)"); echo "
Doctor"; echo "
Name"; if($gender=='0') echo " Male Female"; else echo " Male Female"; echo "
Age"; echo ""; echo "
Father Name"; echo "
Contacts"; //echo "
Emergency Contact"; echo "
Address"; echo "
E-mail"; echo "
NIC"; echo "
remarks"; echo "
Reg Charges"; //echo "Print "; if($isPrint!=null) echo " Print "; else echo " Print "; echo "
"; //echo ""; //echo "   "; ?> "; echo ""; echo "
"; echo ""; echo ""; //echo "
"; echo ""; echo ""; echo "
"; echo ""; $patientID= ""; $name= ""; if(isset($_POST['find'])){ $keyword= $_POST['keyword']; } if ($keyword!=""){ $query= "select name,fname,address,contacts,doctorID,patientID,date_,regCharges,nic from patientTab where patientID>0 and ".$_POST['searchBy']." like'%$keyword%' order by ".$_POST['searchBy'].",date_ desc"; }else{ $query= "select name,fname,address,contacts,doctorID,patientID,date_,regCharges,nic from patientTab where patientID>=0 and date_=(select max(date_) from patientTab) order by patientID desc"; } //echo $query; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { if ($cnt==1) echo "
S.#NameFather NameAddressContactNICEDITDetailSlipPad"; $date_= date("d-m-Y", strtotime(odbc_result( $cur, 'date_' ))); $patientID= odbc_result( $cur, 'patientID' ); $regCharges= odbc_result( $cur, 'regCharges' ); $name= odbc_result( $cur, 'name' ); $fname= odbc_result( $cur, 'fname' ); $address= odbc_result( $cur, 'address' ); $contacts= odbc_result( $cur,'contacts'); $doctorID= odbc_result( $cur,'doctorID'); $nic= odbc_result( $cur,'nic'); //if (odbc_result( $cur,8)=="0") $status="Enrolled" ; else $status="Struck Off" ; echo "
$cnt$name$fname$address$contacts$niceditDetail" ; echo "Slip"; echo "Pad"; $cnt+=1; } echo "
"; if ($cnt==1) echo "No Record Found"; odbc_close($conn); ?>