修改标准默认配置,修改待阅列表数据
parent
e059dcb2b2
commit
787dd9aa5f
|
@ -390,6 +390,15 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public class IRUnReadSubjectView
|
||||
{
|
||||
#region HIR
|
||||
public Guid? ClaimUserId { get; set; }
|
||||
|
||||
public string? ClaimUserName { get; set; }
|
||||
|
||||
public string SubjectName { get; set; }
|
||||
|
||||
public List<PatientBasicInfo> PatientList { get; set; }
|
||||
#endregion
|
||||
public int Index { get; set; } = 0;
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
|
|
|
@ -336,7 +336,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
ReadingCategory = ReadingCategory.Visit,
|
||||
TrialReadingCriterionId = trialReadingCriterionConfig.TrialReadingCriterionId,
|
||||
IsNeedClinicalDataSign = isNeedClinicalDataSign,
|
||||
IsClinicalDataSign = isClinicalDataSign
|
||||
IsClinicalDataSign = isClinicalDataSign,
|
||||
|
||||
//HIR
|
||||
SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget)
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1065,7 +1068,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
TrialReadingCriterionId = trialReadingCriterionConfig.TrialReadingCriterionId,
|
||||
IsNeedClinicalDataSign = isNeedClinicalDataSign,
|
||||
IsClinicalDataSign = isClinicalDataSign,
|
||||
IsFrontTaskNeedSignButNotSign = isFrontTaskNeedSignButNotSign
|
||||
IsFrontTaskNeedSignButNotSign = isFrontTaskNeedSignButNotSign,
|
||||
|
||||
//HIR
|
||||
SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget)
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -1143,6 +1143,29 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
SortField = inQuery.SortField,
|
||||
});
|
||||
|
||||
//给出患者编号
|
||||
var currentPageData = result.CurrentPageData;
|
||||
var subjectIdList = currentPageData.Select(t => t.SubjectId).ToList();
|
||||
var list = await _subjectRepository.Where(t => subjectIdList.Contains(t.Id)).Select(t => new
|
||||
{
|
||||
SubjectId = t.Id,
|
||||
PatientList = t.SubjectPatientList.Select(c => new PatientBasicInfo()
|
||||
{
|
||||
PatientId = c.PatientId,
|
||||
PatientAge = c.Patient.PatientAge,
|
||||
PatientBirthDate = c.Patient.PatientBirthDate,
|
||||
PatientIdStr = c.Patient.PatientIdStr,
|
||||
PatientSex = c.Patient.PatientSex,
|
||||
PatientName = c.Patient.PatientName,
|
||||
}).ToList(),
|
||||
}).ToListAsync();
|
||||
|
||||
foreach (var item in currentPageData)
|
||||
{
|
||||
item.PatientList = list.Where(t => t.SubjectId == item.SubjectId).FirstOrDefault()?.PatientList;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//随机阅片
|
||||
else
|
||||
|
@ -1196,7 +1219,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
|
||||
if (critrion.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||
{
|
||||
var visitQuery = _visitTaskRepository.Where(x => x.TrialId == inQuery.TrialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect)
|
||||
var visitQuery = _visitTaskRepository.Where(x => x.TrialId == inQuery.TrialId/* && x.DoctorUserId == _userInfo.Id*/ && x.TaskState == TaskState.Effect)
|
||||
.WhereIf(inQuery.SubjectId != null, t => t.SubjectId == inQuery.SubjectId)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.PatientIdStr), t => t.Subject.SubjectPatientList.Any(t => t.Patient.PatientIdStr.Contains(inQuery.PatientIdStr)))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.PatientName), t => t.Subject.SubjectPatientList.Any(t => t.Patient.PatientName.Contains(inQuery.PatientName)))
|
||||
|
@ -1252,12 +1275,16 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => (t.Subject.Code.Contains(inQuery.SubjectCode!) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(inQuery.SubjectCode!) && t.IsAnalysisCreate));
|
||||
|
||||
|
||||
var visitGroupQuery = visitQuery.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode });
|
||||
var visitGroupQuery = visitQuery.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode, x.Subject.ShortName, x.SubjectCriterionClaimUserId, x.SubjectCriterionClaimUser.UserName });
|
||||
|
||||
var visitTaskQuery = visitGroupQuery.Select(x => new IRUnReadSubjectView()
|
||||
{
|
||||
SubjectId = x.Key.SubjectId,
|
||||
SubjectCode = x.Key.BlindSubjectCode == string.Empty ? x.Key.Code : x.Key.BlindSubjectCode,
|
||||
SubjectName = x.Key.ShortName,
|
||||
|
||||
ClaimUserId = x.Key.SubjectCriterionClaimUserId,
|
||||
ClaimUserName = x.Key.UserName,
|
||||
|
||||
SuggesteFinishedTime = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned).Min(x => x.SuggesteFinishedTime),
|
||||
|
||||
|
|
|
@ -1807,7 +1807,7 @@ namespace IRaCIS.Application.Services
|
|||
await _repository.AddAsync(newStuty);
|
||||
//newStuty.Id = NewId.NextSequentialGuid();
|
||||
|
||||
newStuty.SeqId = Guid.Empty;
|
||||
newStuty.SeqId = NewId.NextSequentialGuid();
|
||||
newStuty.Code = currentNextCodeInt;
|
||||
newStuty.StudyCode = AppSettings.GetCodeStr(currentNextCodeInt, nameof(DicomStudy));
|
||||
newStuty.TrialId = item.TrialId;
|
||||
|
@ -1824,7 +1824,7 @@ namespace IRaCIS.Application.Services
|
|||
series.Id = seriesId;
|
||||
series.StudyId = newStuty.Id;
|
||||
|
||||
series.SeqId = Guid.Empty;
|
||||
series.SeqId = NewId.NextSequentialGuid();
|
||||
series.TrialId = item.TrialId;
|
||||
series.SubjectId = item.SubjectId;
|
||||
series.SubjectVisitId = item.SubjectVisitId;
|
||||
|
@ -1843,7 +1843,7 @@ namespace IRaCIS.Application.Services
|
|||
instance.SeriesId = seriesId;
|
||||
instance.StudyId = newStuty.Id;
|
||||
|
||||
instance.SeqId = Guid.Empty;
|
||||
instance.SeqId = NewId.NextSequentialGuid();
|
||||
instance.TrialId = item.TrialId;
|
||||
instance.SubjectId = item.SubjectId;
|
||||
instance.SubjectVisitId = item.SubjectVisitId;
|
||||
|
|
|
@ -174,26 +174,21 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
[HttpDelete, Route("{trialId:guid}/{id:guid}")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
//[Authorize(Policy = IRaCISPolicy.CRC)]
|
||||
public async Task<IResponseOutput> DeleteSV(Guid id)
|
||||
{
|
||||
if (await _dicomStudyRepository.AnyAsync(t => t.SubjectVisitId == id))
|
||||
var sv = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == id);
|
||||
|
||||
var maxUnsubmmitVisit = await _subjectVisitRepository.Where(t => t.SubjectId == sv.SubjectId && t.SubmitState == SubmitStateEnum.None).OrderByDescending(t => t.VisitNum).FirstOrDefaultAsync();
|
||||
if (maxUnsubmmitVisit != null && sv.VisitNum == maxUnsubmmitVisit.VisitNum)
|
||||
{
|
||||
//---当前访视已经有影像上传,不允许删除。
|
||||
return ResponseOutput.NotOk(_localizer["Visit_UploadedNoDelete"]);
|
||||
await _subjectVisitRepository.DeleteAsync(sv, true);
|
||||
|
||||
}
|
||||
if (await _subjectVisitRepository.AnyAsync(t => t.Id == id && t.InPlan))
|
||||
else
|
||||
{
|
||||
//---计划内的访视不允许删除。
|
||||
return ResponseOutput.NotOk(_localizer["Visit_PlanVisitNoDelete"]);
|
||||
}
|
||||
if (await _subjectVisitRepository.AnyAsync(t => t.OutPlanPreviousVisitId == id))
|
||||
{
|
||||
//---当前访视已经被设置为另一访视的上一访视,不允许删除。
|
||||
return ResponseOutput.NotOk(_localizer["Visit_PreviousVisitNoDelete"]);
|
||||
return ResponseOutput.NotOk("删除访视操作,每次只允许删除该受试者未绑定检查的最后一个访视");
|
||||
}
|
||||
|
||||
await _subjectVisitRepository.DeleteFromQueryAsync(s => s.Id == id, true);
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
|
|
@ -87,10 +87,10 @@ public class ReadingQuestionCriterionTrial : BaseAddAuditEntity
|
|||
public ImagePlatform ImagePlatform { get; set; } = ImagePlatform.PACS;
|
||||
|
||||
[Comment("阅片工具")]
|
||||
public ReadingTool? ReadingTool { get; set; }
|
||||
public ReadingTool? ReadingTool { get; set; } = Share.ReadingTool.Dicom;
|
||||
|
||||
[Comment("任务组织级别")]
|
||||
public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; }
|
||||
public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; } = ReadingTaskViewMethod.Subject;
|
||||
[Comment("阅片是否显示受试者信息")]
|
||||
public bool IsReadingShowSubjectInfo { get; set; } = true;
|
||||
|
||||
|
@ -100,19 +100,19 @@ public class ReadingQuestionCriterionTrial : BaseAddAuditEntity
|
|||
|
||||
public bool IsConfirmMedicineQuestion { get; set; } = false;
|
||||
[Comment("仲裁对象")]
|
||||
public ArbitrationRule ArbitrationRule { get; set; } = ArbitrationRule.Reading;
|
||||
public ArbitrationRule ArbitrationRule { get; set; } = ArbitrationRule.None;
|
||||
[Comment("阅片模式")]
|
||||
public ReadingMethod ReadingType { get; set; } = ReadingMethod.Double;
|
||||
public ReadingMethod ReadingType { get; set; } = ReadingMethod.Single;
|
||||
[Comment("存在阅片期")]
|
||||
public bool IsReadingPeriod { get; set; } = true;
|
||||
public bool IsReadingPeriod { get; set; } = false;
|
||||
|
||||
[Comment("是否生成全局阅片任务")]
|
||||
public bool IsGlobalReading { get; set; } = true;
|
||||
public bool IsGlobalReading { get; set; } = false;
|
||||
|
||||
[Comment("是否签名")]
|
||||
public bool IsSigned { get; set; } = false;
|
||||
[Comment("仲裁阅片")]
|
||||
public bool IsArbitrationReading { get; set; } = true;
|
||||
public bool IsArbitrationReading { get; set; } = false;
|
||||
[Comment("肿瘤学阅片 原字段 IsClinicalReading")]
|
||||
public bool IsOncologyReading { get; set; }
|
||||
|
||||
|
|
|
@ -83,6 +83,11 @@ public class SCPStudyConfigration : IEntityTypeConfiguration<SCPStudy>
|
|||
|
||||
builder.HasMany(s => s.SeriesList).WithOne(se => se.SCPStudy).HasForeignKey(se => se.StudyId).HasPrincipalKey(st => st.Id);
|
||||
|
||||
builder.HasMany(s => s.SCPStudySubjectVisitList).WithOne(se => se.SCPStudy).HasForeignKey(se => se.SCPStudyId).HasPrincipalKey(st => st.Id);
|
||||
|
||||
builder.HasMany(s => s.InstanceList).WithOne(se => se.SCPStudy).HasForeignKey(se => se.StudyId).HasPrincipalKey(st => st.Id);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue