修改bug
parent
59c7a73f63
commit
cbec6039a7
|
@ -1266,14 +1266,14 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
{
|
{
|
||||||
var sv = dbSubjectVisitList[0];
|
var sv = dbSubjectVisitList[0];
|
||||||
|
|
||||||
var existObj = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.SubjectId==sv.SubjectId && t.SubmitState != SubmitStateEnum.Submitted && t.VisitNum < sv.VisitNum);
|
var existObj = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.SubjectId == sv.SubjectId && t.SubmitState != SubmitStateEnum.Submitted && t.VisitNum < sv.VisitNum);
|
||||||
|
|
||||||
if (sv.PDState == PDStateEnum.PDProgress)
|
if (sv.PDState == PDStateEnum.PDProgress)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (existObj != null)
|
if (existObj != null)
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk($"系统检测发现该受试者当前访视之前的访视:{existObj.VisitName},未提交,疾病进展确认对阅片时限要求很高,请将上述访视提交或标记失访后,再提交当前访视!", 1);
|
return ResponseOutput.NotOk($"系统检测发现该受试者当前访视之前的访视:{existObj.VisitName},未提交,疾病进展确认对阅片时限要求很高,请将上述访视提交或标记失访后,再提交当前访视!", 1,ApiResponseCodeEnum.NeedTips);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1281,7 +1281,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
if (existObj != null)
|
if (existObj != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
return ResponseOutput.NotOk($"系统检测发现该受试者当前访视之前的访视:{existObj.VisitName},未提交。请尽快完成上述访视的影像上传和提交!", 0);
|
return ResponseOutput.NotOk($"系统检测发现该受试者当前访视之前的访视:{existObj.VisitName},未提交。请尽快完成上述访视的影像上传和提交!", 0,, ApiResponseCodeEnum.NeedTips);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1909,6 +1909,10 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
[TypeFilter(typeof(TrialResourceFilter))]
|
[TypeFilter(typeof(TrialResourceFilter))]
|
||||||
public async Task<IResponseOutput> UpdateSubjectAndSVInfo(UploadSubjectAndVisitCommand command)
|
public async Task<IResponseOutput> UpdateSubjectAndSVInfo(UploadSubjectAndVisitCommand command)
|
||||||
{
|
{
|
||||||
|
var dbSubjectVisit = ( await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == command.SubjectVisitId)).IfNullThrowException();
|
||||||
|
|
||||||
|
dbSubjectVisit.PDState = command.PDState;
|
||||||
|
|
||||||
if (command.IsEnrollmentConfirm != null)
|
if (command.IsEnrollmentConfirm != null)
|
||||||
{
|
{
|
||||||
if (await _subjectVisitRepository.Where(t => t.Id == command.SubjectVisitId)
|
if (await _subjectVisitRepository.Where(t => t.Id == command.SubjectVisitId)
|
||||||
|
@ -1923,11 +1927,9 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
return ResponseOutput.NotOk("回退的访视,不允许修改PD确认状态");
|
return ResponseOutput.NotOk("回退的访视,不允许修改PD确认状态");
|
||||||
}
|
}
|
||||||
|
|
||||||
await _repository.BatchUpdateAsync<SubjectVisit>(t => t.Id == command.SubjectVisitId, u => new SubjectVisit()
|
dbSubjectVisit.IsEnrollmentConfirm = command.IsEnrollmentConfirm.Value;
|
||||||
{
|
|
||||||
IsEnrollmentConfirm = command.IsEnrollmentConfirm.Value,
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1935,21 +1937,22 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
|
|
||||||
if (command.SubjectFirstGiveMedicineTime != null)
|
if (command.SubjectFirstGiveMedicineTime != null)
|
||||||
{
|
{
|
||||||
List<DataInspection> datas = new List<DataInspection>();
|
|
||||||
var data = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == command.SubjectVisitId);
|
|
||||||
await _repository.BatchUpdateAsync<Subject>(t => t.Id == command.SubjectId, u => new Subject()
|
await _repository.BatchUpdateAsync<Subject>(t => t.Id == command.SubjectId, u => new Subject()
|
||||||
{
|
{
|
||||||
FirstGiveMedicineTime = command.SubjectFirstGiveMedicineTime,
|
FirstGiveMedicineTime = command.SubjectFirstGiveMedicineTime,
|
||||||
|
|
||||||
});
|
});
|
||||||
if (data.IsBaseLine)
|
|
||||||
|
List<DataInspection> datas = new List<DataInspection>();
|
||||||
|
|
||||||
|
if (dbSubjectVisit.IsBaseLine)
|
||||||
{
|
{
|
||||||
datas.Add(new DataInspection()
|
datas.Add(new DataInspection()
|
||||||
{
|
{
|
||||||
|
|
||||||
SubjectId = command.SubjectId,
|
SubjectId = command.SubjectId,
|
||||||
SiteId = data.SiteId,
|
SiteId = dbSubjectVisit.SiteId,
|
||||||
TrialId = data.TrialId,
|
TrialId = dbSubjectVisit.TrialId,
|
||||||
IsSign = false,
|
IsSign = false,
|
||||||
Identification = "Edit|Subject|Info|Subject",
|
Identification = "Edit|Subject|Info|Subject",
|
||||||
CreateTime = DateTime.Now.AddSeconds(1),
|
CreateTime = DateTime.Now.AddSeconds(1),
|
||||||
|
@ -1961,13 +1964,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
await _inspectionService.AddListInspectionRecordAsync(datas);
|
await _inspectionService.AddListInspectionRecordAsync(datas);
|
||||||
}
|
}
|
||||||
|
|
||||||
////受试者基线 入组确认 或者访视PD 进展 默认加急
|
await _subjectVisitRepository.SaveChangesAsync();
|
||||||
//await _repository.UpdateFromQueryAsync<SubjectVisit>(t => t.Id == command.SubjectVisitId, u => new SubjectVisit()
|
|
||||||
//{
|
|
||||||
// PDState = command.PDState,
|
|
||||||
// IsUrgent = (command.IsEnrollmentConfirm == true) || (command.PDState == PDStateEnum.PDProgress)
|
|
||||||
|
|
||||||
//});
|
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue