File manager - Edit - /home/autoph/public_html/ahglegal/includes/phic/new.php
Back
<?php if (isset($_GET['CreateClaim'])){ $insertHeader = 'true'; } if (isset($_GET['error'])){ $insertHeader = 'false'; } if (isset($_POST['deletePatient'])){ //DELETE RECORDS $dtl_id = $_POST['dtl_id']; $hdrID = $_POST['hdrID']; echo "Delete ID: ". $dtl_id; mysql_query("UPDATE `phic_claim_summary_dtl` SET `delete`= '1' WHERE `id`='$dtl_id'"); $insertHeader = 'false'; } if (isset($_POST['PostClaim'])){ //DELETE RECORDS $transactionID = $_POST['transactionID']; mysql_query("UPDATE `phic_claim_summary` SET `posted`= '1' WHERE `ref_number`='$transactionID'"); $insertHeader = 'false'; } if (isset($_POST['insertPatient'])){ $ptransID=$_GET['transID']; $pstartDate=$_GET['startdate']; $pendDate=$_GET['enddate']; $transHDRID = $_POST['transHDRID']; $txDateA = $_POST['txDateA']; // echo "Transaction ID: ". $ptransID; //echo "<br>Header ID: ". $transHDRID; $transHDRID = mysql_result(mysql_query("SELECT `id` FROM `phic_claim_summary` WHERE `ref_number`='$ptransID'"),0); //exit; $pselCom =$_GET['selCom']; $pcompName = explode("---",$pselCom); $pcompanyID = $pcompName[1]; $selUser = $_POST['selUser']; $exSelUser = explode("---",$selUser); $selUserID = $exSelUser[1]; $patientLname= mysql_result(mysql_query("SELECT `patient_lname` FROM `patient_list` WHERE `patient_id`='$selUserID'"),0); $patientFname= mysql_result(mysql_query("SELECT `patient_fname` FROM `patient_list` WHERE `patient_id`='$selUserID'"),0); //CHECK IF CLAIMS EXISTS IN RECORS $checkClaims = mysql_result(mysql_query("SELECT COUNT('id') FROM `phic_claim_summary_dtl` WHERE `delete`= 0 AND `patient_id`='$selUserID' AND `tx_dateA` ='$txDateA' AND `branch_id`='$pcompanyID'"),0); if($checkClaims > 0){ $errorFileS = mysql_result(mysql_query("SELECT `date_start` FROM `phic_claim_summary_dtl` WHERE `delete`= 0 AND `patient_id` ='$selUserID' AND `date_start` BETWEEN '$pstartDate' AND '$pendDate' AND `branch_id`='$pcompanyID' || `delete`= 0 AND `patient_id` ='$selUserID' AND `date_end` BETWEEN '$pstartDate' AND '$pendDate' AND `branch_id`='$pcompanyID'"),0); $errorFileE= mysql_result(mysql_query("SELECT `date_end` FROM `phic_claim_summary_dtl` WHERE `delete`= 0 AND `patient_id` ='$selUserID' AND `date_start` BETWEEN '$pstartDate' AND '$pendDate' AND `branch_id`='$pcompanyID' || `delete`= 0 AND `patient_id` ='$selUserID' AND `date_end` BETWEEN '$pstartDate' AND '$pendDate' AND `branch_id`='$pcompanyID'"),0); echo " <center> <div style='position:absolute;width:550px;height:220x;left:300px;top:200px;border:1px solid gray;border-radius:5px;background:white;z-index:7500'> <div style='position:relative'> <table style='width:100%;border-collapse:collapse'> <tr> <td colspan='2' class='lightGradient' style='border:1px solid lightgray;height:28px;font-size:12px;font-weight:normal;color:gray;border-right:1px solid #f2f2f2'> <img src='images/bullet.gif' width='10px' height='10px'> </img>"; echo "<b>DUPLICATE FILING DETECTED </b> </td> <td align='center' class='lightGradient' style='width:3%;background:#F2F2F2;border:1px solid lightgray'> <a href='phic_claims.php?view=new&subView=new&transID=".$_GET['transID']."&startdate=".$_GET['startdate']."&enddate=".$_GET['enddate']."&selCom=".$_GET['selCom']."&CreateClaim=Save+Record&id=".$_GET['id']."&error=true'> <input type='button' name='close' value='X' style='width:25px;font-size:16;font-weight:bold;height:25px'></a> </td> </tr> </table> </div> <table> <tr> <td align='left' style='padding-left:15px;padding-top:0px;padding-right:15px;font-size:12px;font-weight:normal;color:black;width:500px;height:140px;background:white;border:1px solid white'> ERROR!<br><br> Duplicate Filing is detected for Patient <i style='font-size:14px;color:red'>".$patientLname.", " .$patientFname. "</i>. Same entry was filed on same date range <i style='font-size:12px;color:red'>". $errorFileS ." - ".$errorFileE."</i>. Please check your entry and try again!. <br><br>Thank you! </td> </tr> </table> </div> </center>"; $insertHeader = 'false'; exit; } $dtlsql="INSERT INTO `phic_claim_summary_dtl` (`id`,`hdr_id`,`ref_number`,`patient_id`,`branch_id`,`encoded_by`,`date_start`,`date_end`,`type`,`amount`,`notes`,`last_name`,`first_name`,`date_created`,`tx_dateA` ) VALUES('','$transHDRID','$ptransID','$selUserID','$pcompanyID','$user','$pstartDate','$pendDate','New','','','$patientLname','$patientFname','$toDate','$txDateA' )";// if(!mysql_query($dtlsql)){ die('Error: ' . mysql_error()); }else{ } $insertHeader = 'false'; echo "My Header Tagging: ". $insertHeader; } ?> <div style='position:absolute;border:1px solid gray;border-radius:5px;width:900px;height:550px;background:white;z-index:100000;top:50px;left:260px'> <div style='position:relative;border-radius 5px 5px 0px 0px'> <table style='width:100%;border-collapse:collapse'> <tr> <td colspan='2' class="lightGradient" style="border:1px solid lightgray;height:28px;font-size:14px;font-weight:normal;color:gray;border-right:1px solid #f2f2f2"> <img src="images/bullet.gif" width="10px" height="10px"> </img> <b style="font-size:14px;color:red"> <?php if(($_GET['subView'])==='home'){echo "DASHBOARD";}else{echo "CREATE NEW PHIC CLAIMS ";}?><?php echo "<b style='font-size:18px'>" . $_GET['search'] ."</b>";?> </b> </td> <td align='center' class="lightGradient" style='width:3%;background:#F2F2F2;border:1px solid lightgray'> <a href='phic_claims.php?search=<?php echo $_GET['search'];?>&view=plist&id=<?php echo $_GET['id'];?>'> <input type='button' name='close' value='X' style='width:25px;font-size:16;font-weight:bold;height:25px'></a> </td> </tr> </table> </div> <div style='padding:5px;position:relative;height:100px;width:98.7%;border:1px solid #fafafa;background:#f4f4f4;border-bottom:1px solid lightgray'> <?php if(isset($_GET['CreateClaim'])){ $isDisable='Disabled'; $isDisableNew='Enable'; $value='Locked'; $fontColor='lightgray'; $trueShow ='True'; $bgColor ='#F2F2F2'; }else { $isDisable='Enable'; $isDisableNew='Disabled'; $value='Save Record'; $fontColor='black'; $trueShow ='false'; } if(isset($_GET['editPatient'])){ $isDisable='Disabled'; $isDisableNew='Enable'; $value='Locked'; $fontColor='lightgray'; $trueShow ='True'; $bgColor ='#F2F2F2'; } ?> <form action='' method='GET'> <?php $transID = mysql_result(mysql_query("SELECT `fv_phic_id` FROM `trans_code` WHERE `fv_phic_id`!=''"),0); ?> <input type='hidden' name='view' value='new'> <input type='hidden' name='subView' value='new'> <input type='hidden' name='transID' value='<?php echo $transID;?>'> <center><table> <tr style='background:#f4f4f4'> <td style='border:0px solid gray'>Date Start:<br> <input <?php echo $isDisable;?> required align='center' id='datepickerA' type='text' name='startdate' value='<?php echo $_GET['startdate']?>' style='background:<?php echo $bgColor;?>;font-size:12px;color:<?php $fontColor;?>;text-align:center;width:80px;height:30px;border:1px solid lightgray; border-radius:3px'> </td> <td align = 'center' style='border:0px solid gray;width:10px;background:#f4f4f4'> -<br> </td> <td style='border:0px solid gray'>Date End:<br> <input <?php echo $isDisable;?> required align='center' id='datepicker' type='text' name='enddate' value='<?php echo $_GET['enddate']?>' style='background:<?php echo $bgColor;?>;font-size:12px;color:<?php $fontColor;?>;text-align:center;width:80px;height:30px;border:1px solid lightgray; border-radius:3px'> </td> <td align = 'center' style='border:0px solid gray;width:10px;background:#f4f4f4'> <br> </td> <td style='border:0px solid gray'>Select Center:<br> <select <?php echo $isDisable;?> name="selCom" style="width:300px;height:30px;font-size:14px;color:<?php $fontColor;?>;border;1px solid lightgry;border:1px solid lightgray;background:<?php echo $bgColor;?>;border-radius:3px"> <?php $getCom = mysql_query("SELECT * FROM `company` WHERE 1"); while($myMT = mysql_fetch_array($getCom)){ ?> <option style="font-size:14px;color:blue;"> <?php echo "<b style='font-size:14px;'>".$myMT['company_name']. "</b>";?> ---<?php echo $myMT['company_id'];?></option> <?php }?> </select> </td> <td style='border:0px solid gray'><br> <input type='submit' name='CreateClaim' value='<?php echo $value;?>' style='height:30px;width:80px;border:1px solid lightgray;border-radius:3px;background:<?php echo $bgColor;?>;' <?php echo $isDisable;?>> <a href='phic_claims.php?view=new&subView=new'><input type='button' name='New' value='New' style='height:30px;width:80px;border:1px solid lightgray;border-radius:3px'<?php echo $isDisableNew;?> > </td> </tr> </form> <br> <?php $tID = $_GET['transID']; $transHDRID = mysql_result(mysql_query("SELECT `id` FROM `phic_claim_summary` WHERE `ref_number`='$tID'"),0); $checkPosted = mysql_result(mysql_query("SELECT COUNT('id') FROM `phic_claim_summary` WHERE `ref_number`='$tID' AND `posted`='1'"),0); if($trueShow==='True'){ echo "<form action='' method='POST'>"; echo "<input type='hidden' name='view' value='new'>"; echo "<input type='hidden' name='subView' value='new'>"; echo "<input type='hidden' name='ptransID' value='".$tID."'>"; echo "<input type='hidden' name='transHDRID' value='".$transHDRID."'>"; echo "<td colspan='6' style='border:0px solid gray;background:#f4f4f4;border:1px solid white;height:30px;'>"; if($checkPosted > 0) { $chkDisabled ='Disabled'; $bgcolor='lightgray'; echo "<select disabled name='selUser' style='width:300px;height:30px;font-size:14px;color:gray;border;1px solid lightgry;border:1px solid lightgray;background:white;border-radius:3px'>"; $getU = mysql_query("SELECT * FROM `patient_list` WHERE `nephro_status`!='Expired' ORDER by `patient_lname` ASC"); while($myMT = mysql_fetch_array($getU)){ echo "<option style='font-size:14px;color:gray;'> <b style='font-size:14px'>".$myMT['patient_lname'].", ". $myMT['patient_fname']."</b>> ---". $myMT['patient_id']."</option>"; } echo "</select>"; }else { $chkDisabled ='enabled'; $bgcolor='#F78181'; echo "<a href='phic_claims.php?view=new&subView=new&transID=".$_GET['transID']."&startdate=".$_GET['startdate']."&enddate=".$_GET['enddate']."&selCom=".$_GET['selCom']."&CreateClaim=Save+Record&id=".$_GET['id']."'><ABBR title='Add New Patient'><input type='button' name='NewPatient' value='+' style='width:30px;height:30px;border:1px solid lightgray;'></ABBR></a> <select name='selUser' style='width:300px;height:30px;font-size:14px;color:blue;border;1px solid lightgry;border:1px solid lightgray;background:white;border-radius:3px'>"; $getU = mysql_query("SELECT * FROM `patient_list` WHERE `nephro_status`!='Expired' ORDER by `patient_lname` ASC"); while($myMT = mysql_fetch_array($getU)){ echo "<option style='font-size:14px;color:blue;'> <b style='font-size:14px;'>".$myMT['patient_lname'].", ". $myMT['patient_fname']."</b>> ---". $myMT['patient_id']."</option>"; } echo "</select>"; } if($checkPosted > 0) { echo "<a href='phic_claims.php?view=new&subView=new&transID=".$_GET['transID']."&startdate=".$_GET['startdate']."&enddate=".$_GET['enddate']."&selCom=".$_GET['selCom']."&CreateClaim=Save+Record&id=".$_GET['id']."'><ABBR title='Add New Patient'><input type='button' name='NewPatient' value='+' style='width:30px;height:30px;border:1px solid lightgray;'></ABBR></a> <input disabled type='submit' name='insertPatient' value='Add Patient' style='height:30px;width:80px;border:1px solid lightgray;border-radius:3px'> </form>"; }else { echo "<input type='text' required id='datepickerC' placeholder='Tx Date' name='txDateA' style='background:white;text-align:center;font-size:12px;color:<?php $fontColor;?>;height:30px;width:125px;border:1px solid gray;border-radius:5px'> <input type='submit' name='insertPatient' value='Add Patient' style='height:30px;width:80px;border:1px solid lightgray;border-radius:3px'> </form>"; } echo "</td>"; echo "<td style='border:0px solid lightgray;background:#f4f4f4;'>";echo "<form action='' method='POST'>"; if($checkPosted > 0) { echo "<input type='hidden' name='transactionID' value='".$_GET['transID']."'> <input disabled type='submit' name='PostClaim' value='POST' style='height:30px;width:70px;border:1px solid lightgray;border-radius:3px;background:#F78181'> </form>"; }else { echo "<input type='hidden' name='transactionID' value='".$_GET['transID']."'> <input type='submit' name='PostClaim' value='POST' style='height:30px;width:70px;border:1px solid lightgray;border-radius:3px;background:#F78181'> </form>"; } echo "</td>"; } ?> </table></center> </div> <div style='overflow:auto;border-radius:0px 0px 5px 5px;padding:5px;position:relative;height:397px;width:98.7%;border:1px solid #000;background:#fff;border-bottom:1px solid lightgray'> <table style='width:100%;border-collapse:collapse'> <tr> <th style='width:5%'>No.</th> <th style='width:10%'>Ref.No.</th> <th style='width:25%'>Date Covered</th> <th style='width:25%'>Patient Name.</th> <th style='width:15%'>Confinement Date.</th> <th style='width:10%'>Branch ID.</th> <th style='width:10%'>Encoded By</th> <th style='width:10%'> </th> </tr> <?php $refNumber =$_GET['transID']; $getList = mysql_query("SELECT * FROM `phic_claim_summary_dtl` WHERE `ref_number`='$refNumber' AND `delete`= 0 ORDER by `last_name` ASC"); while($row = mysql_fetch_array($getList)){ $count = $count + 1; $dtlID = $row['id']; echo "<tr>"; echo "<td>".$count."</td>"; echo "<td style='text-align:center;padding-left:0px;'>".$row['ref_number']."</td>"; echo "<td style='text-align:center;padding-left:0px;'>".$row['date_start']." - ".$row['date_end']."</td>"; echo "<td style='text-align:left;padding-left:10px;'>".$row['last_name'].", ".$row['first_name']."</td>"; echo "<td style='text-align:left;padding-left:10px;'>".$row['tx_dateA']."</td>"; echo "<td style='text-align:center;padding-left:10px;'>".$row['branch_id']."</td>"; echo "<td style='text-align:center;padding-left:10px;'>".$row['encoded_by']."</td>"; echo "<td style='text-align:center;padding-left:10px;'> <form action='' method='POST'> <input type='hidden' name='dtl_id' value='$dtlID'> <input type='hidden' name='hdrID' value='$refNumber'> <ABBR title='Remove this record'> <input type='submit' $chkDisabled name='deletePatient' value='X' style='height:20px;width:30px;border:1px solid ".$bgcolor.";background:".$bgcolor.";font-size:14px;color:black;align:center;border-radius:5px'> </ABBR></a></td> </form>"; echo "<tr>"; } ?> <table> </div> </div> <?php if (isset($_GET['editPatient'])){ $insertHeader = 'false'; } if(isset($_POST['PostClaim'])){ $insertHeader = 'false'; } if($insertHeader === 'true'){ echo "My Header Tagging: ". $insertHeader; if (isset($_GET['CreateClaim'])){ //insert patient $startDate=$_GET['startdate']; $endDate=$_GET['enddate']; $selCom =$_GET['selCom']; $compName = explode("---",$selCom); $companyID = $compName[1]; $amount =$_GET['amount']; $transID = mysql_result(mysql_query("SELECT `fv_phic_id` FROM `trans_code` WHERE `fv_phic_id`!=''"),0); $hdrsql="INSERT INTO `phic_claim_summary` (`id`, `start_date`,`end_date`,`branch_code`,`ref_number`,`date_created`,`created_by`,`amount`) VALUES('','$startDate','$endDate','$companyID','$transID','$toDate','$user','$amount')"; if(!mysql_query($hdrsql)){ die('Error: ' . mysql_error()); }else{ } //UPDATE CODE $newCode = $transID + 1; mysql_query("UPDATE `trans_code` SET `fv_phic_id` = '$newCode' WHERE `fv_phic_id`!=''"); } $insertHeader = 'false'; } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings