Ejemplo n.º 1
0
 print "</div>";
 print "<div id='superbill_billingdata'>";
 print "<h1>" . xl('Billing Information') . ":</h1>";
 if (count($patient) > 0) {
     $billings = array();
     echo "<table width='100%'>";
     echo "<tr>";
     echo "<td class='bold' width='10%'>" . xl('Date') . "</td>";
     echo "<td class='bold' width='20%'>" . xl('Provider') . "</td>";
     echo "<td class='bold' width='40%'>" . xl('Code') . "</td>";
     echo "<td class='bold' width='10%'>" . xl('Fee') . "</td></tr>\n";
     $total = 0.0;
     $copays = 0.0;
     //foreach ($patient as $be) {
     $ta = split(":", $patient);
     $billing = getPatientBillingEncounter($pids[$iCounter], $ta[1]);
     $billings[] = $billing;
     foreach ($billing as $b) {
         // grab the date to reformat it in the output
         $bdate = strtotime($b['date']);
         echo "<tr>\n";
         echo "<td class='text' style='font-size: 0.8em'>" . oeFormatShortDate(date("Y-m-d", $bdate)) . "<BR>" . date("h:i a", $bdate) . "</td>";
         echo "<td class='text'>" . $b['provider_name'] . "</td>";
         echo "<td class='text'>";
         echo $b['code_type'] . ":\t" . $b['code'] . "&nbsp;" . $b['modifier'] . "&nbsp;&nbsp;&nbsp;" . $b['code_text'] . "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
         echo "</td>\n";
         echo "<td class='text'>";
         echo oeFormatMoney($b['fee']);
         echo "</td>\n";
         echo "</tr>\n";
         $total += $b['fee'];
Ejemplo n.º 2
0
     print "<span class=bold>" . xl('Tertiary Insurance Data') . ":</span><br>";
     printRecDataOne($insurance_data_array, getRecInsuranceData($pid, "tertiary"), $N);
     echo "</div>";
 } elseif ($val == "billing") {
     echo "<hr />";
     echo "<div class='text billing'>";
     print "<h1>" . xl('Billing Information') . ":</h1>";
     if (count($ar['newpatient']) > 0) {
         $billings = array();
         echo "<table>";
         echo "<tr><td width='400' class='bold'>Code</td><td class='bold'>" . xl('Fee') . "</td></tr>\n";
         $total = 0.0;
         $copays = 0.0;
         foreach ($ar['newpatient'] as $be) {
             $ta = split(":", $be);
             $billing = getPatientBillingEncounter($pid, $ta[1]);
             $billings[] = $billing;
             foreach ($billing as $b) {
                 echo "<tr>\n";
                 echo "<td class=text>";
                 echo $b['code_type'] . ":\t" . $b['code'] . "&nbsp;" . $b['modifier'] . "&nbsp;&nbsp;&nbsp;" . $b['code_text'] . "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                 echo "</td>\n";
                 echo "<td class=text>";
                 echo oeFormatMoney($b['fee']);
                 echo "</td>\n";
                 echo "</tr>\n";
                 $total += $b['fee'];
                 if ($b['code_type'] == "COPAY") {
                     $copays += $b['fee'];
                 }
             }
Ejemplo n.º 3
0
    private function getIncudes($val)
    {
        global $pid;
        if ($val == "demographics") {
            ?>
	    <hr />
	    <div class='text demographics' id='DEM'>
	    <?php 
            // printRecDataOne($patient_data_array, getRecPatientData ($pid), $N);
            $result1 = getPatientData($pid);
            $result2 = getEmployerData($pid);
            ?>
	    <table>
	    <tr><td><h6><?php 
            echo htmlspecialchars(xl('Patient Data') . ":", ENT_QUOTES);
            ?>
</h6></td></tr>
	    <?php 
            display_layout_rows('DEM', $result1, $result2);
            ?>
	    </table>
	    </div>
	    <?php 
        } elseif ($val == "history") {
            ?>
	    <hr />
	    <div class='text history' id='HIS'>
		<?php 
            $result1 = getHistoryData($pid);
            ?>
		<table>
		<tr><td><h6><?php 
            echo htmlspecialchars(xl('History Data') . ":", ENT_QUOTES);
            ?>
</h6></td></tr>
		<?php 
            display_layout_rows('HIS', $result1);
            ?>
		</table>
		</div>
	<?php 
        } elseif ($val == "insurance") {
            ?>
	    <hr />
	    <div class='text insurance'>";
	    <h6><?php 
            echo htmlspecialchars(xl('Insurance Data') . ":", ENT_QUOTES);
            ?>
</h6>
	    <br><span class=bold><?php 
            echo htmlspecialchars(xl('Primary Insurance Data') . ":", ENT_QUOTES);
            ?>
</span><br>
	    <?php 
            printRecDataOne($insurance_data_array, getRecInsuranceData($pid, "primary"), $N);
            ?>
	    <span class=bold><?php 
            echo htmlspecialchars(xl('Secondary Insurance Data') . ":", ENT_QUOTES);
            ?>
</span><br>
	    <?php 
            printRecDataOne($insurance_data_array, getRecInsuranceData($pid, "secondary"), $N);
            ?>
	    <span class=bold><?php 
            echo htmlspecialchars(xl('Tertiary Insurance Data') . ":", ENT_QUOTES);
            ?>
</span><br>
	    <?php 
            printRecDataOne($insurance_data_array, getRecInsuranceData($pid, "tertiary"), $N);
            ?>
	    </div>
	    <?php 
        } elseif ($val == "billing") {
            ?>
	    <hr />
	    <div class='text billing'>
	    <h6><?php 
            echo htmlspecialchars(xl('Billing Information') . ":", ENT_QUOTES);
            ?>
</h6>
	    <?php 
            if (count($ar['newpatient']) > 0) {
                $billings = array();
                ?>
		<table>
		<tr><td width='400' class='bold'><?php 
                echo htmlspecialchars(xl('Code'), ENT_QUOTES);
                ?>
</td><td class='bold'><?php 
                echo htmlspecialchars(xl('Fee'), ENT_QUOTES);
                ?>
</td></tr>
		<?php 
                $total = 0.0;
                $copays = 0.0;
                foreach ($ar['newpatient'] as $be) {
                    $ta = split(":", $be);
                    $billing = getPatientBillingEncounter($pid, $ta[1]);
                    $billings[] = $billing;
                    foreach ($billing as $b) {
                        ?>
			<tr>
			<td class=text>
			<?php 
                        echo htmlspecialchars($b['code_type'], ENT_QUOTES) . ":\t" . htmlspecialchars($b['code'], ENT_QUOTES) . "&nbsp;" . htmlspecialchars($b['modifier'], ENT_QUOTES) . "&nbsp;&nbsp;&nbsp;" . htmlspecialchars($b['code_text'], ENT_QUOTES) . "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                        ?>
			</td>
			<td class=text>
			<?php 
                        echo htmlspecialchars(oeFormatMoney($b['fee']), ENT_QUOTES);
                        ?>
			</td>
			</tr>
			<?php 
                        $total += $b['fee'];
                        if ($b['code_type'] == "COPAY") {
                            $copays += $b['fee'];
                        }
                    }
                }
                echo "<tr><td>&nbsp;</td></tr>";
                echo "<tr><td class=bold>" . htmlspecialchars(xl('Sub-Total'), ENT_QUOTES) . "</td><td class=text>" . htmlspecialchars(oeFormatMoney($total + abs($copays)), ENT_QUOTES) . "</td></tr>";
                echo "<tr><td class=bold>" . htmlspecialchars(xl('Paid'), ENT_QUOTES) . "</td><td class=text>" . htmlspecialchars(oeFormatMoney(abs($copays)), ENT_QUOTES) . "</td></tr>";
                echo "<tr><td class=bold>" . htmlspecialchars(xl('Total'), ENT_QUOTES) . "</td><td class=text>" . htmlspecialchars(oeFormatMoney($total), ENT_QUOTES) . "</td></tr>";
                echo "</table>";
                echo "<pre>";
                //print_r($billings);
                echo "</pre>";
            } else {
                printPatientBilling($pid);
            }
            echo "</div>\n";
            // end of billing DIV
        } elseif ($val == "immunizations") {
            ?>
		<hr />
		<div class='text immunizations'>
		<h6><?php 
            echo htmlspecialchars(xl('Patient Immunization') . ":", ENT_QUOTES);
            ?>
</h6>
		<?php 
            $sql = "select i1.immunization_id as immunization_id, if(i1.administered_date,concat(i1.administered_date,' - ') ,substring(i1.note,1,20) ) as immunization_data from immunizations i1 where i1.patient_id = ? order by administered_date desc";
            $result = sqlStatement($sql, array($pid));
            while ($row = sqlFetchArray($result)) {
                echo htmlspecialchars($row['immunization_data'], ENT_QUOTES);
                echo generate_display_field(array('data_type' => '1', 'list_id' => 'immunizations'), $row['immunization_id']);
                ?>
		      <br>
		    <?php 
            }
            ?>
		</div>
		<?php 
        } elseif ($val == "batchcom") {
            ?>
	    <hr />
	    <div class='text transactions'>
	    <h6><?php 
            htmlspecialchars(xl('Patient Communication sent') . ":", ENT_QUOTES);
            ?>
</h6>
	    <?php 
            $sql = "SELECT concat( 'Messsage Type: ', batchcom.msg_type, ', Message Subject: ', batchcom.msg_subject, ', Sent on:', batchcom.msg_date_sent ) AS batchcom_data, batchcom.msg_text, concat( users.fname, users.lname ) AS user_name FROM `batchcom` JOIN `users` ON users.id = batchcom.sent_by WHERE batchcom.patient_id=?";
            $result = sqlStatement($sql, array($pid));
            while ($row = sqlFetchArray($result)) {
                echo htmlspecialchars($row['batchcom_data'] . ", " . xl('By') . ": " . $row['user_name'], ENT_QUOTES);
                ?>
		<br><?php 
                echo htmlspecialchars(xl('Text'), ENT_QUOTES);
                ?>
:<br><?php 
                echo htmlspecialchars($row['msg_txt'], ENT_QUOTES);
                ?>
<br>
		<?php 
            }
            ?>
	    </div>
	    <?php 
        } elseif ($val == "notes") {
            ?>
	    <hr />
	    <div class='text notes'>
	    <h6><?php 
            echo htmlspecialchars(xl('Patient Notes') . ":", ENT_QUOTES);
            ?>
</h6>
	    <?php 
            printPatientNotes($pid);
            ?>
	    </div>
	    <?php 
        } elseif ($val == "transactions") {
            ?>
	    <hr />
	    <div class='text transactions'>
	    <h6><?php 
            echo htmlspecialchars(xl('Patient Transactions') . ":", ENT_QUOTES);
            ?>
</h6>
	    <?php 
            printPatientTransactions($pid);
            ?>
	    </div>
	    <?php 
        }
    }