Uat_Study
parent
8683273022
commit
fe260a6a06
|
@ -37,6 +37,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
private readonly IRepository<ClinicalForm> _clinicalFormRepository;
|
private readonly IRepository<ClinicalForm> _clinicalFormRepository;
|
||||||
private readonly IRepository<Subject> _subjectRepository;
|
private readonly IRepository<Subject> _subjectRepository;
|
||||||
|
private readonly IRepository<ReadModuleCriterionFrom> _readModuleCriterionFromRepository;
|
||||||
|
private readonly IRepository<ReadModule> _readModuleRepository;
|
||||||
private readonly IRepository<ClinicalQuestionAnswer> _clinicalQuestionAnswerRepository;
|
private readonly IRepository<ClinicalQuestionAnswer> _clinicalQuestionAnswerRepository;
|
||||||
|
|
||||||
private readonly IRepository<ClinicalTableAnswer> _clinicalTableAnswerRepository;
|
private readonly IRepository<ClinicalTableAnswer> _clinicalTableAnswerRepository;
|
||||||
|
@ -55,6 +57,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
IRepository<ReadingClinicalData> readingClinicalDataRepository,
|
IRepository<ReadingClinicalData> readingClinicalDataRepository,
|
||||||
IRepository<ClinicalForm> clinicalFormRepository,
|
IRepository<ClinicalForm> clinicalFormRepository,
|
||||||
IRepository<Subject> subjectRepository,
|
IRepository<Subject> subjectRepository,
|
||||||
|
IRepository<ReadModuleCriterionFrom> readModuleCriterionFromRepository,
|
||||||
|
IRepository<ReadModule> readModuleRepository,
|
||||||
IRepository<SubjectVisit> subjectVisitRepository,
|
IRepository<SubjectVisit> subjectVisitRepository,
|
||||||
IRepository<ClinicalTableAnswer> clinicalTableAnswerRepository,
|
IRepository<ClinicalTableAnswer> clinicalTableAnswerRepository,
|
||||||
IRepository<ClinicalQuestionAnswer> clinicalQuestionAnswerRepository,
|
IRepository<ClinicalQuestionAnswer> clinicalQuestionAnswerRepository,
|
||||||
|
@ -76,6 +80,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
_clinicalFormRepository = clinicalFormRepository;
|
_clinicalFormRepository = clinicalFormRepository;
|
||||||
this._subjectRepository = subjectRepository;
|
this._subjectRepository = subjectRepository;
|
||||||
|
this._readModuleCriterionFromRepository = readModuleCriterionFromRepository;
|
||||||
|
this._readModuleRepository = readModuleRepository;
|
||||||
_clinicalTableAnswerRepository = clinicalTableAnswerRepository;
|
_clinicalTableAnswerRepository = clinicalTableAnswerRepository;
|
||||||
_iClinicalQuestionService = iClinicalQuestionService;
|
_iClinicalQuestionService = iClinicalQuestionService;
|
||||||
}
|
}
|
||||||
|
@ -393,5 +399,65 @@ namespace IRaCIS.Core.Application.Service
|
||||||
return ResponseOutput.Ok(true);
|
return ResponseOutput.Ok(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取CRC确认列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<List<GetCRCConfirmListOutDto>> GetCRCConfirmList(GetCRCConfirmListInDto inDto)
|
||||||
|
{
|
||||||
|
|
||||||
|
List<GetCRCConfirmListOutDto> result = await _readModuleRepository.Where(x => x.TrialId == inDto.TrialId)
|
||||||
|
.Select(x => new GetCRCConfirmListOutDto()
|
||||||
|
{
|
||||||
|
IsCRCConfirm = x.IsCRCConfirm,
|
||||||
|
LatestScanDate = x.SubjectVisit.LatestScanDate,
|
||||||
|
ReadingSetType = x.ReadingSetType,
|
||||||
|
IsPMConfirm = x.IsPMConfirm,
|
||||||
|
ReadModuleId=x.Id,
|
||||||
|
|
||||||
|
}).OrderBy(x => x.LatestScanDate).ToListAsync();
|
||||||
|
|
||||||
|
var formList = await _clinicalFormRepository.Where(x => x.TrialId == inDto.TrialId)
|
||||||
|
.Where(x=> x.ClinicalDataTrialSet.UploadRole==UploadRole.CRC)
|
||||||
|
.Where(x=> x.ClinicalDataTrialSet.ClinicalDataLevel==ClinicalLevel.ImageRead|| x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.OncologyRead)
|
||||||
|
.Select(x =>new CRCConfirmFormList
|
||||||
|
{
|
||||||
|
CkeckDate=x.CheckDate,
|
||||||
|
ClinicalDataLevel= x.ClinicalDataTrialSet.ClinicalDataLevel,
|
||||||
|
|
||||||
|
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
var confirmList = await _readModuleCriterionFromRepository.Where(x => x.TrialId == inDto.TrialId).ToListAsync();
|
||||||
|
|
||||||
|
result.ForEach(x =>
|
||||||
|
{
|
||||||
|
if (x.IsCRCConfirm)
|
||||||
|
{
|
||||||
|
x.FormCount = confirmList.Where(y => y.ReadModuleId == x.ReadModuleId).Count();
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (x.ReadingSetType == ReadingSetType.ImageReading)
|
||||||
|
{
|
||||||
|
x.FormCount = formList.Where(y => y.ClinicalDataLevel == ClinicalLevel.ImageRead&&y.CkeckDate<=x.LatestScanDate).Count();
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
x.FormCount = formList.Where(y => y.ClinicalDataLevel == ClinicalLevel.OncologyRead&&y.CkeckDate <= x.LatestScanDate).Count();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -472,7 +472,11 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
question.GroupId = questionRelation[question.GroupId ?? default(Guid)];
|
question.GroupId = questionRelation[question.GroupId ?? default(Guid)];
|
||||||
}
|
}
|
||||||
addTrialDataList.Add(question);
|
if (question.RelevanceId != null)
|
||||||
|
{
|
||||||
|
question.RelevanceId = questionRelation[question.RelevanceId ?? default(Guid)];
|
||||||
|
}
|
||||||
|
addTrialDataList.Add(question);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
@ -93,7 +94,41 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public string Answer { get; set; } = string.Empty;
|
public string Answer { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SubmitClinicalFormInDto
|
public class GetCRCConfirmListInDto
|
||||||
|
{
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CRCConfirmFormList
|
||||||
|
{
|
||||||
|
public DateTime? CkeckDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 临床级别
|
||||||
|
/// </summary>
|
||||||
|
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetCRCConfirmListOutDto
|
||||||
|
{
|
||||||
|
public Guid ReadModuleId { get; set; }
|
||||||
|
|
||||||
|
public bool IsPMConfirm { get; set; }
|
||||||
|
|
||||||
|
public ReadingSetType ReadingSetType { get; set; }
|
||||||
|
|
||||||
|
public bool IsCRCConfirm { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最晚拍片日期
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? LatestScanDate { get; set; }
|
||||||
|
|
||||||
|
public int FormCount { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SubmitClinicalFormInDto
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// VisitId
|
/// VisitId
|
||||||
|
|
|
@ -128,15 +128,25 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int ShowOrder { get; set; } = 0;
|
public int ShowOrder { get; set; } = 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否必填
|
/// 是否必填
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsRequired { get; set; } = false;
|
public IsRequired IsRequired { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 父问题Id
|
/// 关联Value
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid? ParentId { get; set; }
|
public string RelevanceValue { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 关联ID
|
||||||
|
/// </summary>
|
||||||
|
public Guid? RelevanceId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 父问题Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid? ParentId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 父问题触发值
|
/// 父问题触发值
|
||||||
|
@ -297,15 +307,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int ShowOrder { get; set; }
|
public int ShowOrder { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否必填
|
/// 是否必填
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsRequired { get; set; }
|
public IsRequired IsRequired { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建时间
|
/// 创建时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建人
|
/// 创建人
|
||||||
|
|
|
@ -72,15 +72,25 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int ShowOrder { get; set; } = 0;
|
public int ShowOrder { get; set; } = 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否必填
|
/// 是否必填
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsRequired { get; set; } = false;
|
public IsRequired IsRequired { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建时间
|
/// 关联Value
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime CreateTime { get; set; }
|
public string RelevanceValue { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 关联ID
|
||||||
|
/// </summary>
|
||||||
|
public Guid? RelevanceId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建人
|
/// 创建人
|
||||||
|
|
|
@ -64,15 +64,15 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// 排序
|
/// 排序
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int ShowOrder { get; set; }
|
public int ShowOrder { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否必填
|
/// 是否必填
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsRequired { get; set; }
|
public IsRequired IsRequired { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建时间
|
/// 创建时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -75,12 +75,22 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否必填
|
/// 是否必填
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsRequired { get; set; } = false;
|
public IsRequired IsRequired { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 系统临床问题Id
|
/// 关联Value
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid? SystemClinicalQuestionId { get; set; }
|
public string RelevanceValue { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 关联ID
|
||||||
|
/// </summary>
|
||||||
|
public Guid? RelevanceId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 系统临床问题Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid? SystemClinicalQuestionId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建时间
|
/// 创建时间
|
||||||
|
|
|
@ -64,15 +64,15 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// 排序
|
/// 排序
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int ShowOrder { get; set; }
|
public int ShowOrder { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否必填
|
/// 是否必填
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsRequired { get; set; }
|
public IsRequired IsRequired { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建时间
|
/// 创建时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -54,6 +54,11 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid? ReadingId { get; set; }
|
public Guid? ReadingId { get; set; }
|
||||||
|
|
||||||
}
|
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("ClinicalDataTrialSetId")]
|
||||||
|
public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||||
|
// 生成时间 2023-06-29 16:36:05
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
|
using System;
|
||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
namespace IRaCIS.Core.Domain.Models
|
||||||
|
{
|
||||||
|
///<summary>
|
||||||
|
///ReadModuleCriterionFrom
|
||||||
|
///</summary>
|
||||||
|
[Table("ReadModuleCriterionFrom")]
|
||||||
|
public class ReadModuleCriterionFrom : Entity, IAuditAdd
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 阅片期Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid ReadModuleId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 受试者Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid SubjectId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 项目Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 表单Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid ClinicalFormId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建人
|
||||||
|
/// </summary>
|
||||||
|
public Guid CreateUserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -75,11 +75,11 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
public DateTime UpdateTime { get; set; }
|
public DateTime UpdateTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public bool IsCRCConfirm { get; set; } = false;
|
||||||
|
|
||||||
|
public bool IsPMConfirm { get; set; } = false;
|
||||||
public bool IsDeleted { get; set; }
|
public bool IsDeleted { get; set; }
|
||||||
|
|
||||||
public DateTime? DeletedTime { get; set; }
|
public DateTime? DeletedTime { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -418,8 +418,8 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
|
|
||||||
public virtual DbSet<ClinicalTableAnswer> ClinicalTableAnswer { get; set; }
|
public virtual DbSet<ClinicalTableAnswer> ClinicalTableAnswer { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<ReadModuleCriterionFrom> ReadModuleCriterionFrom { get; set; }
|
||||||
public virtual DbSet<ClinicalForm> ClinicalForm { get; set; }
|
public virtual DbSet<ClinicalForm> ClinicalForm { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
public static readonly string ConnectionString = "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true";
|
public static readonly string ConnectionString = "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true";
|
||||||
public static readonly string DbDatabase = "IRaCIS_New_Tet";
|
public static readonly string DbDatabase = "IRaCIS_New_Tet";
|
||||||
//表名称用字符串,拼接
|
//表名称用字符串,拼接
|
||||||
public static readonly string TableName = "ClinicalForm";
|
public static readonly string TableName = "ReadModuleCriterionFrom";
|
||||||
//具体文件里面 例如service 可以配置是否分页
|
//具体文件里面 例如service 可以配置是否分页
|
||||||
}
|
}
|
||||||
#>
|
#>
|
||||||
|
|
Loading…
Reference in New Issue