* @copyright Copyright (c) 2017 Brady Miller * @copyright Copyright (c) 2021 Rod Roark * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 */ require_once("../../globals.php"); require_once("$srcdir/options.inc.php"); require_once("$srcdir/validation/LBF_Validation.php"); require_once("$srcdir/patientvalidation.inc.php"); require_once("$srcdir/pid.inc"); require_once("$srcdir/patient.inc"); use OpenEMR\Common\Acl\AclMain; use OpenEMR\Common\Csrf\CsrfUtils; use OpenEMR\Core\Header; use OpenEMR\Events\PatientDemographics\UpdateEvent; // Session pid must be right or bad things can happen when demographics are saved! // $set_pid = $_GET["set_pid"] ?? ($_GET["pid"] ?? null); if ($set_pid && $set_pid != $_SESSION["pid"]) { setpid($set_pid); } $result = getPatientData($pid, "*, DATE_FORMAT(DOB,'%Y-%m-%d') as DOB_YMD"); $result2 = getEmployerData($pid); // Check authorization. if ($pid) { // Create and fire the patient demographics update event $updateEvent = new UpdateEvent($pid); $updateEvent = $GLOBALS["kernel"]->getEventDispatcher()->dispatch(UpdateEvent::EVENT_HANDLE, $updateEvent, 10); if ( !$updateEvent->authorized() || !AclMain::aclCheckCore('patients', 'demo', '', 'write') ) { die(xlt('Updating demographics is not authorized.')); } if ($result['squad'] && ! AclMain::aclCheckCore('squads', $result['squad'])) { die(xlt('You are not authorized to access this squad.')); } } else { if (!AclMain::aclCheckCore('patients', 'demo', '', array('write','addonly'))) { die(xlt('Adding demographics is not authorized.')); } } $CPR = 4; // cells per row // $statii = array('married','single','divorced','widowed','separated','domestic partner'); // $provideri = getProviderInfo(); if ($GLOBALS['insurance_information'] != '0') { $insurancei = getInsuranceProvidersExtra(); } else { $insurancei = getInsuranceProviders(); } //Check to see if only one insurance is allowed if ($GLOBALS['insurance_only_one']) { $insurance_array = array('primary'); } else { $insurance_array = array('primary', 'secondary', 'tertiary'); } ?> <?php echo xlt('Edit Current Patient'); ?> LBF forms accordinf the form_id*/ $constraints = LBF_Validation::generate_validate_constraints("DEM"); ?>


  • >
:
:
" onchange="capitalizeMe(this);" />
:
' />
:
" onkeyup='policykeyup(this)' />
:
" onkeyup='policykeyup(this)' />
:
1, 'field_id' => ('i' . $i . 'subscriber_relationship'), 'list_id' => 'sub_relation', 'empty_title' => ' ', 'smallform' => ' form-control form-control-sm mb-1' ), ($result3['subscriber_relationship'] ?? '') ); ?> ()
:
" onchange="capitalizeMe(this);" /> " onchange="capitalizeMe(this);" /> " onchange="capitalizeMe(this);" />
:
' />
:
1, 'field_id' => ('i' . $i . 'subscriber_sex'), 'list_id' => 'sex', 'smallform' => ' form-control form-control-sm mb-1' ), ($result3['subscriber_sex'] ?? '') ); ?>
:
" />
:
" onchange="capitalizeMe(this);" />
:
" onchange="capitalizeMe(this);" />
:
" onchange="capitalizeMe(this);" />
:
$GLOBALS['state_data_type'], 'field_id' => ('i' . $i . 'subscriber_state'), 'list_id' => $GLOBALS['state_list'], 'fld_length' => '15', 'max_length' => '63', 'edit_options' => 'C', 'smallform' => 'true' ), ($result3['subscriber_state'] ?? '') ); ?>
:
" />
:
$GLOBALS['country_data_type'], 'field_id' => ('i' . $i . 'subscriber_country'), 'list_id' => $GLOBALS['country_list'], 'fld_length' => '10', 'max_length' => '63', 'edit_options' => 'C', 'smallform' => 'true' ), ($result3['subscriber_country'] ?? '') ); ?>
:
' onkeyup='phonekeyup(this,mypcc)' />
:
" />
:
: