protected virtual async Task Update(CreateOrEditDiseaseDto input)
        {
            var disease = await _diseaseRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, disease);
            await _attachmentFilesAppService.CheckAttachment(AttachmentTypeConsts.DiagnoseTheDisease, input.PersonId + "." + input.Id, input, AttachmentUploadType.edit);
        }
 public async Task CreateOrEdit(CreateOrEditDiseaseDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
        protected virtual async Task Create(CreateOrEditDiseaseDto input)
        {
            var disease = ObjectMapper.Map <Disease>(input);


            if (AbpSession.TenantId != null)
            {
                disease.TenantId = (int?)AbpSession.TenantId;
            }


            var id = await _diseaseRepository.InsertAndGetIdAsync(disease);

            await _attachmentFilesAppService.CheckAttachment(AttachmentTypeConsts.DiagnoseTheDisease, input.PersonId + "." + id, input, AttachmentUploadType.add);
        }