Skip to content

Commit

Permalink
Fee sheet and Codes revenue code (#7415)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjpadgett committed May 1, 2024
1 parent 14e7854 commit a379476
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
?>

<script type="text/javascript" src='<?php echo "$web_root/interface/forms/fee_sheet/contraception_products/js/view_model.js?v=$v_js_includes"; ?>'></script>
<link rel="stylesheet" href="<?php echo $web_root;?>/interface/forms/fee_sheet/contraception_products/css/contraception_products.css" type="text/css">
<link rel="stylesheet" href="<?php echo $web_root;?>/interface/forms/fee_sheet/contraception_products/css/contraception_products.css" type="text/css">
52 changes: 23 additions & 29 deletions interface/forms/fee_sheet/new.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,10 @@ function echoServiceLines()
} else { // not billed
if ($institutional) {
if ($codetype != 'COPAY' && $codetype != 'ICD10') {
echo " <td class='billcell'><select type='text' class='revcode form-control form-control-sm' name='bill[" . attr($lino) . "][revenue_code]' " .
"title='" . xla("Revenue Code for this item. Type to search") . "' " .
"value='" . attr($revenue_code) . "' size='4'></select></td>\n";
echo " <td class='billcell'>" .
"<input type='text' class='revcode form-control form-control-sm' name='bill[" . attr($lino) . "][revenue_code]' " .
"title='" . xla("Revenue Code for this item. Type to search or double click for list") . "' " .
"value='" . attr($revenue_code) . "' size='4'></td>\n";
} else {
echo " <td class='billcell'>&nbsp;</td>\n";
}
Expand Down Expand Up @@ -635,7 +636,7 @@ function echoProductLines()
?>
<html>
<head>
<?php Header::setupHeader(['common', 'knockout', 'select2']);?>
<?php Header::setupHeader(['common', 'knockout', 'jquery-ui', 'jquery-ui-base']);?>
<script>
var mypcc = <?php echo js_escape($GLOBALS['phone_country_code']); ?>;
var diags = new Array();
Expand Down Expand Up @@ -685,31 +686,24 @@ function echoProductLines()
}
?>
function reinitForm(){
$(".revcode").select2({
ajax: {
url: "<?php echo $GLOBALS['web_root'] ?>/interface/billing/ub04_helpers.php",
dataType: 'json',
data: function(params) {
return {
code_group: "revenue_code",
term: params.term
};
},
processResults: function(data) {
return {
results: $.map(data, function(item, index) {
return {
text: item.label,
id: index,
value: item.value
}
})
};
return x;
},
cache: true
var cache = {};
$( ".revcode" ).autocomplete({
minLength: 1,
source: function( request, response ) {
var term = request.term;
request.code_group = "revenue_code";
if ( term in cache ) {
response( cache[ term ] );
return;
}
$.getJSON( "<?php echo $GLOBALS['web_root'] ?>/interface/billing/ub04_helpers.php", request, function( data, status, xhr ) {
cache[ term ] = data;
response( data );
})
}
})
}).dblclick(function(event) {
$(this).autocomplete('search'," ");
});
}

// This is invoked by <select onchange> for the various dropdowns,
Expand Down Expand Up @@ -1312,7 +1306,7 @@ function checkLastChar(s) {
// Also preserve other items from the form, if present.
if (!empty($bline['id']) && empty($iter["billed"])) {
if ($institutional) {
//$revenue_code = trim($bline['revenue_code']);
$revenue_code = trim($bline['revenue_code']);
}
$modifier = trim($bline['mod'] ?? '');
$units = intval(trim($bline['units'] ?? ''));
Expand Down
47 changes: 20 additions & 27 deletions interface/patient_file/encounter/superbill_custom_full.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ function ffescape($field)
<head>
<title><?php echo xlt("Codes"); ?></title>

<?php Header::setupHeader(['select2']); ?>
<?php Header::setupHeader(['jquery-ui', 'jquery-ui-base']); ?>

<style>
.ui-autocomplete {
Expand All @@ -292,32 +292,25 @@ function ffescape($field)
</style>
<script>
<?php if ($institutional) { ?>
$(function () {
$(".revcode").select2({
ajax: {
url: "<?php echo $GLOBALS['web_root'] ?>/interface/billing/ub04_helpers.php",
dataType: 'json',
data: function(params) {
return {
code_group: "revenue_code",
term: params.term
};
},
processResults: function(data) {
return {
results: $.map(data, function(item, index) {
return {
text: item.label,
id: index,
value: item.value
}
})
};
return x;
},
cache: true
$( function() {
var cache = {};
$( ".revcode" ).autocomplete({
minLength: 1,
source: function( request, response ) {
var term = request.term;
request.code_group = "revenue_code";
if ( term in cache ) {
response( cache[ term ] );
return;
}
$.getJSON( "<?php echo $GLOBALS['web_root'] ?>/interface/billing/ub04_helpers.php", request, function( data, status, xhr ) {
cache[ term ] = data;
response( data );
});
}
})
}).dblclick(function(event) {
$(this).autocomplete('search'," ");
});
});
<?php } ?>

Expand Down Expand Up @@ -543,7 +536,7 @@ function getCTMask() {
<?php if ($mode == "modify") { ?>
<input type='text' size='6' class='form-control form-control-sm' name="revenue_code" readonly="readonly" value='<?php echo attr($revenue_code) ?>' />
<?php } else { ?>
<select size='6' style='width:150px' class='form-control form-control-sm revcode' name="revenue_code" title='<?php echo xla('Type to search and select revenue code'); ?>' value='<?php echo attr($revenue_code) ?>'> </select>
<input type='text' size='6' class='form-control form-control-sm revcode' name="revenue_code" title='<?php echo xla('Type to search and select revenue code'); ?>' value='<?php echo attr($revenue_code) ?>'>
<?php } ?>
</div>
<?php } ?>
Expand Down

0 comments on commit a379476

Please sign in to comment.