修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
8272dc71d5
commit
5b0dfa8d7a
|
@ -3085,6 +3085,86 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
#region 暂时不区分标准
|
#region 暂时不区分标准
|
||||||
|
|
||||||
|
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ReadingTaskQuestionMark)))
|
||||||
|
{
|
||||||
|
var type = GetEntityAuditOpt(item);
|
||||||
|
|
||||||
|
var entity = item.Entity as ReadingTaskQuestionMark;
|
||||||
|
|
||||||
|
var tableQuestionAnswer = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTableQuestionAnswer)).Select(x => x.Entity as ReadingTableQuestionAnswer)
|
||||||
|
.Where(x => x.RowId == entity.RowId && x.TableQuestionId == entity.TableQuestionId).FirstOrDefault();
|
||||||
|
var answer = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (tableQuestionAnswer != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
var tableQuesionList = await _dbContext.ReadingTableQuestionTrial.Where(t => t.Id == tableQuestionAnswer.TableQuestionId).Select(t =>
|
||||||
|
new
|
||||||
|
{
|
||||||
|
TrialReadingCriterionId = t.ReadingQuestionTrial.ReadingQuestionCriterionTrialId, //标准Id
|
||||||
|
Type = t.ReadingQuestionTrial.QuestionName, //病灶类型
|
||||||
|
t.Unit,
|
||||||
|
t.CustomUnit,
|
||||||
|
t.DictionaryCode,
|
||||||
|
t.QuestionName,
|
||||||
|
t.QuestionEnName,
|
||||||
|
QuestionId = t.Id,
|
||||||
|
t.ShowOrder,
|
||||||
|
AnswerType = t.Type,
|
||||||
|
})
|
||||||
|
.OrderBy(t => t.ShowOrder).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
List<UnitData> unitDataList = (await _dbContext.Dictionary.Where(x => x.Parent.Code == "ValueUnit").Where(x => x.Code != "0").ToListAsync()).Select(x => new UnitData()
|
||||||
|
{
|
||||||
|
|
||||||
|
Unit = (ValueUnit)int.Parse(x.Code),
|
||||||
|
UnitName = x.Value.ToString(),
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
answer = Translationunit(tableQuesionList.AnswerType, tableQuesionList.Unit, tableQuesionList.CustomUnit, unitDataList, tableQuestionAnswer.Answer);
|
||||||
|
}
|
||||||
|
|
||||||
|
var rowMark = await _dbContext.ReadingTableAnswerRowInfo.Where(x => x.Id == entity.RowId).Select(x => x.RowMark).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
var tableQuestionName = await _dbContext.ReadingTableQuestionTrial.Where(x => x.Id == entity.TableQuestionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefaultAsync();
|
||||||
|
var questionName = await _dbContext.ReadingQuestionTrial.Where(x => x.Id == entity.QuestionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefaultAsync();
|
||||||
|
var liverSegmentation = await _dbContext.ReadingTableQuestionAnswer.Where(x => x.RowId == entity.RowId && x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.liverSegmentation).Select(x => x.Answer).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
var generalId = new Guid();
|
||||||
|
if (entity.MarkId != null)
|
||||||
|
{
|
||||||
|
generalId = entity.MarkId.Value;
|
||||||
|
}
|
||||||
|
else if (entity.TableQuestionId == null && entity.QuestionId == null)
|
||||||
|
{
|
||||||
|
generalId = entity.Id;
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
generalId = IdentifierHelper.CreateGuid(entity.VisitTaskId.ToString(), entity.QuestionId.ToString(), entity.RowId.ToString(), entity.TableQuestionId.ToString(), "ReadingTaskQuestionMark");
|
||||||
|
}
|
||||||
|
|
||||||
|
await InsertInspection<ReadingTaskQuestionMark>(entity, type, x => new InspectionConvertDTO()
|
||||||
|
{
|
||||||
|
VisitTaskId = entity.VisitTaskId,
|
||||||
|
GeneralId = generalId,
|
||||||
|
ObjectRelationParentId = entity.VisitTaskId,
|
||||||
|
|
||||||
|
}, new
|
||||||
|
{
|
||||||
|
QuestionName = questionName,
|
||||||
|
RowMark = rowMark,
|
||||||
|
TableQuestionName = tableQuestionName,
|
||||||
|
Answer = answer,
|
||||||
|
LiverSegmentation = liverSegmentation,
|
||||||
|
}, _userInfo.AuditIdentification);
|
||||||
|
}
|
||||||
|
|
||||||
//保存影像质量 多条记录,只记录一条稽查
|
//保存影像质量 多条记录,只记录一条稽查
|
||||||
if (entitys.Any(x => x.Entity.GetType() == typeof(ReadingTaskQuestionAnswer)))
|
if (entitys.Any(x => x.Entity.GetType() == typeof(ReadingTaskQuestionAnswer)))
|
||||||
{
|
{
|
||||||
|
@ -3267,85 +3347,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ReadingTaskQuestionMark)))
|
|
||||||
{
|
|
||||||
var type = GetEntityAuditOpt(item);
|
|
||||||
|
|
||||||
var entity = item.Entity as ReadingTaskQuestionMark;
|
|
||||||
|
|
||||||
var tableQuestionAnswer = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTableQuestionAnswer)).Select(x => x.Entity as ReadingTableQuestionAnswer)
|
|
||||||
.Where(x => x.RowId == entity.RowId && x.TableQuestionId == entity.TableQuestionId).FirstOrDefault();
|
|
||||||
var answer = string.Empty;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (tableQuestionAnswer != null)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
var tableQuesionList = await _dbContext.ReadingTableQuestionTrial.Where(t =>t.Id== tableQuestionAnswer.TableQuestionId).Select(t =>
|
|
||||||
new
|
|
||||||
{
|
|
||||||
TrialReadingCriterionId = t.ReadingQuestionTrial.ReadingQuestionCriterionTrialId, //标准Id
|
|
||||||
Type = t.ReadingQuestionTrial.QuestionName, //病灶类型
|
|
||||||
t.Unit,
|
|
||||||
t.CustomUnit,
|
|
||||||
t.DictionaryCode,
|
|
||||||
t.QuestionName,
|
|
||||||
t.QuestionEnName,
|
|
||||||
QuestionId = t.Id,
|
|
||||||
t.ShowOrder,
|
|
||||||
AnswerType = t.Type,
|
|
||||||
})
|
|
||||||
.OrderBy(t => t.ShowOrder).FirstOrDefaultAsync();
|
|
||||||
|
|
||||||
List<UnitData> unitDataList = (await _dbContext.Dictionary.Where(x => x.Parent.Code == "ValueUnit").Where(x => x.Code != "0").ToListAsync()).Select(x => new UnitData()
|
|
||||||
{
|
|
||||||
|
|
||||||
Unit = (ValueUnit)int.Parse(x.Code),
|
|
||||||
UnitName = x.Value.ToString(),
|
|
||||||
}).ToList();
|
|
||||||
|
|
||||||
answer = Translationunit(tableQuesionList.AnswerType, tableQuesionList.Unit, tableQuesionList.CustomUnit, unitDataList, tableQuestionAnswer.Answer) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
var rowMark = await _dbContext.ReadingTableAnswerRowInfo.Where(x => x.Id == entity.RowId).Select(x => x.RowMark).FirstOrDefaultAsync();
|
|
||||||
|
|
||||||
var tableQuestionName = await _dbContext.ReadingTableQuestionTrial.Where(x => x.Id == entity.TableQuestionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefaultAsync();
|
|
||||||
var questionName = await _dbContext.ReadingQuestionTrial.Where(x => x.Id == entity.QuestionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefaultAsync();
|
|
||||||
var liverSegmentation = await _dbContext.ReadingTableQuestionAnswer.Where(x => x.RowId == entity.RowId && x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.liverSegmentation).Select(x => x.Answer).FirstOrDefaultAsync();
|
|
||||||
|
|
||||||
var generalId=new Guid();
|
|
||||||
if (entity.MarkId != null)
|
|
||||||
{
|
|
||||||
generalId = entity.MarkId.Value;
|
|
||||||
}
|
|
||||||
else if (entity.TableQuestionId == null && entity.QuestionId == null)
|
|
||||||
{
|
|
||||||
generalId = entity.Id;
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
generalId = IdentifierHelper.CreateGuid(entity.VisitTaskId.ToString(), entity.QuestionId.ToString(), entity.RowId.ToString(), entity.TableQuestionId.ToString(), "ReadingTaskQuestionMark");
|
|
||||||
}
|
|
||||||
|
|
||||||
await InsertInspection<ReadingTaskQuestionMark>(entity, type, x => new InspectionConvertDTO()
|
|
||||||
{
|
|
||||||
VisitTaskId = entity.VisitTaskId,
|
|
||||||
GeneralId = generalId,
|
|
||||||
ObjectRelationParentId = entity.VisitTaskId,
|
|
||||||
|
|
||||||
}, new
|
|
||||||
{
|
|
||||||
QuestionName = questionName,
|
|
||||||
RowMark = rowMark,
|
|
||||||
TableQuestionName = tableQuestionName,
|
|
||||||
Answer = answer,
|
|
||||||
LiverSegmentation = liverSegmentation,
|
|
||||||
}, _userInfo.AuditIdentification);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//病灶这里操作 ReadingTableAnswerRowInfo ReadingTableQuestionAnswer
|
//病灶这里操作 ReadingTableAnswerRowInfo ReadingTableQuestionAnswer
|
||||||
|
|
Loading…
Reference in New Issue