Esempio n. 1
0
 public function doctorAction()
 {
     if ($this->_auth->userid && $this->_auth->role == 2) {
         //$users = Application_Model_M_ConsultDialog::fetchConsultUsersByDoctorID($this->_auth->userid);
         $consultorders = Application_Model_M_ConsultOrder::fetchConsultUsersByDoctorID($this->_auth->userid);
         if (count($consultorders) > 0) {
             $out['errno'] = '0';
             $results = array();
             foreach ($consultorders as $consultorder) {
                 $una = Yy_Utils::getNameAvatar($consultorder->getUid(), $consultorder->getUrole());
                 $result = array('id' => $consultorder->getUid(), 'role' => $consultorder->getUrole(), 'name' => $una['name'], 'avatar' => $una['avatar']);
                 array_push($results, $result);
             }
             $out['users'] = $results;
         } else {
             $out['errno'] = '1';
         }
     } else {
         $out['errno'] = '200';
     }
     $out['msg'] = Yy_ErrMsg_Consult::getMsg('doctor', $out['errno']);
     Yy_Utils::jsonOut($out);
 }