@RequestMapping(value = "/chart/delete/{id}", method = RequestMethod.GET)
  @ResponseBody
  public Boolean deleteChart(@PathVariable Integer id) {

    try {
      chartService.delete(id);
    } catch (EntityRemovalException e) {
      return false;
    }

    return true;
  }
 /**
  * TODO: check duplicated charts
  *
  * @param physicianId
  * @param patientId
  * @return
  */
 @RequestMapping(value = "/chart/add", method = RequestMethod.GET)
 @ResponseBody
 public Boolean addChart(
     @RequestParam Integer physicianId,
     @RequestParam Integer patientId,
     @RequestParam(value = "codes[]") String[] codes) {
   try {
     for (String code : codes) {
       String[] entry = code.split(Constants.HYPHEN);
       chartService.create(new Chart(physicianId, patientId, entry[0], entry[1]));
     }
   } catch (Exception e) {
     throw new AjaxBadRequest("Error while adding chart");
   }
   return true;
 }