修改参数
parent
6bdaf926c4
commit
a914e6815e
|
@ -3047,14 +3047,14 @@
|
||||||
临床数据 原表
|
临床数据 原表
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.PreviousPDFService.AddOrUpdatePreviousPDFService(IRaCIS.Core.Application.Contracts.PreviousPDFAddOrEdit)">
|
<member name="M:IRaCIS.Application.Services.PreviousPDFService.AddOrUpdateReadingPreviousPDF(IRaCIS.Core.Application.Contracts.PreviousPDFAddOrEdit)">
|
||||||
<summary>
|
<summary>
|
||||||
新增或者修改
|
新增或者修改
|
||||||
</summary>
|
</summary>
|
||||||
<param name="addOrEditPreviousPDF"></param>
|
<param name="addOrEditPreviousPDF"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.PreviousPDFService.PreviousPDFView(IRaCIS.Core.Application.Service.Reading.Dto.PreviousPDFInDto)">
|
<member name="M:IRaCIS.Application.Services.PreviousPDFService.GetPreviousPDFList(IRaCIS.Core.Application.Service.Reading.Dto.PreviousPDFInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
获取
|
获取
|
||||||
</summary>
|
</summary>
|
||||||
|
@ -3086,7 +3086,7 @@
|
||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.ReadingPeriodSetService.ReadingToGenerate(IRaCIS.Core.Application.Service.Reading.Dto.ReadingToGenerateInDto)">
|
<member name="M:IRaCIS.Application.Services.ReadingPeriodSetService.GenerateReadingTask(IRaCIS.Core.Application.Service.Reading.Dto.ReadingToGenerateInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
添加对应的阅片
|
添加对应的阅片
|
||||||
</summary>
|
</summary>
|
||||||
|
@ -3138,14 +3138,14 @@
|
||||||
获取读片模块
|
获取读片模块
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.ReadModuleService.GetReadModuleSingle(IRaCIS.Core.Application.Service.Reading.Dto.GetReadModuleSingleIndto)">
|
<member name="M:IRaCIS.Application.Services.ReadModuleService.GetReadModule(IRaCIS.Core.Application.Service.Reading.Dto.GetReadModuleSingleIndto)">
|
||||||
<summary>
|
<summary>
|
||||||
获取单条详情信息
|
获取单条详情信息
|
||||||
</summary>
|
</summary>
|
||||||
<param name="dto"></param>
|
<param name="dto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.ReadModuleService.GetSubjectReadVisits(IRaCIS.Core.Application.Service.Reading.Dto.GetSubjectReadVisitsInDto)">
|
<member name="M:IRaCIS.Application.Services.ReadModuleService.GetSubjectReadVisitList(IRaCIS.Core.Application.Service.Reading.Dto.GetSubjectReadVisitsInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
添加阅片的时候 获取访视
|
添加阅片的时候 获取访视
|
||||||
</summary>
|
</summary>
|
||||||
|
|
|
@ -218,7 +218,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
private async Task<string> SetDataInspectionDateType(List<string> identification, string json)
|
private async Task<string> SetDataInspectionDateType(List<string> identification, string json)
|
||||||
{
|
{
|
||||||
var list = await (from parent in _frontAuditConfigRepository.AsQueryable().Where(x => identification.Contains(x.Identification))
|
var list = await (from parent in _frontAuditConfigRepository.AsQueryable().Where(x => identification.Contains(x.Identification))
|
||||||
join child in _frontAuditConfigRepository.AsQueryable().Where(x => x.EnumType == "Date" && x.IsEnable.HasValue && x.IsEnable.Value) on parent.Id equals child.ParentId
|
join child in _frontAuditConfigRepository.AsQueryable().Where(x => x.EnumType == "Date" && x.IsEnable ) on parent.Id equals child.ParentId
|
||||||
select new DateDto()
|
select new DateDto()
|
||||||
{
|
{
|
||||||
Code = child.Code,
|
Code = child.Code,
|
||||||
|
@ -279,13 +279,13 @@ namespace IRaCIS.Core.Application.Service
|
||||||
private async Task<string> GetInspectionEnumValue(List<string> identification, string json)
|
private async Task<string> GetInspectionEnumValue(List<string> identification, string json)
|
||||||
{
|
{
|
||||||
var list = await (from u in _frontAuditConfigRepository.Where(x => identification.Contains(x.Identification))
|
var list = await (from u in _frontAuditConfigRepository.Where(x => identification.Contains(x.Identification))
|
||||||
join p in _frontAuditConfigRepository.Where(x => x.EnumType == "Foreign" && x.IsEnable.HasValue && x.IsEnable.Value) on u.Id equals p.ParentId
|
join p in _frontAuditConfigRepository.Where(x => x.EnumType == "Foreign" && x.IsEnable) on u.Id equals p.ParentId
|
||||||
select new
|
select new
|
||||||
{
|
{
|
||||||
Key = p.Code,
|
Key = p.Code,
|
||||||
ForeignKeyValue = p.ForeignKeyValue,
|
ForeignKeyValue = p.ForeignKeyValue,
|
||||||
ForeignKeyText = p.ForeignKeyText,
|
ForeignKeyText = p.ForeignKeyText,
|
||||||
ForeignKeyTable = p.ForeignKeyTable
|
ForeignKeyTable = p.ForeignKeyTableName
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
list = list.GroupBy(x => new { x.Key }, (key, lst) => new
|
list = list.GroupBy(x => new { x.Key }, (key, lst) => new
|
||||||
{
|
{
|
||||||
|
@ -349,7 +349,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
var list = await (from u in _frontAuditConfigRepository.Where(x => identifications.Contains(x.Identification))
|
var list = await (from u in _frontAuditConfigRepository.Where(x => identifications.Contains(x.Identification))
|
||||||
join p in _frontAuditConfigRepository.Where(x => x.Code != "AuditState" && x.EnumType == "Dictionary" && x.IsEnable.HasValue && x.IsEnable.Value) on u.Id equals p.ParentId
|
join p in _frontAuditConfigRepository.Where(x => x.Code != "AuditState" && x.EnumType == "Dictionary" && x.IsEnable) on u.Id equals p.ParentId
|
||||||
select new
|
select new
|
||||||
{
|
{
|
||||||
Key = p.Code,
|
Key = p.Code,
|
||||||
|
@ -586,12 +586,12 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
Sort = lst.Select(x => x.Sort).FirstOrDefault(),
|
Sort = lst.Select(x => x.Sort).FirstOrDefault(),
|
||||||
IsShowByTrialConfig= lst.Select(x => x.IsShowByTrialConfig).FirstOrDefault(),
|
IsShowByTrialConfig= lst.Select(x => x.IsShowByTrialConfig).FirstOrDefault(),
|
||||||
ByTrialConfig = lst.Select(x => x.ByTrialConfig).FirstOrDefault(),
|
TrialConfigRelyFieldName = lst.Select(x => x.TrialConfigRelyFieldName).FirstOrDefault(),
|
||||||
Code = lst.Max(x => x.Code),
|
Code = lst.Max(x => x.Code),
|
||||||
ConfigType = lst.Select(x => x.ConfigType).FirstOrDefault(),
|
ConfigType = lst.Select(x => x.ConfigType).FirstOrDefault(),
|
||||||
CreateTime = DateTime.Now,
|
CreateTime = DateTime.Now,
|
||||||
Description = lst.Select(x => x.Description).FirstOrDefault(),
|
Description = lst.Select(x => x.Description).FirstOrDefault(),
|
||||||
EnumList = lst.Select(x => x.EnumList).FirstOrDefault(),
|
//EnumList = lst.Select(x => x.EnumList).FirstOrDefault(),
|
||||||
//IsConfig = lst.Select(x => x.IsConfig).FirstOrDefault(),
|
//IsConfig = lst.Select(x => x.IsConfig).FirstOrDefault(),
|
||||||
IsShowParent = lst.Select(x => x.IsShowParent).FirstOrDefault(),
|
IsShowParent = lst.Select(x => x.IsShowParent).FirstOrDefault(),
|
||||||
ParentId = item.AddItemGuid,
|
ParentId = item.AddItemGuid,
|
||||||
|
@ -612,7 +612,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
DateType = lst.Select(x => x.DateType).FirstOrDefault(),
|
DateType = lst.Select(x => x.DateType).FirstOrDefault(),
|
||||||
ForeignKeyValue = lst.Select(x => x.ForeignKeyValue).FirstOrDefault(),
|
ForeignKeyValue = lst.Select(x => x.ForeignKeyValue).FirstOrDefault(),
|
||||||
ForeignKeyText = lst.Select(x => x.ForeignKeyText).FirstOrDefault(),
|
ForeignKeyText = lst.Select(x => x.ForeignKeyText).FirstOrDefault(),
|
||||||
ForeignKeyTable = lst.Select(x => x.ForeignKeyTable).FirstOrDefault(),
|
ForeignKeyTableName = lst.Select(x => x.ForeignKeyTableName).FirstOrDefault(),
|
||||||
DataType = lst.Select(x => x.DataType).FirstOrDefault(),
|
DataType = lst.Select(x => x.DataType).FirstOrDefault(),
|
||||||
Id =NewId.NextGuid()//新id,
|
Id =NewId.NextGuid()//新id,
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
@ -642,7 +642,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
x.DateType = !item.DateType.IsNullOrEmpty() ? item.DateType : x.DateType;
|
x.DateType = !item.DateType.IsNullOrEmpty() ? item.DateType : x.DateType;
|
||||||
x.DictionaryKey = !item.DictionaryKey.IsNullOrEmpty() ? item.DictionaryKey : x.DictionaryKey;
|
x.DictionaryKey = !item.DictionaryKey.IsNullOrEmpty() ? item.DictionaryKey : x.DictionaryKey;
|
||||||
x.IsShowParent = !item.IsShowParent==null ? item.IsShowParent : x.IsShowParent;
|
x.IsShowParent = !item.IsShowParent==null ? item.IsShowParent : x.IsShowParent;
|
||||||
x.ForeignKeyTable = !item.ForeignKeyTable.IsNullOrEmpty() ? item.ForeignKeyTable : x.ForeignKeyTable;
|
x.ForeignKeyTableName = !item.ForeignKeyTableName.IsNullOrEmpty() ? item.ForeignKeyTableName : x.ForeignKeyTableName;
|
||||||
x.ForeignKeyText = !item.ForeignKeyText.IsNullOrEmpty() ? item.ForeignKeyText : x.ForeignKeyText;
|
x.ForeignKeyText = !item.ForeignKeyText.IsNullOrEmpty() ? item.ForeignKeyText : x.ForeignKeyText;
|
||||||
x.ForeignKeyValue = !item.ForeignKeyValue.IsNullOrEmpty() ? item.ForeignKeyValue : x.ForeignKeyValue;
|
x.ForeignKeyValue = !item.ForeignKeyValue.IsNullOrEmpty() ? item.ForeignKeyValue : x.ForeignKeyValue;
|
||||||
x.EnumType = !item.EnumType.IsNullOrEmpty() ? item.EnumType : x.EnumType;
|
x.EnumType = !item.EnumType.IsNullOrEmpty() ? item.EnumType : x.EnumType;
|
||||||
|
@ -714,15 +714,15 @@ namespace IRaCIS.Core.Application.Service
|
||||||
Sort=data.Sort,
|
Sort=data.Sort,
|
||||||
ValueCN = data.ValueCN,
|
ValueCN = data.ValueCN,
|
||||||
ChildrenTypeValue = leftchildrenType.Value,
|
ChildrenTypeValue = leftchildrenType.Value,
|
||||||
EnumList=data.EnumList,
|
|
||||||
DictionaryKey=data.DictionaryKey,
|
DictionaryKey=data.DictionaryKey,
|
||||||
EnumType=data.EnumType,
|
EnumType=data.EnumType,
|
||||||
ObjectTypeId=data.ObjectTypeId,
|
ObjectTypeId=data.ObjectTypeId,
|
||||||
ObjectTypeValue = leftObjectTypeIdtemp.Value,
|
ObjectTypeValue = leftObjectTypeIdtemp.Value,
|
||||||
ObjectTypeValueCN = leftObjectTypeIdtemp.ValueCN,
|
ObjectTypeValueCN = leftObjectTypeIdtemp.ValueCN,
|
||||||
IsShowByTrialConfig =data.IsShowByTrialConfig,
|
IsShowByTrialConfig =data.IsShowByTrialConfig,
|
||||||
ByTrialConfig=data.ByTrialConfig,
|
TrialConfigRelyFieldName = data.TrialConfigRelyFieldName,
|
||||||
IsForwardPosition=data.IsForwardPosition,
|
|
||||||
Identification=data.Identification,
|
Identification=data.Identification,
|
||||||
IsHaveReason=data.IsHaveReason,
|
IsHaveReason=data.IsHaveReason,
|
||||||
IsHaveSign=data.IsHaveSign,
|
IsHaveSign=data.IsHaveSign,
|
||||||
|
|
|
@ -40,7 +40,7 @@ namespace IRaCIS.Application.Services
|
||||||
/// <param name="addOrEditPreviousPDF"></param>
|
/// <param name="addOrEditPreviousPDF"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> AddOrUpdatePreviousPDFService(PreviousPDFAddOrEdit addOrEditPreviousPDF)
|
public async Task<IResponseOutput> AddOrUpdateReadingPreviousPDF(PreviousPDFAddOrEdit addOrEditPreviousPDF)
|
||||||
{
|
{
|
||||||
var entity = await _repository.InsertOrUpdateAsync<PreviousPDF, PreviousPDFAddOrEdit>(addOrEditPreviousPDF, true);
|
var entity = await _repository.InsertOrUpdateAsync<PreviousPDF, PreviousPDFAddOrEdit>(addOrEditPreviousPDF, true);
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
@ -55,7 +55,7 @@ namespace IRaCIS.Application.Services
|
||||||
/// <param name="query"></param>
|
/// <param name="query"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<dynamic> PreviousPDFView(PreviousPDFInDto inDto)
|
public async Task<dynamic> GetPreviousPDFList(PreviousPDFInDto inDto)
|
||||||
{
|
{
|
||||||
var list= await _previousPDFRepository.AsQueryable().Where(x => x.TrialId == inDto.TrialId)
|
var list= await _previousPDFRepository.AsQueryable().Where(x => x.TrialId == inDto.TrialId)
|
||||||
.Where(x => (x.ClinicalLevel == ClinicalLevel.Subject && x.SubjectId == inDto.SubjectId) || x.SubjectVisitId == inDto.VisitOrReadId)
|
.Where(x => (x.ClinicalLevel == ClinicalLevel.Subject && x.SubjectId == inDto.SubjectId) || x.SubjectVisitId == inDto.VisitOrReadId)
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<(PageOutput<GetReadModuleDtoOut>,object)> GetReadModuleList(GetReadModuleDto dto)
|
public async Task<(PageOutput<GetReadModuleDtoOut>,object)> GetReadModuleList(GetReadModuleDto dto)
|
||||||
{
|
{
|
||||||
var subjectquery = _subjectRepository.WhereIf(dto.TrialId!=null, x => x.TrialId == dto.TrialId)
|
var subjectQuery = _subjectRepository.WhereIf(dto.TrialId!=null, x => x.TrialId == dto.TrialId)
|
||||||
.WhereIf(dto.SubjectId != null, x => x.Id == dto.SubjectId)
|
.WhereIf(dto.SubjectId != null, x => x.Id == dto.SubjectId)
|
||||||
.Include(x => x.SubjectVisitList).Include(x=>x.Site).Include(x => x.TrialSite)
|
.Include(x => x.SubjectVisitList).Include(x=>x.Site).Include(x => x.TrialSite)
|
||||||
.Select(x => new GetReadModuleDtoOut
|
.Select(x => new GetReadModuleDtoOut
|
||||||
|
@ -96,7 +96,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var pageList = await subjectquery.ToPagedListAsync(dto.PageIndex, dto.PageSize, dto.SortField == null|| dto.SortField==string.Empty ? "SiteCode" : dto.SortField,
|
var pageList = await subjectQuery.ToPagedListAsync(dto.PageIndex, dto.PageSize, dto.SortField == null|| dto.SortField==string.Empty ? "SiteCode" : dto.SortField,
|
||||||
dto.Asc);
|
dto.Asc);
|
||||||
|
|
||||||
|
|
||||||
|
@ -109,9 +109,9 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var subjectisd = pageList.CurrentPageData.Select(x => x.SubjectId).ToList();
|
var subjectIds = pageList.CurrentPageData.Select(x => x.SubjectId).ToList();
|
||||||
|
|
||||||
var readModules =await _readModuleRepository.Where(x => subjectisd.Contains(x.SubjectId)).Include(x=>x.SubjectVisit)
|
var readModules =await _readModuleRepository.Where(x => subjectIds.Contains(x.SubjectId)).Include(x=>x.SubjectVisit)
|
||||||
.Include(x => x.ReadModuleModel).ToListAsync();
|
.Include(x => x.ReadModuleModel).ToListAsync();
|
||||||
|
|
||||||
pageList.CurrentPageData.ForEach(x => {
|
pageList.CurrentPageData.ForEach(x => {
|
||||||
|
@ -164,7 +164,7 @@ namespace IRaCIS.Application.Services
|
||||||
/// <param name="dto"></param>
|
/// <param name="dto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<GetReadModuleSingleOutdto> GetReadModuleSingle(GetReadModuleSingleIndto dto)
|
public async Task<GetReadModuleSingleOutdto> GetReadModule(GetReadModuleSingleIndto dto)
|
||||||
{
|
{
|
||||||
var data = await GetReadModuleList(new GetReadModuleDto()
|
var data = await GetReadModuleList(new GetReadModuleDto()
|
||||||
{
|
{
|
||||||
|
@ -214,15 +214,15 @@ namespace IRaCIS.Application.Services
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<List<GetSubjectReadVisitsOutDto>> GetSubjectReadVisits(GetSubjectReadVisitsInDto inDto)
|
public async Task<List<GetSubjectReadVisitsOutDto>> GetSubjectReadVisitList(GetSubjectReadVisitsInDto inDto)
|
||||||
{
|
{
|
||||||
var visitquery = _subjectVisitRepository.Where(x => x.SubjectId == inDto.SubjectId && x.SubmitState != SubmitStateEnum.None);
|
var visitQuery = _subjectVisitRepository.Where(x => x.SubjectId == inDto.SubjectId && x.SubmitState != SubmitStateEnum.None);
|
||||||
|
|
||||||
var finalVisitNum = await visitquery.Where(x => x.IsFinalVisit).Select(x => x.VisitNum).FirstOrDefaultAsync();
|
var finalVisitNum = await visitQuery.Where(x => x.IsFinalVisit).Select(x => x.VisitNum).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
|
||||||
var readModulequery = _readModuleRepository.AsQueryable();
|
var readModulequery = _readModuleRepository.AsQueryable();
|
||||||
return await visitquery.WhereIf(finalVisitNum != null, x => x.VisitNum < finalVisitNum)
|
return await visitQuery.WhereIf(finalVisitNum != null, x => x.VisitNum < finalVisitNum)
|
||||||
.Where(x => readModulequery.Where(y => y.SubjectVisitId == x.Id && y.ReadingSetType == inDto.ReadingSetType).Count() == 0).OrderBy(x => finalVisitNum)
|
.Where(x => readModulequery.Where(y => y.SubjectVisitId == x.Id && y.ReadingSetType == inDto.ReadingSetType).Count() == 0).OrderBy(x => finalVisitNum)
|
||||||
.Select(x => new GetSubjectReadVisitsOutDto()
|
.Select(x => new GetSubjectReadVisitsOutDto()
|
||||||
{
|
{
|
||||||
|
@ -240,13 +240,11 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> AddReadModule(ReadModuleAddDto dto)
|
public async Task<IResponseOutput> AddReadModule(ReadModuleAddDto dto)
|
||||||
{
|
{
|
||||||
var visitquery = _subjectVisitRepository.Where(x => x.SubjectId == dto.SubjectId && x.InPlan);
|
var visitQuery = _subjectVisitRepository.Where(x => x.SubjectId == dto.SubjectId && x.InPlan);
|
||||||
|
|
||||||
visitquery = visitquery.WhereIf(dto.ExpirationDate != null, x => x.LatestScanDate <= dto.ExpirationDate.Value)
|
visitQuery = visitQuery.WhereIf(dto.ExpirationDate != null, x => x.LatestScanDate <= dto.ExpirationDate.Value)
|
||||||
.WhereIf(dto.ExpirationVisitNum != null, x => x.VisitNum <= dto.ExpirationVisitNum.Value);
|
.WhereIf(dto.ExpirationVisitNum != null, x => x.VisitNum <= dto.ExpirationVisitNum.Value);
|
||||||
|
var visit = visitQuery.OrderByDescending(x => x.VisitNum).FirstOrDefault();
|
||||||
|
|
||||||
var visit = visitquery.OrderByDescending(x => x.VisitNum).FirstOrDefault();
|
|
||||||
|
|
||||||
if (visit != null)
|
if (visit != null)
|
||||||
{
|
{
|
||||||
|
@ -262,9 +260,7 @@ namespace IRaCIS.Application.Services
|
||||||
Status = ReadingCommon.GetVisitSubmitStateEnum(visit),
|
Status = ReadingCommon.GetVisitSubmitStateEnum(visit),
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var res = await _readModuleRepository.SaveChangesAsync();
|
var res = await _readModuleRepository.SaveChangesAsync();
|
||||||
|
|
||||||
return ResponseOutput.Ok(res);
|
return ResponseOutput.Ok(res);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -297,7 +293,7 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpDelete("{readModuleId:guid}")]
|
[HttpDelete("{readModuleId:guid}")]
|
||||||
public async Task<IResponseOutput> DeleteReadModule(Guid readModuleId)
|
public async Task<IResponseOutput> DeleteReadModule(Guid readModuleId)
|
||||||
{
|
{
|
||||||
var success = await _readModuleRepository.DeleteFromQueryAsync(t => t.Id == readModuleId, true);
|
await _readModuleRepository.DeleteFromQueryAsync(t => t.Id == readModuleId, true);
|
||||||
return ResponseOutput.Result(true);
|
return ResponseOutput.Result(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,17 +88,17 @@ namespace IRaCIS.Application.Services
|
||||||
await _readingPeriodPlanRepository.DeleteFromQueryAsync(x => x.ReadingPeriodSetId == inDto.ReadingPeriodSetId);
|
await _readingPeriodPlanRepository.DeleteFromQueryAsync(x => x.ReadingPeriodSetId == inDto.ReadingPeriodSetId);
|
||||||
await _readingPeriodPlanRepository.SaveChangesAsync();
|
await _readingPeriodPlanRepository.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
var readset = (await _readingPeriodSetRepository.Where(x => x.Id == inDto.ReadingPeriodSetId).Include(x => x.ReadingPeriodSites).FirstOrDefaultAsync()).IfNullThrowException();
|
var readSet = (await _readingPeriodSetRepository.Where(x => x.Id == inDto.ReadingPeriodSetId).Include(x => x.ReadingPeriodSites).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
var visitquery = _subjectVisitRepository.Where(x => x.TrialId == readset.TrialId && x.InPlan);
|
var visitQuery = _subjectVisitRepository.Where(x => x.TrialId == readSet.TrialId && x.InPlan);
|
||||||
if (readset.ReadingScope == ReadingScopeEnum.Site)
|
if (readSet.ReadingScope == ReadingScopeEnum.Site)
|
||||||
{
|
{
|
||||||
var siteids = readset.ReadingPeriodSites.Select(x => x.SiteId);
|
var siteIds = readSet.ReadingPeriodSites.Select(x => x.SiteId);
|
||||||
visitquery = visitquery.Where(x => siteids.Contains(x.SiteId));
|
visitQuery = visitQuery.Where(x => siteIds.Contains(x.SiteId));
|
||||||
}
|
}
|
||||||
|
|
||||||
visitquery = visitquery.WhereIf(readset.ExpirationDate != null, x => x.LatestScanDate <= readset.ExpirationDate.Value)
|
visitQuery = visitQuery.WhereIf(readSet.ExpirationDate != null, x => x.LatestScanDate <= readSet.ExpirationDate.Value)
|
||||||
.WhereIf(readset.ExpirationVisitNum != null, x => x.VisitNum <= readset.ExpirationVisitNum);
|
.WhereIf(readSet.ExpirationVisitNum != null, x => x.VisitNum <= readSet.ExpirationVisitNum);
|
||||||
var subjectVisits = await visitquery.Include(x => x.Subject).Include(x => x.TrialSite).GroupBy(x => x.SubjectId).Select(x => new
|
var subjectVisits = await visitQuery.Include(x => x.Subject).Include(x => x.TrialSite).GroupBy(x => x.SubjectId).Select(x => new
|
||||||
{
|
{
|
||||||
SubjectId = x.Key,
|
SubjectId = x.Key,
|
||||||
Visit = x.ToList()
|
Visit = x.ToList()
|
||||||
|
@ -127,15 +127,15 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return visits.Where(x => _readModuleRepository.Where(y => y.ReadingSetType == readset.ReadingSetType && x.Id == y.SubjectVisitId).Count() == 0)
|
return visits.Where(x => _readModuleRepository.Where(y => y.ReadingSetType == readSet.ReadingSetType && x.Id == y.SubjectVisitId).Count() == 0)
|
||||||
.Select(x => new PreviewTheReadingListOutDto
|
.Select(x => new PreviewTheReadingListOutDto
|
||||||
{
|
{
|
||||||
ExpirationDate= readset.ExpirationDate,
|
ExpirationDate= readSet.ExpirationDate,
|
||||||
SubjectVisitId= x.Id,
|
SubjectVisitId= x.Id,
|
||||||
TrialSiteCode = x.TrialSite.TrialSiteCode,
|
TrialSiteCode = x.TrialSite.TrialSiteCode,
|
||||||
LatestScanDate=x.LatestScanDate,
|
LatestScanDate=x.LatestScanDate,
|
||||||
ReadingPeriodName= readset.ReadingPeriodName,
|
ReadingPeriodName= readSet.ReadingPeriodName,
|
||||||
ReadingPeriodSetId=readset.Id,
|
ReadingPeriodSetId= readSet.Id,
|
||||||
SubjectCode=x.Subject.Code,
|
SubjectCode=x.Subject.Code,
|
||||||
SubjectId=x.SubjectId,
|
SubjectId=x.SubjectId,
|
||||||
SubjectVisitName=x.VisitName,
|
SubjectVisitName=x.VisitName,
|
||||||
|
@ -148,7 +148,7 @@ namespace IRaCIS.Application.Services
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<IResponseOutput> ReadingToGenerate(ReadingToGenerateInDto inDto)
|
public async Task<IResponseOutput> GenerateReadingTask(ReadingToGenerateInDto inDto)
|
||||||
{
|
{
|
||||||
//var readset = (await _readingPeriodSetRepository.Where(x => x.Id == inDto.ReadingPeriodSetId).Include(x => x.ReadingPeriodSites).FirstOrDefaultAsync()).IfNullThrowConvertException();
|
//var readset = (await _readingPeriodSetRepository.Where(x => x.Id == inDto.ReadingPeriodSetId).Include(x => x.ReadingPeriodSites).FirstOrDefaultAsync()).IfNullThrowConvertException();
|
||||||
//var visits = await _subjectVisitRepository.Where(x => inDto.SubjectVisitIds.Contains(x.Id)).ToListAsync();
|
//var visits = await _subjectVisitRepository.Where(x => inDto.SubjectVisitIds.Contains(x.Id)).ToListAsync();
|
||||||
|
@ -187,8 +187,8 @@ namespace IRaCIS.Application.Services
|
||||||
await _readingPeriodPlanRepository.DeleteFromQueryAsync(x => x.ReadingPeriodSetId == inDto.ReadingPeriodSetId);
|
await _readingPeriodPlanRepository.DeleteFromQueryAsync(x => x.ReadingPeriodSetId == inDto.ReadingPeriodSetId);
|
||||||
await _readingPeriodPlanRepository.SaveChangesAsync();
|
await _readingPeriodPlanRepository.SaveChangesAsync();
|
||||||
await _readingPeriodPlanRepository.AddRangeAsync(plans);
|
await _readingPeriodPlanRepository.AddRangeAsync(plans);
|
||||||
var res = await _readingPeriodPlanRepository.SaveChangesAsync();
|
var result = await _readingPeriodPlanRepository.SaveChangesAsync();
|
||||||
return ResponseOutput.Result(res);
|
return ResponseOutput.Result(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -226,11 +226,11 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<PageOutput<ReadingPeriodSetView>> GetReadingPeriodSetList(ReadingPeriodSetQuery query)
|
public async Task<PageOutput<ReadingPeriodSetView>> GetReadingPeriodSetList(ReadingPeriodSetQuery query)
|
||||||
{
|
{
|
||||||
var readquery =_readingPeriodSetRepository.AsQueryable().Include(x=>x.ReadingPeriodSites)
|
var readQuery =_readingPeriodSetRepository.AsQueryable().Include(x=>x.ReadingPeriodSites)
|
||||||
.WhereIf(query.TrialId!=null,x=>x.TrialId==query.TrialId)
|
.WhereIf(query.TrialId!=null,x=>x.TrialId==query.TrialId)
|
||||||
.WhereIf(query.ReadingPeriodName != null, x => x.ReadingPeriodName.Contains(query.ReadingPeriodName))
|
.WhereIf(query.ReadingPeriodName != null, x => x.ReadingPeriodName.Contains(query.ReadingPeriodName))
|
||||||
.ProjectTo<ReadingPeriodSetView>(_mapper.ConfigurationProvider);
|
.ProjectTo<ReadingPeriodSetView>(_mapper.ConfigurationProvider);
|
||||||
var pageList= await readquery.ToPagedListAsync(query.PageIndex, query.PageSize, query.SortField == null ? "CreateTime" : query.SortField,
|
var pageList= await readQuery.ToPagedListAsync(query.PageIndex, query.PageSize, query.SortField == null ? "CreateTime" : query.SortField,
|
||||||
query.SortAsc);
|
query.SortAsc);
|
||||||
return pageList;
|
return pageList;
|
||||||
}
|
}
|
||||||
|
@ -263,18 +263,13 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
var plans = _readingPeriodPlanRepository.Where(x => x.ReadingPeriodSetId == indto.Id).Include(x=>x.SubjectVisit)
|
var plans = _readingPeriodPlanRepository.Where(x => x.ReadingPeriodSetId == indto.Id).Include(x=>x.SubjectVisit)
|
||||||
.Include(x => x.ReadingPeriodSet).ToList();
|
.Include(x => x.ReadingPeriodSet).ToList();
|
||||||
|
|
||||||
var needAddVisitIds = plans.Select(x => x.SubjectVisitId).ToList();
|
var needAddVisitIds = plans.Select(x => x.SubjectVisitId).ToList();
|
||||||
|
|
||||||
var repeatVisitNames = _readModuleRepository.Where(x => x.ReadingSetType == ReadingSetType.ImageReading && needAddVisitIds.Contains(x.SubjectVisitId)).Select(x => x.SubjectVisit.VisitName).ToList();
|
var repeatVisitNames = _readModuleRepository.Where(x => x.ReadingSetType == ReadingSetType.ImageReading && needAddVisitIds.Contains(x.SubjectVisitId)).Select(x => x.SubjectVisit.VisitName).ToList();
|
||||||
|
|
||||||
if(repeatVisitNames.Count!=0)
|
if(repeatVisitNames.Count!=0)
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk($"{string.Join(",", repeatVisitNames)}已经添加过阅片期,无法设置生效");
|
return ResponseOutput.NotOk($"{string.Join(",", repeatVisitNames)}已经添加过阅片期,无法设置生效");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<ReadModule> readModules = new List<ReadModule>();
|
List<ReadModule> readModules = new List<ReadModule>();
|
||||||
foreach (var item in plans)
|
foreach (var item in plans)
|
||||||
{
|
{
|
||||||
|
@ -293,17 +288,18 @@ namespace IRaCIS.Application.Services
|
||||||
};
|
};
|
||||||
|
|
||||||
await _readModuleRepository.AddRangeAsync(readModules);
|
await _readModuleRepository.AddRangeAsync(readModules);
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
await _readModuleRepository.DeleteFromQueryAsync(x => x.ReadingPeriodSetId == indto.Id);
|
await _readModuleRepository.DeleteFromQueryAsync(x => x.ReadingPeriodSetId == indto.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
var readquery =await _readingPeriodSetRepository.UpdatePartialFromQueryAsync(indto.Id, x => new ReadingPeriodSet() {
|
var readQuery =await _readingPeriodSetRepository.UpdatePartialFromQueryAsync(indto.Id, x => new ReadingPeriodSet() {
|
||||||
IsTakeEffect = indto.IsTakeEffect
|
IsTakeEffect = indto.IsTakeEffect
|
||||||
});
|
});
|
||||||
|
|
||||||
var res=await _readingPeriodSetRepository.SaveChangesAsync();
|
var result = await _readingPeriodSetRepository.SaveChangesAsync();
|
||||||
return ResponseOutput.Result(res);
|
return ResponseOutput.Result(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,19 +19,19 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// Value
|
/// Value
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public string Value { get; set; }
|
public string Value { get; set; } = String.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ValueCN
|
/// ValueCN
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public string ValueCN { get; set; }
|
public string ValueCN { get; set; } = String.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description
|
/// Description
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public string Description { get; set; }
|
public string Description { get; set; } = String.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// CreateTime
|
/// CreateTime
|
||||||
|
@ -61,7 +61,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// Code
|
/// Code
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public string Code { get; set; }
|
public string Code { get; set; } = String.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ParentId
|
/// ParentId
|
||||||
|
@ -72,13 +72,13 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// IsEnable
|
/// IsEnable
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public bool? IsEnable { get; set; }
|
public bool IsEnable { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// IsConfig
|
/// IsConfig
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public bool? IsConfig { get; set; }
|
public bool IsConfig { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ModuleTypeId
|
/// ModuleTypeId
|
||||||
|
@ -95,14 +95,14 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid? ChildrenTypeId { get; set; }
|
public Guid? ChildrenTypeId { get; set; }
|
||||||
|
|
||||||
public bool? IsShowParent { get; set; }
|
public bool IsShowParent { get; set; }
|
||||||
|
|
||||||
public string ConfigType { get; set; }
|
public string ConfigType { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
public int Sort { get; set; }
|
||||||
|
|
||||||
public int? Sort { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
public string EnumList { get; set; }
|
|
||||||
|
|
||||||
public string DictionaryKey { get; set; }
|
public string DictionaryKey { get; set; }
|
||||||
|
|
||||||
|
@ -112,14 +112,11 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public Guid? ObjectTypeId { get; set; }
|
public Guid? ObjectTypeId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public bool? IsShowByTrialConfig { get; set; }
|
public bool IsShowByTrialConfig { get; set; }
|
||||||
|
|
||||||
|
public string TrialConfigRelyFieldName { get; set; }
|
||||||
|
|
||||||
public string ByTrialConfig { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 是否向前站位
|
|
||||||
/// </summary>
|
|
||||||
public bool? IsForwardPosition { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 标识
|
/// 标识
|
||||||
|
@ -130,22 +127,22 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否有签名
|
/// 是否有签名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? IsHaveSign { get; set; }
|
public bool IsHaveSign { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否有原因
|
/// 是否有原因
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? IsHaveReason { get; set; }
|
public bool IsHaveReason { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否完成
|
/// 是否完成
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? IsFinish { get; set; }
|
public bool IsFinish { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否加入计划
|
/// 是否加入计划
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? IsJoinPlan { get; set; }
|
public bool IsJoinPlan { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数据类型
|
/// 数据类型
|
||||||
|
@ -165,57 +162,54 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
public string ChildDataValue { get; set; }
|
public string ChildDataValue { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否为特殊类型
|
/// 是否为特殊类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
public bool IsSpecialType { get; set; }
|
||||||
public bool? IsSpecialType { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 日期类型
|
/// 日期类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public string DateType { get; set; }
|
public string DateType { get; set; } = String.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 字典Code
|
/// 字典Code
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public string DictionaryCode { get; set; }
|
public string DictionaryCode { get; set; } = String.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 字典Type
|
/// 字典Type
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public string DictionaryType { get; set; }
|
public string DictionaryType { get; set; } = String.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 字典表
|
/// 字典表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public string ForeignKeyTable { get; set; }
|
public string ForeignKeyTableName { get; set; } = String.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 字典Value
|
/// 字典Value
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public string ForeignKeyValue { get; set; }
|
public string ForeignKeyValue { get; set; } = String.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 字典
|
/// 字典
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public string ForeignKeyText { get; set; }
|
public string ForeignKeyText { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 接口名
|
/// 接口名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public string InterfaceName { get; set; }
|
public string InterfaceName { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue