* @author Brady Miller * @copyright Copyright (c) 2008-2009 Rod Roark * @copyright Copyright (c) 2017-2018 Brady Miller * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 */ require_once("$srcdir/options.inc.php"); require_once("$srcdir/patient.inc"); $CPR = 4; // cells per row $pprow = array(); function end_cell() { global $item_count, $cell_count; if ($item_count > 0) { echo ""; $item_count = 0; } } function end_row() { global $cell_count, $CPR; end_cell(); if ($cell_count > 0) { for (; $cell_count < $CPR; ++$cell_count) { echo ""; } echo "\n"; $cell_count = 0; } } function end_group() { global $last_group; if (strlen($last_group) > 0) { end_row(); echo " \n"; echo "\n"; } } function issue_ippf_gcac_newtype() { echo " var gcadisp = (aitypes[index] == 3) ? '' : 'none';\n"; echo " document.getElementById('ippf_gcac').style.display = gcadisp;\n"; } function issue_ippf_gcac_save($issue) { $sets = "id = '" . add_escape_custom($issue) . "'"; $fres = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = 'GCA' AND uor > 0 AND field_id != '' AND edit_options != 'H' " . "ORDER BY group_id, seq"); while ($frow = sqlFetchArray($fres)) { $field_id = $frow['field_id']; $value = get_layout_form_value($frow); $sets .= ", " . add_escape_custom($field_id) . " = '" . add_escape_custom($value) . "'"; } // This replaces the row if its id exists, otherwise inserts it. sqlStatement("REPLACE INTO lists_ippf_gcac SET $sets"); } function issue_ippf_gcac_form($issue, $thispid) { global $pprow, $item_count, $cell_count, $last_group; $shrow = getHistoryData($thispid); if ($issue) { $pprow = sqlQuery("SELECT * FROM lists_ippf_gcac WHERE id = ?", array($issue)); } else { $pprow = array(); } echo "