* @author Vinish K * @author Brady Miller * @author Jerry Padgett * @author Stephen Nielson * @copyright Copyright (c) 2015 Z&H Consultancy Services Private Limited * @copyright Copyright (c) 2019 Brady Miller * @copyright Copyright (c) 2021 Jerry Padgett * @copyright Copyright (c) 2021 Stephen Nielson * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 */ use OpenEMR\Services\ClinicalNotesService; require_once(__DIR__ . "/../../globals.php"); require_once($GLOBALS["srcdir"] . "/api.inc"); function clinical_notes_report($pid, $encounter, $cols, $id) { $count = 0; $clinicalNotesService = new ClinicalNotesService(); $records = $clinicalNotesService->getClinicalNotesForPatientForm($id, $pid, $encounter) ?? []; $data = array_filter($records, function ($val) { return $val['activity'] == ClinicalNotesService::ACTIVITY_ACTIVE; }); if ($data) { ?> $value) { ?>