* @author Stephen Nielson * @copyright Copyright (c) 2022 David Eschelbacher * @copyright Copyright (c) 2022 Discover and Change, Inc. * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 */ use OpenEMR\Services\ContactService; global $pid; // we need to grab our pid from our global settings. $pid = ($frow['blank_form'] ?? null) ? 0 : $pid; $contactService = new ContactService(); $addresses = $contactService->getContactsForPatient($pid); $table_id = uniqid("table_edit_addresses_"); // should always be set, but just in case we will set it to 0 so we can grab it $field_id_esc = $field_id_esc ?? '0'; $addresses = $addresses ?? []; $name_field_id = "form_" . $field_id_esc; $smallform = $smallform ?? ''; $widgetConstants = [ 'listWithAddButton' => 26 ,'textDate' => 4 ,'textbox' => 2 ]; // TODO: @adunsulag could we actually design out an actual layout and then just generate/display it in here? Seems like that would provide the most extensible option? // TODO: @adunsulag the repeating nature of this as a layout display would be problematic... we'd need some kind of repeater widget, would be a fun project. ?>