Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
commit
80eb9aa036
|
@ -198,6 +198,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.Include(x=>x.ClinicalDataTrialSet).Select(x=>new GetCRCSubjectClinicalOutDto() {
|
.Include(x=>x.ClinicalDataTrialSet).Select(x=>new GetCRCSubjectClinicalOutDto() {
|
||||||
SubjectId=x.SubjectId,
|
SubjectId=x.SubjectId,
|
||||||
SubjectCode=x.Subject.Code,
|
SubjectCode=x.Subject.Code,
|
||||||
|
TrialId=inDto.TrialId,
|
||||||
ClinicalDataTrialSetId = x.ClinicalDataTrialSet.Id,
|
ClinicalDataTrialSetId = x.ClinicalDataTrialSet.Id,
|
||||||
ClinicalDataSetEnName= x.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
ClinicalDataSetEnName= x.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
||||||
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName,
|
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName,
|
||||||
|
@ -408,56 +409,157 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<GetCRCConfirmListOutDto>> GetCRCConfirmList(GetCRCConfirmListInDto inDto)
|
public async Task<List<GetCRCConfirmListOutDto>> GetCRCConfirmList(GetCRCConfirmListInDto inDto)
|
||||||
{
|
{
|
||||||
|
|
||||||
List<GetCRCConfirmListOutDto> result = await _readModuleRepository.Where(x => x.TrialId == inDto.TrialId)
|
List<GetCRCConfirmListOutDto> result = await _readModuleRepository.Where(x => x.TrialId == inDto.TrialId)
|
||||||
.Select(x => new GetCRCConfirmListOutDto()
|
.Select(x => new GetCRCConfirmListOutDto()
|
||||||
{
|
{
|
||||||
|
SubjectId= x.SubjectId,
|
||||||
IsCRCConfirm = x.IsCRCConfirm,
|
IsCRCConfirm = x.IsCRCConfirm,
|
||||||
LatestScanDate = x.SubjectVisit.LatestScanDate,
|
LatestScanDate = x.SubjectVisit.LatestScanDate,
|
||||||
ReadingSetType = x.ReadingSetType,
|
ReadingSetType = x.ReadingSetType,
|
||||||
IsPMConfirm = x.IsPMConfirm,
|
IsPMConfirm = x.IsPMConfirm,
|
||||||
ReadModuleId=x.Id,
|
ReadModuleId = x.Id,
|
||||||
|
|
||||||
}).OrderBy(x => x.LatestScanDate).ToListAsync();
|
}).OrderBy(x => x.LatestScanDate).ToListAsync();
|
||||||
|
|
||||||
var formList = await _clinicalFormRepository.Where(x => x.TrialId == inDto.TrialId)
|
var formList = await _clinicalFormRepository.Where(x => x.TrialId == inDto.TrialId)
|
||||||
.Where(x=> x.ClinicalDataTrialSet.UploadRole==UploadRole.CRC)
|
.Where(x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC)
|
||||||
.Where(x=> x.ClinicalDataTrialSet.ClinicalDataLevel==ClinicalLevel.ImageRead|| x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.OncologyRead)
|
.Where(x => x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.ImageRead || x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.OncologyRead)
|
||||||
.Select(x =>new CRCConfirmFormList
|
.Select(x => new CRCClinicalForm
|
||||||
{
|
{
|
||||||
CkeckDate=x.CheckDate,
|
CkeckDate = x.CheckDate,
|
||||||
ClinicalDataLevel= x.ClinicalDataTrialSet.ClinicalDataLevel,
|
ClinicalDataLevel = x.ClinicalDataTrialSet.ClinicalDataLevel,
|
||||||
|
ClinicalFormId = x.Id,
|
||||||
|
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
var confirmList = await _readModuleCriterionFromRepository.Where(x => x.TrialId == inDto.TrialId).ToListAsync();
|
var confirmList = await _readModuleCriterionFromRepository.Where(x => x.TrialId == inDto.TrialId).ToListAsync();
|
||||||
|
|
||||||
result.ForEach(x =>
|
result.ForEach(x =>
|
||||||
{
|
{
|
||||||
if (x.IsCRCConfirm)
|
if (x.IsCRCConfirm)
|
||||||
{
|
{
|
||||||
x.FormCount = confirmList.Where(y => y.ReadModuleId == x.ReadModuleId).Count();
|
x.ClinicalFormIdList = confirmList.Where(y => y.ReadModuleId == x.ReadModuleId).Select(y=>y.ClinicalFormId).ToList();
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (x.ReadingSetType == ReadingSetType.ImageReading)
|
if (x.ReadingSetType == ReadingSetType.ImageReading)
|
||||||
{
|
{
|
||||||
x.FormCount = formList.Where(y => y.ClinicalDataLevel == ClinicalLevel.ImageRead&&y.CkeckDate<=x.LatestScanDate).Count();
|
x.ClinicalFormIdList = formList.Where(y => y.ClinicalDataLevel == ClinicalLevel.ImageRead&&y.CkeckDate<=x.LatestScanDate).Select(y => y.ClinicalFormId).ToList();
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
x.FormCount = formList.Where(y => y.ClinicalDataLevel == ClinicalLevel.OncologyRead&&y.CkeckDate <= x.LatestScanDate).Count();
|
x.ClinicalFormIdList = formList.Where(y => y.ClinicalDataLevel == ClinicalLevel.OncologyRead&&y.CkeckDate <= x.LatestScanDate).Select(y => y.ClinicalFormId).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CRC 确认临床数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> CRCConfirmClinical(CRCConfirmClinicalInDto inDto)
|
||||||
|
{
|
||||||
|
var dataList =await this.GetCRCConfirmList(new GetCRCConfirmListInDto()
|
||||||
|
{
|
||||||
|
TrialId = inDto.TrialId
|
||||||
|
});
|
||||||
|
|
||||||
|
var presentData = dataList.Where(x => x.ReadModuleId == inDto.ReadModuleId).First();
|
||||||
|
var confirmlist= dataList.Where(x =>(x.LatestScanDate < presentData.LatestScanDate && x.ReadingSetType == presentData.ReadingSetType)
|
||||||
|
|| x.ReadModuleId == presentData.ReadModuleId).Where(x => !x.IsCRCConfirm).ToList();
|
||||||
|
|
||||||
|
List<ReadModuleCriterionFrom> needAddList = new List<ReadModuleCriterionFrom>()
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
confirmlist.ForEach(x =>
|
||||||
|
{
|
||||||
|
x.ClinicalFormIdList.ForEach(y =>
|
||||||
|
{
|
||||||
|
needAddList.Add(new ReadModuleCriterionFrom()
|
||||||
|
{
|
||||||
|
ClinicalFormId = y,
|
||||||
|
ReadModuleId = x.ReadModuleId,
|
||||||
|
SubjectId = x.SubjectId,
|
||||||
|
TrialId = inDto.TrialId,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var readModuleIds = confirmlist.Select(x => x.ReadModuleId).ToList();
|
||||||
|
|
||||||
|
await _readModuleRepository.UpdatePartialFromQueryAsync(x => readModuleIds.Contains(x.Id),x=>new ReadModule() {
|
||||||
|
IsCRCConfirm=true
|
||||||
|
});
|
||||||
|
await _readModuleCriterionFromRepository.AddRangeAsync(needAddList);
|
||||||
|
|
||||||
|
await _readModuleCriterionFromRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CRC 取消确认
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> CRCCancelConfirmClinical(CRCCancelConfirmClinicalInDto inDto)
|
||||||
|
{
|
||||||
|
var dataList = await this.GetCRCConfirmList(new GetCRCConfirmListInDto()
|
||||||
|
{
|
||||||
|
TrialId = inDto.TrialId
|
||||||
|
});
|
||||||
|
|
||||||
|
var presentData = dataList.Where(x => x.ReadModuleId == inDto.ReadModuleId).First();
|
||||||
|
|
||||||
|
if (dataList.Any(x => x.IsPMConfirm && x.LatestScanDate > presentData.LatestScanDate && x.ReadingSetType == presentData.ReadingSetType))
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException("当前数据并非最后一条确认信息,无法取消!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(presentData.IsPMConfirm)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException("PM已确认,无法取消!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
await _readModuleRepository.UpdatePartialFromQueryAsync(x => presentData.ReadModuleId==x.Id, x => new ReadModule()
|
||||||
|
{
|
||||||
|
IsCRCConfirm = false
|
||||||
|
});
|
||||||
|
|
||||||
|
await _readModuleCriterionFromRepository.BatchDeleteNoTrackingAsync(x=>x.ReadModuleId== presentData.ReadModuleId);
|
||||||
|
|
||||||
|
await _readModuleCriterionFromRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PM确认临床数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> PMConfirmClinical(CRCConfirmClinicalInDto inDto)
|
||||||
|
{
|
||||||
|
var readModuleData = await _readModuleRepository.Where(x => x.Id == inDto.ReadModuleId).FirstNotNullAsync();
|
||||||
|
if (!readModuleData.IsCRCConfirm)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException("CRC还未确认数据,PM无法确认");
|
||||||
|
}
|
||||||
|
|
||||||
|
await _readModuleRepository.UpdatePartialFromQueryAsync(x => inDto.ReadModuleId == x.Id, x => new ReadModule()
|
||||||
|
{
|
||||||
|
IsPMConfirm = false
|
||||||
|
});
|
||||||
|
|
||||||
|
await _readModuleRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(true);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,73 @@ namespace IRaCIS.Core.Application.Service
|
||||||
_systemClinicalQuestionRepository = systemClinicalQuestionRepository;
|
_systemClinicalQuestionRepository = systemClinicalQuestionRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取问题计算关系
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<List<GetTrialClinicalQuestionCalculateRelationOutDto>> GetTrialClinicalQuestionCalculateRelation(GetTrialClinicalQuestionCalculateRelationInDto inDto)
|
||||||
|
{
|
||||||
|
|
||||||
|
var result= await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId)
|
||||||
|
.Where( x=> x.ClinicalQuestionType == "number")
|
||||||
|
.Where(x => x.CustomCalculateMark != null && x.CustomCalculateMark > ClinicalCalculateMark.None)
|
||||||
|
.Select(x => new GetTrialClinicalQuestionCalculateRelationOutDto()
|
||||||
|
{
|
||||||
|
QuestionId = x.Id,
|
||||||
|
QuestionName = x.QuestionName,
|
||||||
|
CustomCalculateMark = x.CustomCalculateMark,
|
||||||
|
CalculateQuestionList = x.CalculateQuestionList,
|
||||||
|
}).ToListAsync();
|
||||||
|
result = result.Where(x => x.CalculateQuestionList.Count() > 0).ToList();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取计算问题
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<List<GetClinicalCalculateQuestionsOutDto>> GetClinicalCalculateQuestions(GetClinicalCalculateQuestionsInDto inDto)
|
||||||
|
{
|
||||||
|
var result = await _trialClinicalQuestionRepository
|
||||||
|
|
||||||
|
.Where(x => x.TrialClinicalId == inDto.TrialClinicalId)
|
||||||
|
.WhereIf(!inDto.ClinicalQuestionType.IsNullOrEmpty(), x => x.ClinicalQuestionType == inDto.ClinicalQuestionType)
|
||||||
|
.OrderBy(x => x.ShowOrder)
|
||||||
|
.Select(x => new GetClinicalCalculateQuestionsOutDto
|
||||||
|
()
|
||||||
|
{
|
||||||
|
QuestionId = x.Id,
|
||||||
|
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us)
|
||||||
|
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
var tablequestion = await _trialClinicalTableQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId && x.ClinicalTableQuestionType == "number").Select(x =>
|
||||||
|
new
|
||||||
|
{
|
||||||
|
TableQuestionId = x.Id,
|
||||||
|
QuestionId= x.QuestionId,
|
||||||
|
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us)
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
result.ForEach(x =>
|
||||||
|
{
|
||||||
|
x.TableQuestions = tablequestion.Where(y => x.QuestionId == y.QuestionId).Select(y => new CalculateQuestion()
|
||||||
|
{
|
||||||
|
|
||||||
|
QuestionId = y.QuestionId,
|
||||||
|
QuestionName = y.QuestionName
|
||||||
|
|
||||||
|
}).ToList();
|
||||||
|
});
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取系统临床数据预览
|
/// 获取系统临床数据预览
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -104,6 +171,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
public void FindChildQuestion(ClinicalQuestionPreviewDto item, List<ClinicalQuestionPreviewDto> questions, List<ClinicalTablePreviewDto> tableQuestions,List<ClinicalFormQuestionAnswer> answers, List<ClinicalFormTableQuestionAnswer> tableAnswers)
|
public void FindChildQuestion(ClinicalQuestionPreviewDto item, List<ClinicalQuestionPreviewDto> questions, List<ClinicalTablePreviewDto> tableQuestions,List<ClinicalFormQuestionAnswer> answers, List<ClinicalFormTableQuestionAnswer> tableAnswers)
|
||||||
{
|
{
|
||||||
item.Childrens = questions.Where(x => (x.ParentId == item.Id)||(x.GroupId== item.Id&&x.ParentId==null)).ToList();
|
item.Childrens = questions.Where(x => (x.ParentId == item.Id)||(x.GroupId== item.Id&&x.ParentId==null)).ToList();
|
||||||
|
|
||||||
|
item.RelationQuestions = questions.Where(x => x.RelevanceId == item.Id).ToList();
|
||||||
|
|
||||||
item.Answer = answers.Where(x => x.QuestionId == item.Id).Select(x => x.Answer).FirstOrDefault()??string.Empty;
|
item.Answer = answers.Where(x => x.QuestionId == item.Id).Select(x => x.Answer).FirstOrDefault()??string.Empty;
|
||||||
|
|
||||||
var tableIndexs = tableAnswers.Where(x => x.QuestionId == item.Id).Select(x => x.RowIndex).Distinct().OrderBy(x=>x).ToList();
|
var tableIndexs = tableAnswers.Where(x => x.QuestionId == item.Id).Select(x => x.RowIndex).Distinct().OrderBy(x=>x).ToList();
|
||||||
|
@ -120,6 +190,10 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
item.TableQuestions = tableQuestions.Where(x => x.QuestionId == item.Id).OrderBy(x=>x.ShowOrder).ToList();
|
item.TableQuestions = tableQuestions.Where(x => x.QuestionId == item.Id).OrderBy(x=>x.ShowOrder).ToList();
|
||||||
|
|
||||||
|
item.RelationQuestions.ForEach(x => {
|
||||||
|
this.FindChildQuestion(x, questions, tableQuestions, answers, tableAnswers);
|
||||||
|
});
|
||||||
|
|
||||||
item.Childrens.ForEach(x => {
|
item.Childrens.ForEach(x => {
|
||||||
this.FindChildQuestion(x, questions, tableQuestions, answers, tableAnswers);
|
this.FindChildQuestion(x, questions, tableQuestions, answers, tableAnswers);
|
||||||
});
|
});
|
||||||
|
|
|
@ -28,6 +28,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
{
|
{
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
|
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
public string SubjectCode { get; set; }
|
public string SubjectCode { get; set; }
|
||||||
public Guid ClinicalDataTrialSetId { get; set; }
|
public Guid ClinicalDataTrialSetId { get; set; }
|
||||||
|
|
||||||
|
@ -99,10 +101,27 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CRCConfirmFormList
|
public class CRCCancelConfirmClinicalInDto
|
||||||
|
{
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
public Guid ReadModuleId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CRCConfirmClinicalInDto
|
||||||
|
{
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
public Guid ReadModuleId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class CRCClinicalForm
|
||||||
{
|
{
|
||||||
public DateTime? CkeckDate { get; set; }
|
public DateTime? CkeckDate { get; set; }
|
||||||
|
|
||||||
|
public Guid ClinicalFormId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 临床级别
|
/// 临床级别
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -112,6 +131,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public class GetCRCConfirmListOutDto
|
public class GetCRCConfirmListOutDto
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 受试者ID
|
||||||
|
/// </summary>
|
||||||
|
public Guid SubjectId { get; set; }
|
||||||
public Guid ReadModuleId { get; set; }
|
public Guid ReadModuleId { get; set; }
|
||||||
|
|
||||||
public bool IsPMConfirm { get; set; }
|
public bool IsPMConfirm { get; set; }
|
||||||
|
@ -125,7 +149,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime? LatestScanDate { get; set; }
|
public DateTime? LatestScanDate { get; set; }
|
||||||
|
|
||||||
public int FormCount { get; set; }
|
|
||||||
|
public List<Guid> ClinicalFormIdList { get; set; }
|
||||||
|
|
||||||
|
public int FormCount
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.ClinicalFormIdList.Count();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SubmitClinicalFormInDto
|
public class SubmitClinicalFormInDto
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
@ -8,6 +10,76 @@ using System.Threading.Tasks;
|
||||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#region 获取计算问题
|
||||||
|
|
||||||
|
public class GetTrialClinicalQuestionCalculateRelationInDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 项目临床数据Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid TrialClinicalId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetTrialClinicalQuestionCalculateRelationOutDto
|
||||||
|
{
|
||||||
|
public Guid QuestionId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 问题名称
|
||||||
|
/// </summary>
|
||||||
|
public string QuestionName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义计算标记
|
||||||
|
/// </summary>
|
||||||
|
public ClinicalCalculateMark? CustomCalculateMark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数值类型
|
||||||
|
/// </summary>
|
||||||
|
public ValueOfType? ValueType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 单位
|
||||||
|
/// </summary>
|
||||||
|
public ValueUnit? Unit { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义单位
|
||||||
|
/// </summary>
|
||||||
|
public string CustomUnit { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public List<CalculateInfo> CalculateQuestionList { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetClinicalCalculateQuestionsOutDto
|
||||||
|
{
|
||||||
|
public Guid QuestionId { get; set; }
|
||||||
|
|
||||||
|
public string QuestionName { get; set; }
|
||||||
|
|
||||||
|
public List<CalculateQuestion> TableQuestions { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetClinicalCalculateQuestionsInDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 项目临床数据Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid TrialClinicalId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 临床问题类型(分组,单选。)
|
||||||
|
/// </summary>
|
||||||
|
public string ClinicalQuestionType { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 预览
|
#region 预览
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,6 +116,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<ClinicalQuestionPreviewDto> Childrens { get; set; } = new List<ClinicalQuestionPreviewDto>();
|
public List<ClinicalQuestionPreviewDto> Childrens { get; set; } = new List<ClinicalQuestionPreviewDto>();
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 关联问题
|
||||||
|
/// </summary>
|
||||||
|
public List<ClinicalQuestionPreviewDto> RelationQuestions { get; set; } = new List<ClinicalQuestionPreviewDto>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 表格问题
|
/// 表格问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -172,6 +250,36 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// 单位
|
/// 单位
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Unit { get; set; } = string.Empty;
|
public string Unit { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义计算标记
|
||||||
|
/// </summary>
|
||||||
|
public ClinicalCalculateMark? CustomCalculateMark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义计算问题
|
||||||
|
/// </summary>
|
||||||
|
public string CalculateQuestions { get; set; } = "[]";
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public List<CalculateInfo> CalculateQuestionList
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var result = JsonConvert.DeserializeObject<List<CalculateInfo>>(this.CalculateQuestions);
|
||||||
|
return result == null ? new List<CalculateInfo>() : result;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
return new List<CalculateInfo>();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -212,16 +320,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// 项目临床数据Id
|
/// 项目临床数据Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid TrialClinicalId { get; set; }
|
public Guid TrialClinicalId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 自定义计算标记
|
|
||||||
/// </summary>
|
|
||||||
public ClinicalCalculateMark? ClinicalCalculateMarkEnum { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 自定义计算问题
|
|
||||||
/// </summary>
|
|
||||||
public string CalculateQuestions { get; set; } = "[]";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -61,6 +61,7 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum ClinicalCalculateMark
|
public enum ClinicalCalculateMark
|
||||||
{
|
{
|
||||||
|
None = -1,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// +
|
/// +
|
||||||
|
|
|
@ -8,6 +8,7 @@ using IRaCIS.Core.Domain.Share;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Domain.Models
|
namespace IRaCIS.Core.Domain.Models
|
||||||
{
|
{
|
||||||
|
@ -126,6 +127,36 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// 单位
|
/// 单位
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Unit { get; set; } = string.Empty;
|
public string Unit { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义计算标记
|
||||||
|
/// </summary>
|
||||||
|
public ClinicalCalculateMark? CustomCalculateMark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义计算问题
|
||||||
|
/// </summary>
|
||||||
|
public string CalculateQuestions { get; set; } = "[]";
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public List<CalculateInfo> CalculateQuestionList
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var result = JsonConvert.DeserializeObject<List<CalculateInfo>>(this.CalculateQuestions);
|
||||||
|
return result == null ? new List<CalculateInfo>() : result;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
return new List<CalculateInfo>();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ using IRaCIS.Core.Domain.Share;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Domain.Models
|
namespace IRaCIS.Core.Domain.Models
|
||||||
{
|
{
|
||||||
|
@ -125,13 +126,33 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 自定义计算标记
|
/// 自定义计算标记
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ClinicalCalculateMark? ClinicalCalculateMarkEnum { get; set; }
|
public ClinicalCalculateMark? CustomCalculateMark { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 自定义计算问题
|
/// 自定义计算问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string CalculateQuestions { get; set; } = "[]";
|
public string CalculateQuestions { get; set; } = "[]";
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public List<CalculateInfo> CalculateQuestionList
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var result = JsonConvert.DeserializeObject<List<CalculateInfo>>(this.CalculateQuestions);
|
||||||
|
return result == null ? new List<CalculateInfo>() : result;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
return new List<CalculateInfo>();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 小数点位数
|
/// 小数点位数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue