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4 ʴ %2W{- 8kS@F%f"f3dL#L_]RS7> @#F8q  dL6̀I iT/ݯ ##.^.a~^VWMyr\ U%_OJn NIr~EqՍ~ N ~۱Y06iiZ_gO9!#Dd_wFixYrB'=f PF^9IWQuQYgYy X;s &/6^o j7V3_L0MrVA1cx@SaDq0h2k`8)CGZg٦ fFkNȨ8 *7zn@FV uOV nFK C++٘׏ߡ eo:f(}`fOZ|?\*O'.s="card">
Doctor Detail
#NamePatientsOPDTestsTotal"; } $opdCharges="select isnull(sum(opdCharges),0) from patientVisits where (doa between '$from' and '$to') and doctorID='$empID'"; $amount="select isnull(sum(testCharges),0) from patientTestsView where (date_ between '$from' and '$to') and doctorID='$empID'"; list($no,$patients,$opdCharges,$amount)=getName($conn, "select count(*),($opdCharges),($amount) from patientVisits where (doa between '$from' and '$to') and doctorID='$empID'"); $opdTotal+=$opdCharges; $total+=$opdCharges; echo "$cnt".odbc_result( $cur, 'stdName' )."".$patients."$opdCharges"; echo "$amount" ; $totalTests+=$amount; $total+=$amount; //$amount=round(getName($conn, "select sum(amount) from expenses where (date_ between '$from' and '$to') and userID='$empID'")); //echo "$amount" ; //$total-=$amount; echo "$total" ; $total=0; $cnt+=1; } if($cnt>1){ echo ""; } ?>
User Detail
"; //$arr=array(); $testsids="select distinct userID from patientTests where (date_ between '$from' and '$to') and labid='".$_SESSION['labid']."' "; $servicesids="select distinct userID from services where (date_ between '$from' and '$to') and labid='".$_SESSION['labid']."' "; $opdids="select distinct userID from patientVisits where (doa between '$from' and '$to') and labid='".$_SESSION['labid']."' "; $query= "select ID,stdName from student where labid='".$_SESSION['labid']."' and (ID in($opdids) or ID in($testsids) or ID in($servicesids) ) "; $cur= odbc_exec( $conn, $query ); $cnt=1;$total=$opdTotal=$totalTests=0; while( odbc_fetch_row( $cur ) ) { $empID=odbc_result( $cur, 'ID' ); //$arr[$cnt++]=odbc_result( $cur, 'ID' ); if($cnt==1){ echo "
#NameOPDTestsExpensesTotal"; } $amount="select isnull(sum(testCharges),0) from patientTests where (date_ between '$from' and '$to') and userID='$empID'"; $expenses="select sum(amount) from expenses where (date_ between '$from' and '$to') and userID='$empID'"; list($n,$opdCharges,$amount,$expenses)=getName($conn, "select isnull(sum(opdCharges),0),($amount),($expenses) from patientVisits where (doa between '$from' and '$to') and userID='$empID'"); $opdTotal+=$opdCharges; $total+=$opdCharges; echo "
$cnt".odbc_result( $cur, 'stdName' )."$opdCharges"; //$amount=round(getName($conn, "select isnull(sum(testCharges),0) from patientTests where (date_ between '$from' and '$to') and userID='$empID'")); echo "$amount" ; $totalTests+=$amount; $total+=$amount; //$amount=round(getName($conn, "select sum(amount) from expenses where (date_ between '$from' and '$to') and userID='$empID'")); echo "$expenses" ; $total-=$expenses; echo "$total" ; $total=0; $cnt+=1; } if($cnt>1){ echo ""; echo ""; echo "
" ; echo "".$opdTotal."";//"; echo "".$totalTests."";//"; //echo ""; //echo ""; //echo ""; echo "
"; } echo "
"; $query= "select patientType,sum(charges) as charges from servicesView where (date_ between '$from' and '$to') and labid='".$_SESSION['labid']."' group by patientType"; //echo $query; $cur= odbc_exec( $conn, $query ); $cnt=1;$total=0; while( odbc_fetch_row( $cur ) ) { if ($cnt==1){ echo "
Services ($from to $to)
#Patient TypeAmount"; } $amount= odbc_result( $cur, 'charges' ); echo "
$cnt".odbc_result( $cur, 'patientType' )."$amount" ; $total+=$amount; $cnt+=1; } if($cnt>1){ echo "
Total$total" ; echo "
"; } echo "
"; $query= "select serviceID,sum(charges) as charges,count(*) as cases from servicesView where (date_ between '$from' and '$to') and labid='".$_SESSION['labid']."' group by serviceID"; //echo $query; $cur= odbc_exec( $conn, $query ); $cnt=1;$total=0; while( odbc_fetch_row( $cur ) ) { if ($cnt==1){ echo "
Services Summary ($from to $to)
#DescriptionCasesAmount"; } $testID=getName($conn,"select headName from AccountHeads where id='".odbc_result( $cur, 'serviceID' )."'"); //$description= odbc_result( $cur, 'description' ); $amount= odbc_result( $cur, 'charges' ); echo "
$cnt$testID".odbc_result( $cur, 'cases' )."$amount" ; $total+=$amount; $cnt+=1; } if($cnt>1){ echo "
Total$total" ; echo "
"; } //odbc_close($conn); function getService($typeofService){ if($typeofService=="0") return "Lab Test"; elseif($typeofService=="0") return "Lab Test"; elseif($typeofService=="2") return "Radiology"; elseif($typeofService=="1") return "Cardiology"; elseif($typeofService=="3") return "CT-Scan"; elseif($typeofService=="4") return "X-Ray"; elseif($typeofService=="5") return "MRI"; elseif($typeofService=="6") return "C/S Tests"; else return "Not Defined"; } ?>
Tests Summary
#Test NameCasesAmount"; } $typeofService= getService(odbc_result( $cur, 'typeofService' )); //$typeofService= getName($conn,"select testname from testlab where ID=".odbc_result( $cur, 'testID')); $amount= odbc_result( $cur, 'amount' ); echo "$cnt"; echo "$typeofService"; echo "".odbc_result( $cur, 'cases' )."$amount" ; $total+=$amount; $cnt+=1; } if($cnt!=1) echo "Total$total" ; echo ""; ?>

Pharmacy

#NamePurchasepReturnSalesRetrun"; } $empID=odbc_result( $cur, 'ID' ); //$amount=round(getName($conn, "select sum(amount) from itemInOutSummary where (date_ between '$from' and '$to') and pNo>0 and userID='$empID'")); $pRNo="select round(sum(amount),2) from itemInOutSummary where (date_ between '$from' and '$to') and pRNo>0 and userID='$empID'"; $sale="select round(sum(amount),2) from itemInOutSummary where (date_ between '$from' and '$to') and saleNo>0 and userID='$empID'"; $saleReturn="select round(sum(amount),2) from itemInOutSummary where (date_ between '$from' and '$to') and saleRNo>0 and userID='$empID'"; list($n,$purchase,$pRNo,$sale,$saleReturn)=getName($conn, "select round(sum(amount),2),($pRNo),($sale),($saleReturn) from itemInOutSummary where (date_ between '$from' and '$to') and pNo>0 and userID='$empID'"); echo "$cnt".odbc_result( $cur, 'stdName' )."" ; echo "".round($purchase)."" ; $total+=$purchase; //$amount=round(getName($conn, "select sum(amount) from itemInOutSummary where (date_ between '$from' and '$to') and pRNo>0 and userID='$empID'")); //echo "$amount" ; echo "$pRNo" ; $total+=$pRNo; //$amount=round(getName($conn, "select sum(amount) from itemInOutSummary where (date_ between '$from' and '$to') and saleNo>0 and userID='$empID'")); //echo "$sale" ; echo "$sale" ; //$amount=round(getName($conn, "select sum(amount) from itemInOutSummary where (date_ between '$from' and '$to') and saleRNo>0 and userID='$empID'")); //echo "$amount" ; echo "$saleReturn" ; $total-=$amount; //echo "$total" ; $total=0; $cnt+=1; } echo ""; ?>
Admissions
='2024-11-01' and patientID not in($ids) and recordType='patientAdmission' and labid='".$_SESSION['labid']."' order by time_ asc"; //echo $query; $cur= odbc_exec( $conn, $query ); $cnt=1;$total=0; while( odbc_fetch_row( $cur ) ) { if ($cnt==1) echo "
#DatePatientConsultantProcedureLocationAmountUser"; echo "
".$cnt; echo "".date('d.m.Y',strtotime(odbc_result($cur,'date_'))); echo "".getName($conn,"select name from patientTab where patientID=".odbc_result($cur,'patientID') ); $arr=getName($conn,"select doctorID,operation from patientvisits where patientID='".odbc_result($cur,'patientID')."' and visitNo='1' "); $consultant=getName($conn,"select stdName from student where ID='".$arr[1]."' "); //$pdf->Cell(40,$cellHeight,$pName,1,0,'L'); //$pdf->Cell(30,$cellHeight,$arr[2],1,0,'L'); echo "".$consultant; echo "".$arr[2]; echo "".getHead($conn,odbc_result( $cur, 'accountID' )); echo "".round(odbc_result($cur,'pprice')); echo "".getName($conn,"select stdName from student where ID=".odbc_result($cur,'userID') ); //echo "
$cnt$description".odbc_result($cur,'cases')."$amount" ; $cnt+=1; $total+=odbc_result($cur,'pprice'); } if($cnt!=1){ echo "
Total$total" ; echo "Print" ; echo "
"; } ?>