提交 修改
parent
2f3a67ba17
commit
88117a84f7
|
@ -120,6 +120,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk(fun.ErrorMessage);
|
return ResponseOutput.NotOk(fun.ErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo,null, fun);
|
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo,null, fun);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,10 +156,11 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
if (opt.OptCommand.Id == null)
|
if (opt.OptCommand.Id == null)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
|
Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
|
||||||
keyValuePairs.Add("CodeView", fun.Data);
|
keyValuePairs.Add("CodeView", fun.Data.StudyCode);
|
||||||
opt.AuditInfo.JsonDetail = _inspectionService.AddJsonItem(opt.AuditInfo.JsonDetail, keyValuePairs);
|
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);
|
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo,null, fun);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,6 +175,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
public async Task<IResponseOutput> DeleteNoneDicomStudy(DataInspectionDto<IDDto> opt)
|
public async Task<IResponseOutput> DeleteNoneDicomStudy(DataInspectionDto<IDDto> opt)
|
||||||
{
|
{
|
||||||
var fun = _noneDicomStudyService.DeleteNoneDicomStudy;
|
var fun = _noneDicomStudyService.DeleteNoneDicomStudy;
|
||||||
|
opt.AuditInfo.GeneralId = opt.OptCommand.Id;
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,6 +191,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
public async Task<IResponseOutput> deleteNoneDicomStudyFile(DataInspectionDto<IDDto> opt)
|
public async Task<IResponseOutput> deleteNoneDicomStudyFile(DataInspectionDto<IDDto> opt)
|
||||||
{
|
{
|
||||||
var fun = _noneDicomStudyService.DeleteNoneDicomStudyFile;
|
var fun = _noneDicomStudyService.DeleteNoneDicomStudyFile;
|
||||||
|
opt.AuditInfo.GeneralId = opt.OptCommand.Id;
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,9 +208,9 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task<IResponseOutput> AddOrUpdatePreviousHistory(DataInspectionDto<PreviousHistoryAddOrEdit> opt)
|
public async Task<IResponseOutput> AddOrUpdatePreviousHistory(DataInspectionDto<PreviousHistoryAddOrEdit> opt)
|
||||||
{
|
{
|
||||||
|
var fun = await _clinicalDataService.AddOrUpdatePreviousHistory(opt.OptCommand);
|
||||||
var fun = _clinicalDataService.AddOrUpdatePreviousHistory;
|
opt.AuditInfo.GeneralId = fun.Data;
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo,null, fun);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -220,6 +224,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
public async Task<IResponseOutput> DeletePreviousHistory(DataInspectionDto<IDDto> opt)
|
public async Task<IResponseOutput> DeletePreviousHistory(DataInspectionDto<IDDto> opt)
|
||||||
{
|
{
|
||||||
var fun = _clinicalDataService.DeletePreviousHistory;
|
var fun = _clinicalDataService.DeletePreviousHistory;
|
||||||
|
opt.AuditInfo.GeneralId = opt.OptCommand.Id;
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,9 +240,9 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task<IResponseOutput> AddOrUpdatePreviousSurgery(DataInspectionDto<PreviousSurgeryAddOrEdit> opt)
|
public async Task<IResponseOutput> AddOrUpdatePreviousSurgery(DataInspectionDto<PreviousSurgeryAddOrEdit> opt)
|
||||||
{
|
{
|
||||||
|
var fun = await _clinicalDataService.AddOrUpdatePreviousSurgery(opt.OptCommand);
|
||||||
var fun = _clinicalDataService.AddOrUpdatePreviousSurgery;
|
opt.AuditInfo.GeneralId = fun.Data;
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo,null, fun);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -250,8 +255,8 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task<IResponseOutput> DeletePreviousSurgery(DataInspectionDto<IDDto> opt)
|
public async Task<IResponseOutput> DeletePreviousSurgery(DataInspectionDto<IDDto> opt)
|
||||||
{
|
{
|
||||||
|
|
||||||
var fun = _clinicalDataService.DeletePreviousSurgery;
|
var fun = _clinicalDataService.DeletePreviousSurgery;
|
||||||
|
opt.AuditInfo.GeneralId = opt.OptCommand.Id;
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,9 +270,9 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task<IResponseOutput> AddOrUpdatePreviousOther(DataInspectionDto<PreviousOtherAddOrEdit> opt)
|
public async Task<IResponseOutput> AddOrUpdatePreviousOther(DataInspectionDto<PreviousOtherAddOrEdit> opt)
|
||||||
{
|
{
|
||||||
|
var fun = await _clinicalDataService.AddOrUpdatePreviousOther(opt.OptCommand);
|
||||||
var fun = _clinicalDataService.AddOrUpdatePreviousOther;
|
opt.AuditInfo.GeneralId = fun.Data;
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo,null, fun);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -282,6 +287,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
{
|
{
|
||||||
|
|
||||||
var fun = _clinicalDataService.DeletePreviousOther;
|
var fun = _clinicalDataService.DeletePreviousOther;
|
||||||
|
opt.AuditInfo.GeneralId = opt.OptCommand.Id;
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -95,7 +95,13 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
||||||
/// 访视计划ID
|
/// 访视计划ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid? VisitStageId { get; set; }
|
public Guid? VisitStageId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 通用ID
|
||||||
|
/// </summary>
|
||||||
|
public Guid? GeneralId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
////需要单独处理
|
////需要单独处理
|
||||||
|
|
|
@ -278,7 +278,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||||
await SetEnum(addDto);
|
await SetEnum(addDto);
|
||||||
var add = _mapper.Map<DataInspection>(addDto);
|
var add = _mapper.Map<DataInspection>(addDto);
|
||||||
Guid? parentId = null;
|
Guid? parentId = null;
|
||||||
parentId = (await _repository.GetQueryable<DataInspection>().Where( x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId&&x.ChildrenType==add.ChildrenType && x.ObjectType==add.ObjectType&&x.VisitStageId==add.VisitStageId).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id;
|
parentId = (await _repository.GetQueryable<DataInspection>().Where( x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId&&x.ChildrenType==add.ChildrenType && x.ObjectType==add.ObjectType&&x.VisitStageId==add.VisitStageId&&x.GeneralId==add.GeneralId).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id;
|
||||||
add.ParentId = parentId;
|
add.ParentId = parentId;
|
||||||
add.CreateTime = DateTime.Now;
|
add.CreateTime = DateTime.Now;
|
||||||
add.CreateUserId = _userInfo.Id;
|
add.CreateUserId = _userInfo.Id;
|
||||||
|
@ -319,7 +319,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||||
|
|
||||||
foreach (var add in datas)
|
foreach (var add in datas)
|
||||||
{
|
{
|
||||||
add.ParentId = (await _repository.GetQueryable<DataInspection>().Where(x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId && x.ChildrenType == add.ChildrenType && x.ObjectType == add.ObjectType&&x.VisitStageId==add.VisitStageId).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id;
|
add.ParentId = (await _repository.GetQueryable<DataInspection>().Where(x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId && x.ChildrenType == add.ChildrenType && x.ObjectType == add.ObjectType&&x.VisitStageId==add.VisitStageId&& x.GeneralId == add.GeneralId).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id;
|
||||||
add.CreateUserId = _userInfo.Id;
|
add.CreateUserId = _userInfo.Id;
|
||||||
add.IP = _userInfo.IP;
|
add.IP = _userInfo.IP;
|
||||||
await SetInspectionNameValue(add);
|
await SetInspectionNameValue(add);
|
||||||
|
|
|
@ -155,7 +155,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost("{trialId:guid}")]
|
[HttpPost("{trialId:guid}")]
|
||||||
public async Task<IResponseOutput> AddOrUpdatePreviousHistory(PreviousHistoryAddOrEdit addOrEditPreviousHistory)
|
public async Task<IResponseOutput<Guid>> AddOrUpdatePreviousHistory(PreviousHistoryAddOrEdit addOrEditPreviousHistory)
|
||||||
{
|
{
|
||||||
|
|
||||||
var entity = await _previousHistoryRepository.InsertOrUpdateAsync(addOrEditPreviousHistory, true);
|
var entity = await _previousHistoryRepository.InsertOrUpdateAsync(addOrEditPreviousHistory, true);
|
||||||
|
@ -180,7 +180,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
|
|
||||||
[HttpPost("{trialId:guid}")]
|
[HttpPost("{trialId:guid}")]
|
||||||
public async Task<IResponseOutput> AddOrUpdatePreviousOther(PreviousOtherAddOrEdit addOrEditPreviousOther)
|
public async Task<IResponseOutput<Guid>> AddOrUpdatePreviousOther(PreviousOtherAddOrEdit addOrEditPreviousOther)
|
||||||
{
|
{
|
||||||
var entity = await _previousOtherRepository.InsertOrUpdateAsync(addOrEditPreviousOther, true);
|
var entity = await _previousOtherRepository.InsertOrUpdateAsync(addOrEditPreviousOther, true);
|
||||||
return ResponseOutput.Ok(entity.Id);
|
return ResponseOutput.Ok(entity.Id);
|
||||||
|
@ -205,7 +205,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost("{trialId:guid}")]
|
[HttpPost("{trialId:guid}")]
|
||||||
public async Task<IResponseOutput> AddOrUpdatePreviousSurgery(PreviousSurgeryAddOrEdit addOrEditPreviousSurgery)
|
public async Task<IResponseOutput<Guid>> AddOrUpdatePreviousSurgery(PreviousSurgeryAddOrEdit addOrEditPreviousSurgery)
|
||||||
{
|
{
|
||||||
|
|
||||||
var entity = await _previousSurgeryRepository.InsertOrUpdateAsync(addOrEditPreviousSurgery, true);
|
var entity = await _previousSurgeryRepository.InsertOrUpdateAsync(addOrEditPreviousSurgery, true);
|
||||||
|
|
|
@ -63,6 +63,12 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class NoneDicomStudyAddReturnDto
|
||||||
|
{
|
||||||
|
public Guid Id{ get; set; }
|
||||||
|
public string StudyCode { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,10 +12,10 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
{
|
{
|
||||||
public interface IClinicalDataService
|
public interface IClinicalDataService
|
||||||
{
|
{
|
||||||
Task<IResponseOutput> AddOrUpdatePreviousHistory(PreviousHistoryAddOrEdit addOrEditPreviousHistory);
|
Task<IResponseOutput<Guid>> AddOrUpdatePreviousHistory(PreviousHistoryAddOrEdit addOrEditPreviousHistory);
|
||||||
Task<IResponseOutput> AddOrUpdatePreviousOther(PreviousOtherAddOrEdit addOrEditPreviousOther);
|
Task<IResponseOutput<Guid>> AddOrUpdatePreviousOther(PreviousOtherAddOrEdit addOrEditPreviousOther);
|
||||||
Task<IResponseOutput> AddOrUpdatePreviousPDF(PreviousPDFAddOrEdit addOrEditPreviousPDF);
|
Task<IResponseOutput> AddOrUpdatePreviousPDF(PreviousPDFAddOrEdit addOrEditPreviousPDF);
|
||||||
Task<IResponseOutput> AddOrUpdatePreviousSurgery(PreviousSurgeryAddOrEdit addOrEditPreviousSurgery);
|
Task<IResponseOutput<Guid>> AddOrUpdatePreviousSurgery(PreviousSurgeryAddOrEdit addOrEditPreviousSurgery);
|
||||||
Task<IResponseOutput> DeletePreviousHistory(Guid previousHistoryId);
|
Task<IResponseOutput> DeletePreviousHistory(Guid previousHistoryId);
|
||||||
Task<IResponseOutput> DeletePreviousOther(Guid previousOtherId);
|
Task<IResponseOutput> DeletePreviousOther(Guid previousOtherId);
|
||||||
Task<IResponseOutput> DeletePreviousPDF(Guid previousPDFId);
|
Task<IResponseOutput> DeletePreviousPDF(Guid previousPDFId);
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
{
|
{
|
||||||
public interface INoneDicomStudyService
|
public interface INoneDicomStudyService
|
||||||
{
|
{
|
||||||
Task<IResponseOutput<string>> AddOrUpdateNoneDicomStudy(NoneDicomStudyAddOrEdit addOrEditNoneDicomStudy);
|
Task<IResponseOutput<NoneDicomStudyAddReturnDto>> AddOrUpdateNoneDicomStudy(NoneDicomStudyAddOrEdit addOrEditNoneDicomStudy);
|
||||||
Task<IResponseOutput> DeleteNoneDicomStudy(Guid noneDicomStudyId);
|
Task<IResponseOutput> DeleteNoneDicomStudy(Guid noneDicomStudyId);
|
||||||
Task<IResponseOutput> DeleteNoneDicomStudyFile(Guid noneDicomStudyFileId);
|
Task<IResponseOutput> DeleteNoneDicomStudyFile(Guid noneDicomStudyFileId);
|
||||||
Task<List<NoneDicomStudyFileView>> GetNoneDicomStudyFileList(Guid noneDicomStudyId);
|
Task<List<NoneDicomStudyFileView>> GetNoneDicomStudyFileList(Guid noneDicomStudyId);
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
[TypeFilter(typeof(TrialResourceFilter))]
|
[TypeFilter(typeof(TrialResourceFilter))]
|
||||||
public async Task<IResponseOutput<string>> AddOrUpdateNoneDicomStudy(NoneDicomStudyAddOrEdit addOrEditNoneDicomStudy)
|
public async Task<IResponseOutput<NoneDicomStudyAddReturnDto>> AddOrUpdateNoneDicomStudy(NoneDicomStudyAddOrEdit addOrEditNoneDicomStudy)
|
||||||
{
|
{
|
||||||
var entity = await _noneDicomStudyRepository.InsertOrUpdateAsync(addOrEditNoneDicomStudy, false);
|
var entity = await _noneDicomStudyRepository.InsertOrUpdateAsync(addOrEditNoneDicomStudy, false);
|
||||||
|
|
||||||
|
@ -89,8 +89,12 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
await _repository.SaveChangesAsync();
|
await _repository.SaveChangesAsync();
|
||||||
|
|
||||||
|
NoneDicomStudyAddReturnDto noneDicom = new NoneDicomStudyAddReturnDto()
|
||||||
return ResponseOutput.Ok(entity.StudyCode);
|
{
|
||||||
|
StudyCode= entity.StudyCode,
|
||||||
|
Id= entity.Id
|
||||||
|
};
|
||||||
|
return ResponseOutput.Ok(noneDicom);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -965,6 +965,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
SubjectId = x.SubjectId,
|
SubjectId = x.SubjectId,
|
||||||
TrialId = x.TrialId,
|
TrialId = x.TrialId,
|
||||||
SubjectVisitId=x.SubjectVisitId,
|
SubjectVisitId=x.SubjectVisitId,
|
||||||
|
GeneralId=x.Id,
|
||||||
JsonDetail = JsonConvert.SerializeObject(new
|
JsonDetail = JsonConvert.SerializeObject(new
|
||||||
{
|
{
|
||||||
studyUid=x.StudyCode,
|
studyUid=x.StudyCode,
|
||||||
|
|
|
@ -154,6 +154,11 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid? VisitStageId { get; set; }
|
public Guid? VisitStageId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 通用Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid? GeneralId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue