修改医生既往阅片情况声明

This commit is contained in:
2023-01-31 09:35:52 +08:00
parent e18b890f96
commit 79d4c6a116
21 changed files with 242 additions and 117 deletions
@@ -26,6 +26,9 @@
}
public class TrialSOWPathDTO
{
public Guid TrialId { get; set; }
@@ -691,6 +691,12 @@ namespace IRaCIS.Application.Contracts
{
public Guid? Id { get; set; }
public Guid? TrialId { get; set; }
public Guid? TrialReadingCriterionId { get; set; }
public string CriterionName { get; set; }
public bool IsEnable { get; set; } = true;
/// <summary>
@@ -772,6 +778,9 @@ namespace IRaCIS.Application.Contracts
/// CreateTime
/// </summary>
public DateTime CreateTime { get; set; }
}
public class GetDoctorCriterionFileInDto
@@ -72,7 +72,7 @@ namespace IRaCIS.Application.Services
{
return ResponseOutput.NotOk("The current phone number already existed!", new DoctorBasicInfoCommand());
}
if (await _doctorRepository.AnyAsync(t => t.EMail == doctor.EMail))
{
return ResponseOutput.NotOk("The current email already existed!", new DoctorBasicInfoCommand());
@@ -80,7 +80,7 @@ namespace IRaCIS.Application.Services
doctor.Code = (await _doctorRepository.MaxAsync(t => t.Code)) + 1;
doctor.ReviewerCode = AppSettings.GetCodeStr(doctor.Code,nameof(Doctor)) ;
doctor.ReviewerCode = AppSettings.GetCodeStr(doctor.Code, nameof(Doctor));
doctor.Password = MD5Helper.Md5(doctor.Phone);
@@ -103,7 +103,7 @@ namespace IRaCIS.Application.Services
var updateModel = basicInfoModel;
var phone = updateModel.Phone.Trim();
if ((await _doctorRepository.FirstOrDefaultAsync(t => t.Phone == phone && t.Id != updateModel.Id) )!= null)
if ((await _doctorRepository.FirstOrDefaultAsync(t => t.Phone == phone && t.Id != updateModel.Id)) != null)
{
return ResponseOutput.NotOk("The current phone number already existed!", new DoctorBasicInfoCommand());
}
@@ -116,10 +116,10 @@ namespace IRaCIS.Application.Services
var doctor = await _doctorRepository.FirstOrDefaultAsync(t => t.Id == updateModel.Id).IfNullThrowException();
//删除中间表 Title对应的记录
await _repository.BatchDeleteAsync<DoctorDictionary>(t => t.DoctorId == updateModel.Id && t.KeyName == StaticData.Title);
await _repository.BatchDeleteAsync<DoctorDictionary>(t => t.DoctorId == updateModel.Id && t.KeyName == StaticData.Title);
var adddata=new List<DoctorDictionary>();
var adddata = new List<DoctorDictionary>();
//重新插入新的 Title记录
updateModel.TitleIds.ForEach(titleId => adddata.Add(new DoctorDictionary() { DoctorId = updateModel.Id.Value, KeyName = StaticData.Title, DictionaryId = titleId }));
@@ -284,7 +284,7 @@ namespace IRaCIS.Application.Services
}
[HttpPost]
public async Task<IResponseOutput> UpdateEmploymentInfo(EmploymentCommand doctorWorkInfoModel)
{
#region
@@ -314,7 +314,7 @@ namespace IRaCIS.Application.Services
//_mapper.Map(doctorWorkInfoModel, doctor);
//var success = _doctorRepository.SaveChanges();
#endregion
var entity = await _repository.InsertOrUpdateAsync<Doctor, EmploymentCommand>(doctorWorkInfoModel, true);
@@ -369,7 +369,7 @@ namespace IRaCIS.Application.Services
return test;
}
[HttpPost]
public async Task<IResponseOutput> UpdateSpecialtyInfo(SpecialtyCommand specialtyUpdateModel)
{
@@ -421,7 +421,7 @@ namespace IRaCIS.Application.Services
#endregion
#region
[HttpPost]
public async Task<IResponseOutput> UpdateAuditResume(ResumeConfirmCommand auditResumeParam)
{
@@ -441,8 +441,8 @@ namespace IRaCIS.Application.Services
ReviewStatus = auditResumeParam.ReviewStatus,
AcceptingNewTrial = auditResumeParam.AcceptingNewTrial,
ActivelyReading = auditResumeParam.ActivelyReading,
IsVirtual=auditResumeParam.IsVirtual,
BlindName=auditResumeParam.BlindName,
IsVirtual = auditResumeParam.IsVirtual,
BlindName = auditResumeParam.BlindName,
BlindNameCN = auditResumeParam.BlindNameCN,
BlindPublications = auditResumeParam.BlindPublications,
AuditTime = DateTime.Now,
@@ -479,11 +479,22 @@ namespace IRaCIS.Application.Services
public async Task<IResponseOutput> AddDoctorCriterionFile(AddDoctorCriterionFileDto inDto)
{
if (await _doctorCriterionFileRepository.AnyAsync(x =>inDto.IsEnable&& x.DoctorId == inDto.DoctorId && x.FileType == inDto.FileType && x.IsEnable && x.CriterionType == inDto.CriterionType && x.Id != inDto.Id))
if (await _doctorCriterionFileRepository.AnyAsync(x => inDto.IsEnable && x.DoctorId == inDto.DoctorId && x.FileType == inDto.FileType && x.TrialId==inDto.TrialId &&x.TrialReadingCriterionId==inDto.TrialReadingCriterionId && x.IsEnable && x.CriterionType == inDto.CriterionType && x.Id != inDto.Id))
{
throw new BusinessValidationFailedException("当前标准已添加过此类型文件");
}
var entity = await _doctorCriterionFileRepository.InsertOrUpdateAsync(inDto, true);
var entity = await _doctorCriterionFileRepository.InsertOrUpdateAsync(inDto);
if (inDto.TrialId != null)
{
entity.Remark = await _trialRepository.Where(t => t.Id == inDto.TrialId).Select(t => t.TrialCode).FirstOrDefaultAsync();
}
await _doctorCriterionFileRepository.SaveChangesAsync();
return ResponseOutput.Ok(entity.Id.ToString());
}
@@ -523,7 +534,7 @@ namespace IRaCIS.Application.Services
var doctor = (await _doctorRepository
.ProjectTo<ResumeConfirmDTO>(_mapper.ConfigurationProvider).FirstOrDefaultAsync(t => t.Id == doctorId)).IfNullThrowException();
doctor.InHoliday = (await _repository.CountAsync<Vacation>(x=>x.DoctorId==doctorId&&x.EndDate<=DateTime.Now&&x.StartDate<=DateTime.Now)) > 0;
doctor.InHoliday = (await _repository.CountAsync<Vacation>(x => x.DoctorId == doctorId && x.EndDate <= DateTime.Now && x.StartDate <= DateTime.Now)) > 0;
return doctor;
}