* @author Amiel Elboim * @author Brady Miller * @copyright Copyright (c) 2016 Shachar Zilbershlag * @copyright Copyright (c) 2016 Amiel Elboim * @copyright Copyright (c) 2019 Brady Miller * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 */ require_once(__DIR__ . "/../../globals.php"); require_once("functions.php"); require_once(dirname(__FILE__) . "/../../../library/group.inc"); use OpenEMR\Common\Acl\AclMain; use OpenEMR\Core\Header; //Check acl $can_view = AclMain::aclCheckCore("groups", "gadd", false, 'view'); $can_edit = AclMain::aclCheckCore("groups", "gadd", false, 'write'); if (!$can_view && !$can_edit) { formJump(); } $statuses_in_meeting = getGroupAttendanceStatuses(); $returnurl = 'encounter_top.php'; //If editing form, get participants from therapy_groups_participant_attendance table. Otherwise get from therapy_groups_participants table. if (isset($_GET['id'])) {//clicked edit form $form_id = $_GET['id']; } else {//In case didn't click 'edit' but an attendance form already exists (can't have 2 attendance forms for same encounter) $result = get_form_id_of_existing_attendance_form($encounter, $therapy_group); $form_id = $result['form_id']; } if ($form_id) {//If editing a form or the form already exists (inwhich case will automatically go into edit mode for existing form) $participants_sql = "SELECT tgpa.*, p.fname, p.lname " . "FROM therapy_groups_participant_attendance as tgpa " . "JOIN patient_data as p ON tgpa.pid = p.id " . "WHERE tgpa.form_id = ?;"; $result = sqlStatement($participants_sql, array($form_id)); while ($p = sqlFetchArray($result)) { $participants[] = $p; } } else {//new form $participants = getParticipants($therapy_group, true); } ?>
disabled />
" value="" disabled >
disabled >