public function ajax_appointment()
 {
     $response = $this->parse_appointment(false);
     if ($response == false) {
         $this->send_err_json_result('err');
     }
     if ($this->type != 'NEW' && $this->type != 'UPDATE') {
         $this->send_ok_json_result($response);
     }
     if (isset($this->data['_mail'])) {
         EALogic::send_status_change_mail($response->id);
     }
     $this->send_ok_json_result($response);
 }