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() {
|
||||
SubjectId=x.SubjectId,
|
||||
SubjectCode=x.Subject.Code,
|
||||
TrialId=inDto.TrialId,
|
||||
ClinicalDataTrialSetId = x.ClinicalDataTrialSet.Id,
|
||||
ClinicalDataSetEnName= x.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
||||
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName,
|
||||
|
@ -408,56 +409,157 @@ namespace IRaCIS.Core.Application.Service
|
|||
[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();
|
||||
|
||||
List<GetCRCConfirmListOutDto> result = await _readModuleRepository.Where(x => x.TrialId == inDto.TrialId)
|
||||
.Select(x => new GetCRCConfirmListOutDto()
|
||||
{
|
||||
SubjectId= x.SubjectId,
|
||||
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 CRCClinicalForm
|
||||
{
|
||||
CkeckDate = x.CheckDate,
|
||||
ClinicalDataLevel = x.ClinicalDataTrialSet.ClinicalDataLevel,
|
||||
ClinicalFormId = x.Id,
|
||||
}).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();
|
||||
|
||||
x.ClinicalFormIdList = confirmList.Where(y => y.ReadModuleId == x.ReadModuleId).Select(y=>y.ClinicalFormId).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
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
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
/// <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,12 +42,79 @@ namespace IRaCIS.Core.Application.Service
|
|||
_systemClinicalQuestionRepository = systemClinicalQuestionRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取系统临床数据预览
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
/// <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>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<(List<ClinicalQuestionPreviewDto>, bool)> GetSystemClinicalQuestionPreview(GetSystemClinicalQuestionPreviewDto inDto)
|
||||
{
|
||||
var questions = await _systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId)
|
||||
|
@ -104,7 +171,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
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.Answer = answers.Where(x => x.QuestionId == item.Id).Select(x => x.Answer).FirstOrDefault()??string.Empty;
|
||||
|
||||
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;
|
||||
|
||||
var tableIndexs = tableAnswers.Where(x => x.QuestionId == item.Id).Select(x => x.RowIndex).Distinct().OrderBy(x=>x).ToList();
|
||||
|
||||
|
@ -120,10 +190,14 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
item.TableQuestions = tableQuestions.Where(x => x.QuestionId == item.Id).OrderBy(x=>x.ShowOrder).ToList();
|
||||
|
||||
item.Childrens.ForEach(x => {
|
||||
item.RelationQuestions.ForEach(x => {
|
||||
this.FindChildQuestion(x, questions, tableQuestions, answers, tableAnswers);
|
||||
});
|
||||
}
|
||||
|
||||
item.Childrens.ForEach(x => {
|
||||
this.FindChildQuestion(x, questions, tableQuestions, answers, tableAnswers);
|
||||
});
|
||||
}
|
||||
|
||||
#region 项目问题
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
{
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public string SubjectCode { get; set; }
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
|
||||
|
@ -99,10 +101,27 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
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 Guid ClinicalFormId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
|
@ -112,6 +131,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public class GetCRCConfirmListOutDto
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 受试者ID
|
||||
/// </summary>
|
||||
public Guid SubjectId { get; set; }
|
||||
public Guid ReadModuleId { get; set; }
|
||||
|
||||
public bool IsPMConfirm { get; set; }
|
||||
|
@ -125,7 +149,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
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
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -8,10 +10,80 @@ using System.Threading.Tasks;
|
|||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
|
||||
#region 预览
|
||||
|
||||
|
||||
public class GetSystemClinicalQuestionPreviewDto
|
||||
#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 预览
|
||||
|
||||
|
||||
public class GetSystemClinicalQuestionPreviewDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 系统临床数据Id
|
||||
|
@ -44,10 +116,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public List<ClinicalQuestionPreviewDto> Childrens { get; set; } = new List<ClinicalQuestionPreviewDto>();
|
||||
|
||||
/// <summary>
|
||||
/// 表格问题
|
||||
/// </summary>
|
||||
public List<ClinicalTablePreviewDto> TableQuestions { get; set; } = new List<ClinicalTablePreviewDto>();
|
||||
|
||||
/// <summary>
|
||||
/// 关联问题
|
||||
/// </summary>
|
||||
public List<ClinicalQuestionPreviewDto> RelationQuestions { get; set; } = new List<ClinicalQuestionPreviewDto>();
|
||||
|
||||
/// <summary>
|
||||
/// 表格问题
|
||||
/// </summary>
|
||||
public List<ClinicalTablePreviewDto> TableQuestions { get; set; } = new List<ClinicalTablePreviewDto>();
|
||||
|
||||
public List<Dictionary<Guid,string>> TableAnswer { get; set; }
|
||||
}
|
||||
|
@ -172,7 +250,37 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// 单位
|
||||
/// </summary>
|
||||
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>
|
||||
/// 查询临床数据基类
|
||||
|
@ -212,16 +320,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// 项目临床数据Id
|
||||
/// </summary>
|
||||
public Guid TrialClinicalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义计算标记
|
||||
/// </summary>
|
||||
public ClinicalCalculateMark? ClinicalCalculateMarkEnum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义计算问题
|
||||
/// </summary>
|
||||
public string CalculateQuestions { get; set; } = "[]";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -61,11 +61,12 @@ namespace IRaCIS.Core.Domain.Share
|
|||
/// </summary>
|
||||
public enum ClinicalCalculateMark
|
||||
{
|
||||
None = -1,
|
||||
|
||||
/// <summary>
|
||||
/// +
|
||||
/// </summary>
|
||||
Add = 1,
|
||||
/// <summary>
|
||||
/// +
|
||||
/// </summary>
|
||||
Add = 1,
|
||||
|
||||
/// <summary>
|
||||
/// -
|
||||
|
|
|
@ -8,6 +8,7 @@ using IRaCIS.Core.Domain.Share;
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
|
@ -126,7 +127,37 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// 单位
|
||||
/// </summary>
|
||||
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.Schema;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
|
@ -125,17 +126,37 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// <summary>
|
||||
/// 自定义计算标记
|
||||
/// </summary>
|
||||
public ClinicalCalculateMark? ClinicalCalculateMarkEnum { get; set; }
|
||||
public ClinicalCalculateMark? CustomCalculateMark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义计算问题
|
||||
/// </summary>
|
||||
public string CalculateQuestions { get; set; } = "[]";
|
||||
|
||||
/// <summary>
|
||||
/// 小数点位数
|
||||
/// </summary>
|
||||
public int? DigitPlaces { 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>
|
||||
public int? DigitPlaces { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
|
|
Loading…
Reference in New Issue