2 include_once("../../globals.php");
3 include_once("$srcdir/sql.inc");
5 // This may be more appropriate to move to the library
7 require_once("{$GLOBALS['srcdir']}/sql.inc");
8 function getInsuranceCompanies($pid) {
9 $res = sqlStatement("SELECT * FROM insurance_data WHERE pid = '$pid' " .
10 "ORDER BY type ASC, date DESC");
12 for($iter = 0; $row = sqlFetchArray($res); $iter++
) {
13 if (strcmp($row['type'], $prevtype) == 0) continue;
14 $prevtype = $row['type'];
20 //the number of rows to display before resetting and starting a new column:
25 <script type
="text/javascript">
26 function cleartext(atrib
)
28 document
.copay_form
.code
.value
=document
.copay_form
.codeH
.value
;
29 document
.copay_form
.codeH
.value
="";
34 <?php
html_header_show();?
>
35 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
37 <body
class="body_bottom">
39 <table border
='0' cellspacing
='0' cellpadding
='0' height
='100%'>
46 <form method
='post' name
='copay_form' action
="diagnosis.php?mode=add&type=COPAY&text=copay"
47 target
='Diagnosis' onsubmit
='return top.restoreSession()'>
49 <dt
><span
class=title
><?php
xl('Copay','e'); ?
></span
></dt
>
52 <input type
=hidden name
=code
>
53 <span
class='text'><?php
xl('$','e'); ?
> </span
><input type
='entry' name
='codeH' value
='' size
='5' />
55 <input type
="SUBMIT" value
="<?php xl('Save','e');?>" onclick
="cleartext('clear')"><br
><br
>
58 <div
<?php
if ($GLOBALS['simplified_copay']) echo " style='display:none;'"; ?
>>
59 <input type
="RADIO" name
="payment_method" value
="cash" checked
><?php
xl('cash','e'); ?
>
60 <input type
="RADIO" name
="payment_method" value
="credit card"><?php
xl('credit','e'); ?
>
61 <input type
="RADIO" name
="payment_method" value
="check"><?php
xl('check','e'); ?
>
62 <input type
="RADIO" name
="payment_method" value
="other"><?php
xl('other','e'); ?
><br
><br
>
63 <input type
="RADIO" name
="payment_method" value
="insurance"><?php
xl('insurance','e'); ?
>
65 if ($ret=getInsuranceCompanies($pid)) {
67 echo "<select name=insurance_company>\n";
68 foreach($ret as $iter) {
69 $plan_name = trim($iter['plan_name']);
70 if ($plan_name != '') {
71 echo "<option value='"
73 ."'>".$plan_name ."\n";
81 <input type
="RADIO" name
="payment_method" value
="write off"><?php
xl('write off','e'); ?
>