public function processChangePasswordAction()
 {
     $params = $this->_getParam('user');
     $currentUserId = (int) Zend_Auth::getInstance()->getIdentity()->personId;
     $user = new User();
     $user->userId = $currentUserId;
     $user->personId = $currentUserId;
     // userId and personId are similar
     $user->populate();
     if ($params['newPassword'] != $params['confirmNewPassword']) {
         $ret = __('New password does not match confirmed password.');
     } else {
         if ($user->password != $params['currentPassword']) {
             $ret = __('Current password is invalid.');
         } else {
             if (!strlen($params['newPassword']) > 0) {
                 $ret = __('New password is required.');
             } else {
                 if ($params['newPassword'] == $params['currentPassword']) {
                     $ret = __('New password must be different from current password.');
                 } else {
                     $password = $params['newPassword'];
                     $user->password = $password;
                     $user->persist();
                     $ret = true;
                 }
             }
         }
     }
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct($ret);
 }
Example #2
0
 static function getAllUsers()
 {
     $userManager = new User();
     $users = $userManager->populate();
     Plugin::callHook("user_get_all", array(&$users));
     usort($users, "User::userorder");
     return $users;
 }
Example #3
0
 /**
  * @covers User::getProfile
  */
 public function testGetProfile()
 {
     $this->object->populate();
     $user = $this->object->getProfile();
     $attributes = ['sub' => 1, 'name' => 'admin name', 'login' => 'admin', 'email' => 'mail', 'scope' => 'admin user'];
     foreach ($attributes as $attributeName => $attributeValue) {
         $this->assertObjectHasAttribute($attributeName, $user, 'User should have the "' . $attributeName . '" attribute');
         $this->assertAttributeEquals($attributeValue, $attributeName, $user, 'User->' . $attributeName . ' should be set to "' . $attributeValue . '" but found: "' . $user->{$attributeName} . '"');
     }
 }
Example #4
0
 public function getEnteredBy()
 {
     $ret = '';
     $userId = (int) $this->userId;
     if ($userId > 0) {
         $user = new User();
         $user->userId = $userId;
         $user->populate();
         $ret = $user->username;
     }
     return $ret;
 }
Example #5
0
 public function init()
 {
     $auth = Zend_Auth::getInstance();
     $userId = $auth->getIdentity()->userId;
     $user = new User();
     $user->userId = $userId;
     $user->populate();
     if (strlen($user->preferences) > 0) {
         $this->xmlPreferences = new SimpleXMLElement($user->preferences);
     }
     $this->user = $user;
 }
Example #6
0
 static function existAuthToken($auth = null)
 {
     $result = false;
     $userManager = new User();
     $users = $userManager->populate('id');
     if (empty($auth)) {
         $auth = @$_COOKIE['leedStaySignedIn'];
     }
     foreach ($users as $user) {
         if ($user->getToken() == $auth) {
             $result = $user;
         }
     }
     return $result;
 }
Example #7
0
 static function existAuthToken($auth = null)
 {
     $result = false;
     $userManager = new User();
     $users = $userManager->populate('id');
     $phpAuth = strtolower(@$_SERVER['PHP_AUTH_USER']);
     if (empty($auth)) {
         $auth = @$_COOKIE['leedStaySignedIn'];
     }
     foreach ($users as $user) {
         if ($user->getToken() == $auth || strtolower($user->login) === $phpAuth) {
             $result = $user;
             break;
         }
     }
     return $result;
 }
Example #8
0
 public function preDispatch(Zend_Controller_Request_Abstract $request)
 {
     $auth = Zend_Auth::getInstance();
     $publicPages = array();
     $publicPages['controllers'] = array('login');
     $publicPages['actions'] = array();
     $controllerName = $request->getControllerName();
     $actionName = $request->getActionName();
     if (in_array($controllerName, $publicPages['controllers'])) {
         return true;
     }
     PermissionTemplate::auditAccess($controllerName, $actionName);
     if ($auth->hasIdentity()) {
         //$permissionTemplateId = $auth->getIdentity()->permissionTemplateId;
         $userId = $auth->getIdentity()->userId;
         $user = new User();
         $user->userId = (int) $auth->getIdentity()->userId;
         $user->populate();
         $permissionTemplateId = $user->permissionTemplateId;
         if ($permissionTemplateId != 'superadmin' && !PermissionTemplate::hasAccess($permissionTemplateId, $controllerName, $actionName)) {
             $error = __('Access denied');
             trigger_error($error, E_USER_NOTICE);
             throw new WebVista_App_AuthException($error);
         } else {
             return true;
         }
     }
     if (isset($_SERVER['PHP_AUTH_USER'])) {
         $_POST['username'] = $_SERVER['PHP_AUTH_USER'];
         $_POST['password'] = $_SERVER['PHP_AUTH_PW'];
         $zvah = new Zend_View_Helper_Action();
         $zvah->action('process', 'login');
         if ($auth->hasIdentity() || in_array($controllerName, $publicPages['controllers'])) {
             return true;
         }
     }
     /*else if ($actionName != 'index' && $controllerName != 'index') {
     			header('WWW-Authenticate: Basic realm="Unauthorize Access Prohibited"');
     			header('HTTP/1.0 401 Unauthorized');
     		}*/
     throw new WebVista_App_AuthException('You must be authenticated to access the system.');
 }
 /**
  * Default action to dispatch
  */
 public function indexAction()
 {
     $personId = (int) $this->_getParam('personId', 0);
     $visitId = (int) $this->_getParam('visitId', 0);
     $this->_setActivePatient($personId, $visitId);
     $identity = Zend_Auth::getInstance()->getIdentity();
     $userId = (int) $identity->userId;
     $user = new User();
     $user->userId = $userId;
     $user->populate();
     $preferences = $user->xmlPreferences;
     $location = '';
     if ($preferences !== null) {
         $currentLocation = (int) $preferences->currentLocation;
         if ($currentLocation > 0) {
             $location = Room::location($currentLocation);
         }
     }
     $this->view->location = $location;
     // ALERTS
     $personId = (int) $identity->personId;
     $team = new TeamMember();
     $teamId = $team->getTeamByPersonId($personId);
     $ctr = 0;
     if (strlen($teamId) > 0) {
         $alert = new GeneralAlert();
         $alertIterator = $alert->getIteratorByTeam($teamId);
         foreach ($alertIterator as $item) {
             $ctr++;
         }
     }
     if ($ctr > 0) {
         $this->view->alerts = $ctr;
     }
     $this->view->identity = Zend_Auth::getInstance()->getIdentity();
     $this->view->xmlHeader = '<?xml version=\'1.0\' encoding=\'iso-8859-1\'?>' . "\n";
     $contentType = stristr($_SERVER["HTTP_ACCEPT"], "application/xhtml+xml") ? "application/xhtml+xml" : "text/xml";
     header("Content-type: " . $contentType);
     $this->render();
 }
Example #10
0
 public function populate($patientId, $userId, $visitId)
 {
     $this->_patientId = (int) $patientId;
     $patient = new Patient();
     $patient->personId = $this->_patientId;
     $patient->populate();
     $this->_title = $patient->displayName . ' Healthcare Record';
     $this->patient = $patient;
     $this->_userId = (int) $userId;
     $user = new User();
     $user->personId = $this->_userId;
     $user->populate();
     $this->user = $user;
     $visit = new Visit();
     $visit->visitId = (int) $visitId;
     if ($visit->visitId > 0 && $visit->populate()) {
         $this->visit = $visit;
     }
     $this->building = Building::getBuildingDefaultLocation($this->user->personId);
     $performers = array();
     $problemList = new ProblemList();
     $filters = array();
     $filters['personId'] = $this->_patientId;
     $this->setFiltersDateRange($filters);
     $problems = array();
     $problemListIterator = new ProblemListIterator();
     $problemListIterator->setFilters($filters);
     foreach ($problemListIterator as $problem) {
         $problems[] = $problem;
         $providerId = (int) $problem->providerId;
         if (!isset($performers[$providerId])) {
             $provider = new Provider();
             $provider->personId = $providerId;
             $provider->populate();
             $performers[$providerId] = $provider;
         }
     }
     $this->problemLists = $problems;
     unset($filters['personId']);
     $filters['patientId'] = $this->_patientId;
     $labResults = array();
     $labTests = array();
     $labOrderTests = array();
     $labsIterator = new LabsIterator();
     $labsIterator->setFilters($filters);
     foreach ($labsIterator as $lab) {
         // get the lab order
         $labTestId = (int) $lab->labTestId;
         if (!isset($labTests[$labTestId])) {
             $labTest = new LabTest();
             $labTest->labTestId = (int) $lab->labTestId;
             $labTest->populate();
             $labTests[$labTestId] = $labTest;
         }
         $labTest = $labTests[$labTestId];
         $orderId = (int) $labTest->labOrderId;
         if (!isset($labOrderTests[$orderId])) {
             $orderLabTest = new OrderLabTest();
             $orderLabTest->orderId = $orderId;
             $orderLabTest->populate();
             $labOrderTests[$orderId] = $orderLabTest;
         }
         $orderLabTest = $labOrderTests[$orderId];
         $providerId = (int) $orderLabTest->order->providerId;
         if (!isset($performers[$providerId])) {
             $provider = new Provider();
             $provider->personId = $providerId;
             $provider->populate();
             $performers[$providerId] = $provider;
         }
         if (!isset($labResults[$orderId])) {
             $labResults[$orderId] = array();
             $labResults[$orderId]['results'] = array();
             $labResults[$orderId]['labTest'] = $labTest;
             $labResults[$orderId]['orderLabTest'] = $orderLabTest;
         }
         $labResults[$orderId]['results'][] = $lab;
     }
     $this->labResults = $labResults;
     $this->performers = $performers;
     $this->populateHeader($this->_xml);
     $this->populateBody($this->_xml);
     return $this->_xml->asXML();
 }
Example #11
0
 public static function myPreferencesLocation()
 {
     static $room = null;
     if ($room !== null) {
         return $room;
     }
     $auth = Zend_Auth::getInstance();
     $room = new Room();
     if ((int) $auth->getIdentity()->personId > 0) {
         $user = new User();
         $user->userId = (int) $auth->getIdentity()->personId;
         $user->populate();
         $xmlPreferences = new SimpleXMLElement($user->preferences);
         $roomId = (string) $xmlPreferences->currentLocation;
         $room->roomId = (int) $roomId;
         $room->populate();
     }
     return $room;
 }
Example #12
0
 public function processCopyTemplateAction()
 {
     $permissionTemplateId = (int) $this->_getParam('permissionTemplateId');
     $templateType = $this->_getParam('templateType');
     $templateValue = $this->_getParam('templateValue');
     $permissionTemplate = new PermissionTemplate();
     $permissionTemplate->permissionTemplateId = $permissionTemplateId;
     if (!$permissionTemplate->populate()) {
         $this->_helper->autoCompleteDojo(array());
     }
     $templateName = $templateValue;
     if ($templateType == 'user') {
         $user = new User();
         $user->userId = $templateValue;
         $user->populate();
         $templateName = 'Special template for User ' . $user->username;
     }
     $permissionTemplate->permissionTemplateId = 0;
     $permissionTemplate->name = $templateName;
     $permissionTemplate->persist();
     if (isset($user)) {
         $user->permissionTemplateId = $permissionTemplate->permissionTemplateId;
         $user->persist();
     }
     $data = array();
     $data['id'] = $permissionTemplate->permissionTemplateId;
     $data['name'] = $permissionTemplate->name;
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct($data);
 }
Example #13
0
     return;
 }
 if (!$api->checkParameterExists('id', $id)) {
     $api->output(400, 'User identifier must be provided');
     //user was not provided, return an error
     return;
 }
 //get user
 $id = intval($id);
 if ($api->requesterId !== $id && !$api->checkScope('admin')) {
     $api->output(403, 'Admin scope is required for updating another user');
     //indicate the requester do not have the required scope for updating another user
     return;
 }
 $user = new User($id);
 if (!$user->populate()) {
     $api->output(404, 'User not found');
     //indicate the user was not found
     return;
 }
 //adapt and validate object received
 $updatedUser = $api->query['body'];
 if ($updatedUser !== null) {
     $updatedUser->status = 1;
 }
 if (!$user->validateModel($updatedUser, $errorMessage)) {
     $api->output(400, 'User is not valid: ' . $errorMessage);
     //provided user is not valid
     return;
 }
 //update user
Example #14
0
 public static function getBuildingDefaultLocation($personId, $defaultLocationId = null)
 {
     // get default building given user's person id, if $defaultLocationId is defined then room is returned
     $user = new User();
     $user->personId = $personId;
     $user->populateWithPersonId();
     $user->populate();
     $building = null;
     $room = null;
     if (strlen($user->preferences) > 0) {
         $xmlPreferences = new SimpleXMLElement($user->preferences);
         $room = new Room();
         $room->roomId = (int) $xmlPreferences->currentLocation;
         if ($room->populate()) {
             $building = $room->building;
         }
     }
     if ($defaultLocationId === null) {
         if ($building === null) {
             $building = new Building();
             $building->buildingId = (int) $user->defaultBuildingId;
             $building->populate();
         }
         return $building;
     } else {
         if ($room === null) {
             $room = new Room();
             $room->roomId = (int) $defaultLocationId;
             $room->populate();
         }
         return $room;
     }
 }
Example #15
0
<?php

//Imports
require_once 'session.php';
require_once 'db/db_conn.php';
require_once 'db/SELECT.php';
require_once 'db/UPDATE.php';
require_once 'classes/Hiker.php';
require_once 'classes/User.php';
$con = connect_db();
$old_ADK_USER = new User();
$old_ADK_USER->id = intval($_POST['id']);
$old_ADK_USER->get($con);
$ADK_USER = new User();
$ADK_USER->populate();
$ADK_HIKER = new Hiker();
$ADK_HIKER->populateFromUpdateHiker();
if (!$ADK_USER->isValid()) {
    $con->close();
    header('Location: ../editHiker?_=' . $ADK_USER->id . '&e=' . $ADK_USER->err);
    exit;
}
if (!$ADK_HIKER->isValid()) {
    $con->close();
    header('Location: ../editHiker?_=' . $ADK_USER->id . '&e=' . $ADK_HIKER->err);
    exit;
}
if (!User::isUniqueUsername($con, $ADK_USER->username, $old_ADK_USER->username)) {
    $con->close();
    header('Location: ../editHiker?_=' . $ADK_USER->id . '&e=q');
    exit;
Example #16
0
//Imports
require_once 'variables_site.php';
require_once 'db/db_conn.php';
require_once 'db/SELECT.php';
require_once 'db/INSERT.php';
require_once 'randomPW.php';
require_once 'email.php';
require_once 'pm.php';
require_once 'classes/Correspondent.php';
require_once 'classes/Message.php';
require_once 'classes/User.php';
$randomPW = randomPW(8);
$con = connect_db();
$ADK_USER = new User();
$ADK_USER->populate($randomPW);
$ADK_USER->usergroupid = 2;
$ADK_USER->pw = $randomPW;
$ADK_CORRESPONDENT = new Correspondent();
$ADK_CORRESPONDENT->info = $_POST['personalinfo'];
if (!$ADK_USER->isValid()) {
    $con->close();
    header('Location: ../editCorrespondent?_=' . $ADK_USER->id . '&e=' . $ADK_USER->err);
    exit;
}
if (!User::isUniqueUsername($con, $ADK_USER->username, '')) {
    $con->close();
    header('Location: ../editCorrespondent?_=' . $ADK_USER->id . '&e=q');
    exit;
}
$ADK_USER->save($con);
Example #17
0
 public static function getMainTabs($baseUrl = '')
 {
     $mainTabs = array();
     $mainTabs['Calendar']['url'] = $baseUrl . '/calendar.raw';
     $mainTabs['Calendar']['hrefMode'] = 'ajax-html';
     $mainTabs['Provider']['url'] = $baseUrl . '/provider-dashboard.raw';
     $mainTabs['Provider']['hrefMode'] = 'ajax-html';
     $mainTabs['Station']['url'] = $baseUrl . '/station-dashboard.raw';
     $mainTabs['Station']['hrefMode'] = 'ajax-html';
     //$mainTabs['Patient']['url'] = "/index.php/minimal/PatientDashboard/View?patient_id=' + mainController.getActivePatient() + '";
     //$mainTabs['Patient']['hrefMode'] =  'iframe';
     $auth = Zend_Auth::getInstance();
     $userId = $auth->getIdentity()->userId;
     $user = new User();
     $user->userId = $userId;
     $user->populate();
     $mainTabs['Medications']['url'] = $baseUrl . '/medications.raw';
     $mainTabs['Medications']['hrefMode'] = 'ajax-html';
     $mainTabs['Problems']['url'] = $baseUrl . '/problem-list.raw';
     $mainTabs['Problems']['hrefMode'] = 'ajax-html';
     $mainTabs['Notes']['url'] = $baseUrl . '/clinical-notes.raw';
     $mainTabs['Notes']['hrefMode'] = 'ajax-html';
     $mainTabs['Vitals']['url'] = $baseUrl . '/vital-signs.raw';
     $mainTabs['Vitals']['hrefMode'] = 'ajax-html';
     $mainTabs['Labs']['url'] = $baseUrl . '/lab-results.raw';
     $mainTabs['Labs']['hrefMode'] = 'ajax-html';
     $mainTabs['Orders']['url'] = $baseUrl . '/orders.raw';
     $mainTabs['Orders']['hrefMode'] = 'ajax-html';
     $mainTabs['Claims']['url'] = $baseUrl . '/claims.raw';
     $mainTabs['Claims']['hrefMode'] = 'ajax-html';
     $mainTabs['A/R']['url'] = $baseUrl . '/accounts.raw';
     $mainTabs['A/R']['hrefMode'] = 'ajax-html';
     $mainTabs['Reports']['url'] = $baseUrl . '/reports.raw';
     $mainTabs['Reports']['hrefMode'] = 'ajax-html';
     //$mainTabs['Billing']['url']   = '/index.php/minimal/claim/list';
     //$mainTabs['Billing']['hrefMode'] =  'iframe';
     $mainTabs['Messaging']['url'] = $baseUrl . '/messaging.raw';
     $mainTabs['Messaging']['hrefMode'] = 'ajax-html';
     $mainTabs['Admin']['url'] = $baseUrl . '/admin.raw';
     $mainTabs['Admin']['hrefMode'] = 'ajax-html';
     foreach ($mainTabs as $tabName => $url) {
         if (self::userHasPermissionForTab($tabName) === false) {
             unset($mainTabs[$tabName]);
         }
     }
     return $mainTabs;
 }
Example #18
0
                $user->setRole('admin');
                $user->store();
            }
            fMessaging::create('affected', User::makeURL('login'), $user->getUsername());
            fMessaging::create('success', User::makeURL('login'), 'The user ' . $user->getUsername() . ' was successfully created');
            fURL::redirect(User::makeURL('login'));
        } catch (fExpectedException $e) {
            fMessaging::create('error', fURL::get(), $e->getMessage());
        }
    }
    include VIEW_PATH . '/add_edit_user.php';
} elseif ('settings' == $action) {
    $user = new User($user_id);
    if (fRequest::isPost()) {
        try {
            $user->populate();
        } catch (fExpectedException $e) {
            fMessaging::create('error', fURL::get(), $e - getMessage());
        }
    }
    include VIEW_PATH . '/add_edit_user_settings.php';
} elseif ('delete' == $action) {
    try {
        $user = new User($user_id);
        if (fRequest::isPost()) {
            fRequest::validateCSRFToken(fRequest::get('token'));
            $user->delete();
            fMessaging::create('success', User::makeUrl('edit', $user), 'The user ' . $user->getName() . ' was successfully deleted');
            fURL::redirect(User::makeUrl('edit', $user));
        }
    } catch (fNotFoundException $e) {
Example #19
0
 public function getEnteredBy()
 {
     $db = Zend_Registry::get('dbAdapter');
     $sqlSelect = $db->select()->from('audits', 'userId')->where('objectClass = ?', 'ClaimLine')->where('objectId = ?', $this->claimLineId)->order('dateTime DESC')->limit(1);
     $ret = '';
     if ($row = $db->fetchRow($sqlSelect)) {
         $userId = (int) $row['userId'];
         if ($userId > 0) {
             $user = new User();
             $user->userId = $userId;
             $user->populate();
             $ret = $user->username;
         }
     }
     return $ret;
 }
Example #20
0
 public function getEnteredBy()
 {
     $userId = $this->last_change_user_id > 0 ? $this->last_change_user_id : $this->created_by_user_id;
     $ret = '';
     if ($userId > 0) {
         $user = new User();
         $user->userId = $userId;
         $user->populate();
         $ret = $user->username;
     }
     return $ret;
 }
Example #21
0
 public function populate($data)
 {
     parent::populate($data->user);
     $this->setVisits($data->visits);
     $this->setLastVisit($data->last_visit);
 }
 function listNotesAction()
 {
     $personId = 0;
     $personId = (int) $this->_getParam('personId');
     $filter = $this->_getParam('filter');
     $clinicalNoteIterator = new ClinicalNoteIterator();
     $custom = $this->_getParam('custom');
     if (count($custom) > 0) {
         $custom = $this->_getParam('custom');
         $custom['personId'] = $personId;
         $clinicalNoteIterator->customView($custom);
     } else {
         $data = array();
         $data['personId'] = $personId;
         if ($filter == 'byAuthoringPersonId') {
             $data['authoringPersonId'] = $this->_getParam('authoringPersonId');
         }
         if ($filter == 'byDateRange') {
             $data['dateRange'] = $this->_getParam('dateRange');
         }
         if ($filter == 'byCurrentPractice' || $filter == 'bySelectedVisit') {
             $visitId = (int) $this->_getParam('visitId');
             $visit = new Visit();
             $visit->visitId = $visitId;
             $visit->populate();
             $building = new Building();
             $building->buildingId = $visit->buildingId;
             $building->populate();
             $data['locationId'] = $building->buildingId;
             $data['selectedVisit'] = date('Y-m-d', strtotime($visit->timestamp));
         }
         if ($filter == 'byVisitPractice' || $filter == 'byVisitBuilding') {
             $practiceId = 0;
             $buildingId = 0;
             $identity = Zend_Auth::getInstance()->getIdentity();
             $userId = $identity->userId;
             $user = new User();
             $user->userId = $userId;
             $user->populate();
             if (strlen($user->preferences) > 0) {
                 $this->xmlPreferences = new SimpleXMLElement($user->preferences);
                 $currentLocation = (string) $this->xmlPreferences->currentLocation;
                 $locationId = (int) $currentLocation;
                 if ($locationId > 0) {
                     $room = new Room();
                     $room->roomId = $locationId;
                     $room->populate();
                     $practiceId = $room->building->practiceId;
                     $buildingId = $room->buildingId;
                 }
             }
             $data['practiceId'] = $practiceId;
             $data['buildingId'] = $buildingId;
         }
         $clinicalNoteIterator->setFilter($filter, $data);
     }
     //trigger_error($cnSelect->__toString(),E_USER_NOTICE);
     //var_dump($db->query($cnSelect)->fetchAll());exit;
     $notes = array();
     foreach ($clinicalNoteIterator as $note) {
         if ($note['eSignatureId'] > 0) {
             $img = 'sm-signed.png';
             $alt = 'Signed';
         } else {
             $img = 'sm-editproblem.png';
             $alt = 'Editing';
         }
         $icon = '<img src="' . Zend_Registry::get('baseUrl') . 'img/' . $img . '" alt="' . $alt . '" />';
         $row = array();
         $row['id'] = $note['clinicalNoteId'];
         $row['data'][] = '';
         $row['data'][] = $icon . ' ' . date('Y-m-d', strtotime($note['dateTime']));
         $row['data'][] = $note['noteTitle'];
         $row['data'][] = $note['last_name'] . ', ' . $note['first_name'] . ' ' . substr($note['middle_name'], 0, 1);
         $location = '';
         $locationId = (int) $note['locationId'];
         if ($locationId > 0) {
             $location = Room::location($locationId);
         }
         $row['data'][] = $location;
         $row['data'][] = $row['id'];
         $row['data'][] = 0;
         $xml = simplexml_load_string($note['template']);
         $genericData = new GenericData();
         $filters = array();
         $filters['objectId'] = $note['clinicalNoteId'];
         $filters['objectClass'] = 'ClinicalNote';
         $genericDataIterator = $genericData->getIteratorByFilters($filters);
         $firstData = false;
         $childIcon = '<img src="' . Zend_Registry::get('baseUrl') . 'img/leaf.gif" alt="-" />';
         foreach ($genericDataIterator as $data) {
             if (!$firstData) {
                 $firstData = true;
                 //$row['id'] .= ':'.$data->revisionId;
                 $row['data'][6] = $data->revisionId;
                 continue;
             }
             $tmp = array();
             $tmp['id'] = $data->revisionId;
             $tmp['data'][] = $data->objectId;
             // '';
             $tmp['data'][] = '&nbsp; &nbsp; &nbsp;' . $childIcon . ' ' . date('Y-m-d', strtotime($data->dateTime));
             $tmp['data'][] = $note['noteTitle'];
             $tmp['data'][] = '';
             // Author
             $tmp['data'][] = '';
             // Location
             $tmp['data'][] = $note['clinicalNoteId'];
             $tmp['data'][] = $tmp['id'];
             $row['rows'][] = $tmp;
         }
         $notes[] = $row;
     }
     $acj = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $acj->suppressExit = true;
     $acj->direct(array("rows" => $notes));
 }