2 include_once("../../globals.php");
4 // This may be more appropriate to move to the library
6 function getInsuranceCompanies($pid)
8 $res = sqlStatement("SELECT * FROM insurance_data WHERE pid = '$pid' " .
9 "ORDER BY type ASC, date DESC");
11 for ($iter = 0; $row = sqlFetchArray($res); $iter++
) {
12 if (strcmp($row['type'], $prevtype) == 0) {
16 $prevtype = $row['type'];
23 //the number of rows to display before resetting and starting a new column:
28 <script type
="text/javascript">
29 function cleartext(atrib
)
31 document
.copay_form
.code
.value
=document
.copay_form
.codeH
.value
;
32 document
.copay_form
.codeH
.value
="";
37 <?php
html_header_show();?
>
38 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
40 <body
class="body_bottom">
42 <table border
='0' cellspacing
='0' cellpadding
='0' height
='100%'>
49 <form method
='post' name
='copay_form' action
="diagnosis.php?mode=add&type=COPAY&text=copay"
50 target
='Diagnosis' onsubmit
='return top.restoreSession()'>
52 <dt
><span
class=title
><?php
xl('Copay', 'e'); ?
></span
></dt
>
55 <input type
=hidden name
=code
>
56 <span
class='text'><?php
xl('$', 'e'); ?
> </span
><input type
='entry' name
='codeH' value
='' size
='5' />
58 <input type
="SUBMIT" value
="<?php xl('Save', 'e');?>" onclick
="cleartext('clear')"><br
><br
>
61 <div
<?php
if ($GLOBALS['simplified_copay']) {
62 echo " style='display:none;'";
64 <input type
="RADIO" name
="payment_method" value
="cash" checked
><?php
xl('cash', 'e'); ?
>
65 <input type
="RADIO" name
="payment_method" value
="credit card"><?php
xl('credit', 'e'); ?
>
66 <input type
="RADIO" name
="payment_method" value
="check"><?php
xl('check', 'e'); ?
>
67 <input type
="RADIO" name
="payment_method" value
="other"><?php
xl('other', 'e'); ?
><br
><br
>
68 <input type
="RADIO" name
="payment_method" value
="insurance"><?php
xl('insurance', 'e'); ?
>
70 if ($ret=getInsuranceCompanies($pid)) {
72 echo "<select name=insurance_company>\n";
73 foreach ($ret as $iter) {
74 $plan_name = trim($iter['plan_name']);
75 if ($plan_name != '') {
76 echo "<option value='"
78 ."'>".$plan_name ."\n";
87 <input type
="RADIO" name
="payment_method" value
="write off"><?php
xl('write off', 'e'); ?
>