using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using AutoMapper; using Castle.Core.Internal; using IRaCIS.Application.Contracts; using IRaCIS.Application.Interfaces; using IRaCIS.Core.Application.Contracts; using IRaCIS.Core.Application.Contracts.DTO; using IRaCIS.Core.Application.Filter; using IRaCIS.Core.Application.Image.QA; using IRaCIS.Core.Application.Interfaces; using IRaCIS.Core.Application.Service.Inspection.DTO; using IRaCIS.Core.Application.Service.Inspection.Interface; using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Infra.EFCore; using IRaCIS.Core.Infrastructure.Extention; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; namespace IRaCIS.Core.API.Controllers { [ApiController, ApiExplorerSettings(GroupName = "Reviewer")] [UnitOfWork] public class InspectionController : ControllerBase { private readonly IRepository _repository; private readonly IMapper _mapper; private readonly IUserInfo _userInfo; private readonly ITrialDocumentService _trialDocumentService; private readonly IQCListService _qCListService; private readonly ITrialConfigService _trialConfigService; private readonly INoneDicomStudyService _noneDicomStudyService; private readonly ISubjectService _subjectService; private readonly ISubjectVisitService _subjectVisitService; private readonly IQCOperationService _qCOperationService; private readonly IClinicalDataService _clinicalDataService; private readonly IVisitPlanService _visitPlanService; private readonly IInspectionService _inspectionService; private readonly IRepository _dataInspectionRepository; private delegate Task executionFun(dynamic data); public InspectionController(IRepository repository, IRepository _repositoryDataInspection, IMapper mapper, IUserInfo userInfo, ITrialDocumentService trialDocumentService, IRepository dataInspectionRepository, IQCListService _qCListService, IInspectionService sinspectionService, ITrialConfigService _trialConfigService, INoneDicomStudyService noneDicomStudyService, ISubjectService _subjectService, ISubjectVisitService subjectVisitService, IQCOperationService qCOperationService, IClinicalDataService clinicalDataService, IVisitPlanService visitPlanService ) { this._repository = repository; this._mapper = mapper; this._userInfo = userInfo; this._inspectionService = sinspectionService; this._trialDocumentService = trialDocumentService; this._qCListService = _qCListService; this._trialConfigService = _trialConfigService; this._noneDicomStudyService = noneDicomStudyService; this._subjectService = _subjectService; this._subjectVisitService = subjectVisitService; this._qCOperationService = qCOperationService; this._clinicalDataService = clinicalDataService; this._visitPlanService = visitPlanService; this._dataInspectionRepository = dataInspectionRepository; } #region 获取稽查数据 /// /// 获取稽查数据 /// /// [HttpPost, Route("Inspection/GetInspectionData")] public async Task> GetInspectionData(GetDataInspectionDto dto) { return await _inspectionService.GetInspectionData(dto); } #endregion #region 影像质疑 /// /// 手动领取 或者取消 QC任务 /// /// /// [HttpPost, Route("Inspection/QCOperation/ObtainOrCancelQCTask")] [UnitOfWork] public async Task ObtainOrCancelQCTask(DataInspectionDto opt) { var fun = await _qCOperationService.ObtainOrCancelQCTask(opt.OptCommand.trialId, opt.OptCommand.subjectVisitId, opt.OptCommand.obtaionOrCancel); if (!fun.IsSuccess) { return ResponseOutput.NotOk(fun.ErrorMessage); } return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun); } /// /// 添加或者更新 QC核对问题列表 /// /// /// [HttpPost, Route("Inspection/QCOperation/AddOrUpdateQCQuestionAnswerList")] [UnitOfWork] public async Task AddOrUpdateQCQuestionAnswerList(DataInspectionDto opt) { var fun = await _qCOperationService.AddOrUpdateQCQuestionAnswerList(opt.OptCommand.qcQuestionAnswerCommands, opt.OptCommand.trialId, opt.OptCommand.subjectVisitId,opt.OptCommand.trialQCProcess,opt.OptCommand.currentQCType); if (!fun.IsSuccess) { return ResponseOutput.NotOk(fun.ErrorMessage); } return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun); } /// /// 添加和更新质疑 /// [HttpPost, Route("Inspection/QCOperation/AddOrUpdateQCChallenge")] [UnitOfWork] public async Task AddOrUpdateQCChallenge(DataInspectionDto opt) { var fun = await _qCOperationService.AddOrUpdateQCChallenge(opt.OptCommand.qaQuestionCommand, opt.OptCommand.trialId, opt.OptCommand.trialQCProcess, opt.OptCommand.currentQCType); if (!fun.IsSuccess) { return ResponseOutput.NotOk(fun.ErrorMessage); } return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun); } /// /// 回复质疑 /// [HttpPost, Route("Inspection/QCOperation/AddQCChallengeReply")] [UnitOfWork] public async Task AddQCChallengeReply(DataInspectionDto opt) { var fun = _qCOperationService.AddQCChallengeReply; return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); } /// /// 关闭质疑 /// [HttpPost, Route("Inspection/QCOperation/CloseQCChallenge")] [UnitOfWork] public async Task CloseQCChallenge(DataInspectionDto opt) { var fun = await _qCOperationService.CloseQCChallenge(opt.OptCommand.qcChallengeId, opt.OptCommand.subjectVisitId, opt.OptCommand.closeEnum, opt.OptCommand.closeReason); if (!fun.IsSuccess) { return ResponseOutput.NotOk(fun.ErrorMessage); } return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun); } /// /// 删除QC质疑记录 /// /// /// [HttpPost, Route("Inspection/QCOperation/DeleteQCChallenge")] [UnitOfWork] public async Task DeleteQCChallenge(DataInspectionDto opt) { var fun = _qCOperationService.DeleteQCChallenge; return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun); } /// /// 一致性核查 质疑的添加/回复 /// [HttpPost, Route("Inspection/QCOperation/AddCheckChallengeReply")] [UnitOfWork] public async Task AddCheckChallengeReply(DataInspectionDto opt) { var fun = _qCOperationService.AddCheckChallengeReply; return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); } /// /// 删除QC质疑记录 /// /// /// [HttpPost, Route("Inspection/QCOperation/CloseCheckChallenge")] [UnitOfWork] public async Task CloseCheckChallenge(DataInspectionDto opt) { var fun = _qCOperationService.CloseCheckChallenge; return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun); } /// /// 手动设置一致性核查通过 /// [HttpPost, Route("Inspection/QCOperation/SetCheckPass")] [UnitOfWork] public async Task SetCheckPass(DataInspectionDto opt) { var fun = _qCOperationService.SetCheckPass; return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun); } /// /// CRC 请求回退 /// [HttpPost, Route("Inspection/QCOperation/CRCRequstCheckBack")] [UnitOfWork] public async Task CRCRequstCheckBack(DataInspectionDto opt) { var fun = _qCOperationService.CRCRequstCheckBack; return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun); } /// /// 一致性核查 回退 对话记录不清除 只允许PM回退 /// [HttpPost, Route("Inspection/QCOperation/CheckBack")] [UnitOfWork] public async Task CheckBack(DataInspectionDto opt) { var fun = _qCOperationService.CheckBack; return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun); } #endregion #region 影像上传 /// /// 疾病进展确认评估 /// /// /// [HttpPost, Route("Inspection/QCOperation/UpdateSubjectAndSVInfo")] [UnitOfWork] public async Task UpdateSubjectAndSVInfo(DataInspectionDto opt) { var fun = _qCOperationService.UpdateSubjectAndSVInfo; return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); } /// /// 删除影像 /// /// /// [HttpPost, Route("Inspection/QCOperation/deleteStudyList")] [UnitOfWork] public async Task deleteStudyList(DataInspectionDto opt) { var fun = await _qCOperationService.DeleteStudyList(opt.OptCommand.ids, opt.OptCommand.subjectVisitId, opt.OptCommand.trialId); if (!fun.IsSuccess) { return ResponseOutput.NotOk(fun.ErrorMessage); } return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo,null, fun); } /// /// CRC RequestToQC 批量提交 /// /// /// [HttpPost, Route("Inspection/QCOperation/CRCRequestToQC")] [UnitOfWork] public async Task CRCRequestToQC(DataInspectionDto opt) { var fun = _qCOperationService.CRCRequestToQC; return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); } /// /// 非DICOM影像新增编辑 /// /// /// [HttpPost, Route("Inspection/noneDicomStudy/AddOrUpdateNoneDicomStudy")] [UnitOfWork] public async Task AddOrUpdateNoneDicomStudy(DataInspectionDto opt) { var fun = await _noneDicomStudyService.AddOrUpdateNoneDicomStudy(opt.OptCommand); if (!fun.IsSuccess) { return ResponseOutput.NotOk(fun.ErrorMessage); } if (opt.OptCommand.Id == null) { Dictionary keyValuePairs = new Dictionary(); 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); } /// /// 删除非dicom /// /// /// [HttpPost, Route("Inspection/noneDicom/DeleteNoneDicomStudy")] [UnitOfWork] public async Task DeleteNoneDicomStudy(DataInspectionDto opt) { var fun = _noneDicomStudyService.DeleteNoneDicomStudy; opt.AuditInfo.GeneralId = opt.OptCommand.Id; return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun); } /// /// 删除非dicom文件 /// /// /// [HttpPost, Route("Inspection/noneDicom/deleteNoneDicomStudyFile")] [UnitOfWork] public async Task deleteNoneDicomStudyFile(DataInspectionDto 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 /// /// 新增或修改既往放疗史 /// /// /// [HttpPost, Route("Inspection/clinicalData/AddOrUpdatePreviousHistory")] [UnitOfWork] public async Task AddOrUpdatePreviousHistory(DataInspectionDto 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); } /// /// 删除既往放疗史 /// /// /// [HttpPost, Route("Inspection/clinicalData/DeletePreviousHistory")] [UnitOfWork] public async Task DeletePreviousHistory(DataInspectionDto opt) { var fun = _clinicalDataService.DeletePreviousHistory; opt.AuditInfo.GeneralId = opt.OptCommand.Id; return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun); } /// /// 新增或修改既往手术史 /// /// /// [HttpPost, Route("Inspection/clinicalData/AddOrUpdatePreviousSurgery")] [UnitOfWork] public async Task AddOrUpdatePreviousSurgery(DataInspectionDto 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); } /// /// 删除既往手术史 /// /// /// [HttpPost, Route("Inspection/clinicalData/DeletePreviousSurgery")] [UnitOfWork] public async Task DeletePreviousSurgery(DataInspectionDto opt) { var fun = _clinicalDataService.DeletePreviousSurgery; opt.AuditInfo.GeneralId = opt.OptCommand.Id; return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun); } /// /// 新增或修改既往其他治疗史 /// /// /// [HttpPost, Route("Inspection/clinicalData/AddOrUpdatePreviousOther")] [UnitOfWork] public async Task AddOrUpdatePreviousOther(DataInspectionDto 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); } /// /// 删除既往其他治疗史 /// /// /// [HttpPost, Route("Inspection/clinicalData/DeletePreviousOther")] [UnitOfWork] public async Task DeletePreviousOther(DataInspectionDto 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 访视计划 /// /// 新增或添加访视计划 /// /// /// [HttpPost, Route("Inspection/VisitPlan/AddOrUpdateVisitStage")] [UnitOfWork] public async Task AddOrUpdateVisitStage(DataInspectionDto opt) { var fun = await _visitPlanService.AddOrUpdateVisitStage(opt.OptCommand); if (!fun.IsSuccess) { return ResponseOutput.NotOk(fun.ErrorMessage); } opt.OptCommand.Id = Guid.Parse(fun.Data); return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun); } /// /// 删除访视计划对象 /// /// /// [HttpPost, Route("Inspection/VisitPlan/DeleteVisitStage")] [UnitOfWork] public async Task DeleteVisitStage(DataInspectionDto opt) { var fun = _visitPlanService.DeleteVisitStage; return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun); } /// /// 确认访视计划 /// /// /// [HttpPost, Route("Inspection/VisitPlan/ConfirmTrialVisitPlan")] [UnitOfWork] public async Task ConfirmTrialVisitPlan(DataInspectionDto opt) { var fun = _visitPlanService.ConfirmTrialVisitPlan; return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun); } /// /// 下载访视计划 /// /// /// [HttpPost, Route("Inspection/VisitPlan/DownloadInflunceStudyList")] [UnitOfWork] public async Task DownloadInflunceStudyList(DataInspectionDto 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 AddOrUpdateSV(DataInspectionDto 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 SetSubjectVisitUrgent(DataInspectionDto 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 DeleteSV(DataInspectionDto 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 SetSVExecuted(DataInspectionDto 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 配置项目信息 /// /// 配置 基础逻辑信息 /// /// /// [HttpPost, Route("Inspection/configTrialBasicInfo/configTrialBasicInfo")] [UnitOfWork] public async Task ConfigTrialBasicInfo(DataInspectionDto opt) { var fun = _trialConfigService.ConfigTrialBasicInfo; return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); } /// /// 配置流程 /// /// /// [HttpPost, Route("Inspection/configTrialBasicInfo/configTrialProcessInfo")] [UnitOfWork] public async Task ConfigTrialProcessInfo(DataInspectionDto opt) { var fun = _trialConfigService.ConfigTrialProcessInfo; return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); } /// /// 配置加急信息 /// /// /// [HttpPost, Route("Inspection/configTrialBasicInfo/ConfigTrialUrgentInfo")] [UnitOfWork] public async Task ConfigTrialUrgentInfo(DataInspectionDto opt) { var fun = _trialConfigService.ConfigTrialUrgentInfo; return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); } /// /// 签名确认 /// /// 签名确认 /// [HttpPost, Route("Inspection/configTrialBasicInfo/TrialConfigSignatureConfirm")] [UnitOfWork] public async Task TrialConfigSignatureConfirm(DataInspectionDto opt) { var fun = _trialConfigService.TrialConfigSignatureConfirm; return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); } /// /// 配置 基础逻辑信息并确认 /// /// /// [HttpPost, Route("Inspection/configTrialBasicInfo/ConfigTrialBasicInfoConfirm")] [UnitOfWork] public async Task ConfigTrialBasicInfoConfirm(DataInspectionDto 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); } /// /// 配置流程并确认 /// /// /// [HttpPost, Route("Inspection/configTrialBasicInfo/ConfigTrialProcessInfoConfirm")] [UnitOfWork] public async Task ConfigTrialProcessInfoConfirm(DataInspectionDto 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); } /// /// 配置加急信息并确认 /// /// /// [HttpPost, Route("Inspection/configTrialBasicInfo/ConfigTrialUrgentInfoConfirm")] [UnitOfWork] public async Task ConfigTrialUrgentInfoConfirm(DataInspectionDto 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); } /// /// 保存并确认访视计划 /// /// /// [HttpPost, Route("Inspection/VisitPlan/SaveConfirmTrialVisitPlan")] [UnitOfWork] public async Task SaveConfirmTrialVisitPlan(DataInspectionDto 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 受试者 /// /// 添加或更新受试者信息[New] /// /// /// //[TypeFilter(typeof(TrialResourceFilter))] [HttpPost, Route("Inspection/Subject/AddOrUpdateSubject")] [UnitOfWork] public async Task 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); } /// /// 修改受试者状态 /// /// /// /// [HttpPut, Route("Inspection/Subject/UpdateSubjectStatus")] [UnitOfWork] public async Task UpdateSubjectStatus(InsUpdateSubjectStatus opt) { var fun = _subjectService.UpdateSubjectStatus; return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); } /// /// 删除受试者 /// /// /// [HttpDelete, Route("Inspection/Subject/DeleteSubject")] [UnitOfWork] public async Task 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 } }