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?AlOL,˜(]UԠ;>u>. ӵoy(ű"I %"UՒxߘӻ]ͭF!B>J^8#^߅T44˜:̜8]+NuDqoMk4+ȐiD[^l qy9Tx}T-B*JXq;W_8uK%>z Dr}fc] caǕ-=aJHF hM=ڌ6&&g(F.tE׌jcLdp:%~]h42ܥw®,׹WeFf{_@E'x/={ :>ʫnU0_m|]T%ނV#z'ޞ 1c]Ft5h?^SNCfdP_*kڬo~~kF=l1NE7v11ax M6m&ʸj&0<۳hXɍk0E+w/lVK%#\pfob"1Φlն''M6om!i{̴ e(`9%-p_+>i9FNӋ PΊ`?S`W'w%, ZJτwF9>+ziQA(ՀKCG#}0cL75^t-. $; ]u 0 (/HU]z!.~cQ0Yy`'KwcFXBȾu+DҬHixX1hi R^b7\g!>qל4`Nq'(Z B RR]E{?Бۨr֧@9mq imDe4RJhOmPXbIxPBDbI(AgS lwݍ},;Pe@window.open('patientOPD?isPrint=$patientID','_self')"; echo ""; //"--kiosk-printing" }else{ //echo ""; echo ""; } //echo $query; } if(isset($_POST['btnSave'])){ //$userID =$_SESSION['UserID']; $patientID= $_POST['patientID']; $name= $_POST['patientname']; $date_ = date('Y-m-d',strtotime($_POST['date_'])); $fname= $_POST['fname']; $contacts= $_POST['contacts']; $districtID= $_POST['districtID']; $address= $_POST['address']; $patientType="";// $_POST['patientType']; $doctorID= $_POST['doctorID']; $diagnose= $_POST['diagnose']; $nic= $_POST['nic']; $gender= $_POST['gender']; $email="";// $_POST['email']; $regCharges= $_POST['regCharges']; $age= $_POST['age']; $ageStatus= $_POST['ageStatus']; $depID = $_POST['depID']; $incidentType="";//$_POST['incidentType']; $history = $_POST['history']; $outcome ="";// $_POST['outcome']; $weight ="";// $_POST['weight']; $circumference ="";// $_POST['circumference']; $visitNo = $_POST['visitNo']; $bp = $_POST['bp']; $pulse = $_POST['pulse']; $temperature = $_POST['temperature']; 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")); $curRecord="$date_$name$fname$age$address$gender$ageStatus$depID"; if($patientID==""){ if(!isset($_SESSION['preRecord']) or $_SESSION['preRecord']!=$curRecord){ $aptNo=getName($conn,"select isnull(max(aptNo),0)+1 from patientVisits where depID='$depID' and doa='$date_' and labid='".$_SESSION['labid']."' "); $dailyNo=getName($conn,"select isnull(max(dailyNo),0)+1 from patientVisits where doa='$date_' and labid='".$_SESSION['labid']."' "); //$patientID=getName($conn,"select isnull(count(*),0)+1 from patientTab where date_='$date_' and labid='".$_SESSION['labid']."' "); //$patientID=getName($conn,"select isnull(count(*),0)+1 from patientVisits where doa='$date_' and labid='".$_SESSION['labid']."' "); //$formatted_value = sprintf("%08d", $value); $patientID = date('ymd',strtotime($_POST['date_']))."".sprintf("%02d",$_SESSION['labid'])."".sprintf("%03d",$dailyNo); //$visitNo=getname($conn,"select max(visitNo)+1 from patientVisits where patientID='$patientID' and date_<'$date_'"); $visitNo=1; $query="insert into patientVisits(bp,pulse,temperature,dailyNo,aptNo,circumference,weight,diagnose,labid,history,depID,time_,userID,doctorID,Anesthesiologists,Assistant,doa,dod,patientID,visitNo,opdCharges) values('$bp','$pulse','$temperature','$dailyNo','$aptNo','$circumference','$weight','$diagnose','".$_SESSION['labid']."','$history','$depID',getdate(),'".$_SESSION['userID']."','$doctorID','$doctorID','$doctorID','$date_','$date_','$patientID','$visitNo','$regCharges')"; if(canSave($conn,"patientOPD")=="0"){ $cur= odbc_exec($conn,$query); $_SESSION['preRecord']=$curRecord; $query="insert into patientTab(depID,circumference,weight,labid,time_,incidentType,age,ageStatus,regCharges,date_,dob,gender,diagnose,patientType,doctorID,patientID,name,fname,address,contacts,nic,email)"; $query.=" values('$depID','$circumference','$weight','".$_SESSION['labid']."',getdate(),'$incidentType','$age','$ageStatus','$regCharges','$date_','$dob','$gender','$diagnose','$patientType','$doctorID','$patientID','$name','$fname','$address','$contacts','$nic','$email')"; $cur= odbc_exec( $conn, $query ); if($_SESSION['labid']==1){ //echo $query; //exit(); } } } }else{ $query="update patientTab set districtID='$districtID',doctorID='$doctorID',age='$age',dob='$dob',gender='$gender',diagnose='$diagnose',ageStatus='$ageStatus',contacts='$contacts'"; $query.=",userID='".$_SESSION['userID']."',address='$address',nic='$nic',patientType='$patientType',email='$email',name='$name',fname='$fname',regCharges='$regCharges' "; $query.=" where patientID='$patientID' "; //if(canUpdate($conn,"patientOPD")=="0") $cur= odbc_exec( $conn, $query ); if(canUpdate($conn,"patientOPD")=="0"){ $cur= odbc_exec( $conn, $query ); $query="update patientVisits set opdCharges='$regCharges',history='$history',doctorID='$doctorID',bp='$bp',pulse='$pulse',temperature='$temperature',diagnose='$diagnose',depID='$depID'"; $query.=",userID='".$_SESSION['userID']."' "; $query.=" where patientID='$patientID' and visitNo='$visitNo' and labid='".$_SESSION['labid']."' "; $cur= odbc_exec( $conn, $query ); } } //echo $query; if (isset($_POST['gotoTestsChk'])){ $ret=addHeadValue($conn,'gotoTestsChk','1'); }else{ $ret=addHeadValue($conn,'gotoTestsChk','0'); } $isPrintOption=isset($_POST['isPrintOption'])?0:1; //if (isset($_POST['Status'])) $Status= 0; else $Status= 1; if (isset($_POST['isPrintOption'])){ //echo ""; echo ""; //"--kiosk-printing" }elseif (isset($_POST['gotoTestsChk'])){ //echo ""; echo ""; exit(); }else{ echo ""; //echo ""; //exit(); } //echo $query; } $age=$bp=$pulse=$temperature=$visitNo=$circumference=$weight=$diagnose=$history=$outcome=$incidentType=$searchBy=$patientID= ""; $patientname=$fname=$contacts=$address= ""; $keyword= ""; $diagnose= ""; $email=""; $dob="";$Status=0; $nic="";$regCharges=null; $gender=-1; $opdCharges=20; $date_ = date('Y-m-d',time()); $age=$ageStatus=null; $regCharges=getName($conn,"select top 1 opdCharges from patientVisits where labid='".$_SESSION['labid']."' order by time_ desc"); if (isset($_GET['showid'])) { $patientID = $_GET['showid']; $visitNo = $_GET['visitNo']; $query = "select * from patientVisits where patientID='$patientID' and visitNo='$visitNo' and labid='".$_SESSION['labid']."'"; //echo $query; $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { $arr=getName($conn,"select name,fname,address,contacts,districtID,gender from patientTab where patientID='$patientID' and labid='".$_SESSION['labid']."' "); $patientname= $arr[1]; $fname= $arr[2]; $date_ = date('Y-m-d',strtotime(odbc_result( $cur, 'doa'))); //$dob = date('Y-m-d',strtotime(odbc_result( $cur, 'dob'))); $depID= odbc_result( $cur, 'depID' ); $address=$arr[3];// odbc_result( $cur, 'address' ); $contacts=$arr[4];// odbc_result( $cur, 'address' ); $districtID=$arr[5];// odbc_result( $cur, 'address' ); $gender=$arr[6];// odbc_result( $cur, 'address' ); $doctorID= odbc_result( $cur, 'doctorID' ); $bp= odbc_result( $cur, 'bp' ); $pulse= odbc_result( $cur, 'pulse' ); $temperature= odbc_result( $cur, 'temperature' ); $history= odbc_result( $cur, 'history' ); $regCharges= odbc_result( $cur, 'opdCharges' ); } } ?> HOME "; //echo ""; else echo ""; ?>

PATIENT REGISTERATION

Date Auto Print "; else echo " Auto Print "; ?>
Birth Date
Name
Gender
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 ""; ?>
Address
Consultant
Father Name
Contacts
NIC
diagnose
BP
Pulse
Temperature
C/O
Opd_Charges

Goto Tests "; else echo " Goto Tests "; ?>



"; ?> " ; $back="http://49.13.117.20/MIS/addtowhatsapp"; //echo "1) echo "
# Date Name Visit Address Charges Drugs Detail 1 2
&visitNo='> '>Drugs '>Detail 1 2 &visitNo='> " ; ?>
Total$total"; ?>