7 * @link http://www.open-emr.org
8 * @author Brady Miller <brady.g.miller@gmail.com>
9 * @copyright Copyright (c) 2017 Brady Miller <brady.g.miller@gmail.com>
10 * @copyright Copyright (c) 2021 Rod Roark <rod@sunsetsystems.com>
11 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
14 require_once("../../globals.php");
15 require_once("$srcdir/options.inc.php");
16 require_once("$srcdir/validation/LBF_Validation.php");
17 require_once("$srcdir/patientvalidation.inc.php");
18 require_once("$srcdir/pid.inc.php");
19 require_once("$srcdir/patient.inc.php");
21 use OpenEMR\Common\Acl\AclMain
;
22 use OpenEMR\Common\Csrf\CsrfUtils
;
23 use OpenEMR\Core\Header
;
24 use OpenEMR\Events\PatientDemographics\UpdateEvent
;
26 // Session pid must be right or bad things can happen when demographics are saved!
28 $set_pid = $_GET["set_pid"] ??
($_GET["pid"] ??
null);
29 if ($set_pid && $set_pid != $_SESSION["pid"]) {
33 $result = getPatientData($pid, "*, DATE_FORMAT(DOB,'%Y-%m-%d') as DOB_YMD");
34 $result2 = getEmployerData($pid);
36 // Check authorization.
38 // Create and fire the patient demographics update event
39 $updateEvent = new UpdateEvent($pid);
40 $updateEvent = $GLOBALS["kernel"]->getEventDispatcher()->dispatch($updateEvent, UpdateEvent
::EVENT_HANDLE
, 10);
43 !$updateEvent->authorized() ||
44 !AclMain
::aclCheckCore('patients', 'demo', '', 'write')
46 die(xlt('Updating demographics is not authorized.'));
49 if ($result['squad'] && ! AclMain
::aclCheckCore('squads', $result['squad'])) {
50 die(xlt('You are not authorized to access this squad.'));
53 if (!AclMain
::aclCheckCore('patients', 'demo', '', array('write','addonly'))) {
54 die(xlt('Adding demographics is not authorized.'));
58 $CPR = 4; // cells per row
60 // $statii = array('married','single','divorced','widowed','separated','domestic partner');
61 // $provideri = getProviderInfo();
62 if ($GLOBALS['insurance_information'] != '0') {
63 $insurancei = getInsuranceProvidersExtra();
65 $insurancei = getInsuranceProviders();
67 //Check to see if only one insurance is allowed
68 if ($GLOBALS['insurance_only_one']) {
69 $insurance_array = array('primary');
71 $insurance_array = array('primary', 'secondary', 'tertiary');
77 <?php Header
::setupHeader(['datetime-picker','common','select2', 'erx']);
79 <title
><?php
echo xlt('Edit Current Patient'); ?
></title
>
81 <?php
include_once($GLOBALS['srcdir'] . "/options.js.php"); ?
>
85 // Support for beforeunload handler.
86 var somethingChanged
= false;
93 $
(".select-previous-names").select2({
95 dropdownAutoWidth
: true,
97 <?php
require($GLOBALS['srcdir'] . '/js/xl/select2.js.php'); ?
>
98 }).on("select2:unselecting", function (e
) {
99 $
(this
).data('state', 'unselected');
100 var data
= e
.params
.args
.data
;
101 const message
= "<span>" +
xl("Are You Sure you want to delete this name?") +
"</span>";
102 const ele
= opener
.document
.getElementById('form_name_history');
103 dialog
.confirm(message
).then(returned
=> {
104 if (returned
!== true) {
105 if (data
!== false) {
106 $
(".select-previous-names > option").prop("selected", "selected").trigger("change");
110 // delete from table.
111 const url
= top
.webroot_url +
'/library/ajax/specialty_form_ajax.php?delete=true';
112 let doData
= new FormData();
113 doData
.append('csrf_token_form', <?php
echo js_escape(CsrfUtils
::collectCsrfToken()); ?
>);
114 doData
.append('id', data
.id
);
115 doData
.append('task_name_history', 'delete');
119 }).then(rtn
=> rtn
.json()).then((rtn
) => {
120 dialog
.alert(xl("Returned: " + rtn
));
121 if (rtn
=== 'Success') {
122 $
(".select-previous-names option[value=" + data
.id +
"]").remove();
126 }).on("select2:open", function (e
) {
127 if ($
(this
).data('state') === 'unselected') {
128 $
(this
).removeData('state');
130 setTimeout(function () {
131 self
.select2('close');
134 }).on('select2:opening select2:closing', function (event
) {
135 let
$search = $
(this
).parent().find('.select2-search__field');
136 $search.prop('disabled', true);
140 $
(".select-dropdown").select2({
142 dropdownAutoWidth
: true,
144 <?php
require($GLOBALS['srcdir'] . '/js/xl/select2.js.php'); ?
>
146 if (typeof error
!== 'undefined') {
152 $
(".medium_modal").on('click', function(e
) {
153 e
.preventDefault();e
.stopPropagation();
154 let title
= <?php
echo xlj('Insurance Search/Select/Add'); ?
>;
155 let ins_url
= $
(this
).attr('href') +
encodeURIComponent(sendInsToSearch(insurance_index
));
156 dlgopen('', '', 700, 600, '', title
, {
158 {text
: <?php
echo xlj('Close'); ?
>, close
: true, style
: 'default btn-sm'}
168 $
('.datepicker').datetimepicker({
169 <?php
$datetimepicker_timepicker = false; ?
>
170 <?php
$datetimepicker_showseconds = false; ?
>
171 <?php
$datetimepicker_formatInput = true; ?
>
172 <?php
$datetimepicker_minDate = false; ?
>
173 <?php
$datetimepicker_maxDate = false; ?
>
174 <?php
require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?
>
175 <?php
// can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
177 $
('.datetimepicker').datetimepicker({
178 <?php
$datetimepicker_timepicker = true; ?
>
179 <?php
$datetimepicker_showseconds = false; ?
>
180 <?php
$datetimepicker_formatInput = true; ?
>
181 <?php
$datetimepicker_minDate = false; ?
>
182 <?php
$datetimepicker_maxDate = false; ?
>
183 <?php
require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?
>
184 <?php
// can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
186 $
('.datepicker-past').datetimepicker({
187 <?php
$datetimepicker_timepicker = false; ?
>
188 <?php
$datetimepicker_showseconds = false; ?
>
189 <?php
$datetimepicker_formatInput = true; ?
>
190 <?php
$datetimepicker_minDate = false; ?
>
191 <?php
$datetimepicker_maxDate = '+1970/01/01'; ?
>
192 <?php
require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?
>
193 <?php
// can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
195 $
('.datetimepicker-past').datetimepicker({
196 <?php
$datetimepicker_timepicker = true; ?
>
197 <?php
$datetimepicker_showseconds = false; ?
>
198 <?php
$datetimepicker_formatInput = true; ?
>
199 <?php
$datetimepicker_minDate = false; ?
>
200 <?php
$datetimepicker_maxDate = '+1970/01/01'; ?
>
201 <?php
require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?
>
202 <?php
// can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
204 $
('.datepicker-future').datetimepicker({
205 <?php
$datetimepicker_timepicker = false; ?
>
206 <?php
$datetimepicker_showseconds = false; ?
>
207 <?php
$datetimepicker_formatInput = true; ?
>
208 <?php
$datetimepicker_minDate = '-1970/01/01'; ?
>
209 <?php
$datetimepicker_maxDate = false; ?
>
210 <?php
require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?
>
211 <?php
// can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
213 $
('.datetimepicker-future').datetimepicker({
214 <?php
$datetimepicker_timepicker = true; ?
>
215 <?php
$datetimepicker_showseconds = false; ?
>
216 <?php
$datetimepicker_formatInput = true; ?
>
217 <?php
$datetimepicker_minDate = '-1970/01/01'; ?
>
218 <?php
$datetimepicker_maxDate = false; ?
>
219 <?php
require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?
>
220 <?php
// can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
223 // Support for beforeunload handler.
224 $
('.tab input, .tab select, .tab textarea').change(function() {
225 somethingChanged
= true;
227 window
.addEventListener("beforeunload", function (e
) {
228 if (somethingChanged
&& !top
.timed_out
) {
229 var msg
= <?php
echo xlj('You have unsaved changes.'); ?
>;
230 e
.returnValue
= msg
; // Gecko, Trident, Chrome 34+
231 return msg
; // Gecko, WebKit, Chrome <34
235 if (window
.checkSkipConditions
) {
236 checkSkipConditions();
238 // Hide swap ins button if insurance is primary
239 $
('#INSURANCE .tabNav a').click(function(){
240 let text
= $
(this
).text();
241 if ( text
!= 'Primary') {
242 $
('.swapIns').show();
244 $
('.swapIns').hide();
249 var mypcc
= <?php
echo js_escape($GLOBALS['phone_country_code']); ?
>;
251 //code used from http://tech.irt.org/articles/js037/
252 function replace(string,text
,by
) {
253 // Replaces text with by in string
254 var strLength
= string.length
, txtLength
= text
.length
;
255 if ((strLength
== 0) ||
(txtLength
== 0)) return string;
257 var i
= string.indexOf(text
);
258 if ((!i
) && (text
!= string.substring(0,txtLength
))) return string;
259 if (i
== -1) return string;
261 var newstr
= string.substring(0,i
) + by
;
263 if (i+txtLength
< strLength
)
264 newstr +
= replace(string.substring(i+txtLength
,strLength
),text
,by
);
269 function upperFirst(string,text
) {
270 return replace(string,text
,text
.charAt(0).toUpperCase() + text
.substring(1,text
.length
));
273 <?php
for ($i = 1; $i <= 3; $i++
) { ?
>
274 function auto_populate_employer_address
<?php
echo attr($i); ?
>(){
275 var f
= document
.demographics_form
;
276 if (f
.form_i
<?php
echo attr($i); ?
>subscriber_relationship
.options
[f
.form_i
<?php
echo attr($i); ?
>subscriber_relationship
.selectedIndex
].value
== "self")
278 f
.i
<?php
echo attr($i); ?
>subscriber_fname
.value
=f
.form_fname
.value
;
279 f
.i
<?php
echo attr($i); ?
>subscriber_mname
.value
=f
.form_mname
.value
;
280 f
.i
<?php
echo attr($i); ?
>subscriber_lname
.value
=f
.form_lname
.value
;
281 f
.i
<?php
echo attr($i); ?
>subscriber_street
.value
=f
.form_street
.value
;
282 f
.i
<?php
echo attr($i); ?
>subscriber_street_line_2
.value
=f
.form_street_line_2
.value
;
283 f
.i
<?php
echo attr($i); ?
>subscriber_city
.value
=f
.form_city
.value
;
284 f
.form_i
<?php
echo attr($i); ?
>subscriber_state
.value
=f
.form_state
.value
;
285 f
.i
<?php
echo attr($i); ?
>subscriber_postal_code
.value
=f
.form_postal_code
.value
;
286 if (f
.form_country_code
)
287 f
.form_i
<?php
echo attr($i); ?
>subscriber_country
.value
=f
.form_country_code
.value
;
288 f
.i
<?php
echo attr($i); ?
>subscriber_phone
.value
=f
.form_phone_home
.value
;
289 f
.i
<?php
echo attr($i); ?
>subscriber_DOB
.value
=f
.form_DOB
.value
;
290 if(typeof f
.form_ss
!="undefined")
292 f
.i
<?php
echo attr($i); ?
>subscriber_ss
.value
=f
.form_ss
.value
;
294 f
.form_i
<?php
echo attr($i); ?
>subscriber_sex
.value
= f
.form_sex
.value
;
295 f
.i
<?php
echo attr($i); ?
>subscriber_employer
.value
=f
.form_em_name
.value
;
296 f
.i
<?php
echo attr($i); ?
>subscriber_employer_street
.value
=f
.form_em_street
.value
;
297 f
.i
<?php
echo attr($i); ?
>subscriber_employer_street_line_2
.value
=f
.form_em_street_line_2
.value
;
298 f
.i
<?php
echo attr($i); ?
>subscriber_employer_city
.value
=f
.form_em_city
.value
;
299 f
.form_i
<?php
echo attr($i); ?
>subscriber_employer_state
.value
=f
.form_em_state
.value
;
300 f
.i
<?php
echo attr($i); ?
>subscriber_employer_postal_code
.value
=f
.form_em_postal_code
.value
;
301 if (f
.form_em_country
)
302 f
.form_i
<?php
echo attr($i); ?
>subscriber_employer_country
.value
=f
.form_em_country
.value
;
308 function popUp(URL
) {
311 top
.restoreSession();
312 eval("page" + id +
" = window.open(URL, '" + id +
"', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=300,left = 440,top = 362');");
315 function checkNum () {
316 var re
= new RegExp();
318 str
=document
.demographics_form
.monthly_income
.value
;
322 alert(<?php
echo xlj('Please enter a monetary amount using only numbers and a decimal point.'); ?
>);
326 function address_verify() {
327 top
.restoreSession();
328 var f
= document
.demographics_form
;
330 dlgopen('../../practice/address_verify.php?address1=' +
encodeURIComponent(f
.form_street
.value
) +
331 '&address2=' +
encodeURIComponent(f
.form_street_line_2
.value
) +
332 '&city=' +
encodeURIComponent(f
.form_city
.value
) +
333 '&state=' +
encodeURIComponent(f
.form_state
.value
) +
334 '&zip5=' +
encodeURIComponent(f
.form_postal_code
.value
.substring(0,5)) +
335 '&zip4=' +
encodeURIComponent(f
.form_postal_code
.value
.substring(5,9))
336 , '_blank', 400, 150, '', xl('Address Verify'));
341 // Indicates which insurance slot is being updated.
342 var insurance_index
= 0;
344 // The OnClick handler for searching/adding the insurance company.
345 function ins_search(ins
) {
346 insurance_index
= ins
;
350 function sendInsToSearch(ins
) {
351 let thesel
= $
('#i' + ins +
'provider');
352 let theseldata
= $
(thesel
).select2('data');
353 return theseldata
[0]['id'];
356 function InsSaveClose() {
357 top
.restoreSession();
358 document
.location
.reload();
360 // The ins_search.php window calls this to set the selected insurance.
361 function set_insurance(ins_id
, ins_name
) {
362 thesel
= $
('#i' + insurance_index +
'provider');
363 if ($
(thesel
).find("option[value='" + ins_id +
"']").length
) {
364 thesel
.val(ins_id
).trigger('change');
366 // no matching option was found so create one, append it to the
367 // end of the list, and select it.
368 let newOption
= new Option(ins_name
, ins_id
, true, true);
369 thesel
.append(newOption
).trigger('change');
373 // This capitalizes the first letter of each word in the passed input
374 // element. It also strips out extraneous spaces.
375 function capitalizeMe(elem
) {
376 var a
= elem
.value
.split(' ');
378 for(var i
= 0; i
< a
.length
; ++i
) {
379 if (a
[i
].length
> 0) {
380 if (s
.length
> 0) s +
= ' ';
381 s +
= a
[i
].charAt(0).toUpperCase() + a
[i
].substring(1);
387 function divclick(cb
, divid
) {
388 var divstyle
= document
.getElementById(divid
).style
;
390 divstyle
.display
= 'block';
392 divstyle
.display
= 'none';
397 // Compute the length of a string without leading and trailing spaces.
398 function trimlen(s
) {
400 var j
= s
.length
- 1;
401 for (; i
<= j
&& s
.charAt(i
) == ' '; ++i
);
402 for (; i
<= j
&& s
.charAt(j
) == ' '; --j
);
407 function validate(f
) {
409 var errMsgs
= new Array();
410 <?php
generate_layout_validation('DEM'); ?
>
413 msg +
= <?php
echo xlj('The following fields are required'); ?
> +
":\n\n";
414 for ( var i
= 0; i
< errMsgs
.length
; i++
) {
415 msg +
= errMsgs
[i
] +
"\n";
417 msg +
= "\n" +
<?php
echo xlj('Please fill them in before continuing.'); ?
>;
419 if ( errMsgs
.length
> 0 ) {
423 //Misc Deceased Date Validation for Future Date
424 var dateVal
= document
.getElementById("form_deceased_date").value
;
427 month
= '' +
(d
.getMonth() +
1),
428 day
= '' + d
.getDate(),
429 year
= d
.getFullYear();
430 if (month
.length
< 2) month
= '0' + month
;
431 if (day
.length
< 2) day
= '0' + day
;
432 currentDate
= year+
'-'+month+
'-'+day
;
433 if(dateVal
> currentDate
)
435 alert (<?php
echo xlj("Deceased Date should not be greater than Today"); ?
>);
439 //Patient Data validations
440 <?php
if ($GLOBALS['erx_enable']) { ?
>
442 for(i
=0;i
<f
.length
;i++
){
443 if(f
[i
].type
=='text' && f
[i
].value
)
445 if(f
[i
].name
== 'form_fname' || f
[i
].name
== 'form_mname' || f
[i
].name
== 'form_lname')
447 alertMsg +
= checkLength(f
[i
].name
,f
[i
].value
,35);
448 alertMsg +
= checkUsername(f
[i
].name
,f
[i
].value
);
450 else if(f
[i
].name
== 'form_street' || f
[i
].name
== 'form_city')
452 alertMsg +
= checkLength(f
[i
].name
,f
[i
].value
,35);
453 alertMsg +
= checkAlphaNumericExtended(f
[i
].name
,f
[i
].value
);
455 else if(f
[i
].name
== 'form_phone_home')
457 alertMsg +
= checkPhone(f
[i
].name
,f
[i
].value
);
469 // Some insurance validation.
470 for (var i
= 1; i
<= 3; ++i
) {
471 subprov
= 'i' + i +
'provider';
472 if (!f
[subprov
] || f
[subprov
].selectedIndex
<= 0) continue;
473 var subpfx
= 'i' + i +
'subscriber_';
474 var subrelat
= f
['form_' + subpfx +
'relationship'];
476 f
[subpfx +
'fname'].value
== f
.form_fname
.value
&&
477 f
[subpfx +
'mname'].value
== f
.form_mname
.value
&&
478 f
[subpfx +
'lname'].value
== f
.form_lname
.value
;
479 var ss_regexp
=/[0-9][0-9][0-9]-?
[0-9][0-9]-?
[0-9][0-9][0-9][0-9]/;
482 if(typeof f
.form_ss
!="undefined")
484 samess
= f
[subpfx +
'ss'].value
== f
.form_ss
.value
;
485 ss_valid
=ss_regexp
.test(f
[subpfx +
'ss'].value
) && ss_regexp
.test(f
.form_ss
.value
);
487 if (subrelat
.options
[subrelat
.selectedIndex
].value
== "self") {
489 if (!confirm(<?php
echo xlj('Subscriber relationship is self but name is different! Is this really OK?'); ?
>))
492 if (!samess
&& ss_valid
) {
493 if(!confirm(<?php
echo js_escape(xl('Subscriber relationship is self but SS number is different!') . " " . xl("Is this really OK?")); ?
>))
499 if (!confirm(<?php
echo xlj('Subscriber relationship is not self but name is the same! Is this really OK?'); ?
>))
502 if (samess
&& ss_valid
) {
503 if(!confirm(<?php
echo js_escape(xl('Subscriber relationship is not self but SS number is the same!') . " " . xl("Is this really OK?")); ?
>))
509 return errMsgs
.length
< 1;
512 // Added 06/2009 by BM to make compatible with list_options table and functions - using jquery
515 <?php
for ($i = 1; $i <= 3; $i++
) { ?
>
516 $
("#form_i<?php echo attr($i); ?>subscriber_relationship").change(function() { auto_populate_employer_address
<?php
echo attr($i); ?
>(); });
524 div
.demographicsEditContainer div
.label_custom
{
529 padding
-top
: 0 !important
;
530 margin
-bottom
: 0.2rem
;
533 div
.insuranceEditContainer div
.label_custom span
{
535 display
: inline
-flex
;
542 if (!empty($GLOBALS['right_justify_labels_demographics']) && ($_SESSION['language_direction'] == 'ltr')) { ?
>
544 text
-align
: right
!important
;
547 div
.tab td
.data
, div
.data
{
558 /*Get the constraint from the DB-> LBF forms accordinf the form_id*/
559 $constraints = LBF_Validation
::generate_validate_constraints("DEM");
561 <script
> var constraints
= <?php
echo $constraints;?
>; </script
>
563 <body
class="body_top">
565 <form action
='demographics_save.php' name
='demographics_form' id
="DEM" method
='post' class='form-inline'
566 onsubmit
="submitme(<?php echo $GLOBALS['new_validate'] ? 1 : 0;?>,event,'DEM',constraints)">
567 <input type
="hidden" name
="csrf_token_form" value
="<?php echo attr(CsrfUtils::collectCsrfToken()); ?>" />
568 <input type
='hidden' name
='mode' value
='save' />
569 <input type
='hidden' name
='db_id' value
="<?php echo attr($result['id']); ?>" />
570 <input type
="hidden" name
="isSwapClicked" value
="" />
572 <div
class="container-xl">
575 <h2
><?php
echo xlt('Edit Current Patient');?
></h2
>
578 <div
class="btn-group">
579 <button type
="submit" class="btn btn-primary btn-save" id
="submit_btn" disabled
="disabled" value
="<?php echo xla('Save'); ?>">
580 <?php
echo xlt('Save'); ?
>
582 <a
class="btn btn-secondary btn-cancel" href
="demographics.php" onclick
="top.restoreSession()">
583 <?php
echo xlt('Cancel'); ?
>
594 <div
class='container-xl demographicsEditContainer'>
595 <div
class="section-header">
596 <span
class="text font-weight-bold"><?php
echo xlt("Demographics")?
></span
>
599 <?php
display_layout_tabs('DEM', $result, $result2); ?
>
602 <div
class="tabContainer">
603 <?php
display_layout_tabs_data_editable('DEM', $result, $result2); ?
>
608 <div
class='container-xl'>
611 if (! $GLOBALS['simplified_demographics']) {
612 //Check to see if only one insurance is allowed
613 if ($GLOBALS['insurance_only_one']) {
614 $insurance_headings = array(xl("Primary Insurance Provider"));
615 $insurance_info = array();
616 $insurance_info[1] = getInsuranceData($pid, "primary");
618 $insurance_headings = array(xl("Primary Insurance Provider"), xl("Secondary Insurance Provider"), xl("Tertiary Insurance provider"));
619 $insurance_info = array();
620 $insurance_info[1] = getInsuranceData($pid, "primary");
621 $insurance_info[2] = getInsuranceData($pid, "secondary");
622 $insurance_info[3] = getInsuranceData($pid, "tertiary");
627 <div
class="section-header">
628 <span
class="text font-weight-bold"><?php
echo xlt("Insurance")?
></span
>
630 <div id
="INSURANCE" class="insuranceEditContainer">
633 foreach ($insurance_array as $instype) {
635 <li
<?php
echo $instype == 'primary' ?
'class="current"' : '' ?
>><a href
="#"><?php
$CapInstype = ucfirst($instype);
636 echo xlt($CapInstype); ?
></a
></li
><?php
} ?
>
639 <div
class="tabContainer">
642 for ($i = 1; $i <= 3; $i++
) {
643 $result3 = $insurance_info[$i];
646 <div
class="tab <?php echo $i == 1 ? 'current' : '' ?> h-auto w-auto">
647 <div
class="form-row">
648 <div
class="col-md-6"><!-- start left column
-->
650 <div
class="form-row"><!-- start nested row
-->
651 <div
class="col-md-3 label_custom pb-3">
652 <span
class='required'><?php
echo text($insurance_headings[$i - 1]); ?
>:</span
>
654 <div
class="col-md-9">
655 <a
class="medium_modal btn btn-primary" href
="../../practice/ins_search.php?ins=" role
="button"
656 onclick
="ins_search(<?php echo attr_js($i); ?>)"><?php
echo xlt('Search/Add/Edit') ?
></a
>
657 <select id
="i<?php echo attr($i); ?>provider" name
="i<?php echo attr($i); ?>provider" class="form-control form-control-sm sel2 mb-1" style
="width: 250px;">
658 <option value
=""><?php
echo xlt('Unassigned'); ?
></option
>
660 foreach ($insurancei as $iid => $iname) {
661 echo "<option value='" . attr($iid) . "'";
662 if (!empty($result3["provider"]) && (strtolower($iid) == strtolower($result3["provider"]))) {
665 echo ">" . text($iname) . "</option>\n";
670 </div
><!-- end nested row
-->
672 <div
class="form-row"><!-- start nested row
-->
673 <div
class="col-md-3 pb-1 label_custom">
674 <span
class='required'><?php
echo xlt('Plan Name'); ?
>:</span
>
676 <div
class="col-md-6">
677 <input type
='entry' class='form-control form-control-sm mb-1' size
='20'
678 name
='i<?php echo attr($i); ?>plan_name'
679 value
="<?php echo attr($result3["plan_name
"] ?? ''); ?>"
680 onchange
="capitalizeMe(this);" />
682 <div
class="col-md-3 swapIns <?php echo (empty($GLOBALS['enable_swap_secondary_insurance'])) ? ' d-none"' : '"'; ?>>
683 <a class="btn btn
-secondary pb
-1" href="#" role="button"
684 onclick
="document.forms[0].isSwapClicked.value=<?php echo attr($i); ?>; document.forms[0].submit()">
685 <?php
echo ($i == '2') ?
xlt('Swap with Primary') : xlt('Swap with Secondary'); ?
>
688 </div
><!-- end nested row
-->
690 <div
class="form-row"><!-- start nested row
-->
691 <div
class="col-md-3 pb-1 label_custom ">
692 <span
class='required'><?php
echo xlt('Effective Date'); ?
>:</span
>
694 <div
class="col-md-9">
695 <input type
='entry' size
='16' class='datepicker form-control form-control-sm mb-1'
696 id
='i<?php echo attr($i); ?>effective_date'
697 name
='i<?php echo attr($i); ?>effective_date'
698 value
='<?php echo attr(oeFormatShortDate($result3['date
'] ?? '')); ?>' />
700 </div
><!-- end nested row
-->
702 <div
class="form-row"><!-- start nested row
-->
703 <div
class="col-md-3 pb-1 label_custom ">
704 <span
class='required'><?php
echo xlt('Effective Date End'); ?
>:</span
>
706 <div
class="col-md-9">
707 <input type
='entry' size
='16' class='datepicker form-control form-control-sm mb-1'
708 id
='i<?php echo attr($i); ?>effective_date_end'
709 name
='i<?php echo attr($i); ?>effective_date_end'
710 value
='<?php echo attr(oeFormatShortDate($result3['date_end
'] ?? '')); ?>' />
712 </div
><!-- end nested row
-->
714 <div
class="form-row"><!-- start nested row
-->
715 <div
class="col-md-3 pb-1 label_custom">
716 <span
class='required'><?php
echo xlt('Policy Number'); ?
>:</span
>
718 <div
class="col-md-9">
719 <input type
='entry' class='form-control form-control-sm mb-1' size
='16'
720 name
='i<?php echo attr($i); ?>policy_number'
721 value
="<?php echo attr($result3["policy_number
"] ?? ''); ?>"
722 onkeyup
='policykeyup(this)' />
724 </div
><!-- end nested row
-->
726 <div
class="form-row"><!-- start nested row
-->
727 <div
class="col-md-3 pb-1 label_custom ">
728 <span
class='required'><?php
echo xlt('Group Number'); ?
>:</span
>
730 <div
class="col-md-9">
731 <input type
="text" class='form-control form-control-sm mb-1' size
='16'
732 name
='i<?php echo attr($i); ?>group_number'
733 value
="<?php echo attr($result3["group_number
"] ?? ''); ?>"
734 onkeyup
='policykeyup(this)' />
736 </div
><!-- end nested row
-->
738 <div
class="form-row"<?php
echo $GLOBALS['omit_employers'] ?
" style='display:none'" : ""; ?
>><!-- start nested row
-->
739 <div
class="col-md-3 pb-4 label_custom">
740 <span
class='required'><?php
echo xlt('Subscriber Employer (SE)'); ?
>:</span
>
742 <div
class="col-md-9">
743 <input type
='entry' class='form-control form-control-sm' size
='25'
744 name
='i<?php echo attr($i); ?>subscriber_employer'
745 value
="<?php echo attr($result3["subscriber_employer
"] ?? ''); ?>"
746 onchange
="capitalizeMe(this);" />
747 <span
class='small mb-1'><br
/><?php
echo xlt('if unemployed enter Student'); ?
>,
748 <?php
echo xlt('PT Student, or leave blank'); ?
></span
>
750 </div
><!-- end nested row
-->
752 <div
class="form-row"<?php
echo $GLOBALS['omit_employers'] ?
" style='display:none'" : ""; ?
>><!-- start nested row
-->
753 <div
class="col-md-3 pb-1 label_custom">
754 <span
class='required'><?php
echo xlt('SE Address'); ?
>:</span
>
756 <div
class="col-md-9">
757 <input type
='entry' class='form-control form-control-sm mb-1' size
='25'
758 name
='i<?php echo attr($i); ?>subscriber_employer_street'
759 value
="<?php echo attr($result3["subscriber_employer_street
"] ?? ''); ?>"
760 onchange
="capitalizeMe(this);" />
762 <div
class="col-md-3 pb-1 label_custom">
763 <span
class='required'><?php
echo xlt('SE Address Line 2'); ?
>:</span
>
765 <div
class="col-md-9">
766 <input type
='entry' class='form-control form-control-sm mb-1' size
='25'
767 name
='i<?php echo attr($i); ?>subscriber_employer_street_line_2'
768 value
="<?php echo attr($result3["subscriber_employer_street_line_2
"] ?? ''); ?>"
769 onchange
="capitalizeMe(this);" />
771 </div
><!-- end nested row
-->
773 <div
class="form-row"<?php
echo $GLOBALS['omit_employers'] ?
" style='display:none'" : ""; ?
>><!-- start nested row
-->
774 <div
class="col-md-3 pb-1 label_custom">
775 <span
class='required'><?php
echo xlt('SE City'); ?
>:</span
>
777 <div
class="col-md-9">
778 <input type
='entry' class='form-control form-control-sm mb-1' size
='15'
779 name
='i<?php echo attr($i); ?>subscriber_employer_city'
780 value
="<?php echo attr($result3["subscriber_employer_city
"] ?? ''); ?>"
781 onchange
="capitalizeMe(this);" />
783 </div
><!-- end nested row
-->
785 <div
class="form-row"<?php
echo $GLOBALS['omit_employers'] ?
" style='display:none'" : ""; ?
>><!-- start nested row
-->
786 <div
class="col-md-3 pb-1 label_custom">
787 <span
class='required'><?php
echo ($GLOBALS['phone_country_code'] == '1') ?
xlt('SE State') : xlt('SE Locality') ?
>:</span
>
789 <div
class="col-md-9">
793 'data_type' => $GLOBALS['state_data_type'],
794 'field_id' => ('i' . $i . 'subscriber_employer_state'),
795 'list_id' => $GLOBALS['state_list'],
796 'fld_length' => '15',
797 'max_length' => '63',
798 'edit_options' => 'C',
799 'smallform' => 'true'
801 ($result3['subscriber_employer_state'] ??
'')
805 </div
><!-- end nested row
-->
807 <div
class="form-row"<?php
echo $GLOBALS['omit_employers'] ?
" style='display:none'" : ""; ?
>><!-- start nested row
-->
808 <div
class="col-md-3 pb-1 label_custom">
809 <span
class='required'><?php
echo ($GLOBALS['phone_country_code'] == '1') ?
xlt('SE Zip Code') : xlt('SE Postal Code') ?
>:</span
>
811 <div
class="col-md-9">
812 <input type
='entry' class='form-control form-control-sm mb-1' size
='15'
813 name
='i<?php echo attr($i); ?>subscriber_employer_postal_code'
814 value
="<?php echo attr($result3["subscriber_employer_postal_code
"] ?? ''); ?>" />
816 </div
><!-- end nested row
-->
818 <div
class="form-row"<?php
echo $GLOBALS['omit_employers'] ?
" style='display:none'" : ""; ?
>><!-- start nested row
-->
819 <div
class="col-md-3 pb-1 label_custom">
820 <span
class='required'><?php
echo xlt('SE Country'); ?
>:</span
>
822 <div
class="col-md-9">
824 // Modified 7/2009 by BM to incorporate data types
827 'data_type' => $GLOBALS['country_data_type'],
828 'field_id' => ('i' . $i . 'subscriber_employer_country'),
829 'list_id' => $GLOBALS['country_list'],
830 'fld_length' => '10',
831 'max_length' => '63',
832 'edit_options' => 'C',
833 'smallform' => 'true'
835 ($result3['subscriber_employer_country'] ??
'')
839 </div
><!-- end nested row
-->
841 </div
><!-- end left column
-->
843 <div
class="col-md-6"><!-- start right column
-->
845 <div
class="form-row"><!-- start nested row
-->
846 <div
class="col-md-3 pb-1 label_custom">
847 <span
class='required'><?php
echo xlt('Relationship'); ?
>:</span
>
849 <div
class="col-md-9">
851 // Modified 6/2009 by BM to use list_options and function
855 'field_id' => ('i' . $i . 'subscriber_relationship'),
856 'list_id' => 'sub_relation',
857 'empty_title' => ' ',
858 'smallform' => ' form-control form-control-sm mb-1'
860 ($result3['subscriber_relationship'] ??
'')
863 <a href
="javascript:popUp('browse.php?browsenum=<?php echo attr_url($i); ?>')"
864 class='text'>(<?php
echo xlt('Browse'); ?
>)</a
>
866 </div
><!-- end nested row
-->
868 <div
class="form-row"><!-- start nested row
-->
869 <div
class="col-md-3 pb-1 label_custom">
870 <span
class='required'><?php
echo xlt('Subscriber'); ?
>:</span
>
872 <div
class="col-md-9">
873 <input type
='entry' class='form-control form-control-sm mb-1' size
='10'
874 name
='i<?php echo attr($i); ?>subscriber_fname'
875 value
="<?php echo attr($result3["subscriber_fname
"] ?? ''); ?>"
876 onchange
="capitalizeMe(this);" />
877 <input type
='entry' class='form-control form-control-sm mb-1' size
='3'
878 name
='i<?php echo attr($i); ?>subscriber_mname'
879 value
="<?php echo attr($result3["subscriber_mname
"] ?? ''); ?>"
880 onchange
="capitalizeMe(this);" />
881 <input type
='entry' class='form-control form-control-sm mb-1' size
='10'
882 name
='i<?php echo attr($i); ?>subscriber_lname'
883 value
="<?php echo attr($result3["subscriber_lname
"] ?? ''); ?>"
884 onchange
="capitalizeMe(this);" />
886 </div
><!-- end nested row
-->
888 <div
class="form-row"><!-- start nested row
-->
889 <div
class="col-md-3 pb-1 label_custom">
890 <span
><?php
echo xlt('D.O.B.'); ?
>:</span
>
892 <div
class="col-md-9">
893 <input type
='entry' class='datepicker form-control form-control-sm mb-1 mw-100'
894 id
='i<?php echo attr($i); ?>subscriber_DOB' size
='11'
895 name
='i<?php echo attr($i); ?>subscriber_DOB'
896 value
='<?php echo attr(oeFormatShortDate($result3['subscriber_DOB
'] ?? '')); ?>' />
898 </div
><!-- end nested row
-->
900 <div
class="form-row"><!-- start nested row
-->
901 <div
class="col-md-3 pb-1 label_custom">
902 <span
><?php
echo xlt('Sex'); ?
>:</span
>
904 <div
class="col-md-9">
906 // Modified 6/2009 by BM to use list_options and function
910 'field_id' => ('i' . $i . 'subscriber_sex'),
912 'smallform' => ' form-control form-control-sm mb-1'
914 ($result3['subscriber_sex'] ??
'')
918 </div
><!-- end nested row
-->
920 <div
class="form-row"><!-- start nested row
-->
921 <div
class="col-md-3 pb-1 label_custom">
922 <span
><?php
echo xlt('S.S.'); ?
>:</span
>
924 <div
class="col-md-9">
925 <input type
='entry' class='form-control form-control-sm mb-1 mw-100' size
='11'
926 name
='i<?php echo attr($i); ?>subscriber_ss'
927 value
="<?php echo attr(trim($result3["subscriber_ss
"] ?? '')); ?>" />
929 </div
><!-- end nested row
-->
931 <div
class="form-row"><!-- start nested row
-->
932 <div
class="col-md-3 pb-1 label_custom">
933 <span
class='required'><?php
echo xlt('Subscriber Address'); ?
>:</span
>
935 <div
class="col-md-9">
936 <input type
='entry' class='form-control form-control-sm mb-1 mw-100' size
='20'
937 name
='i<?php echo attr($i); ?>subscriber_street'
938 value
="<?php echo attr($result3["subscriber_street
"] ?? ''); ?>"
939 onchange
="capitalizeMe(this);" />
941 </div
><!-- end nested row
-->
943 <div
class="form-row"><!-- start nested row
-->
944 <div
class="col-md-3 pb-1 label_custom">
945 <span
class='required'><?php
echo xlt('Address Line 2'); ?
>:</span
>
947 <div
class="col-md-9">
948 <input type
='entry' class='form-control form-control-sm mb-1 mw-100' size
='20'
949 name
='i<?php echo attr($i); ?>subscriber_street_line_2'
950 value
="<?php echo attr($result3["subscriber_street_line_2
"] ?? ''); ?>"
951 onchange
="capitalizeMe(this);" />
953 </div
><!-- end nested row
-->
955 <div
class="form-row"><!-- start nested row
-->
956 <div
class="col-md-3 pb-1 label_custom">
957 <span
class='required'><?php
echo xlt('City'); ?
>:</span
>
959 <div
class="col-md-9">
960 <input type
='entry' class='form-control form-control-sm mb-1 mw-100' size
='11'
961 name
='i<?php echo attr($i); ?>subscriber_city'
962 value
="<?php echo attr($result3["subscriber_city
"] ?? ''); ?>"
963 onchange
="capitalizeMe(this);" />
965 </div
><!-- end nested row
-->
967 <div
class="form-row"><!-- start nested row
-->
968 <div
class="col-md-3 pb-1 label_custom">
969 <span
class='required'><?php
echo ($GLOBALS['phone_country_code'] == '1') ?
xlt('State') : xlt('Locality') ?
>:</span
>
971 <div
class="col-md-9">
973 // Modified 7/2009 by BM to incorporate data types
976 'data_type' => $GLOBALS['state_data_type'],
977 'field_id' => ('i' . $i . 'subscriber_state'),
978 'list_id' => $GLOBALS['state_list'],
979 'fld_length' => '15',
980 'max_length' => '63',
981 'edit_options' => 'C',
982 'smallform' => 'true'
984 ($result3['subscriber_state'] ??
'')
988 </div
><!-- end nested row
-->
990 <div
class="form-row"><!-- start nested row
-->
991 <div
class="col-md-3 pb-1 label_custom">
992 <span
class='required'><?php
echo ($GLOBALS['phone_country_code'] == '1') ?
xlt('Zip Code') : xlt('Postal Code') ?
>:</span
>
994 <div
class="col-md-9">
995 <input type
='entry' class='form-control form-control-sm mb-1' size
='15'
996 name
='i<?php echo attr($i); ?>subscriber_postal_code'
997 value
="<?php echo attr($result3["subscriber_postal_code
"] ?? ''); ?>" />
999 </div
><!-- end nested row
-->
1001 <div
class="form-row"><!-- start nested row
-->
1002 <div
class="col-md-3 pb-1 label_custom">
1003 <span
class='required'><?php
echo xlt('Country'); ?
>:</span
>
1005 <div
class="col-md-9">
1007 // Modified 7/2009 by BM to incorporate data types
1008 generate_form_field(
1010 'data_type' => $GLOBALS['country_data_type'],
1011 'field_id' => ('i' . $i . 'subscriber_country'),
1012 'list_id' => $GLOBALS['country_list'],
1013 'fld_length' => '10',
1014 'max_length' => '63',
1015 'edit_options' => 'C',
1016 'smallform' => 'true'
1018 ($result3['subscriber_country'] ??
'')
1022 </div
><!-- end nested row
-->
1024 <div
class="form-row"><!-- start nested row
-->
1025 <div
class="col-md-3 pb-1 label_custom">
1026 <span
><?php
echo xlt('Subscriber Phone'); ?
>:</span
>
1028 <div
class="col-md-9">
1029 <input type
='text' class='form-control form-control-sm mb-1' size
='20'
1030 name
='i<?php echo attr($i); ?>subscriber_phone'
1031 value
='<?php echo attr($result3["subscriber_phone"] ?? ''); ?>'
1032 onkeyup
='phonekeyup(this,mypcc)' />
1034 </div
><!-- end nested row
-->
1036 <div
class="form-row"><!-- start nested row
-->
1037 <div
class="col-md-3 pb-1 label_custom">
1038 <span
><?php
echo xlt('CoPay'); ?
>:</span
>
1040 <div
class="col-md-9">
1041 <input type
='text' class='form-control form-control-sm mb-1' size
="6"
1042 name
='i<?php echo attr($i); ?>copay'
1043 value
="<?php echo attr($result3["copay
"] ?? ''); ?>" />
1045 </div
><!-- end nested row
-->
1047 <div
class="form-row"><!-- start nested row
-->
1048 <div
class="col-md-3 pb-1 label_custom">
1049 <span
class='required'><?php
echo xlt('Accept Assignment'); ?
>:</span
>
1051 <div
class="col-md-9">
1052 <select
class='form-control form-control-sm mb-1'
1053 name
='i<?php echo attr($i); ?>accept_assignment'>
1054 <option value
="TRUE"
1055 <?php
echo (!empty($result3["accept_assignment"]) && (strtoupper($result3["accept_assignment"]) == "TRUE")) ?
"selected" : ""; ?
>>
1056 <?php
echo xlt('YES'); ?
></option
>
1057 <option value
="FALSE"
1058 <?php
echo (!empty($result3["accept_assignment"]) && (strtoupper($result3["accept_assignment"]) == "FALSE")) ?
"selected" : ""; ?
>>
1059 <?php
echo xlt('NO'); ?
></option
>
1062 </div
><!-- end nested row
-->
1064 <div
class="form-row"><!-- start nested row
-->
1065 <div
class="col-md-3 pb-1 label_custom">
1066 <span
><?php
echo xlt('Secondary Medicare Type'); ?
>:</span
>
1068 <div
class="col-md-9">
1069 <select
class='form-control form-control-sm mb-1 sel2' name
='i<?php echo attr($i); ?>policy_type'>
1071 if (!empty($policy_types)) {
1072 foreach ($policy_types as $key => $value) {
1073 echo " <option value ='" . attr($key) . "'";
1074 if (!empty($result3['policy_type']) && ($key == $result3['policy_type'])) {
1077 echo ">" . text($value) . "</option>\n";
1083 </div
><!-- end nested row
-->
1085 </div
><!-- end right column
-->
1090 } //end insurer for loop ?>
1095 <?php
} // end of "if not simplified_demographics" ?>
1104 // Array of skip conditions for the checkSkipConditions() function.
1106 <?php
echo $condition_str; ?
>
1109 // hard code validation for old validation, in the new validation possible to add match rules
1110 <?php
if ($GLOBALS['new_validate'] == 0) { ?
>
1111 // fix inconsistently formatted phone numbers from the database
1112 var f
= document
.forms
[0];
1113 if (f
.form_phone_contact
) phonekeyup(f
.form_phone_contact
,mypcc
);
1114 if (f
.form_phone_home
) phonekeyup(f
.form_phone_home
,mypcc
);
1115 if (f
.form_phone_biz
) phonekeyup(f
.form_phone_biz
,mypcc
);
1116 if (f
.form_phone_cell
) phonekeyup(f
.form_phone_cell
,mypcc
);
1118 <?php
if (! $GLOBALS['simplified_demographics']) { ?
>
1119 phonekeyup(f
.i1subscriber_phone
,mypcc
);
1120 phonekeyup(f
.i2subscriber_phone
,mypcc
);
1121 phonekeyup(f
.i3subscriber_phone
,mypcc
);
1126 <?php
if ($set_pid) { ?
>
1127 parent
.left_nav
.setPatient(<?php
echo js_escape($result['fname'] . " " . $result['lname']) . "," . js_escape($pid) . "," . js_escape($result['pubpid']) . ",''," . js_escape(" " . xl('DOB') . ": " . oeFormatShortDate($result['DOB_YMD']) . " " . xl('Age') . ": " . getPatientAgeDisplay($result['DOB_YMD'])); ?
>);
1130 <?php
echo $date_init; ?
>
1133 <!-- include support
for the
list-add selectbox feature
-->
1134 <?php
require $GLOBALS['fileroot'] . "/library/options_listadd.inc.php"; ?
>
1136 <?php
/*Include the validation script and rules for this form*/
1138 //LBF forms use the new validation depending on the global value
1139 $use_validate_js = $GLOBALS['new_validate'];
1142 <?php
include_once("$srcdir/validation/validation_script.js.php");?
>
1146 var duplicateFieldsArray
=[];
1148 //This code deals with demographics before save action -
1149 <?php
if (($GLOBALS['gbl_edit_patient_form'] == '1') && (checkIfPatientValidationHookIsActive())) :?
>
1150 //Use the Zend patient validation hook.
1151 //TODO - get the edit part of patient validation hook to work smoothly and then
1152 // remove the closeBeforeOpening=1 in the url below.
1156 // Use hook to open the controller and get the new patient validation .
1157 // when no params are sent this window will be closed from the zend controller.
1158 var url
='<?php echo $GLOBALS['web_root
'] . "/interface/modules/zend_modules/public/patientvalidation";?>';
1159 $
("#submit_btn").attr("name","btnSubmit");
1160 $
("#submit_btn").attr("id","btnSubmit");
1161 $
("#btnSubmit").click(function( event
) {
1163 top
.restoreSession();
1165 if(!submitme(<?php
echo $GLOBALS['new_validate'] ?
1 : 0;?
>,event
,'DEM',constraints
)){
1166 event
.preventDefault();
1169 somethingChanged
= false;
1171 // D in edit_options indicates the field is used in duplication checking.
1172 // This constructs a list of the names of those fields.
1174 $mfres = sqlStatement("SELECT field_id FROM layout_options " .
1175 "WHERE form_id = 'DEM' AND uor > 0 AND field_id != '' AND " .
1176 "(edit_options LIKE '%D%' OR edit_options LIKE '%E%') " .
1177 "ORDER BY group_id, seq");
1178 while ($mfrow = sqlFetchArray($mfres)) {
1179 $field_id = $mfrow['field_id'];
1180 if (strpos($field_id, 'em_') === 0) {
1184 if (!empty($mflist)) {
1188 $mflist .= js_escape($field_id);
1191 var flds
= new Array(<?php
echo $mflist; ?
>);
1192 var separator
= '?';
1193 var valueIsChanged
=false;
1194 for (var i
= 0; i
< flds
.length
; ++i
) {
1195 var fval
= $
('#form_' + flds
[i
]).val();
1196 if(duplicateFieldsArray
['#form_' + flds
[i
]]!=fval
) {
1197 valueIsChanged
= true;
1201 if (fval
&& fval
!= '') {
1204 url +
= 'mf_' + flds
[i
] +
'=' +
encodeURIComponent(fval
);
1209 //Only if check for duplicates values are changed open the popup hook screen
1210 if(valueIsChanged
) {
1211 event
.preventDefault();
1212 //("value has changed for duplicate check inputs");
1213 url +
= '&page=edit&closeBeforeOpening=1&mf_id=' +
encodeURIComponent($
("[name='db_id']").val());
1214 dlgopen(url
, '_blank', 700, 500);
1216 else {//other wise submit me is a success just submit the form
1224 //When document is ready collect all the values Marked with D (check duplicate) stored in the db into array duplicateFieldsArray.
1225 var flds
= new Array(<?php
echo ($mflist ??
''); ?
>);
1226 for (var i
= 0; i
< flds
.length
; ++i
) {
1227 var fval
= $
('#form_' + flds
[i
]).val();
1228 duplicateFieldsArray
['#form_' + flds
[i
]] = fval
;
1230 $
(".sel2").select2({
1231 theme
: "bootstrap4",
1232 dropdownAutoWidth
: true,
1234 <?php
require($GLOBALS['srcdir'] . '/js/xl/select2.js.php'); ?
>
1236 <?php
if ($GLOBALS['usps_webtools_enable']) { ?
>
1237 $
("#value_id_text_postal_code").append(
1238 "<input type='button' class='btn btn-sm btn-secondary mb-1' onclick='address_verify()' value='<?php echo xla('Verify Address') ?>' />");