diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs index dfdbd58fd..b42df0107 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs @@ -230,7 +230,7 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost] - public async Task AddOrUpdateGneralSituation(SummarizeInfoDto inDto) + public async Task<(DoctorSummarize,bool)> AddOrUpdateGneralSituation(SummarizeInfoDto inDto) { if (inDto.TrialId != null&&inDto.Id==null) { @@ -262,6 +262,7 @@ namespace IRaCIS.Core.Application.Service inDto.IndicationEn = "Default"; } var exists = await _doctorSummarizeRepository + .Where(x=> x.IndicationEn!=string.Empty && x.Indication!=string.Empty) .Where( x => x.IndicationEn == inDto.IndicationEn|| x.Indication == inDto.Indication) .AnyAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == null&&x.Id!=inDto.Id); @@ -320,7 +321,7 @@ namespace IRaCIS.Core.Application.Service var entity = await _doctorSummarizeRepository.InsertOrUpdateAsync(inDto, true); - return entity; + return (entity,true); } /// diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs index 3bb6cc9d6..35a02e814 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs @@ -500,6 +500,9 @@ namespace IRaCIS.Core.Application.Service await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); + await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); + await _repository.BatchDeleteNoTrackingAsync(t => t.VisitTask.TrialId == trialId); + await _repository.BatchDeleteNoTrackingAsync(t => t.TrialId == trialId); await _repository.BatchDeleteNoTrackingAsync(t => t.VisitTask.TrialId == trialId);