public function autocompletedoctorbycdAction()
 {
     $term = $this->_request->getParam('term');
     $cddoctor = $this->_request->getParam('cddoctor');
     $cdpatient = $this->_request->getParam('cdpatient');
     $covenantModel = new CovenantModel();
     $covenants = $covenantModel->fetchAll($covenantModel->getCovenantByDoctor($cddoctor, $cdpatient, $term));
     $json = '[';
     $first = true;
     foreach ($covenants as $row) {
         if (!$first) {
             $json .= ',';
         } else {
             $first = false;
         }
         $json .= json_encode(array("id" => $row['cdcovenant'], "value" => $row['nmcovenant']));
     }
     $json .= ']';
     echo $json;
 }