Skip to content

Commit

Permalink
Translation project - incorporate xl() and generate_form_field() for …
Browse files Browse the repository at this point in the history
…superbill list
  • Loading branch information
bradymiller committed Jun 5, 2009
1 parent 81de74b commit 6ac45fe
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions interface/patient_file/encounter/superbill_custom_full.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
include_once("../../globals.php");
include_once("../../../custom/code_types.inc.php");
include_once("$srcdir/sql.inc");
include_once("$srcdir/options.inc.php");

// Translation for form fields.
function ffescape($field) {
Expand Down Expand Up @@ -37,7 +38,7 @@ function bucks($amount) {
$code_text = $_POST['code_text'];
$modifier = $_POST['modifier'];
// $units = $_POST['units'];
$superbill = $_POST['superbill'];
$superbill = $_POST['form_superbill'];
$related_code = $_POST['related_code'];
$cyp_factor = $_POST['cyp_factor'] + 0;

Expand All @@ -59,7 +60,7 @@ function bucks($amount) {
"modifier = '" . ffescape($modifier) . "' AND " .
"id != '$code_id'");
if ($crow['count']) {
$alertmsg = "Cannot add/update this entry because a duplicate already exists!";
$alertmsg = xl('Cannot add/update this entry because a duplicate already exists!');
}
else {
$sql =
Expand Down Expand Up @@ -306,18 +307,9 @@ function submitDelete(id) {
<td><?php xl('Category','e'); ?>:</td>
<td></td>
<td>
<select name="superbill">
<option value=''>Unassigned</option>
<?php
$pres = sqlStatement("SELECT option_id, title FROM list_options " .
"WHERE list_id = 'superbill' ORDER BY seq");
while ($prow = sqlFetchArray($pres)) {
echo ' <option value="' . $prow['option_id'] . '"';
if ($superbill == $prow['option_id']) echo " selected";
echo ">" . $prow['title'] . "</option>\n";
}
generate_form_field(array('data_type'=>1,'field_id'=>'superbill','list_id'=>'superbill'), $superbill);
?>
</select>
</td>
</tr>

Expand Down Expand Up @@ -351,7 +343,7 @@ function submitDelete(id) {
"WHERE list_id = 'pricelevel' ORDER BY lo.seq");
for ($i = 0; $prow = sqlFetchArray($pres); ++$i) {
if ($i) echo "&nbsp;&nbsp;";
echo $prow['title'] . " ";
echo xl_list_label($prow['title']) . " ";
echo "<input type='text' size='6' name='fee[" . $prow['option_id'] . "]' " .
"value='" . $prow['pr_price'] . "' >\n";
}
Expand Down Expand Up @@ -409,7 +401,7 @@ function submitDelete(id) {
&nbsp;&nbsp;&nbsp;&nbsp;

<input type="text" name="search" size="5" value="<?php echo $search ?>">&nbsp;
<input type="submit" name="go" value="Search">
<input type="submit" name="go" value=<?php xl('Search','e','\'','\''); ?>>
<input type='hidden' name='fstart' value='<?php echo $fstart ?>'>
</td>

Expand Down Expand Up @@ -450,7 +442,7 @@ function submitDelete(id) {
$pres = sqlStatement("SELECT title FROM list_options " .
"WHERE list_id = 'pricelevel' ORDER BY seq");
while ($prow = sqlFetchArray($pres)) {
echo " <td class='bold' align='right' nowrap>" . $prow['title'] . "</td>\n";
echo " <td class='bold' align='right' nowrap>" . xl_list_label($prow['title']) . "</td>\n";
}
?>
<td></td>
Expand Down Expand Up @@ -520,8 +512,8 @@ function submitDelete(id) {
echo "<td class='text' align='right'>" . bucks($prow['pr_price']) . "</td>\n";
}

echo " <td align='right'><a class='link' href='javascript:submitDelete(" . $iter['id'] . ")'>[Del]</a></td>\n";
echo " <td align='right'><a class='link' href='javascript:submitEdit(" . $iter['id'] . ")'>[Edit]</a></td>\n";
echo " <td align='right'><a class='link' href='javascript:submitDelete(" . $iter['id'] . ")'>[" . xl('Delete') . "]</a></td>\n";
echo " <td align='right'><a class='link' href='javascript:submitEdit(" . $iter['id'] . ")'>[" . xl('Edit') . "]</a></td>\n";
echo " </tr>\n";

}
Expand Down

0 comments on commit 6ac45fe

Please sign in to comment.