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ܴ&cBoawul\eKmO%nu_/4!~6pZ!ДNDd}L0ݯSVX2ŕ&\b[r=\lzU!cEZ_$ȉ߮8WGSJV'%G's9w4qF6ilk, '&<}TR0RUL3z{+WE|2<]^ycLKK% 68"R$2NXo&/(RC9аӔG-"6Ƴ5œ-)6s$ 6#ed>j\[#0mҌ1_$*'R^MYrS'͞\}{HY-Lgm]vHD:IupA4͒U{ZvIe *E,ȥ__ n˓'1 MbN#$!>U3t`_xγt ɷgT8ovFiH[B+g,MxyeYS00tg얪M)K6S)-wM4J]ֵ{*@@[2̴Z]TE;%UK8z(_ =Q})ejXڟXjM]$<_3@tuf`Ȍ4m3Ŭ余 RpiHa6);,а Ae>8(pj%1_$*'R^Mfk~HfJܵtAڒu봁r-'&u :I`ԱNp"HޚMP7J|yGp\jcLdp:%~dz #W8Q[WW[mBTWj[! a?ފy"xAp:(*, O(u`̭*C `-hxӣLz*w'Y*j1Mzgr4HV+#ծSnNs!`UT(_OQ^3wL}n bBk0E+w/lVKשHPjiҐ⮽d6A\:"Wn']; $Procedures="";// $_POST['Procedures']; $gender= $_POST['gender']; $regCharges=0;// $_POST['regCharges']; $age= $_POST['age']; $ageStatus= $_POST['ageStatus']; $districtID = $_POST['districtID']; $diseaseID=0;//$_POST['diseaseID']; $history ="";// $_POST['history']; $diagnose = $_POST['diagnose']; $mrno = $_POST['mrno']; $consultant = $_POST['consultant']; $Findings ="";//$_POST['Findings']; if($ageStatus=='Years') $dob=date('Y-m-d', strtotime($date_. "- $age year")); elseif($ageStatus=='Months') $dob=date('Y-m-d', strtotime($date_. "- $age month")); elseif($ageStatus=='Days') $dob=date('Y-m-d', strtotime($date_. "- $age day")); elseif($ageStatus=='Hours') $dob=date('Y-m-d', strtotime($date_. "- $age hour")); if($yearlyno=="") $yearlyno=getName($conn,"select isnull(max(yearlyno),0)+1 from patientTab where year(date_)='$year_' and labid='".$_SESSION['labid']."' "); if($monthlyNo=="") $monthlyNo=getName($conn,"select isnull(max(monthlyNo),0)+1 from patientTab where year(date_)='$year_' and month(date_)='$month_' and labid='".$_SESSION['labid']."' "); $curRecord="$date_$name$yearlyno$age$outcome$gender$ageStatus$"; if($patientID==""){ if(!isset($_SESSION['preRecord']) or $_SESSION['preRecord']!=$curRecord){ $patientID=getName($conn,"select isnull(count(*),0)+1 from patientTab where date_='$date_' and labid='".$_SESSION['labid']."' "); //$formatted_value = sprintf("%08d", $value); $patientID = date('ymd',strtotime($_POST['date_']))."".sprintf("%04d",$patientID); //$visitNo=getname($conn,"select max(visitNo)+1 from patientVisits where patientID='$patientID' and date_<'$date_'"); $visitNo=1; $query="insert into patientVisits(Findings,consultant,diagnose,labid,history,districtID,time_,userID,doctorID,Anesthesiologists,Assistant,doa,dod,patientID,visitNo,opdCharges) values('$Findings','$consultant','$diagnose','".$_SESSION['labid']."','$history','$districtID',getdate(),'".$_SESSION['userID']."','$doctorID','$doctorID','$doctorID','$doa','$dod','$patientID','$visitNo',0)"; if(canSave($conn,"proforma01")=="0"){ $cur= odbc_exec($conn,$query); $_SESSION['preRecord']=$curRecord; $query="insert into patientTab(UserID,districtID,Findings,consultant,diagnose,labid,mrno,history,time_,diseaseID,age,ageStatus,regCharges,date_,dob,gender,operation,patientType,doctorID,patientID,name,yearlyno,outcome,monthlyNo,Procedures,doa,dod)"; $query.=" values('".$_SESSION['userID']."','$districtID','$Findings','$consultant','$diagnose','".$_SESSION['labid']."','$mrno','$history',getdate(),'$diseaseID','$age','$ageStatus','$regCharges','$date_','$dob','$gender','$operation','$patientType','$doctorID','$patientID','$name','$yearlyno','$outcome','$monthlyNo','$Procedures','$doa','$dod')"; $cur= odbc_exec( $conn, $query ); } } }else{ $query="update patientTab set date_='$date_',doa='$doa',dod='$dod',districtID='$districtID',Findings='$Findings',consultant='$consultant',diagnose='$diagnose',mrno='$mrno',history='$history',diseaseID='$diseaseID',doctorID='$doctorID',age='$age',dob='$dob',gender='$gender',operation='$operation',ageStatus='$ageStatus',monthlyNo='$monthlyNo'"; $query.=",userID='".$_SESSION['userID']."',outcome='$outcome',Procedures='$Procedures',patientType='$patientType',name='$name',yearlyno='$yearlyno',regCharges='$regCharges' "; $query.=" where patientID='$patientID' "; $cur= odbc_exec( $conn, $query ); } //echo "




".$query; //echo ""; //echo $query; } $Findings=$Findings=$diagnose=$history=$mrno=$diseaseID=$searchBy=$patientID= ""; $patientname=$yearlyno=$monthlyNo=$outcome= ""; $Department= ""; $keyword= ""; $operation= ""; $Status=0; $Procedures=""; $doctorID=0; $regCharges=null; $gender="1"; //$doa=$dod=$date_ = date('Y-m-d',time()); $age=$ageStatus=null; 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 ) ) { $patientname= odbc_result( $cur, 'name' ); $yearlyno= odbc_result( $cur, 'yearlyno' ); $date_ = date('Y-m-d',strtotime(odbc_result( $cur, 'date_'))); $dob = date('Y-m-d',strtotime(odbc_result( $cur, 'dob'))); $doa = date('Y-m-d',strtotime(odbc_result( $cur, 'doa'))); $dod = date('Y-m-d',strtotime(odbc_result( $cur, 'dod'))); $monthlyNo= odbc_result( $cur, 'monthlyNo' ); $outcome= (odbc_result( $cur, 'outcome' )); $patientType= odbc_result( $cur, 'patientType' ); $districtID= odbc_result( $cur, 'districtID' ); $doa= odbc_result( $cur, 'doa'); $operation= odbc_result( $cur, 'operation' ); $Procedures= odbc_result( $cur, 'Procedures' ); $regCharges= odbc_result( $cur, 'regCharges' ); $gender= odbc_result( $cur, 'gender' ); $age= odbc_result( $cur, "age" ); $ageStatus= odbc_result( $cur, "ageStatus" ); $history= odbc_result( $cur, "history" ); $mrno= odbc_result( $cur, "mrno" ); $diseaseID= odbc_result( $cur, "diseaseID" ); $diagnose= odbc_result( $cur, "diagnose" ); $consultant= (odbc_result( $cur, "consultant" )); $Findings= odbc_result( $cur, "Findings" ); $doctorID= odbc_result( $cur, "doctorID" ); } } ?> HOME "; //echo ""; else echo ""; ?>

Proforma

Date
Yearly No
Monthly No
Mr No
Name ( value='1'> M value='0'> F )
Diagnose "; $cur= odbc_exec( $conn,"select distinct diagnose from patientTab where labid='".$_SESSION["labid"]."' order by diagnose "); while( odbc_fetch_row( $cur ) ) { echo "
consultant
Age
"; if ($ageStatus=='Years') echo ""; else echo ""; if ($ageStatus=='Months') echo ""; else echo ""; if ($ageStatus=='Days') echo ""; else echo ""; if ($ageStatus=='Hours') echo ""; else echo ""; echo ""; ?>
Admission Date
Discharege Date
Outcome "; $cur= odbc_exec( $conn,"select distinct outcome from patientTab where labid='".$_SESSION["labid"]."' order by outcome "); while( odbc_fetch_row( $cur ) ) { echo "


=0 and date_=(select max(date_) from patientTab where labid='".$_SESSION['labid']."') "; if($patientID!="") $query.=" and patientID='$patientID' "; if($_SESSION['userID']!='4183') $query.=" and userID='".$_SESSION['userID']."' "; $query.=" order by date_ desc,yearlyno desc"; //echo $query; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur )) { $patientID=odbc_result( $cur,'patientID'); $visitNo=getname($conn,"select max(visitNo) from patientVisits where patientID='$patientID' "); //echo "" ; echo "
# Date YearNo MonthNo MrNo Name District Diagnose consultant Adm Date DOD LOS Outcome
"; ?>
'> " ; ?>