医学审核初步完成
parent
50e1ba6716
commit
102a6f851a
|
@ -85,7 +85,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid DoctorUserId { get; set; }
|
public Guid DoctorUserId { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
public TaskMedicalReviewRule TaskMedicalReviewRule { get; set; }
|
public TaskMedicalReviewRule TaskMedicalReviewRule { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string FileName { get; set; } = string.Empty;
|
public string FileName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
public List<ReadingMedicalReviewDialog> ReadingMedicalReviewDialogList { get; set; }
|
public List<ReadingMedicalReviewDialog> ReadingMedicalReviewDialogList { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -138,13 +138,13 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region 已修改
|
#region 已修改
|
||||||
|
|
||||||
// 系统文件签署 父层级未记录稽查(系统文档初始数据)
|
// 系统文件签署 父层级未记录稽查(系统文档初始数据)
|
||||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SystemDocConfirmedUser)))
|
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SystemDocConfirmedUser)))
|
||||||
{
|
{
|
||||||
var type = GetEntityAuditOpt(item);
|
var type = GetEntityAuditOpt(item);
|
||||||
|
|
||||||
|
@ -196,7 +196,71 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//医学审核
|
||||||
|
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TaskMedicalReview)))
|
||||||
|
{
|
||||||
|
var type = GetEntityAuditOpt(item);
|
||||||
|
|
||||||
|
var entity = item.Entity as TaskMedicalReview;
|
||||||
|
|
||||||
|
await InsertInspection<TaskMedicalReview>(entity, type, x => new InspectionConvertDTO()
|
||||||
|
{
|
||||||
|
VisitTaskId = entity.VisitTaskId,
|
||||||
|
|
||||||
|
ObjectRelationParentId = entity.VisitTaskId,
|
||||||
|
|
||||||
|
ObjectRelationParentId2 = entity.MedicalManagerUserId
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//医学审核 问题答案
|
||||||
|
if (entitys.Any(x => x.Entity.GetType() == typeof(ReadingMedicineQuestionAnswer)))
|
||||||
|
{
|
||||||
|
|
||||||
|
var type = AuditOpt.Add;
|
||||||
|
|
||||||
|
var list = entitys.Where(x => x.Entity.GetType() == typeof(ReadingMedicineQuestionAnswer)).Select(t => t.Entity as ReadingMedicineQuestionAnswer);
|
||||||
|
|
||||||
|
var questionIdList = list.Select(t => t.ReadingMedicineQuestionId).ToList();
|
||||||
|
|
||||||
|
var questionNameList = await _dbContext.ReadingMedicineTrialQuestion.Where(x => questionIdList.Contains(x.Id)).Select(t => new { t.QuestionName, ReadingMedicineQuestionId = t.Id, t.ShowOrder }).ToListAsync();
|
||||||
|
|
||||||
|
var firstEntity = list.FirstOrDefault();
|
||||||
|
|
||||||
|
var cloneEntity = firstEntity.Clone();
|
||||||
|
|
||||||
|
//保证Id 唯一
|
||||||
|
cloneEntity.Id = IdentifierHelper.CreateGuid(firstEntity.VisitTaskId.ToString(), firstEntity.TaskMedicalReviewId.ToString() );
|
||||||
|
|
||||||
|
await InsertInspection(cloneEntity, type, x => new InspectionConvertDTO()
|
||||||
|
{
|
||||||
|
VisitTaskId = x.VisitTaskId,
|
||||||
|
|
||||||
|
//byzhouhang
|
||||||
|
ObjectRelationParentId = x.TaskMedicalReviewId,
|
||||||
|
}, new
|
||||||
|
{
|
||||||
|
QuestionAnswerList = list.Join(questionNameList, t => t.ReadingMedicineQuestionId, u => u.ReadingMedicineQuestionId, (t, u) => new { t.Answer, u.QuestionName, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//医学审核对话
|
||||||
|
|
||||||
|
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ReadingMedicalReviewDialog)))
|
||||||
|
{
|
||||||
|
var type = GetEntityAuditOpt(item);
|
||||||
|
|
||||||
|
var entity = item.Entity as ReadingMedicalReviewDialog;
|
||||||
|
|
||||||
|
await InsertInspection<ReadingMedicalReviewDialog>(entity, type, x => new InspectionConvertDTO()
|
||||||
|
{
|
||||||
|
VisitTaskId = entity.VisitTaskId,
|
||||||
|
|
||||||
|
ObjectRelationParentId = entity.TaskMedicalReviewId,
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Qc 问题答案
|
// Qc 问题答案
|
||||||
|
@ -1182,22 +1246,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//医学审核
|
|
||||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TaskMedicalReview)))
|
|
||||||
{
|
|
||||||
var type = GetEntityAuditOpt(item);
|
|
||||||
|
|
||||||
var entity = item.Entity as TaskMedicalReview;
|
|
||||||
|
|
||||||
await InsertInspection<TaskMedicalReview>(entity, type, x => new InspectionConvertDTO()
|
|
||||||
{
|
|
||||||
VisitTaskId = entity.VisitTaskId,
|
|
||||||
|
|
||||||
ObjectRelationParentId = entity.VisitTaskId,
|
|
||||||
|
|
||||||
ObjectRelationParentId2 = entity.MedicalManagerUserId
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//一致性分析规则
|
//一致性分析规则
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue