签名接口修改
parent
0afa1e4d38
commit
525a03533b
|
@ -43,11 +43,9 @@ namespace IRaCIS.Core.API.Controllers.Special
|
||||||
|
|
||||||
public async Task<IResponseOutput> AddOrUpdateTrialInspection(DataInspectionDto<TrialCommand> opt)
|
public async Task<IResponseOutput> AddOrUpdateTrialInspection(DataInspectionDto<TrialCommand> opt)
|
||||||
{
|
{
|
||||||
var fun =await AddOrUpdateTrial(opt.OptCommand);
|
var fun =await AddOrUpdateTrial(opt.Data);
|
||||||
opt.AuditInfo.TrialId = fun.Data.Id;
|
|
||||||
opt.AuditInfo.TrialName = fun.Data.ExperimentName;
|
return fun;
|
||||||
opt.AuditInfo.ResearchProgramNo = fun.Data.ResearchProgramNo;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo,null, fun);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -82,64 +82,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//[HttpPost, Route("Inspection/Test")]
|
|
||||||
//public async Task Test(string Table, string ForeignKeyValue, string ForeignKeyText, string value)
|
|
||||||
//{
|
|
||||||
// string a= await _dataInspectionRepository.GetDictionaryValue(Table, ForeignKeyValue, ForeignKeyText, value);
|
|
||||||
//}
|
|
||||||
|
|
||||||
#region 文件管理
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 废除项目
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/TrialConfig/AbandonTrial")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> AbandonTrial(DataInspectionDto<AbandonTrial> opt)
|
|
||||||
{
|
|
||||||
var fun = await _trialConfigService.AbandonTrial(opt.OptCommand.trialId, opt.OptCommand.isAbandon);
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 修改项目状态项目
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/TrialConfig/UpdateTrialState")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> UpdateTrialState(DataInspectionDto<UpdateTrialState> opt)
|
|
||||||
{
|
|
||||||
var fun = await _trialConfigService.UpdateTrialState(opt.OptCommand.trialId, opt.OptCommand.trialStatusStr, opt.OptCommand.reason);
|
|
||||||
opt.AuditInfo.Reason = opt.OptCommand.reason;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt">参数</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/trialDocument/AddOrUpdateTrialDocument")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> AddOrUpdateTrialDocument(DataInspectionDto<AddOrEditTrialDocument> opt)
|
|
||||||
{
|
|
||||||
var fun = _trialDocumentService.AddOrUpdateTrialDocument;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
[HttpPost, Route("Inspection/trialDocument/UserAbandonDoc")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> UserAbandonDoc(DataInspectionDto<AddOrEditTrialDocument> opt)
|
|
||||||
{
|
|
||||||
var fun = _trialDocumentService.UserAbandonDoc;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 获取稽查数据
|
#region 获取稽查数据
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -154,319 +97,135 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region 影像质疑
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 手动领取 或者取消 QC任务
|
/// 配置 基础逻辑信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="opt"></param>
|
/// <param name="opt"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost, Route("Inspection/QCOperation/ObtainOrCancelQCTask")]
|
[HttpPost, Route("Inspection/configTrialBasicInfo/configTrialBasicInfo")]
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task<IResponseOutput> ObtainOrCancelQCTask(DataInspectionDto<ObtainOrCancelQCTaskDto> opt)
|
public async Task<IResponseOutput> ConfigTrialBasicInfo(DataInspectionDto<BasicTrialConfig> opt)
|
||||||
{
|
{
|
||||||
var fun = await _qCOperationService.ObtainOrCancelQCTask(opt.OptCommand.trialId, opt.OptCommand.subjectVisitId, opt.OptCommand.obtaionOrCancel);
|
await _inspectionService.RecordSing(opt.SignCodeId);
|
||||||
if (!fun.IsSuccess)
|
return await _trialConfigService.ConfigTrialBasicInfo(opt.Data);
|
||||||
{
|
|
||||||
return ResponseOutput.NotOk(fun.ErrorMessage);
|
|
||||||
}
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 添加或者更新 QC核对问题列表
|
/// 配置 基础逻辑信息并确认
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="opt"></param>
|
/// <param name="opt"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost, Route("Inspection/QCOperation/AddOrUpdateQCQuestionAnswerList")]
|
[HttpPost, Route("Inspection/configTrialBasicInfo/ConfigTrialBasicInfoConfirm")]
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task<IResponseOutput> AddOrUpdateQCQuestionAnswerList(DataInspectionDto<AddOrUpdateQCQuestionAnswerListDto> opt)
|
public async Task<IResponseOutput> ConfigTrialBasicInfoConfirm(DataInspectionDto<BasicTrialConfig> opt)
|
||||||
|
{
|
||||||
|
|
||||||
|
await _inspectionService.RecordSing(opt.SignCodeId);
|
||||||
|
var data = await _trialConfigService.ConfigTrialBasicInfo(opt.Data);
|
||||||
|
if (!data.IsSuccess)
|
||||||
{
|
{
|
||||||
var fun = await _qCOperationService.AddOrUpdateQCQuestionAnswerList(opt.OptCommand.qcQuestionAnswerCommands, opt.OptCommand.trialId, opt.OptCommand.subjectVisitId, opt.OptCommand.trialQCProcess, opt.OptCommand.currentQCType);
|
return ResponseOutput.NotOk(data.ErrorMessage);
|
||||||
if (!fun.IsSuccess)
|
|
||||||
{
|
|
||||||
return ResponseOutput.NotOk(fun.ErrorMessage);
|
|
||||||
}
|
}
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
|
return await _trialConfigService.TrialConfigSignatureConfirm(new SignConfirmDTO()
|
||||||
|
{
|
||||||
|
TrialId = opt.Data.TrialId,
|
||||||
|
SignCode = opt.Data.SignCode
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 添加和更新质疑
|
/// 签名确认
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[HttpPost, Route("Inspection/QCOperation/AddOrUpdateQCChallenge")]
|
/// <returns></returns>
|
||||||
|
[HttpPost, Route("Inspection/configTrialBasicInfo/TrialConfigSignatureConfirm")]
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task<IResponseOutput> AddOrUpdateQCChallenge(DataInspectionDto<AddOrUpdateQCChallengeDto> opt)
|
public async Task<IResponseOutput> TrialConfigSignatureConfirm(DataInspectionDto<SignConfirmDTO> opt)
|
||||||
{
|
{
|
||||||
var fun = await _qCOperationService.AddOrUpdateQCChallenge(opt.OptCommand.qaQuestionCommand, opt.OptCommand.trialId, opt.OptCommand.trialQCProcess, opt.OptCommand.currentQCType);
|
await _inspectionService.RecordSing(opt.SignCodeId);
|
||||||
//opt.AuditInfo.GeneralId = fun.Id;
|
return await _trialConfigService.TrialConfigSignatureConfirm(opt.Data);
|
||||||
//Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
|
|
||||||
//keyValuePairs.Add("ChallengeCode", "Q" + fun.ChallengeCode.ToString("D5"));
|
|
||||||
//opt.AuditInfo.JsonDetail = _inspectionService.AddJsonItem(opt.AuditInfo.JsonDetail, keyValuePairs);
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, ResponseOutput.Ok());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 回复质疑
|
/// 配置流程
|
||||||
/// </summary>
|
|
||||||
[HttpPost, Route("Inspection/QCOperation/AddQCChallengeReply")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> AddQCChallengeReply(DataInspectionDto<QADialogCommand> opt)
|
|
||||||
{
|
|
||||||
var fun = _qCOperationService.AddQCChallengeReply;
|
|
||||||
opt.AuditInfo.GeneralId = opt.OptCommand.QCChallengeId;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 关闭质疑
|
|
||||||
/// </summary>
|
|
||||||
[HttpPost, Route("Inspection/QCOperation/CloseQCChallenge")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> CloseQCChallenge(DataInspectionDto<CloseQCChallengeDto> opt)
|
|
||||||
{
|
|
||||||
var fun = await _qCOperationService.CloseQCChallenge(opt.OptCommand.qcChallengeId, opt.OptCommand.subjectVisitId, opt.OptCommand.closeEnum, opt.OptCommand.closeReason);
|
|
||||||
|
|
||||||
opt.AuditInfo.GeneralId = opt.OptCommand.qcChallengeId;
|
|
||||||
if (!fun.IsSuccess)
|
|
||||||
{
|
|
||||||
return ResponseOutput.NotOk(fun.ErrorMessage);
|
|
||||||
}
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 删除QC质疑记录
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="opt"></param>
|
/// <param name="opt"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost, Route("Inspection/QCOperation/DeleteQCChallenge")]
|
[HttpPost, Route("Inspection/configTrialBasicInfo/configTrialProcessInfo")]
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task<IResponseOutput> DeleteQCChallenge(DataInspectionDto<IDDto> opt)
|
public async Task<IResponseOutput> ConfigTrialProcessInfo(DataInspectionDto<TrialProcessConfig> opt)
|
||||||
{
|
{
|
||||||
var fun = _qCOperationService.DeleteQCChallenge;
|
|
||||||
opt.AuditInfo.GeneralId = opt.OptCommand.Id;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
await _inspectionService.RecordSing(opt.SignCodeId);
|
||||||
|
return await _trialConfigService.ConfigTrialProcessInfo(opt.Data);
|
||||||
/// <summary>
|
|
||||||
/// 一致性核查 质疑的添加/回复
|
|
||||||
/// </summary>
|
|
||||||
[HttpPost, Route("Inspection/QCOperation/AddCheckChallengeReply")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> AddCheckChallengeReply(DataInspectionDto<CheckChallengeDialogCommand> opt)
|
|
||||||
|
|
||||||
{
|
|
||||||
var fun = _qCOperationService.AddCheckChallengeReply;
|
|
||||||
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 删除QC质疑记录
|
/// 配置流程并确认
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="opt"></param>
|
/// <param name="opt"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost, Route("Inspection/QCOperation/CloseCheckChallenge")]
|
[HttpPost, Route("Inspection/configTrialBasicInfo/ConfigTrialProcessInfoConfirm")]
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task<IResponseOutput> CloseCheckChallenge(DataInspectionDto<CloseCheckChallengeDto> opt)
|
public async Task<IResponseOutput> ConfigTrialProcessInfoConfirm(DataInspectionDto<TrialProcessConfig> opt)
|
||||||
{
|
{
|
||||||
var fun = _qCOperationService.CloseCheckChallenge;
|
await _inspectionService.RecordSing(opt.SignCodeId);
|
||||||
opt.AuditInfo.Reason = opt.OptCommand.CloseCheckChallenge;
|
var data = await _trialConfigService.ConfigTrialProcessInfo(opt.Data);
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
if (!data.IsSuccess)
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk(data.ErrorMessage);
|
||||||
}
|
}
|
||||||
|
return await _trialConfigService.TrialConfigSignatureConfirm(new SignConfirmDTO()
|
||||||
/// <summary>
|
|
||||||
/// 手动设置一致性核查通过
|
|
||||||
/// </summary>
|
|
||||||
[HttpPost, Route("Inspection/QCOperation/SetCheckPass")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> SetCheckPass(DataInspectionDto<SetCheckPassDt> opt)
|
|
||||||
{
|
{
|
||||||
var fun = _qCOperationService.SetCheckPass;
|
TrialId = opt.Data.TrialId,
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
SignCode = opt.Data.SignCode
|
||||||
}
|
});
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// CRC 请求回退
|
|
||||||
/// </summary>
|
|
||||||
[HttpPost, Route("Inspection/QCOperation/CRCRequstCheckBack")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> CRCRequstCheckBack(DataInspectionDto<IDDto> opt)
|
|
||||||
{
|
|
||||||
var fun = _qCOperationService.CRCRequstCheckBack;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 一致性核查 回退 对话记录不清除 只允许PM回退
|
/// 配置加急信息
|
||||||
/// </summary>
|
|
||||||
[HttpPost, Route("Inspection/QCOperation/CheckBack")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> CheckBack(DataInspectionDto<IDDto> opt)
|
|
||||||
{
|
|
||||||
var fun = _qCOperationService.CheckBack;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
///// <summary>
|
|
||||||
///// QC修改检查部位和 拍片类型
|
|
||||||
///// </summary>
|
|
||||||
//[HttpPost, Route("Inspection/QCOperation/UpdateModality")]
|
|
||||||
//[UnitOfWork]
|
|
||||||
//public async Task<IResponseOutput> UpdateModality(DataInspectionDto<UpdateModalityDto> opt)
|
|
||||||
//{
|
|
||||||
// var fun = await _qCOperationService.UpdateModality(opt.OptCommand.id, (Guid)opt.AuditInfo.SubjectVisitId, opt.OptCommand.type, opt.OptCommand.modality, opt.OptCommand.bodyPart);
|
|
||||||
// return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
//}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 1、设置为不读片,2 设置为读片(取消 先前设置为不读片) 4 设置为删除(数据库记录软删除) 5 恢复为未删除
|
|
||||||
/// </summary>
|
|
||||||
[HttpPost, Route("Inspection/QCOperation/SetSeriesState")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> SetSeriesState(DataInspectionDto<SetSeriesStateDto> opt)
|
|
||||||
{
|
|
||||||
var fun = await _qCOperationService.SetSeriesState(opt.OptCommand.subjectVisitId, opt.OptCommand.studyId, opt.OptCommand.seriesId, opt.OptCommand.state);
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 设置QC 通过或者不通过 7:QC failed 8:QC passed
|
|
||||||
/// </summary>
|
|
||||||
[HttpPost, Route("Inspection/QCOperation/QCPassedOrFailed")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> QCPassedOrFailed(DataInspectionDto<QCPassedOrFailedDto> opt)
|
|
||||||
{
|
|
||||||
var fun = await _qCOperationService.QCPassedOrFailed(opt.OptCommand.trialId, opt.OptCommand.subjectVisitId, opt.OptCommand.auditState);
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 设置、取消 访视紧急
|
|
||||||
/// </summary>
|
|
||||||
[HttpPost, Route("Inspection/QCOperation/SetVisitUrgent")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> SetVisitUrgent(DataInspectionDto<SetVisitUrgentDto> opt)
|
|
||||||
{
|
|
||||||
var fun = await _qCOperationService.SetVisitUrgent(opt.OptCommand.trialId, opt.OptCommand.subjectVisitId, opt.OptCommand.setOrCancel);
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// QA设置 需要重传
|
|
||||||
/// </summary>
|
|
||||||
[HttpPost, Route("Inspection/QCOperation/SetNeedReupload")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> SetNeedReupload(DataInspectionDto<SetNeedReuploadDto> opt)
|
|
||||||
{
|
|
||||||
var fun = await _qCOperationService.SetNeedReupload(opt.OptCommand.trialId, opt.OptCommand.qcChallengeId);
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// CRC 设置已经重传完成
|
|
||||||
/// </summary>
|
|
||||||
[HttpPost, Route("Inspection/QCOperation/SetReuploadFinished")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> SetReuploadFinished(DataInspectionDto<CRCReuploadFinishedCommand> opt)
|
|
||||||
{
|
|
||||||
var fun = _qCOperationService.SetReuploadFinished;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// CRCRequestReUpload
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="opt"></param>
|
/// <param name="opt"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost, Route("Inspection/QCOperation/CRCRequestReUpload")]
|
[HttpPost, Route("Inspection/configTrialBasicInfo/ConfigTrialUrgentInfo")]
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task<IResponseOutput> CRCRequestReUpload(DataInspectionDto<IDDto> opt)
|
public async Task<IResponseOutput> ConfigTrialUrgentInfo(DataInspectionDto<TrialUrgentConfig> opt)
|
||||||
{
|
|
||||||
var fun = _qCOperationService.CRCRequestReUpload;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 影像转发
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/QCOperation/ForwardSVDicomImage")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> ForwardSVDicomImage(DataInspectionDto<ForwardSVDicomImageDto> opt)
|
|
||||||
{
|
|
||||||
var fun = _qCOperationService.ForwardSVDicomImage;
|
|
||||||
opt.AuditInfo.NeedSava = false;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.subjectVisitIdList, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 一致性核查 excel上传 支持三种格式
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="file"></param>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/QCOperation/UploadVisitCheckExcel")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> UploadVisitCheckExcel(IFormFile file, [FromForm] UploadVisitCheckExcelDto opt)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
await _inspectionService.RecordSing(opt.SignCodeId);
|
||||||
var fun = await _qCOperationService.UploadVisitCheckExcel(file, opt.trialId);
|
return await _trialConfigService.ConfigTrialUrgentInfo(opt.Data);
|
||||||
return fun;
|
|
||||||
//var data = JsonConvert.DeserializeObject<DataInspectionAddDTO>(opt.AuditInfo);
|
|
||||||
//return await _inspectionService.Enforcement(opt.trialId, data, null, null, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
#region 影像上传
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 疾病进展确认评估
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/QCOperation/UpdateSubjectAndSVInfo")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> UpdateSubjectAndSVInfo(DataInspectionDto<UploadSubjectAndVisitCommand> opt)
|
|
||||||
{
|
|
||||||
var fun = _qCOperationService.UpdateSubjectAndSVInfo;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 删除影像
|
/// 配置加急信息并确认
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="opt"></param>
|
/// <param name="opt"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost, Route("Inspection/QCOperation/deleteStudyList")]
|
[HttpPost, Route("Inspection/configTrialBasicInfo/ConfigTrialUrgentInfoConfirm")]
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task<IResponseOutput> deleteStudyList(DataInspectionDto<DeleteStudyList> opt)
|
public async Task<IResponseOutput> ConfigTrialUrgentInfoConfirm(DataInspectionDto<TrialUrgentConfig> opt)
|
||||||
{
|
{
|
||||||
var fun = await _qCOperationService.DeleteStudyList(opt.OptCommand.ids, opt.OptCommand.subjectVisitId, opt.OptCommand.trialId);
|
|
||||||
if (!fun.IsSuccess)
|
await _inspectionService.RecordSing(opt.SignCodeId);
|
||||||
|
|
||||||
|
var data = await _trialConfigService.ConfigTrialUrgentInfo(opt.Data);
|
||||||
|
if (!data.IsSuccess)
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk(fun.ErrorMessage);
|
return ResponseOutput.NotOk(data.ErrorMessage);
|
||||||
}
|
}
|
||||||
opt.AuditInfo.NeedSava = false;
|
return await _trialConfigService.TrialConfigSignatureConfirm(new SignConfirmDTO()
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
{
|
||||||
|
TrialId = opt.Data.TrialId,
|
||||||
|
SignCode = opt.Data.SignCode
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -479,482 +238,62 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task<IResponseOutput> CRCRequestToQC(DataInspectionDto<CRCRequestToQCCommand> opt)
|
public async Task<IResponseOutput> CRCRequestToQC(DataInspectionDto<CRCRequestToQCCommand> opt)
|
||||||
{
|
{
|
||||||
var fun = _qCOperationService.CRCRequestToQC;
|
await _inspectionService.RecordSing(opt.SignCodeId);
|
||||||
opt.AuditInfo.NeedSava = false;
|
return await _qCOperationService.CRCRequestToQC(opt.Data);
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 非DICOM影像新增编辑
|
/// 设置QC 通过或者不通过 7:QC failed 8:QC passed
|
||||||
|
/// </summary>
|
||||||
|
[HttpPost, Route("Inspection/QCOperation/QCPassedOrFailed")]
|
||||||
|
[UnitOfWork]
|
||||||
|
public async Task<IResponseOutput> QCPassedOrFailed(DataInspectionDto<QCPassedOrFailedDto> opt)
|
||||||
|
{
|
||||||
|
await _inspectionService.RecordSing(opt.SignCodeId);
|
||||||
|
return await _qCOperationService.QCPassedOrFailed(opt.Data.trialId, opt.Data.subjectVisitId, opt.Data.auditState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 一致性核查 回退 对话记录不清除 只允许PM回退
|
||||||
|
/// </summary>
|
||||||
|
[HttpPost, Route("Inspection/QCOperation/CheckBack")]
|
||||||
|
[UnitOfWork]
|
||||||
|
public async Task<IResponseOutput> CheckBack(DataInspectionDto<IDDto> opt)
|
||||||
|
{
|
||||||
|
await _inspectionService.RecordSing(opt.SignCodeId);
|
||||||
|
return await _qCOperationService.CheckBack(opt.Data.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CRC 设置已经重传完成
|
||||||
|
/// </summary>
|
||||||
|
[HttpPost, Route("Inspection/QCOperation/SetReuploadFinished")]
|
||||||
|
[UnitOfWork]
|
||||||
|
public async Task<IResponseOutput> SetReuploadFinished(DataInspectionDto<CRCReuploadFinishedCommand> opt)
|
||||||
|
{
|
||||||
|
await _inspectionService.RecordSing(opt.SignCodeId);
|
||||||
|
return await _qCOperationService.SetReuploadFinished(opt.Data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新项目状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="opt"></param>
|
/// <param name="opt"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost, Route("Inspection/noneDicomStudy/AddOrUpdateNoneDicomStudy")]
|
[HttpPost, Route("Inspection/TrialConfig/updateTrialState")]
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task<IResponseOutput> AddOrUpdateNoneDicomStudy(DataInspectionDto<NoneDicomStudyAddOrEdit> opt)
|
public async Task<IResponseOutput> UpdateTrialState(DataInspectionDto<UpdateTrialStateDto> opt)
|
||||||
{
|
{
|
||||||
var fun = await _noneDicomStudyService.AddOrUpdateNoneDicomStudy(opt.OptCommand);
|
await _inspectionService.RecordSing(opt.SignCodeId);
|
||||||
if (!fun.IsSuccess)
|
return await _trialConfigService.UpdateTrialState(opt.Data.trialId, opt.Data.trialStatusStr, opt.Data.reason);
|
||||||
{
|
|
||||||
return ResponseOutput.NotOk(fun.ErrorMessage);
|
|
||||||
}
|
|
||||||
if (opt.OptCommand.Id == null)
|
|
||||||
{
|
|
||||||
Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
|
|
||||||
keyValuePairs.Add("CodeView", fun.Data.StudyCode);
|
|
||||||
opt.AuditInfo.JsonDetail = _inspectionService.AddJsonItem(opt.AuditInfo.JsonDetail, keyValuePairs);
|
|
||||||
}
|
|
||||||
|
|
||||||
opt.AuditInfo.GeneralId = fun.Data.Id;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 删除非dicom
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/noneDicom/DeleteNoneDicomStudy")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> DeleteNoneDicomStudy(DataInspectionDto<IDDto> opt)
|
|
||||||
{
|
|
||||||
var fun = _noneDicomStudyService.DeleteNoneDicomStudy;
|
|
||||||
opt.AuditInfo.GeneralId = opt.OptCommand.Id;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 删除非dicom文件
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/noneDicom/deleteNoneDicomStudyFile")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> deleteNoneDicomStudyFile(DataInspectionDto<IDDto> opt)
|
|
||||||
{
|
|
||||||
var fun = _noneDicomStudyService.DeleteNoneDicomStudyFile;
|
|
||||||
//opt.AuditInfo.GeneralId = opt.OptCommand.Id;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 临床数据采集 ClinicalDataService
|
|
||||||
/// <summary>
|
|
||||||
/// 新增或修改既往放疗史
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/clinicalData/AddOrUpdatePreviousHistory")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> AddOrUpdatePreviousHistory(DataInspectionDto<PreviousHistoryAddOrEdit> opt)
|
|
||||||
{
|
|
||||||
var fun = await _clinicalDataService.AddOrUpdatePreviousHistory(opt.OptCommand);
|
|
||||||
opt.AuditInfo.GeneralId = fun.Data;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 删除既往放疗史
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/clinicalData/DeletePreviousHistory")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> DeletePreviousHistory(DataInspectionDto<IDDto> opt)
|
|
||||||
{
|
|
||||||
var fun = _clinicalDataService.DeletePreviousHistory;
|
|
||||||
opt.AuditInfo.GeneralId = opt.OptCommand.Id;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 新增或修改既往手术史
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/clinicalData/AddOrUpdatePreviousSurgery")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> AddOrUpdatePreviousSurgery(DataInspectionDto<PreviousSurgeryAddOrEdit> opt)
|
|
||||||
{
|
|
||||||
var fun = await _clinicalDataService.AddOrUpdatePreviousSurgery(opt.OptCommand);
|
|
||||||
opt.AuditInfo.GeneralId = fun.Data;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 删除既往手术史
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/clinicalData/DeletePreviousSurgery")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> DeletePreviousSurgery(DataInspectionDto<IDDto> opt)
|
|
||||||
{
|
|
||||||
var fun = _clinicalDataService.DeletePreviousSurgery;
|
|
||||||
opt.AuditInfo.GeneralId = opt.OptCommand.Id;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 新增或修改既往其他治疗史
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/clinicalData/AddOrUpdatePreviousOther")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> AddOrUpdatePreviousOther(DataInspectionDto<PreviousOtherAddOrEdit> opt)
|
|
||||||
{
|
|
||||||
var fun = await _clinicalDataService.AddOrUpdatePreviousOther(opt.OptCommand);
|
|
||||||
opt.AuditInfo.GeneralId = fun.Data;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 删除既往其他治疗史
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/clinicalData/DeletePreviousOther")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> DeletePreviousOther(DataInspectionDto<IDDto> opt)
|
|
||||||
{
|
|
||||||
|
|
||||||
var fun = _clinicalDataService.DeletePreviousOther;
|
|
||||||
opt.AuditInfo.GeneralId = opt.OptCommand.Id;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
#region 访视计划
|
|
||||||
///// <summary>
|
|
||||||
///// 新增或添加访视计划
|
|
||||||
///// </summary>
|
|
||||||
///// <param name="opt"></param>
|
|
||||||
///// <returns></returns>
|
|
||||||
//[HttpPost, Route("Inspection/VisitPlan/AddOrUpdateVisitStage")]
|
|
||||||
//[UnitOfWork]
|
|
||||||
//public async Task<IResponseOutput> AddOrUpdateVisitStage(DataInspectionDto<VisitPlanCommand> opt)
|
|
||||||
//{
|
|
||||||
// var fun = await _visitPlanService.AddOrUpdateVisitStage(opt.OptCommand);
|
|
||||||
// if (!fun.IsSuccess)
|
|
||||||
// {
|
|
||||||
// return ResponseOutput.NotOk(fun.ErrorMessage);
|
|
||||||
// }
|
|
||||||
// opt.AuditInfo.VisitStageId = fun.Data.Id;
|
|
||||||
// opt.OptCommand.Id = fun.Data.Id;
|
|
||||||
// opt.AuditInfo.BlindName = fun.Data.BlindName;
|
|
||||||
// return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 删除访视计划对象
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/VisitPlan/DeleteVisitStage")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> DeleteVisitStage(DataInspectionDto<IDDto> opt)
|
|
||||||
{
|
|
||||||
var fun = _visitPlanService.DeleteVisitStage;
|
|
||||||
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 确认访视计划
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/VisitPlan/ConfirmTrialVisitPlan")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> ConfirmTrialVisitPlan(DataInspectionDto<IDDto> opt)
|
|
||||||
{
|
|
||||||
var fun = _visitPlanService.ConfirmTrialVisitPlan;
|
|
||||||
opt.AuditInfo.NeedSava = false;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 下载访视计划
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/VisitPlan/DownloadInflunceStudyList")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> DownloadInflunceStudyList(DataInspectionDto<IDDto> opt)
|
|
||||||
{
|
|
||||||
var fun = _visitPlanService.DownloadInflunceStudyList;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
#region 访视
|
|
||||||
|
|
||||||
[HttpPost, Route("Inspection/subjectVisit/addOrUpdateSV")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> AddOrUpdateSV(DataInspectionDto<SubjectVisitCommand> opt)
|
|
||||||
{
|
|
||||||
var fun = await _subjectVisitService.AddOrUpdateSV(opt.OptCommand);
|
|
||||||
if (!fun.IsSuccess)
|
|
||||||
{
|
|
||||||
return ResponseOutput.NotOk(fun.ErrorMessage);
|
|
||||||
}
|
|
||||||
opt.AuditInfo.SubjectVisitId = Guid.Parse(fun.Data);
|
|
||||||
opt.AuditInfo.SubjectVisitName = opt.OptCommand.VisitName;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
[HttpPost, Route("Inspection/subjectVisit/SetSubjectVisitUrgent")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> SetSubjectVisitUrgent(DataInspectionDto<SetSubjectVisitUrgentCommand> opt)
|
|
||||||
{
|
|
||||||
|
|
||||||
var fun = await _subjectVisitService.SetSubjectVisitUrgent(opt.OptCommand.SubjectVisitId, opt.OptCommand.isUrgent);
|
|
||||||
if (!fun.IsSuccess)
|
|
||||||
{
|
|
||||||
return ResponseOutput.NotOk(fun.ErrorMessage);
|
|
||||||
}
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
[HttpPost, Route("Inspection/subjectVisit/DeleteSV")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> DeleteSV(DataInspectionDto<DeleteSVCommand> opt)
|
|
||||||
{
|
|
||||||
|
|
||||||
var fun = await _subjectVisitService.DeleteSV(opt.OptCommand.SubjectVisitId);
|
|
||||||
if (!fun.IsSuccess)
|
|
||||||
{
|
|
||||||
return ResponseOutput.NotOk(fun.ErrorMessage);
|
|
||||||
}
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPost, Route("Inspection/subjectVisit/SetSVExecuted")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> SetSVExecuted(DataInspectionDto<DeleteSVCommand> opt)
|
|
||||||
{
|
|
||||||
|
|
||||||
var fun = await _subjectVisitService.SetSVExecuted(opt.OptCommand.SubjectVisitId);
|
|
||||||
if (!fun.IsSuccess)
|
|
||||||
{
|
|
||||||
return ResponseOutput.NotOk(fun.ErrorMessage);
|
|
||||||
}
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
#region 配置项目信息
|
|
||||||
/// <summary>
|
|
||||||
/// 配置 基础逻辑信息
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/configTrialBasicInfo/configTrialBasicInfo")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> ConfigTrialBasicInfo(DataInspectionDto<BasicTrialConfig> opt)
|
|
||||||
{
|
|
||||||
var fun = _trialConfigService.ConfigTrialBasicInfo;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 配置流程
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/configTrialBasicInfo/configTrialProcessInfo")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> ConfigTrialProcessInfo(DataInspectionDto<TrialProcessConfig> opt)
|
|
||||||
{
|
|
||||||
var fun = _trialConfigService.ConfigTrialProcessInfo;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 配置加急信息
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/configTrialBasicInfo/ConfigTrialUrgentInfo")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> ConfigTrialUrgentInfo(DataInspectionDto<TrialUrgentConfig> opt)
|
|
||||||
{
|
|
||||||
var fun = _trialConfigService.ConfigTrialUrgentInfo;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 签名确认
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/configTrialBasicInfo/TrialConfigSignatureConfirm")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> TrialConfigSignatureConfirm(DataInspectionDto<SignConfirmDTO> opt)
|
|
||||||
{
|
|
||||||
var fun = _trialConfigService.TrialConfigSignatureConfirm;
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 配置 基础逻辑信息并确认
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/configTrialBasicInfo/ConfigTrialBasicInfoConfirm")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> ConfigTrialBasicInfoConfirm(DataInspectionDto<BasicTrialConfig> opt)
|
|
||||||
{
|
|
||||||
var data = await _trialConfigService.ConfigTrialBasicInfo(opt.OptCommand);
|
|
||||||
if (!data.IsSuccess)
|
|
||||||
{
|
|
||||||
return ResponseOutput.NotOk(data.ErrorMessage);
|
|
||||||
}
|
|
||||||
var fun = _trialConfigService.TrialConfigSignatureConfirm;
|
|
||||||
return await _inspectionService.Enforcement(new SignConfirmDTO()
|
|
||||||
{
|
|
||||||
TrialId = opt.OptCommand.TrialId,
|
|
||||||
SignCode = opt.OptCommand.SignCode
|
|
||||||
}, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 配置流程并确认
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/configTrialBasicInfo/ConfigTrialProcessInfoConfirm")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> ConfigTrialProcessInfoConfirm(DataInspectionDto<TrialProcessConfig> opt)
|
|
||||||
{
|
|
||||||
var data = await _trialConfigService.ConfigTrialProcessInfo(opt.OptCommand);
|
|
||||||
if (!data.IsSuccess)
|
|
||||||
{
|
|
||||||
return ResponseOutput.NotOk(data.ErrorMessage);
|
|
||||||
}
|
|
||||||
var fun = _trialConfigService.TrialConfigSignatureConfirm;
|
|
||||||
return await _inspectionService.Enforcement(new SignConfirmDTO()
|
|
||||||
{
|
|
||||||
TrialId = opt.OptCommand.TrialId,
|
|
||||||
SignCode = opt.OptCommand.SignCode
|
|
||||||
}, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 配置加急信息并确认
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Inspection/configTrialBasicInfo/ConfigTrialUrgentInfoConfirm")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> ConfigTrialUrgentInfoConfirm(DataInspectionDto<TrialUrgentConfig> opt)
|
|
||||||
{
|
|
||||||
var data = await _trialConfigService.ConfigTrialUrgentInfo(opt.OptCommand);
|
|
||||||
if (!data.IsSuccess)
|
|
||||||
{
|
|
||||||
return ResponseOutput.NotOk(data.ErrorMessage);
|
|
||||||
}
|
|
||||||
var fun = _trialConfigService.TrialConfigSignatureConfirm;
|
|
||||||
return await _inspectionService.Enforcement(new SignConfirmDTO()
|
|
||||||
{
|
|
||||||
TrialId = opt.OptCommand.TrialId,
|
|
||||||
SignCode = opt.OptCommand.SignCode
|
|
||||||
}, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
///// <summary>
|
|
||||||
///// 保存并确认访视计划
|
|
||||||
///// </summary>
|
|
||||||
///// <param name="opt"></param>
|
|
||||||
///// <returns></returns>
|
|
||||||
//[HttpPost, Route("Inspection/VisitPlan/SaveConfirmTrialVisitPlan")]
|
|
||||||
//[UnitOfWork]
|
|
||||||
//public async Task<IResponseOutput> SaveConfirmTrialVisitPlan(DataInspectionDto<VisitPlanCommand> opt)
|
|
||||||
//{
|
|
||||||
// var update = await _visitPlanService.AddOrUpdateVisitStage(opt.OptCommand);
|
|
||||||
// if (!update.IsSuccess)
|
|
||||||
// {
|
|
||||||
// return ResponseOutput.NotOk(update.ErrorMessage);
|
|
||||||
// }
|
|
||||||
// var fun = _visitPlanService.ConfirmTrialVisitPlan;
|
|
||||||
// return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
//}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
#region 受试者
|
|
||||||
/// <summary>
|
|
||||||
/// 添加或更新受试者信息[New]
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
//[TypeFilter(typeof(TrialResourceFilter))]
|
|
||||||
[HttpPost, Route("Inspection/Subject/AddOrUpdateSubject")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> AddOrUpdateSubject(InsSubjectCommand opt)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
opt.AuditInfo.SubjectCode = opt.OptCommand.Code;
|
|
||||||
var fun = await _subjectService.AddOrUpdateSubject(opt.OptCommand);
|
|
||||||
opt.AuditInfo.SubjectId = Guid.Parse(fun.Data);
|
|
||||||
//var statusdata = new
|
|
||||||
//{
|
|
||||||
// Status = "OnVisit",
|
|
||||||
// //OutEnrollmentTime = DateTime.Now.ToString("yyyy-MM-dd"),
|
|
||||||
// //VisitOverTime = DateTime.Now.ToString("yyyy-MM-dd"),
|
|
||||||
// Reason = string.Empty,
|
|
||||||
//};
|
|
||||||
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 修改受试者状态
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
///
|
|
||||||
[HttpPut, Route("Inspection/Subject/UpdateSubjectStatus")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> UpdateSubjectStatus(InsUpdateSubjectStatus opt)
|
|
||||||
{
|
|
||||||
var fun = _subjectService.UpdateSubjectStatus;
|
|
||||||
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 删除受试者
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opt"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpDelete, Route("Inspection/Subject/DeleteSubject")]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> DeleteSubject(InsDeleteSubjectDto opt)
|
|
||||||
{
|
|
||||||
var fun = _subjectService.DeleteSubject;
|
|
||||||
opt.AuditInfo.SubjectCode = opt.OptCommand.Code;
|
|
||||||
var data = await _subjectService.DeleteSubject(opt.OptCommand.SubjectId);
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun, data);
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Converters;
|
using Newtonsoft.Json.Converters;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
@ -192,6 +193,14 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
||||||
public bool setOrCancel { get; set; }
|
public bool setOrCancel { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class UpdateTrialStateDto
|
||||||
|
{
|
||||||
|
public Guid trialId {get; set; }
|
||||||
|
public string trialStatusStr { get; set; }
|
||||||
|
|
||||||
|
public string? reason { get; set; }
|
||||||
|
}
|
||||||
public class QCPassedOrFailedDto
|
public class QCPassedOrFailedDto
|
||||||
{
|
{
|
||||||
public Guid trialId { get; set; }
|
public Guid trialId { get; set; }
|
||||||
|
@ -261,34 +270,17 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
||||||
/// 稽查泛型Dto
|
/// 稽查泛型Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="T">泛型</typeparam>
|
/// <typeparam name="T">泛型</typeparam>
|
||||||
public class DataInspectionDto<T> : IInspectionDTO, ISignDTO
|
public class DataInspectionDto<T>
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public T OptCommand { get; set; }
|
public T Data { get; set; }
|
||||||
|
|
||||||
|
[NotDefault]
|
||||||
|
public Guid SignCodeId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public DataInspectionAddDTO AuditInfo
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (auditInfo.JsonDetail.IsNullOrEmpty())
|
|
||||||
{
|
|
||||||
auditInfo.JsonDetail = JsonConvert.SerializeObject(OptCommand);
|
|
||||||
}
|
|
||||||
|
|
||||||
return auditInfo;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
auditInfo = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private DataInspectionAddDTO auditInfo=new DataInspectionAddDTO ();
|
|
||||||
|
|
||||||
public SignDTO SignInfo { get; set; } = new SignDTO() { };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Qc
|
#region Qc
|
||||||
|
|
|
@ -172,6 +172,17 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||||
//public async Task<string>
|
//public async Task<string>
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 传入参数记录ID
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="SignId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task RecordSing(Guid SignId)
|
||||||
|
{
|
||||||
|
_userInfo.SignId = SignId;
|
||||||
|
await _repository.BatchUpdateAsync<TrialSign>(t => t.Id == SignId, u => new TrialSign() { IsCompleted = true });
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 通用逻辑封装
|
/// 通用逻辑封装
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -20,6 +20,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.Interface
|
||||||
|
|
||||||
Task<Guid> AddSignRecordAsync(SignDTO signDTO);
|
Task<Guid> AddSignRecordAsync(SignDTO signDTO);
|
||||||
|
|
||||||
|
Task RecordSing(Guid SignId);
|
||||||
Task<dynamic> Enforcement(dynamic OptCommand, DataInspectionAddDTO AuditInfo, SignDTO SignInfo, dynamic fun, IResponseOutput? response = null);
|
Task<dynamic> Enforcement(dynamic OptCommand, DataInspectionAddDTO AuditInfo, SignDTO SignInfo, dynamic fun, IResponseOutput? response = null);
|
||||||
|
|
||||||
//Task SetEnum(DataInspectionAddDTO Data);
|
//Task SetEnum(DataInspectionAddDTO Data);
|
||||||
|
|
|
@ -39,6 +39,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
Task<IResponseOutput> UploadVisitCheckExcel(IFormFile file, Guid trialId);
|
Task<IResponseOutput> UploadVisitCheckExcel(IFormFile file, Guid trialId);
|
||||||
Task<IResponseOutput> VerifyCanQCPassedOrFailed(Guid subjectVisitId);
|
Task<IResponseOutput> VerifyCanQCPassedOrFailed(Guid subjectVisitId);
|
||||||
|
|
||||||
|
|
||||||
Task<IResponseOutput> ForwardSVDicomImage(Guid[] subjectVisitIdList);
|
Task<IResponseOutput> ForwardSVDicomImage(Guid[] subjectVisitIdList);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue