3 * This program creates the misc_billing_form
6 * @author Terry Hill <terry@lilysystems.com>
7 * @author Brady Miller <brady.g.miller@gmail.com>
8 * @author Stephen Waite <stephen.waite@cmsvt.com>
9 * @copyright Copyright (C) 2007 Bo Huynh
10 * @copyright Copyright (C) 2016 Terry Hill <terry@lillysystems.com>
11 * @copyright Copyright (C) 2017 Brady Miller <brady.g.miller@gmail.com>
12 * @copyright Copyright (C) 2017 Stephen Waite <stephen.waite@cmsvt.com>
13 * @link http://www.open-emr.org
14 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
17 require_once("../../globals.php");
18 require_once("$srcdir/options.inc.php");
19 require_once("$srcdir/api.inc");
20 require_once("date_qualifier_options.php");
22 if (! $encounter) { // comes from globals.php
23 die(xlt("Internal error: we do not seem to be in an encounter!"));
26 //only one misc billing form so grab if exists
27 $formid = 0 +
formData('id', 'G');
29 $mboquery = sqlquery("SELECT `fmbo`.`id` FROM `form_misc_billing_options` AS `fmbo`
30 INNER JOIN `forms` ON (`fmbo`.`id` = `forms`.`form_id`) WHERE
31 `forms`.`deleted` = 0 AND
32 `forms`.`encounter` = ? ORDER BY `fmbo`.`id` DESC", array($encounter));
33 if (!empty($mboquery['id'])) {
34 $formid = 0 +
$mboquery['id'];
38 $obj = $formid ?
formFetch("form_misc_billing_options", $formid) : array();
40 //formHeader("Form: misc_billing_options"); is this needed anymore?
45 <title
><?php
echo xlt('Miscellaneous Billing Options for HCFA-1500'); ?
></title
>
46 <?php
html_header_show(); ?
>
47 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
48 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker-2-5-4/build/jquery.datetimepicker.min.css">
49 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-3-1-1/index.js">
51 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/textformat.js?v=<?php echo $v_js_includes; ?>">
53 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker-2-5-4/build/jquery.datetimepicker.full.min.js">
55 <script language
="javascript">
56 // jQuery stuff to make the page a little easier to use
57 $
(document
).ready(function(){
58 $
(".save").click(function() { top
.restoreSession(); document
.my_form
.submit(); });
59 $
(".dontsave").click(function() { location
.href
='<?php echo "$rootdir/patient_file/encounter/encounter_top.php";?>'; });
60 $
('.datepicker').datetimepicker({
61 <?php
$datetimepicker_timepicker = false; ?
>
62 <?php
$datetimepicker_showseconds = false; ?
>
63 <?php
$datetimepicker_formatInput = false; ?
>
64 <?php
require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?
>
65 <?php
// can add any additional javascript settings to datetimepicker here;
66 // need to prepend first setting with a comma ?>
71 <body
class="body_top">
72 <form method
=post
<?php
echo "name='my_form' " . "action='$rootdir/forms/misc_billing_options/save.php?id=" . attr($formid) . "'>\n";?
>
73 <h4
><?php
echo xlt('Miscellaneous Billing Options for HCFA-1500'); ?
></h4
>
74 <label
for="box10a"><?php
echo xlt('Box 10. a. Employment related:'); ?
></label
>
75 <input type
=checkbox name
="employment_related" id
="box10a" value
="1" <?php
if ($obj['employment_related'] == "1") echo "checked"; ?
> ><br
><br
>
76 <label
for="box10b"><?php
echo xlt('Box 10. b. Auto Accident:'); ?
></label
>
77 <input type
=checkbox name
="auto_accident" id
="box10b" value
="1" <?php
if ($obj['auto_accident'] == "1") echo "checked"; ?
> >
78 <label
for="box10bstate"><?php
echo xlt('State:'); ?
></label
>
79 <input type
=entry name
="accident_state" id
="box10bstate" size
="1" value
="<?php echo attr($obj{"accident_state
"}); ?>" /><br
><br
>
80 <label
for="box10c"><?php
echo xlt('Box 10. c. Other Accident:'); ?
></label
>
81 <input type
=checkbox name
="other_accident" id
="box10c" value
="1" <?php
if ($obj['other_accident'] == "1") echo "checked" ; ?
> ><br
><br
>
82 <label
for="box10d"><?php
echo xlt('Box 10. d. EPSDT Referral Code:'); ?
></label
>
83 <input type
="entry" style
="width: 25px;" size
=2 name
="medicaid_referral_code" id
="box10d" value
="<?php echo attr($obj{"medicaid_referral_code
"}); ?>" >
84 <label
for="box10depsdt"><?php
echo xlt('EPSDT:'); ?
></label
>
85 <input type
="checkbox" name
="epsdt_flag" id
="box10depsdt" value
="1" <?php
if ($obj['epsdt_flag'] == "1") echo "checked"; ?
> ><br
><br
>
86 <label
for="onset_date"><?php
echo xlt('Box 14. Onset Date:'); $onset_date = $obj{"onset_date"}; ?
></label
>
87 <input type
=text style
="width: 70px;" size
=12 class='datepicker' name
='onset_date' id
='onset_date' value
='<?php echo attr($onset_date); ?>' title
='<?php echo xla('yyyy
-mm
-dd
'); ?>' >
88 <label
for="box_14_date_qual_box"><?php
echo generateDateQualifierSelect("box_14_date_qual",$box_14_qualifier_options,$obj); ?
><br
><br
>
89 <label
for="date_initial_treament"><?php
echo xlt('Box 15. Other Date:'); $date_initial_treatment = $obj{"date_initial_treatment"}; ?
></label
>
90 <input type
=text style
="width: 70px;" size
=10 class='datepicker' name
='date_initial_treatment' id
='date_initial_treatment' value
='<?php echo attr($date_initial_treatment); ?>' title
='<?php echo xla('yyyy
-mm
-dd
'); ?>' >
91 <label
for="box_15_date_qual"><?php
generateDateQualifierSelect("box_15_date_qual",$box_15_qualifier_options,$obj); ?
><br
><br
>
92 <label
for="off_work_from"><?php
echo xlt('Box 16. Date unable to work from:'); $off_work_from = $obj{"off_work_from"}; ?
></label
>
93 <input type
=text style
="width: 70px;" size
=10 class='datepicker' name
='off_work_from' id
='off_work_from' value
='<?php echo attr($off_work_from); ?>' title
='<?php echo xla('yyyy
-mm
-dd
'); ?>' >
94 <label
for="off_work_to"><?php
echo xlt('Box 16. Date unable to work to:'); $off_work_to = $obj{"off_work_to"}; ?
></label
>
95 <input type
=text style
="width: 70px;" size
=10 class='datepicker' name
='off_work_to' id
='off_work_to' value
='<?php echo attr($off_work_to); ?>' title
='<?php echo xla('yyyy
-mm
-dd
'); ?>' ><br
><br
>
96 <label
for="provider_id"><?php
echo xlt('Box 17. Provider:'); genProviderSelect('provider_id', '-- ' . xl("Please Select") . ' --', $obj{"provider_id"}); ?
></label
>
97 <label
for="provider_qualifier_code"><?php
echo xlt('Box 17. Provider Qualifier:'); echo generate_select_list('provider_qualifier_code', 'provider_qualifier_code', $obj{"provider_qualifier_code"}, 'Provider Qualifier Code'); ?
></label
><br
><br
>
98 <label
for="hospitalization_date_from"><?php
echo xlt('Box 18. Hospitalization date from:'); $hospitalization_date_from = $obj{"hospitalization_date_from"}; ?
></label
>
99 <input type
=text style
="width: 70px;" size
=10 class='datepicker' name
='hospitalization_date_from' id
='hospitalization_date_from' value
='<?php echo attr($hospitalization_date_from); ?>' title
='<?php echo xla('yyyy
-mm
-dd
'); ?>' >
100 <label
for="hospitalization_date_to"><?php
echo xlt('Box 18. Hospitalization date to:'); $hospitalization_date_to = $obj{"hospitalization_date_to"}; ?
></label
>
101 <input type
=text style
="width: 70px;" size
=10 class='datepicker' name
='hospitalization_date_to' id
='hospitalization_date_to' value
='<?php echo attr($hospitalization_date_to); ?>' title
='<?php echo xla('yyyy
-mm
-dd
'); ?>' ><br
><br
>
102 <label
for="outside_lab"><?php
echo xlt('Box 20. Is Outside Lab used?'); ?
></label
>
103 <input type
=checkbox name
="outside_lab" id
="outside_labe" value
="1" <?php
if ($obj['outside_lab'] == "1") echo "checked";?
> >
104 <label
for="lab_amount"><?php
echo xlt('Amount Charges:'); ?
></label
>
105 <input type
=entry size
=7 align
='right' name
="lab_amount" id
="lab_amount" value
="<?php echo attr($obj{"lab_amount
"});?>" ><br
><br
>
106 <label
for="medicaid_resubmission_code"><?php
echo xlt('Box 22. Medicaid Resubmission Code (ICD-9) ');?
></label
>
107 <input type
=entry size
=9 name
="medicaid_resubmission_code" id
="medicaid_resubmission_code" value
="<?php echo attr($obj{"medicaid_resubmission_code
"}); ?>" >
108 <label
for="medicaid_original_reference"><?php
echo xlt(' Medicaid Original Reference No. '); ?
></label
>
109 <input type
=entry size
=15 name
="medicaid_original_reference" id
="medicaid_original_reference" value
="<?php echo attr($obj{"medicaid_original_reference
"}); ?>" ><br
><br
>
110 <label
for="prior_auth_number"><?php
echo xlt('Box 23. Prior Authorization No. ');?
></label
>
111 <input type
=entry size
=15 name
="prior_auth_number" id
="prior_auth_number" value
="<?php echo attr($obj{"prior_auth_number
"}); ?>" ><br
><br
>
112 <label
for="replacement_claim"><?php
echo xlt('X12 only replacement claim:'); ?
></label
>
113 <input type
=checkbox name
="replacement_claim" id
="replacement_claim" value
="1" <?php
if ($obj['replacement_claim'] == "1") echo "checked"; ?
> ><br
><br
>
114 <label
for="icn_resubmission_number"><?php
echo xlt('X12 only ICN resubmission No.'); ?
></label
>
115 <input type
=entry size
=35 name
="icn_resubmission_number" id
="icn_resubmission_number" value
="<?php echo attr($obj{"icn_resubmission_number
"}); ?>" ><br
><br
>
116 <label
for="addl_notes"><?php
echo xlt('Additional Notes:'); ?
>
117 <textarea cols
=40 rows
=8 wrap
=virtual name
="comments" id
="addl_notes"><?php
echo text($obj{"comments"}); ?
></textarea
><br
><br
>
119 <!-- Save
/Cancel buttons
-->
120 <input type
="button" class="save" value
="<?php echo xla('Save'); ?>" >
121 <input type
="button" class="dontsave" value
="<?php echo xla('Don\'t Save Changes'); ?>" >