添加稽查
parent
a539eaa4b8
commit
477a7e06a0
|
@ -214,10 +214,28 @@ namespace IRaCIS.Api.Controllers
|
|||
|
||||
DataInspectionAddDTO data = JsonConvert.DeserializeObject<DataInspectionAddDTO>(archiveStudyCommand.AuditInfo);
|
||||
data.GeneralId = archivedStudyIds[0];
|
||||
|
||||
data.CreateTime = DateTime.Now;
|
||||
|
||||
await _inspectionService.AddInspectionRecordAsync(data);
|
||||
|
||||
|
||||
List<DataInspection> datas = new List<DataInspection>();
|
||||
datas.Add(new DataInspection()
|
||||
{
|
||||
|
||||
SiteId = savedInfo.SiteId,
|
||||
SubjectId = savedInfo.SubjectId,
|
||||
TrialId = savedInfo.TrialId,
|
||||
SubjectVisitId = savedInfo.SubjectVisitId,
|
||||
Identification = "Edit|Visit|Status|Visit-Image Upload|Add Image",
|
||||
JsonDetail = JsonConvert.SerializeObject(new
|
||||
{
|
||||
SubmitState = "待提交",
|
||||
})
|
||||
});
|
||||
|
||||
await _inspectionService.AddListInspectionRecordAsync(datas);
|
||||
|
||||
return ResponseOutput.Ok(archiveResult);
|
||||
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
|||
////需要单独处理
|
||||
//public string IP { get; set; }
|
||||
|
||||
//public Guid? SignId { get; set; }
|
||||
public DateTime? CreateTime { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -276,6 +276,10 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
|||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> AddInspectionRecordAsync(DataInspectionAddDTO addDto, Guid? signId=null)
|
||||
{
|
||||
if (addDto == new DataInspectionAddDTO())
|
||||
{
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
await SetEnum(addDto);
|
||||
var add = _mapper.Map<DataInspection>(addDto);
|
||||
Guid? parentId = null;
|
||||
|
@ -369,6 +373,10 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
|||
var JsonData = JsonConvert.DeserializeObject<IDictionary<string, object>>(Data.JsonDetail);
|
||||
foreach (var item in Data.EnumList)
|
||||
{
|
||||
if (!JsonData.ContainsKey(item.Key))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var value = JsonData[item.Key];
|
||||
if (value.GetType() == typeof(JArray))
|
||||
{
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid? SignId { get; set; }
|
||||
//public Guid? SignId { get; set; }
|
||||
|
||||
public Guid[] SubjectVisitIds { get; set; }=new Guid[0];
|
||||
}
|
||||
|
|
|
@ -155,6 +155,26 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
await _repository.UpdateFromQueryAsync<SubjectVisit>(t => t.Id == subjectVisitId && t.SubmitState == SubmitStateEnum.ToSubmit, u => new SubjectVisit() { VisitExecuted = 0, SubmitState = SubmitStateEnum.None });
|
||||
}
|
||||
|
||||
|
||||
var subvisit = await _repository.GetQueryable<SubjectVisit>().FirstOrDefaultAsync(x => x.Id == subjectVisitId);
|
||||
|
||||
List<DataInspection> datas = new List<DataInspection>();
|
||||
datas.Add(new DataInspection()
|
||||
{
|
||||
|
||||
SiteId = subvisit.SiteId,
|
||||
SubjectId = subvisit.SubjectId,
|
||||
TrialId = subvisit.TrialId,
|
||||
SubjectVisitId = subvisit.Id,
|
||||
Identification = "Edit|Visit|Status|Visit-Image Upload|Add Image",
|
||||
JsonDetail = JsonConvert.SerializeObject(new
|
||||
{
|
||||
SubmitState = "待提交",
|
||||
})
|
||||
});
|
||||
|
||||
await _inspectionService.AddListInspectionRecordAsync(datas);
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
@ -189,6 +209,25 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
var data = JsonConvert.DeserializeObject<DataInspectionAddDTO>(fileDto.AuditInfo);
|
||||
data.GeneralId = fileDto.noneDicomStudyId;
|
||||
await _inspectionService.AddInspectionRecordAsync(data);
|
||||
|
||||
var subvisit =await _repository.GetQueryable<SubjectVisit>().FirstOrDefaultAsync(x => x.Id == fileDto.subjectVisitId);
|
||||
|
||||
List<DataInspection> datas = new List<DataInspection>();
|
||||
datas.Add(new DataInspection()
|
||||
{
|
||||
|
||||
SiteId = subvisit.SiteId,
|
||||
SubjectId = subvisit.SubjectId,
|
||||
TrialId = subvisit.TrialId,
|
||||
SubjectVisitId = subvisit.Id,
|
||||
Identification = "Edit|Visit|Status|Visit-Image Upload|Add Image",
|
||||
JsonDetail = JsonConvert.SerializeObject(new
|
||||
{
|
||||
SubmitState = "待提交",
|
||||
})
|
||||
});
|
||||
|
||||
await _inspectionService.AddListInspectionRecordAsync(datas);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
@ -966,6 +966,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
TrialId = x.TrialId,
|
||||
SubjectVisitId=x.SubjectVisitId,
|
||||
GeneralId=x.Id,
|
||||
Identification= "Delete|DICOM Study|Data|Visit-Image Upload",
|
||||
JsonDetail = JsonConvert.SerializeObject(new
|
||||
{
|
||||
studyUid=x.StudyCode,
|
||||
|
@ -980,6 +981,11 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#region will calls error wried
|
||||
//ids.ToList().ForEach(async id =>
|
||||
//{
|
||||
|
@ -1046,6 +1052,23 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
LatestScanDate = maxArray.Max()
|
||||
});
|
||||
|
||||
var subvisit = await _repository.GetQueryable<SubjectVisit>().FirstOrDefaultAsync(x => x.Id == subjectVisitId);
|
||||
|
||||
|
||||
datas.Add(new DataInspection()
|
||||
{
|
||||
|
||||
SiteId = subvisit.SiteId,
|
||||
SubjectId = subvisit.SubjectId,
|
||||
TrialId = subvisit.TrialId,
|
||||
SubjectVisitId = subvisit.Id,
|
||||
Identification = "Edit|Visit|Status|Visit-Image Upload|Add Image",
|
||||
JsonDetail = JsonConvert.SerializeObject(new
|
||||
{
|
||||
SubmitState = "待提交",
|
||||
})
|
||||
});
|
||||
await _sinspectionService.AddListInspectionRecordAsync(datas);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
@ -1222,7 +1245,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
//已确认临床数据完整性
|
||||
dbSubjectVisit.IsConfirmedClinicalData = true;
|
||||
|
||||
var signSuccess = await _repository.UpdateFromQueryAsync<TrialSign>(t => t.Id == cRCRequestToQCCommand.SignId, u => new TrialSign() { IsCompleted = true });
|
||||
//var signSuccess = await _repository.UpdateFromQueryAsync<TrialSign>(t => t.Id == cRCRequestToQCCommand.SignId, u => new TrialSign() { IsCompleted = true });
|
||||
|
||||
|
||||
////现在修改为 提交时 设置签名信息
|
||||
|
@ -1291,8 +1314,46 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
|
||||
var success = await _repository.SaveChangesAsync();
|
||||
List<DataInspection> datas = new List<DataInspection>();
|
||||
dbSubjectVisitList.ForEach(x =>
|
||||
{
|
||||
datas.Add(new DataInspection()
|
||||
{
|
||||
|
||||
SiteId = x.SiteId,
|
||||
SubjectId = x.SubjectId,
|
||||
TrialId = x.TrialId,
|
||||
SubjectVisitId = x.Id,
|
||||
Identification= "Edit|Visit|Status|Visit-Image Upload",
|
||||
JsonDetail = JsonConvert.SerializeObject(new
|
||||
{
|
||||
SubmitState = "已提交",
|
||||
|
||||
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
dbSubjectVisitList.ForEach(x =>
|
||||
{
|
||||
datas.Add(new DataInspection()
|
||||
{
|
||||
|
||||
SiteId = x.SiteId,
|
||||
SubjectId = x.SubjectId,
|
||||
TrialId = x.TrialId,
|
||||
SubjectVisitId = x.Id,
|
||||
Identification = "Edit|Visit|Status|Visit-Image Upload-1",
|
||||
JsonDetail = JsonConvert.SerializeObject(new
|
||||
{
|
||||
SubmitState = "已提交",
|
||||
|
||||
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
await _sinspectionService.AddListInspectionRecordAsync(datas);
|
||||
return ResponseOutput.Result(success);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue