对话拼接
parent
9148651556
commit
60707150a6
|
|
@ -1,2 +1,3 @@
|
|||
{
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2691,6 +2691,12 @@
|
|||
<param name="inCommand"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ImageAndDoc.DownloadAndUploadService.GetTrialSubjectVisitMarkList(IRaCIS.Core.Application.Contracts.SubjectVisitMarkQuery)">
|
||||
<summary>
|
||||
获取受试者级别 访视标注列表
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ImageAndDoc.DownloadAndUploadService.GetSubejectOrVisitZipInfo(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Subject},IRaCIS.Core.Application.Contracts.SubejctZipInfoQuery)">
|
||||
<summary>
|
||||
受试者级别所有的影像
|
||||
|
|
@ -10556,6 +10562,56 @@
|
|||
IR阅片页面是否可以查看既往任务结果
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.JointMedicalReviewI18n.Msg1">
|
||||
<summary>
|
||||
trials:medicalFeedback:message:msg1
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.JointMedicalReviewI18n.Msg2">
|
||||
<summary>
|
||||
trials:medicalFeedback:message:msg2
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.JointMedicalReviewI18n.Msg3">
|
||||
<summary>
|
||||
trials:medicalFeedback:message:msg3
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.JointMedicalReviewI18n.Msg4">
|
||||
<summary>
|
||||
trials:medicalFeedback:message:msg4
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.JointMedicalReviewI18n.Msg5">
|
||||
<summary>
|
||||
trials:medicalFeedback:message:msg5
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.JointMedicalReviewI18n.CloseReasonEnum">
|
||||
<summary>
|
||||
trials:medicalFeedback:title:closeReasonEnum
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.JointMedicalReviewI18n.IsEndorse">
|
||||
<summary>
|
||||
trials:medicalFeedback:title:isEndorse
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.JointMedicalReviewI18n.Reason">
|
||||
<summary>
|
||||
trials:medicalFeedback:title:reason
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.JointMedicalReviewI18n.IsRequestReread">
|
||||
<summary>
|
||||
trials:medicalFeedback:title:isRequestReread
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.JointMedicalReviewI18n.AuditAdvice">
|
||||
<summary>
|
||||
AuditAdvice
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetMedicalReviewDialogOutDto.Content">
|
||||
<summary>
|
||||
对话内容
|
||||
|
|
@ -13075,7 +13131,7 @@
|
|||
阅片医学审核
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicalReviewService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo},IRaCIS.Core.Application.Contracts.IReadingImageTaskService,IRaCIS.Core.Application.Service.IVisitTaskService,IRaCIS.Core.Application.Contracts.IReadingClinicalDataService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskMedicalReview},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer},IRaCIS.Core.Application.Interfaces.ITrialEmailNoticeConfigService,AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicalReviewService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingMedicineTrialQuestion},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Internationalization},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo},IRaCIS.Core.Application.Contracts.IReadingImageTaskService,IRaCIS.Core.Application.Service.IVisitTaskService,IRaCIS.Core.Application.Contracts.IReadingClinicalDataService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskMedicalReview},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingMedicalReviewDialog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingMedicineQuestionAnswer},IRaCIS.Core.Application.Interfaces.ITrialEmailNoticeConfigService,AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
阅片医学审核
|
||||
</summary>
|
||||
|
|
@ -13127,6 +13183,21 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicalReviewService.TestGetJointMedicalReviewDialog(System.Guid)">
|
||||
<summary>
|
||||
测试获取医学审核对话拼接内容
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicalReviewService.JointMedicalReviewDialog(IRaCIS.Core.Application.Service.Reading.Dto.GetMedicalReviewDialogOutDto,IRaCIS.Core.Application.Service.Reading.Dto.JointMedicalReviewI18n)">
|
||||
<summary>
|
||||
获取医学审核对话拼接内容
|
||||
</summary>
|
||||
<param name="record"></param>
|
||||
<param name="i18NAndDic"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicalReviewService.FinishMedicalReview(IRaCIS.Core.Application.Service.Reading.Dto.FinishMedicalReviewInDto)">
|
||||
<summary>
|
||||
完成医学审核
|
||||
|
|
|
|||
|
|
@ -203,6 +203,65 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public Guid TaskMedicalReviewId { get; set; }
|
||||
}
|
||||
|
||||
public class JointMedicalReviewI18n
|
||||
{
|
||||
/// <summary>
|
||||
/// trials:medicalFeedback:message:msg1
|
||||
/// </summary>
|
||||
public string Msg1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// trials:medicalFeedback:message:msg2
|
||||
/// </summary>
|
||||
public string Msg2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// trials:medicalFeedback:message:msg3
|
||||
/// </summary>
|
||||
public string Msg3 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// trials:medicalFeedback:message:msg4
|
||||
/// </summary>
|
||||
public string Msg4 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// trials:medicalFeedback:message:msg5
|
||||
/// </summary>
|
||||
public string Msg5 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// trials:medicalFeedback:title:closeReasonEnum
|
||||
/// </summary>
|
||||
public string CloseReasonEnum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// trials:medicalFeedback:title:isEndorse
|
||||
/// </summary>
|
||||
public string IsEndorse { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// trials:medicalFeedback:title:reason
|
||||
/// </summary>
|
||||
public string Reason { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// trials:medicalFeedback:title:isRequestReread
|
||||
/// </summary>
|
||||
public string IsRequestReread { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// AuditAdvice
|
||||
/// </summary>
|
||||
public Dictionary<string, string> AuditAdvice { get; set; }
|
||||
|
||||
public Dictionary<string, string> MedicalDialogCloseEnum { get; set; }
|
||||
|
||||
public Dictionary<string, string> MedicalReviewDoctorUserIdea { get; set; }
|
||||
|
||||
public Dictionary<string, string> YesOrNo { get; set; }
|
||||
}
|
||||
|
||||
public class GetMedicalReviewDialogOutDto
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,12 +3,17 @@ using IRaCIS.Core.Application.Filter;
|
|||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
|
@ -19,6 +24,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
public class ReadingMedicalReviewService(IRepository<ReadingMedicineTrialQuestion> _readingMedicineTrialQuestionRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<VisitTask> _visitTaskRepository,
|
||||
IRepository<Dictionary> _dictionaryRepository,
|
||||
IRepository<Internationalization> _internationalizationRepository,
|
||||
IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswerRepository,
|
||||
IRepository<ReadingGlobalTaskInfo> _readingGlobalTaskInfoRepository,
|
||||
|
||||
|
|
@ -628,6 +635,167 @@ namespace IRaCIS.Core.Application.Service
|
|||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测试获取医学审核对话拼接内容
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<string> TestGetJointMedicalReviewDialog(Guid id)
|
||||
{
|
||||
var dialog = await _readingMedicalReviewDialogRepository.Where(x => x.Id == id)
|
||||
.ProjectTo<GetMedicalReviewDialogOutDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
||||
|
||||
|
||||
Dictionary<string, string> i18NKeys = new Dictionary<string, string>()
|
||||
{
|
||||
{"Msg1","trials:medicalFeedback:message:msg1"},
|
||||
{ "Msg2","trials:medicalFeedback:message:msg2"},
|
||||
{ "Msg3","trials:medicalFeedback:message:msg3"},
|
||||
{ "Msg4", "trials:medicalFeedback:message:msg4"},
|
||||
{ "Msg5", "trials:medicalFeedback:message:msg5"},
|
||||
{ "CloseReasonEnum", "trials:medicalFeedback:title:closeReasonEnum"},
|
||||
{ "IsEndorse", "trials:medicalFeedback:title:isEndorse"},
|
||||
{ "Reason", "trials:medicalFeedback:title:reason"},
|
||||
{ "IsRequestReread", "trials:medicalFeedback:title:isRequestReread"},
|
||||
};
|
||||
|
||||
var i18Values = i18NKeys.Select(x => x.Value).ToList();
|
||||
var i18nList=await _internationalizationRepository.Where(x => i18Values.Contains(x.Code))
|
||||
.Select(x => new
|
||||
{
|
||||
Code= x.Code,
|
||||
Value= _userInfo.IsEn_Us?x.Value:x.ValueCN
|
||||
}).ToListAsync();
|
||||
|
||||
List<string> dictionaryCodeList = new List<string>()
|
||||
{
|
||||
"AuditAdvice",
|
||||
"MedicalDialogCloseEnum",
|
||||
"MedicalReviewDoctorUserIdea",
|
||||
"YesOrNo",
|
||||
};
|
||||
|
||||
var dictionadParents=await _dictionaryRepository.Where(x=> dictionaryCodeList.Contains(x.Parent.Code))
|
||||
.Select(x => new
|
||||
{
|
||||
ParentCode = x.Parent.Code,
|
||||
Code=x.Code,
|
||||
Value = _userInfo.IsEn_Us ? x.Value : x.ValueCN
|
||||
}).ToListAsync();
|
||||
|
||||
JointMedicalReviewI18n i18N = new JointMedicalReviewI18n() { };
|
||||
foreach (var kv in i18NKeys)
|
||||
{
|
||||
PropertyInfo? pi = i18N.GetType().GetProperty(kv.Key);
|
||||
if (pi != null && pi.CanWrite)
|
||||
{
|
||||
var value = i18nList.Where(x => x.Code == kv.Value).Select(x => x.Value).FirstOrDefault() ?? string.Empty;
|
||||
object safeValue = Convert.ChangeType(value, pi.PropertyType);
|
||||
pi.SetValue(i18N, safeValue);
|
||||
}
|
||||
}
|
||||
foreach (var item in dictionaryCodeList)
|
||||
{
|
||||
PropertyInfo? pi = i18N.GetType().GetProperty(item);
|
||||
if (pi != null && pi.CanWrite)
|
||||
{
|
||||
var value = dictionadParents.Where(x => x.ParentCode == item).ToDictionary(x => x.Code, x => x.Value);
|
||||
object safeValue = Convert.ChangeType(value, pi.PropertyType);
|
||||
pi.SetValue(i18N, safeValue);
|
||||
}
|
||||
}
|
||||
|
||||
return await JointMedicalReviewDialog(dialog,i18N);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取医学审核对话拼接内容
|
||||
/// </summary>
|
||||
/// <param name="record"></param>
|
||||
/// <param name="i18NAndDic"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> JointMedicalReviewDialog(GetMedicalReviewDialogOutDto record, JointMedicalReviewI18n i18NAndDic)
|
||||
{
|
||||
StringBuilder str = new StringBuilder() { };
|
||||
var userTypes = new List<int>() { 14, 30 };
|
||||
|
||||
// 这里userTypes.Contains(record.UserTypeEnumInt) 可以提出来 但是还是按照前端写吧 免得不好对照
|
||||
|
||||
// v-if="[14, 30].includes(record.UserTypeEnumInt) && record.Questioning
|
||||
if (userTypes.Contains(record.UserTypeEnumInt) && record.Questioning.IsNotNullOrEmpty())
|
||||
{
|
||||
// <!-- 您好,根据医学审核反馈,该阅片任务的评估有如下问题需要您确认或澄清: -->
|
||||
str.AppendLine(i18NAndDic.Msg1);
|
||||
|
||||
str.AppendLine(record.Questioning);
|
||||
|
||||
if (record.FileList.Count() > 0)
|
||||
{
|
||||
str.AppendLine(i18NAndDic.Msg2);
|
||||
record.FileList.ForEach(x =>
|
||||
{
|
||||
str.AppendLine(x.FileName);
|
||||
});
|
||||
}
|
||||
|
||||
str.AppendLine(i18NAndDic.Msg3);
|
||||
|
||||
str.AppendLine(i18NAndDic.AuditAdvice[record.AuditAdviceEnum.GetEnumInt()]);
|
||||
|
||||
str.AppendLine(i18NAndDic.Msg4);
|
||||
}
|
||||
|
||||
//v-if="[14, 30].includes(record.UserTypeEnumInt) && record.MedicalDialogCloseEnum!== null"
|
||||
if (userTypes.Contains(record.UserTypeEnumInt) && record.MedicalDialogCloseEnum != null)
|
||||
{
|
||||
str.AppendLine(i18NAndDic.CloseReasonEnum + i18NAndDic.MedicalDialogCloseEnum[record.MedicalDialogCloseEnum.Value.GetEnumInt()]);
|
||||
}
|
||||
|
||||
// v-if="[14, 30].includes(record.UserTypeEnumInt) && record.Content
|
||||
if (userTypes.Contains(record.UserTypeEnumInt) && record.Content.IsNotNullOrEmpty())
|
||||
{
|
||||
str.AppendLine(record.Content);
|
||||
}
|
||||
|
||||
// v-if="[13].includes(record.UserTypeEnumInt)"
|
||||
|
||||
if (13 == record.UserTypeEnumInt)
|
||||
{
|
||||
str.AppendLine(i18NAndDic.IsEndorse + i18NAndDic.MedicalReviewDoctorUserIdea[record.DoctorUserIdeaEnum.GetEnumInt()]);
|
||||
|
||||
// v-if="record.DoctorUserIdeaEnum===2"
|
||||
if ((int)record.DoctorUserIdeaEnum == 2)
|
||||
{
|
||||
str.AppendLine(i18NAndDic.Reason + record.DisagreeReason);
|
||||
}
|
||||
|
||||
// record.MedicalDialogCloseEnum!== null
|
||||
|
||||
if (record.MedicalDialogCloseEnum != null)
|
||||
{
|
||||
str.AppendLine(i18NAndDic.IsRequestReread + i18NAndDic.YesOrNo[record.IsApplyHeavyReading.ToString()]);
|
||||
}
|
||||
|
||||
// v-if="record.FileList && record.FileList.length > 0"
|
||||
|
||||
if (record.FileList.Count() > 0)
|
||||
{
|
||||
record.FileList.ForEach(x =>
|
||||
{
|
||||
str.AppendLine(x.FileName);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return str.ToString();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 完成医学审核
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue