/** * Get the values to populate the form. * @return type result of the queries as an array */ function getFieldValues() { $tid = $this->m_oContext->getSelectedTrackingID(); $oWL = new \raptor\WorklistData($this->m_oContext); $aOneRow = $oWL->getDashboardMap(); //$tid); $nSiteID = $this->m_oContext->getSiteID(); $nIEN = $tid; $nUID = $this->m_oContext->getUID(); $myvalues = array(); $myvalues['tid'] = $tid; $myvalues['procName'] = $aOneRow['Procedure']; $result = db_select('raptor_ticket_collaboration', 'c')->fields('c')->condition('siteid', $nSiteID, '=')->condition('IEN', $nIEN, '=')->condition('active_yn', 1, '=')->execute(); if ($result->rowCount() == 0) { //Initialize all values as empty. $myvalues['prev_collaborator_uid'] = ''; $myvalues['collaborator_uid'] = ''; //This gets filled in by javascript $myvalues['requester_prev_notes_tx'] = ''; $myvalues['requester_notes_tx'] = ''; } else { //Initialize all values with what we found. $record = $result->fetchAssoc(); $myvalues['prev_collaborator_uid'] = $record['collaborator_uid']; $myvalues['collaborator_uid'] = $record['collaborator_uid']; $myvalues['requester_prev_notes_tx'] = $record['requester_notes_tx']; $myvalues['requester_notes_tx'] = ''; } return $myvalues; }
/** * Get the values to populate the form. * @return type result of the queries as an array */ function getFieldValues() { $tid = $this->m_oContext->getSelectedTrackingID(); $oWL = new \raptor\WorklistData($this->m_oContext); $aOneRow = $oWL->getDashboardMap(); //$tid); $nSiteID = $this->m_oContext->getSiteID(); $nIEN = $tid; $nUID = $this->m_oContext->getUID(); $myvalues = array(); $myvalues['tid'] = $tid; $myvalues['procName'] = $aOneRow['Procedure']; $this->m_oContext = \raptor\Context::getInstance(); $myvalues['tid'] = $this->m_oContext->getSelectedTrackingID(); //TODO: Pre-populate values for display return $myvalues; }
/** * Get the values to populate the form. * @return type result of the queries as an array */ function getFieldValues() { $tid = $this->m_oContext->getSelectedTrackingID(); if ($tid == NULL || trim($tid) == '' || trim($tid) == 0) { throw new \Exception('Missing selected ticket number!'); } $oWL = new \raptor\WorklistData($this->m_oContext); $aOneRow = $oWL->getDashboardMap(); //$tid); $nSiteID = $this->m_oContext->getSiteID(); $nIEN = $tid; $nUID = $this->m_oContext->getUID(); $myvalues = array(); $myvalues['tid'] = $tid; $myvalues['procName'] = $aOneRow['Procedure']; $myvalues['reason'] = ''; $myvalues['notes_tx'] = ''; //$myvalues['esig'] = ''; $this->m_oContext = \raptor\Context::getInstance(); $myvalues['tid'] = $this->m_oContext->getSelectedTrackingID(); //TODO: Pre-populate values for display return $myvalues; }
/** * Get the values to populate the form. * @return type result of the queries as an array */ function getFieldValues() { $tid = $this->m_oContext->getSelectedTrackingID(); $oWL = new \raptor\WorklistData($this->m_oContext); $aOneRow = $oWL->getDashboardMap(); //$aOneRow = $oWL->getOneWorklistRow(); //$tid); $nSiteID = $this->m_oContext->getSiteID(); $nIEN = $tid; $nUID = $this->m_oContext->getUID(); $sTrackingID = $this->m_oTT->getTrackingID($nSiteID, $nIEN); $myvalues = array(); $myvalues['tid'] = $tid; $myvalues['procName'] = $aOneRow['Procedure']; $myvalues['PatientName'] = $aOneRow['PatientName']; $myvalues['PatientDOB'] = $aOneRow['PatientDOB']; $myvalues['RequestedDate'] = $aOneRow['RequestedDate']; $myvalues['Urgency'] = $aOneRow['Urgency']; //Get all the available locations. $query = db_select('raptor_schedule_location', 'n'); $query->fields('n')->orderBy('location_tx', 'ASC'); //ORDER BY created $result = $query->execute(); $rooms = array(); while ($record = $result->fetchAssoc()) { $rooms[] = array($record['location_tx'], $record['description_tx']); } $myvalues['rooms'] = $rooms; try { //Get all the available durations. $query = db_select('raptor_schedule_duration', 'n'); $query->fields('n')->orderBy('minutes', 'ASC'); //ORDER BY created $result = $query->execute(); $durations = array(); while ($record = $result->fetchAssoc()) { $durations[] = $record['minutes']; } $myvalues['durations'] = $durations; } catch (\Exception $ex) { //For now keep going $myvalues['durations'] = NULL; } //Get all the available users. $query = db_select('raptor_user_profile', 'n'); $query->fields('n')->orderBy('lastname', 'ASC')->orderBy('firstname', 'ASC'); $query->condition('SWI1', 1, '='); $or = db_or(); $or->condition('SP1', 1, '='); $or->condition('SUWI1', 1, '='); $or->condition('PWI1', 1, '='); $query->condition($or); $query->condition('accountactive_yn', 1, '='); $result = $query->execute(); $options = array(); $options[''] = ''; while ($record = $result->fetchAssoc()) { if (substr($record['role_nm'], 0, 1) == 'R') { $displayinfo = $record['lastname'] . ', ' . $record['firstname'] . ($record['usernametitle'] > '' ? ' / ' . $record['usernametitle'] : '') . ($record['suffix'] > '' ? ' / ' . $record['suffix'] : '') . ($record['role_nm'] > '' ? ' / ' . $record['role_nm'] : ''); $options[$record['uid']] = $displayinfo; } } $myvalues['assignment_options'] = $options; $collabinfo = $this->m_oTT->getCollaborationInfo($sTrackingID); if (is_array($collabinfo)) { $myvalues['suggested_uid'] = $collabinfo['collaborator_uid']; $myvalues['suggested_alreadyset_uid'] = $myvalues['suggested_uid']; $myvalues['suggested_alreadyset_note'] = $collabinfo['requester_notes_tx']; } else { $myvalues['suggested_uid'] = NULL; $myvalues['suggested_alreadyset_uid'] = NULL; $myvalues['suggested_alreadyset_note'] = NULL; } $query = db_select('raptor_schedule_track', 'n'); $query->fields('n'); $query->condition('siteid', $nSiteID, '='); $query->condition('IEN', $nIEN, '='); $result = $query->execute(); if ($result->rowCount() == 1) { $record = $result->fetchAssoc(); $scheduled_dt = $record['scheduled_dt']; if (isset($scheduled_dt)) { $dt = new \DateTime($scheduled_dt); $event_date_tx = $dt->format('m/d/Y'); $event_starttime_tx = $dt->format('H:i'); $myvalues['event_date_tx'] = $event_date_tx; $myvalues['event_starttime_tx'] = $event_starttime_tx; } else { $myvalues['event_date_tx'] = NULL; $myvalues['event_starttime_tx'] = NULL; } $myvalues['duration_am'] = $record['duration_am']; $myvalues['location_tx'] = $record['location_tx']; $myvalues['notes_tx'] = $record['notes_tx']; $myvalues['notes_critical_yn'] = $record['notes_critical_yn']; $myvalues['confirmed_by_patient_dt'] = $record['confirmed_by_patient_dt']; $myvalues['canceled_reason_tx'] = $record['canceled_reason_tx']; $myvalues['canceled_dt'] = $record['canceled_dt']; $aPrevNotes = array(); //TODO -- Query the replaced table for all previous notes. $myvalues['prev_notes'] = $aPrevNotes; } else { $myvalues['event_date_tx'] = NULL; $myvalues['event_starttime_tx'] = NULL; $myvalues['duration_am'] = NULL; $myvalues['location_tx'] = NULL; $myvalues['notes_tx'] = NULL; $myvalues['notes_critical_yn'] = NULL; $myvalues['confirmed_by_patient_dt'] = NULL; $myvalues['canceled_reason_tx'] = NULL; $myvalues['canceled_dt'] = NULL; $myvalues['prev_notes'] = array(); } return $myvalues; }
/** * Get all the form contents for rendering * @return type renderable array */ function getForm($form, &$form_state, $disabled, $myvalues) { $form["data_entry_area1"] = array('#prefix' => "\n<section class='raptor-dialog'>\n", '#suffix' => "\n</section>\n"); $oContext = \raptor\Context::getInstance(); $oWL = new \raptor\WorklistData($oContext); $raptor_worklist_rows = $oWL->getWorklistRows(); //$oContext); $data_rows = $raptor_worklist_rows["DataRows"]; $mdwsDao = $oContext->getMdwsClient(); $aCancelOptions = MdwsUtils::getRadiologyCancellationReasons($mdwsDao); $form["data_entry_area1"]['metadata']['cancelreason'] = array('#type' => 'select', '#required' => TRUE, '#empty_value' => '', '#title' => t('Reason for Canceling Selected Orders'), '#options' => $aCancelOptions, '#default_value' => $myvalues['cancelreason'], '#description' => t('Select the reason for canceling the selected orders.')); $form["data_entry_area1"]['metadata']['cancelcomment'] = array('#type' => 'textarea', '#required' => FALSE, '#title' => t('Additional Cancellation Reason Comment'), '#default_value' => $myvalues['cancelcomment'], '#description' => t('Additional reason for the cancellation.')); $form["data_entry_area1"]['table_container'] = array('#type' => 'item', '#prefix' => '<div class="raptor-dialog-table-container"><p>Each of the rows with a checkmark in the table below is an order that is selected for cancellation. Only place a checkmark on the orders you intend to cancel.</p>', '#suffix' => '</div>', '#tree' => TRUE); $rows = "\n"; $rowcount = 0; foreach ($data_rows as $data_row) { $rowcount++; if ($rowcount > 100) { break; } if (!is_array($data_row) || count($data_row) == 0) { continue; } $aRankScoreDetails = $data_row[18]; $score = $aRankScoreDetails[0]; $aRSComment = $aRankScoreDetails[1]; $rscomment = ''; foreach ($aRSComment as $key => $value) { $rscomment .= "<br>{$key}={$value}"; } //$rsurl = getRankScoreIcon($score); // Change row background color if it is assigned to the current user $extra_row_class = is_array($data_row[12]) && $data_row[12]['uid'] == $m_oContext->getUID() ? "special-row" : ""; $assignmentinfo = is_array($data_row[12]) ? '<span title="' . $data_row[12]['requester_notes_tx'] . '">' . $data_row[12]['fullname'] . '</span>' : $data_row[12]; $ticketid = $data_row[0]; $options[$data_row[0]] = array('ticketid' => $ticketid, 'patientname' => $data_row[WorklistData::WLIDX_PATIENTNAME], 'targetdate' => $data_row[3], 'ordereddate' => $data_row[4], 'modality' => $data_row[WorklistData::WLIDX_MODALITY], 'imagetype' => $data_row[17], 'study' => $data_row[WorklistData::WLIDX_STUDY], 'urgency' => $data_row[7], 'transport' => $data_row[WorklistData::WLIDX_TRANSPORT], 'patientlocation' => $data_row[WorklistData::WLIDX_PATIENTCATEGORYLOCATION], 'workflowstatus' => $data_row[WorklistData::WLIDX_WORKFLOWSTATUS], 'assignment' => $assignmentinfo, 'numpending' => $data_row[WorklistData::WLIDX_PENDINGORDERSSAMEPATIENT], 'scheduled' => $data_row[WorklistData::WLIDX_SCHEDINFO]['ShowTx'], 'seemore' => '<a href="#" title="click to see more info" onclick="alert(\'todo show data for ' . $ticketid . '\');return false;">see more</a>'); } $header = array('ticketid' => t('Ticket'), 'patientname' => t('Patient'), 'targetdate' => t('Date Desired'), 'ordereddate' => t('Date Order'), 'modality' => t('Modality'), 'imagetype' => t('Image Type'), 'study' => t('Study'), 'urgency' => t('Urgency'), 'transport' => t('Transport'), 'patientlocation' => t('Patient Category / Location'), 'workflowstatus' => t('Workflow Status'), 'assignment' => t('Assignment'), 'numpending' => t('#P'), 'scheduled' => t('Scheduled'), 'seemore' => t('More Info')); $form["data_entry_area1"]['table_container']['orders'] = array('#title' => 'Select Orders to Cancel', '#type' => 'tableselect', '#header' => $header, '#options' => $options, '#empty' => t('No content available.')); $form["data_entry_area1"]['table_container']['orders']['#attributes']['class']['dataTable'] = 'dataTable'; $form['data_entry_area1']['action_buttons'] = array('#type' => 'item', '#prefix' => '<div class="raptor-action-buttons">', '#suffix' => '</div>', '#tree' => TRUE); $form['data_entry_area1']['action_buttons']['cancelorder'] = array('#type' => 'submit', '#value' => t('Cancel the Selected Orders')); $form['data_entry_area1']['action_buttons']['cancel'] = array('#type' => 'item', '#markup' => '<input class="raptor-dialog-cancel" type="button" value="Exit without Canceling any Orders" />'); return $form; }
/** * Add rows to the array of all uncommitted notes items */ function addUncommittedDetailsToNotesArray($nSiteID, $nIEN, $oAllUsers, $prev_commit_dt, &$noteTextArray) { //Get all the VISTA baseline information. $oWL = new \raptor\WorklistData($this->m_oContext); $aOrderInfo = $oWL->getDashboardMap(); $this->addFormattedVistaNoteRow($noteTextArray, 'Order CPRS Title', $aOrderInfo, 'Procedure'); $this->addFormattedVistaNoteRow($noteTextArray, 'Order CPRS Created Date/Time', $aOrderInfo, 'RequestedDate'); $this->addFormattedVistaNoteRow($noteTextArray, 'Order CPRS Embedded Due Date', $aOrderInfo, 'DesiredDate'); if (count($noteTextArray) > 0) { $noteTextArray[] = ''; } //Get all the scheduler information. if (isset($aOrderInfo['ScheduledDate']) && $aOrderInfo['ScheduledDate'] > '') { $scheduled_dt = $aOrderInfo['ScheduledDate']; $this->addFormattedVistaNoteRow($noteTextArray, 'Scheduled Date/Time', $scheduled_dt); } $getvalues = array(); $prevnotes = $this->getSchedulerNotes($nSiteID, $nIEN, $getvalues, $prev_commit_dt); foreach ($prevnotes as $prevnoteinfo) { if (count($noteTextArray) > 0) { $noteTextArray[] = ''; } $author_uid = $prevnoteinfo['author_uid']; $created_dt = $prevnoteinfo['created_dt']; $notes_tx = $prevnoteinfo['notes_tx']; $notes_critical_yn = $prevnoteinfo['notes_critical_yn']; $userinfo = $oAllUsers->getByUID($author_uid); if ($userinfo == NULL) { $fullname = 'RAPTOR user ' . $author_uid; } else { $fullname = $userinfo->getFullName(); } if (trim($notes_tx) == '') { $notes_tx = 'BLANK'; } if ($notes_critical_yn == 1) { $notetype = 'Critical'; } else { $notetype = 'Standard'; } $this->addFormattedVistaNoteRow($noteTextArray, 'Scheduler ' . $notetype . ' Note Date', $created_dt); $this->addFormattedVistaNoteRow($noteTextArray, 'Scheduler ' . $notetype . ' Note Author', $fullname); $this->addFormattedVistaNoteRow($noteTextArray, 'Scheduler ' . $notetype . ' Note Text', $notes_tx); } if (count($noteTextArray) > 0) { $noteTextArray[] = ''; } //Get all the protocol settings $this->loadProtocolFieldValues($nSiteID, $nIEN, $getvalues, $prev_commit_dt); if ($getvalues['protocol_data_from_database']) { $this->addFormattedVistaNoteRow($noteTextArray, 'Protocol Settings Approved Date', $getvalues, 'protocol_data_created_dt'); $author_uid = $getvalues['protocol_approval_author_uid']; $userinfo = $oAllUsers->getByUID($author_uid); $fullname = $userinfo->getFullName(); $this->addFormattedVistaNoteRow($noteTextArray, 'Protocol Settings Approved By', $fullname); $this->addFormattedVistaNoteRow($noteTextArray, 'Protocol Primary Selection', $getvalues, 'protocol1_nm'); $this->addFormattedVistaNoteRow($noteTextArray, 'Protocol Secondary Selection', $getvalues, 'protocol2_nm'); $this->addFormattedVistaNoteRow($noteTextArray, 'Protocol Note Oral Hydration', $getvalues, 'hydration_oral_customtx'); $this->addFormattedVistaNoteRow($noteTextArray, 'Protocol Note IV Hydration', $getvalues, 'hydration_iv_customtx'); $this->addFormattedVistaNoteRow($noteTextArray, 'Protocol Note Oral Sedation', $getvalues, 'sedation_oral_customtx'); $this->addFormattedVistaNoteRow($noteTextArray, 'Protocol Note IV Sedation', $getvalues, 'sedation_iv_customtx'); $this->addFormattedVistaNoteRow($noteTextArray, 'Protocol Note Enteric Contrast', $getvalues, 'contrast_enteric_customtx'); $this->addFormattedVistaNoteRow($noteTextArray, 'Protocol Note IV Contrast', $getvalues, 'contrast_iv_customtx'); $this->addFormattedVistaNoteRow($noteTextArray, 'Protocol Note Enteric Radioisotope', $getvalues, 'radioisotope_enteric_customtx'); $this->addFormattedVistaNoteRow($noteTextArray, 'Protocol Note IV Radioisotope', $getvalues, 'radioisotope_iv_customtx'); $this->addFormattedVistaNoteRow($noteTextArray, 'Protocol Note Allergy', $getvalues, 'allergy_kw'); $this->addFormattedVistaNoteRow($noteTextArray, 'Protocol Note Claustrophobic', $getvalues, 'claustrophobic_kw'); $this->addFormattedVistaNoteRow($noteTextArray, 'Protocol Note Consent Required', $getvalues, 'consent_req_kw'); } if (count($noteTextArray) > 0) { $noteTextArray[] = ''; } //Collect the protocol notes. $getvalues = array(); $prevnotes = $this->getProtocolNotes($nSiteID, $nIEN, $getvalues, $prev_commit_dt); foreach ($prevnotes as $prevnoteinfo) { if (count($noteTextArray) > 0) { $noteTextArray[] = ''; } $author_uid = $prevnoteinfo['author_uid']; $created_dt = $prevnoteinfo['created_dt']; $notes_tx = $prevnoteinfo['notes_tx']; $userinfo = $oAllUsers->getByUID($author_uid); if ($userinfo == NULL) { $fullname = 'RAPTOR user ' . $author_uid; } else { $fullname = $userinfo->getFullName(); } if (trim($notes_tx) == '') { $notes_tx = 'BLANK'; } $this->addFormattedVistaNoteRow($noteTextArray, 'Protocol General Note Date', $created_dt); $this->addFormattedVistaNoteRow($noteTextArray, 'Protocol General Note Author', $fullname); $this->addFormattedVistaNoteRow($noteTextArray, 'Protocol General Note Text', $notes_tx); } if (count($noteTextArray) > 0) { $noteTextArray[] = ''; } //raptor_ticket_contraindication $sRowLabel = '[Contraindication Acknowledgement'; $query = db_select('raptor_ticket_contraindication', 't')->fields('t')->condition('siteid', $nSiteID, '=')->condition('IEN', $nIEN, '='); if ($prev_commit_dt != NULL) { $query->condition('created_dt', $prev_commit_dt, '>'); } $query->orderBy('rule_nm', 'DESC'); $result = $query->execute(); while ($record = $result->fetchAssoc()) { $acknowledged_dt = $record['created_dt']; $rule_nm = $record['rule_nm']; $author_uid = $record['author_uid']; $userinfo = $oAllUsers->getByUID($author_uid); $fullname = $userinfo->getFullName(); $noteTextArray[] = $sRowLabel . $rule_nm . ' acknowledged by ' . $fullname . ' on ' . $acknowledged_dt; } if (count($noteTextArray) > 0) { $noteTextArray[] = ''; } //Collect the exam data. $getvalues = array(); if (count($noteTextArray) > 0) { $noteTextArray[] = ''; } $this->loadExamFieldValues($nSiteID, $nIEN, $getvalues, $prev_commit_dt); if ($getvalues['exam_data_from_database']) { $author_uid = $getvalues['exam_author_uid']; $userinfo = $oAllUsers->getByUID($author_uid); $fullname = $userinfo->getFullName(); $this->addFormattedVistaNoteRow($noteTextArray, 'Exam Note Author', $fullname); $this->addFormattedVistaNoteRow($noteTextArray, 'Exam Note Date', $getvalues, 'exam_data_created_dt'); $this->addFormattedVistaNoteRow($noteTextArray, 'Exam Note Oral Hydration', $getvalues, 'exam_hydration_oral_tx'); $this->addFormattedVistaNoteRow($noteTextArray, 'Exam Note IV Hydration', $getvalues, 'exam_hydration_iv_tx'); $this->addFormattedVistaNoteRow($noteTextArray, 'Exam Note Oral Sedation', $getvalues, 'exam_sedation_oral_tx'); $this->addFormattedVistaNoteRow($noteTextArray, 'Exam Note IV Sedation', $getvalues, 'exam_sedation_iv_tx'); $this->addFormattedVistaNoteRow($noteTextArray, 'Exam Note Enteric Contrast', $getvalues, 'exam_contrast_enteric_tx'); $this->addFormattedVistaNoteRow($noteTextArray, 'Exam Note IV Contrast', $getvalues, 'exam_contrast_iv_tx'); $this->addFormattedVistaNoteRow($noteTextArray, 'Exam Note Enteric Radioisotope', $getvalues, 'exam_radioisotope_enteric_tx'); $this->addFormattedVistaNoteRow($noteTextArray, 'Exam Note IV Radioisotope', $getvalues, 'exam_radioisotope_iv_tx'); $this->addFormattedVistaNoteRow($noteTextArray, 'Exam Note Consent Received', $getvalues, 'exam_consent_received_kw'); $dose_details = $getvalues['exam_radioisotope_radiation_dose_map']; if (is_array($dose_details)) { foreach ($dose_details as $uom => $values) { $this->addFormattedVistaNoteRow($noteTextArray, 'Exam Note Radioisotope Radiation UoM', $uom); foreach ($values as $dose_record) { $dose = $dose_record['dose']; $qcd = $dose_record['dose_type_cd']; $qterm = $qcd == 'E' ? ' (Estimate)' : ($qcd == 'A' ? ' (Actual)' : (trim($qcd) > '' ? ' (' . $qcd . ')' : '')); $this->addFormattedVistaNoteRow($noteTextArray, 'Exam Note Radioisotope Radiation Dose', $dose . ' ' . $uom . $qterm); } } } $dose_details = $getvalues['exam_other_radiation_dose_map']; if (is_array($dose_details)) { foreach ($dose_details as $uom => $values) { $this->addFormattedVistaNoteRow($noteTextArray, 'Exam Note Equipment Radiation UoM', $uom); foreach ($values as $dose_record) { $dose = $dose_record['dose']; $qcd = $dose_record['dose_type_cd']; $qterm = $qcd == 'E' ? ' (Estimate)' : ($qcd == 'A' ? ' (Actual)' : (trim($qcd) > '' ? ' (' . $qcd . ')' : '')); $this->addFormattedVistaNoteRow($noteTextArray, 'Exam Note Equipment Radiation Dose', $dose . ' ' . $uom . $qterm); } } } } $prevnotes = $this->getExamNotes($nSiteID, $nIEN, $getvalues, $prev_commit_dt); foreach ($prevnotes as $prevnoteinfo) { if (count($noteTextArray) > 0) { $noteTextArray[] = ''; } $author_uid = $prevnoteinfo['author_uid']; $created_dt = $prevnoteinfo['created_dt']; $notes_tx = $prevnoteinfo['notes_tx']; $userinfo = $oAllUsers->getByUID($author_uid); if ($userinfo == NULL) { $fullname = 'RAPTOR user ' . $author_uid; } else { $fullname = $userinfo->getFullName(); } if (trim($notes_tx) == '') { $notes_tx = 'BLANK'; } $this->addFormattedVistaNoteRow($noteTextArray, 'Exam General Note Date', $created_dt); $this->addFormattedVistaNoteRow($noteTextArray, 'Exam General Note Author', $fullname); $this->addFormattedVistaNoteRow($noteTextArray, 'Exam General Note Text', $notes_tx); } if (count($noteTextArray) > 0) { $noteTextArray[] = ''; } //Get raptor_ticket_interpret_notes $getvalues = array(); $prevnotes = $this->getInterpretationNotes($nSiteID, $nIEN, $getvalues, $prev_commit_dt); foreach ($prevnotes as $prevnoteinfo) { $author_uid = $prevnoteinfo['author_uid']; $created_dt = $prevnoteinfo['created_dt']; $notes_tx = $prevnoteinfo['notes_tx']; $userinfo = $oAllUsers->getByUID($author_uid); if ($userinfo == NULL) { $fullname = 'RAPTOR user ' . $author_uid; } else { $fullname = $userinfo->getFullName(); } if (trim($notes_tx) == '') { $notes_tx = 'BLANK'; } $this->addFormattedVistaNoteRow($noteTextArray, 'Interpretation General Note Date', $created_dt); $this->addFormattedVistaNoteRow($noteTextArray, 'Interpretation General Note Author', $fullname); $this->addFormattedVistaNoteRow($noteTextArray, 'Interpretation General Note Text', $notes_tx); } }