Uat_Study
parent
1eac030958
commit
9741b7a438
|
@ -35,6 +35,7 @@ namespace IRaCIS.Api.Controllers
|
||||||
private readonly IStudyService _studyService;
|
private readonly IStudyService _studyService;
|
||||||
private readonly IDicomArchiveService _dicomArchiveService;
|
private readonly IDicomArchiveService _dicomArchiveService;
|
||||||
private readonly ILogger<StudyController> _logger;
|
private readonly ILogger<StudyController> _logger;
|
||||||
|
private readonly IDictionaryService _dictionaryService;
|
||||||
private readonly IInspectionService _inspectionService;
|
private readonly IInspectionService _inspectionService;
|
||||||
private IEasyCachingProvider _provider;
|
private IEasyCachingProvider _provider;
|
||||||
private IUserInfo _userInfo;
|
private IUserInfo _userInfo;
|
||||||
|
@ -44,6 +45,7 @@ namespace IRaCIS.Api.Controllers
|
||||||
public StudyController(IStudyService studyService,
|
public StudyController(IStudyService studyService,
|
||||||
IDicomArchiveService dicomArchiveService,
|
IDicomArchiveService dicomArchiveService,
|
||||||
ILogger<StudyController> logger,
|
ILogger<StudyController> logger,
|
||||||
|
IDictionaryService dictionaryService,
|
||||||
IInspectionService inspectionService,
|
IInspectionService inspectionService,
|
||||||
IEasyCachingProvider provider, IUserInfo userInfo
|
IEasyCachingProvider provider, IUserInfo userInfo
|
||||||
)
|
)
|
||||||
|
@ -53,6 +55,7 @@ namespace IRaCIS.Api.Controllers
|
||||||
_studyService = studyService;
|
_studyService = studyService;
|
||||||
_dicomArchiveService = dicomArchiveService;
|
_dicomArchiveService = dicomArchiveService;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
|
this._dictionaryService = dictionaryService;
|
||||||
this._inspectionService = inspectionService;
|
this._inspectionService = inspectionService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,7 +240,7 @@ namespace IRaCIS.Api.Controllers
|
||||||
Identification = "Edit|Visit|Status|Visit-Image Upload|Add Image",
|
Identification = "Edit|Visit|Status|Visit-Image Upload|Add Image",
|
||||||
JsonDetail = JsonConvert.SerializeObject(new
|
JsonDetail = JsonConvert.SerializeObject(new
|
||||||
{
|
{
|
||||||
SubmitState = "待提交",
|
SubmitState = await _dictionaryService.GetBasicDataTranslateItem("SubmitState", savedInfo.SubmitState),
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
using IRaCIS.Application.Contracts;
|
using IRaCIS.Application.Contracts;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -134,12 +135,45 @@ namespace IRaCIS.Application.Services
|
||||||
return searchList;
|
return searchList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
public async Task<BasicDicView> GetBasicDataTranslateItem(string parentCode, string childCode)
|
/// 获取是和否
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="value"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<string> GetBoolValueState(bool value)
|
||||||
{
|
{
|
||||||
return (await _dicRepository.Where(t => t.Parent.Code == parentCode && t.Code == childCode)
|
return await _dicRepository.Where(t => t.Parent.Code == "YesOrNo" && t.Code == value.ToString()).Select(x => x.ValueCN).FirstOrDefaultAsync() ?? string.Empty;
|
||||||
.ProjectTo<BasicDicView>(_mapper.ConfigurationProvider).FirstOrDefaultAsync())
|
}
|
||||||
.IfNullThrowConvertException();
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取审核状态
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T"></typeparam>
|
||||||
|
/// <param name="trial"></param>
|
||||||
|
/// <param name="childCode"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<string> GetAuditState<T>(Guid trial, T childCode)
|
||||||
|
{
|
||||||
|
var QCProcessEnum = _trialRepository.Where(x=>x.Id==trial).Select(x => x.QCProcessEnum).FirstOrDefault();
|
||||||
|
switch (QCProcessEnum)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
case TrialQCProcess.SingleAudit:
|
||||||
|
return await _dicRepository.Where(t => t.Parent.Code == "AuditStatePE" && t.Code == Convert.ToInt32(childCode).ToString()).Select(x => x.ValueCN).FirstOrDefaultAsync() ?? string.Empty;
|
||||||
|
|
||||||
|
case TrialQCProcess.DoubleAudit:
|
||||||
|
return await _dicRepository.Where(t => t.Parent.Code == "AuditStateRC" && t.Code == Convert.ToInt32(childCode).ToString()).Select(x => x.ValueCN).FirstOrDefaultAsync() ?? string.Empty;
|
||||||
|
default:
|
||||||
|
return string.Empty;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<string> GetBasicDataTranslateItem<T>(string parentCode, T childCode)
|
||||||
|
{
|
||||||
|
return await _dicRepository.Where(t => t.Parent.Code == parentCode && t.Code == Convert.ToInt32(childCode).ToString() ).Select(x => x.ValueCN).FirstOrDefaultAsync()??string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -8,6 +8,30 @@ namespace IRaCIS.Application.Interfaces
|
||||||
{
|
{
|
||||||
public interface IDictionaryService
|
public interface IDictionaryService
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取是和否
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="value"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<string> GetBoolValueState(bool value);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取审核状态
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T"></typeparam>
|
||||||
|
/// <param name="trial"></param>
|
||||||
|
/// <param name="childCode"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<string> GetAuditState<T>(Guid trial, T childCode);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取枚举翻译
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T"></typeparam>
|
||||||
|
/// <param name="parentCode"></param>
|
||||||
|
/// <param name="childCode"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<string> GetBasicDataTranslateItem<T>(string parentCode, T childCode);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
public Guid SubjectVisitId { get; set; }
|
public Guid SubjectVisitId { get; set; }
|
||||||
|
|
||||||
|
public SubmitStateEnum SubmitState { get; set; }
|
||||||
|
|
||||||
//public string SubjectName => LastName + " / " + FirstName;
|
//public string SubjectName => LastName + " / " + FirstName;
|
||||||
//public string FirstName { get; set; } = string.Empty;
|
//public string FirstName { get; set; } = string.Empty;
|
||||||
//public string LastName { get; set; } = string.Empty;
|
//public string LastName { get; set; } = string.Empty;
|
||||||
|
|
|
@ -13,6 +13,7 @@ using Newtonsoft.Json;
|
||||||
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
||||||
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
||||||
using Nito.AsyncEx;
|
using Nito.AsyncEx;
|
||||||
|
using IRaCIS.Application.Interfaces;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Contracts
|
namespace IRaCIS.Core.Application.Contracts
|
||||||
{
|
{
|
||||||
|
@ -25,6 +26,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
private readonly IRepository<NoneDicomStudy> _noneDicomStudyRepository;
|
private readonly IRepository<NoneDicomStudy> _noneDicomStudyRepository;
|
||||||
private readonly IHttpContextAccessor _httpContext;
|
private readonly IHttpContextAccessor _httpContext;
|
||||||
private readonly IWebHostEnvironment _hostEnvironment;
|
private readonly IWebHostEnvironment _hostEnvironment;
|
||||||
|
private readonly IDictionaryService _dictionaryService;
|
||||||
private readonly IInspectionService _inspectionService;
|
private readonly IInspectionService _inspectionService;
|
||||||
private readonly IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository;
|
private readonly IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository;
|
||||||
|
|
||||||
|
@ -35,6 +37,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
public NoneDicomStudyService(IRepository<NoneDicomStudy> noneDicomStudyRepository,
|
public NoneDicomStudyService(IRepository<NoneDicomStudy> noneDicomStudyRepository,
|
||||||
IHttpContextAccessor httpContext,
|
IHttpContextAccessor httpContext,
|
||||||
IWebHostEnvironment hostEnvironment,
|
IWebHostEnvironment hostEnvironment,
|
||||||
|
IDictionaryService dictionaryService,
|
||||||
IInspectionService inspectionService,
|
IInspectionService inspectionService,
|
||||||
IRepository<NoneDicomStudyFile> noneDicomStudyFileRepository)
|
IRepository<NoneDicomStudyFile> noneDicomStudyFileRepository)
|
||||||
{
|
{
|
||||||
|
@ -42,6 +45,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
this._httpContext = httpContext;
|
this._httpContext = httpContext;
|
||||||
this._hostEnvironment = hostEnvironment;
|
this._hostEnvironment = hostEnvironment;
|
||||||
|
this._dictionaryService = dictionaryService;
|
||||||
this._inspectionService = inspectionService;
|
this._inspectionService = inspectionService;
|
||||||
_noneDicomStudyFileRepository = noneDicomStudyFileRepository;
|
_noneDicomStudyFileRepository = noneDicomStudyFileRepository;
|
||||||
}
|
}
|
||||||
|
@ -139,7 +143,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
Identification = "Edit|Visit|Status|Visit-Image Upload|Add Image",
|
Identification = "Edit|Visit|Status|Visit-Image Upload|Add Image",
|
||||||
JsonDetail = JsonConvert.SerializeObject(new
|
JsonDetail = JsonConvert.SerializeObject(new
|
||||||
{
|
{
|
||||||
SubmitState = "待提交",
|
SubmitState = await _dictionaryService.GetBasicDataTranslateItem("SubmitState", subvisit.SubmitState),
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -193,7 +197,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
Identification = "Edit|Visit|Status|Visit-Image Upload|Add Image",
|
Identification = "Edit|Visit|Status|Visit-Image Upload|Add Image",
|
||||||
JsonDetail = JsonConvert.SerializeObject(new
|
JsonDetail = JsonConvert.SerializeObject(new
|
||||||
{
|
{
|
||||||
SubmitState = "待提交",
|
SubmitState = await _dictionaryService.GetBasicDataTranslateItem("SubmitState", subvisit.SubmitState),
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ using IRaCIS.Core.Application.Service.Inspection.Interface;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
||||||
using Nito.AsyncEx;
|
using Nito.AsyncEx;
|
||||||
|
using IRaCIS.Application.Interfaces;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Image.QA
|
namespace IRaCIS.Core.Application.Image.QA
|
||||||
{
|
{
|
||||||
|
@ -31,9 +32,11 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
private readonly DicomFileStoreHelper _dicomFileStoreHelper;
|
private readonly DicomFileStoreHelper _dicomFileStoreHelper;
|
||||||
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
||||||
private readonly IRepository<DicomStudy> _dicomStudyRepository;
|
private readonly IRepository<DicomStudy> _dicomStudyRepository;
|
||||||
|
private readonly IRepository<Dictionary> _dictionaryrepository;
|
||||||
private readonly IRepository<Trial> _trialRepository;
|
private readonly IRepository<Trial> _trialRepository;
|
||||||
private readonly IMediator _mediator;
|
private readonly IMediator _mediator;
|
||||||
private readonly IInspectionService _inspectionService;
|
private readonly IInspectionService _inspectionService;
|
||||||
|
private readonly IDictionaryService _dictionaryService;
|
||||||
private object _locker = new object();
|
private object _locker = new object();
|
||||||
|
|
||||||
private readonly AsyncLock _mutex = new AsyncLock();
|
private readonly AsyncLock _mutex = new AsyncLock();
|
||||||
|
@ -42,15 +45,19 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
IRepository<Trial> trialRepository,
|
IRepository<Trial> trialRepository,
|
||||||
IMediator mediator,
|
IMediator mediator,
|
||||||
IInspectionService inspectionService,
|
IInspectionService inspectionService,
|
||||||
IRepository<DicomStudy> dicomStudyRepository
|
IDictionaryService dictionaryService,
|
||||||
|
IRepository<DicomStudy> dicomStudyRepository,
|
||||||
|
IRepository<Dictionary> dictionaryrepository
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_dicomFileStoreHelper = dicomFileStoreHelper;
|
_dicomFileStoreHelper = dicomFileStoreHelper;
|
||||||
_subjectVisitRepository = subjectVisitRepository;
|
_subjectVisitRepository = subjectVisitRepository;
|
||||||
_dicomStudyRepository = dicomStudyRepository;
|
_dicomStudyRepository = dicomStudyRepository;
|
||||||
|
this._dictionaryrepository = dictionaryrepository;
|
||||||
_mediator = mediator;
|
_mediator = mediator;
|
||||||
_trialRepository = trialRepository;
|
_trialRepository = trialRepository;
|
||||||
_inspectionService = inspectionService;
|
_inspectionService = inspectionService;
|
||||||
|
this._dictionaryService = dictionaryService;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region QC质疑 以及回复 关闭
|
#region QC质疑 以及回复 关闭
|
||||||
|
@ -1046,7 +1053,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
Identification = "Edit|Visit|Status|Visit-Image Upload|Add Image",
|
Identification = "Edit|Visit|Status|Visit-Image Upload|Add Image",
|
||||||
JsonDetail = JsonConvert.SerializeObject(new
|
JsonDetail = JsonConvert.SerializeObject(new
|
||||||
{
|
{
|
||||||
SubmitState = "待提交",
|
SubmitState = await _dictionaryService.GetBasicDataTranslateItem("SubmitState", subvisit.SubmitState),
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
await _inspectionService.AddListInspectionRecordAsync(datas);
|
await _inspectionService.AddListInspectionRecordAsync(datas);
|
||||||
|
|
Loading…
Reference in New Issue