/**
  * Edit clinical notes definition, this must be called using AJAX
  */
 public function editDefinitionAction()
 {
     $clinicalNoteDefinitionId = (int) $this->_getParam('clinicalNoteDefinitionId');
     $clinicalNoteTemplateId = (int) $this->_getParam('clinicalNoteTemplateId');
     $cnDefinition = new ClinicalNoteDefinition();
     $cnDefinition->clinicalNoteTemplateId = $clinicalNoteTemplateId;
     if ($clinicalNoteDefinitionId > 0) {
         $cnDefinition->clinicalNoteDefinitionId = $clinicalNoteDefinitionId;
         $cnDefinition->populate();
     }
     $objForm = new WebVista_Form(array('name' => 'cnDefinition'));
     $objForm->setAction(Zend_Registry::get('baseUrl') . "clinical-notes-manager.raw/process-edit-definition");
     $objForm->loadORM($cnDefinition, "cnDefinition");
     $objForm->setWindow('windowEditDefinition');
     $this->view->form = $objForm;
     $this->render();
 }