@Override
  public List<MedicalCaseView> listAllByOwnerId(Integer ownerId) throws ServiceException {
    MedicalCaseViewExample example = new MedicalCaseViewExample();
    MedicalCaseViewExample.Criteria c = example.createCriteria();
    c.andCreatorUserIdEqualTo(ownerId);

    return medicalCaseViewMapper.selectByExample(example);
  }
  @Override
  public MedicalCaseView getById(Integer medicalCaseId) throws ServiceException {
    MedicalCaseViewExample example = new MedicalCaseViewExample();
    MedicalCaseViewExample.Criteria c = example.createCriteria();
    c.andMedicalCaseIdEqualTo(medicalCaseId);

    List<MedicalCaseView> list = medicalCaseViewMapper.selectByExample(example);
    if (list != null && list.size() > 0) {
      return list.get(0);
    }
    return null;
  }