|
@@ -30,6 +30,7 @@ using WingServerCommon.Utilities;
|
|
|
using WingInterfaceLibrary.DTO.Patient;
|
|
|
using WingInterfaceLibrary.DTO.Common;
|
|
|
using WingInterfaceLibrary.Request.RemedicalAISelected;
|
|
|
+using WingServerCommon.Interfaces.Cache;
|
|
|
|
|
|
namespace WingRemedicalModule.Service
|
|
|
{
|
|
@@ -113,6 +114,29 @@ namespace WingRemedicalModule.Service
|
|
|
|
|
|
private void AddToRemedicalDiagnosis(RemedicalInfoDTO remedicalInfo)
|
|
|
{
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var jumpQueueDevicePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resource", "Diagnosis", "JumpQueueDevice.txt");
|
|
|
+ if (File.Exists(jumpQueueDevicePath))
|
|
|
+ {
|
|
|
+ var jumpQueueDeviceInfos = File.ReadAllText(jumpQueueDevicePath);
|
|
|
+ if (!string.IsNullOrWhiteSpace(jumpQueueDeviceInfos))
|
|
|
+ {
|
|
|
+ var deviceCode = remedicalInfo.DeviceCode;
|
|
|
+ var deviceCache = CacheMaintenance.Instance.Get<IDeviceInfosManager>().Get(deviceCode);
|
|
|
+ if (deviceCache != null && jumpQueueDeviceInfos.Contains(deviceCache.ShortCode))
|
|
|
+ {
|
|
|
+ Logger.WriteLineInfo($"DiagnosisService AddToRemedicalDiagnosis to AddToRemedicalDiagnosisJumpQueue, jumpQueueDeviceInfos:{jumpQueueDeviceInfos}, record code:{remedicalInfo.RecordCode}, remedical code:{remedicalInfo.RemedicalCode}");
|
|
|
+ AddToRemedicalDiagnosisJumpQueue(remedicalInfo);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ Logger.WriteLineWarn($"DiagnosisService AddToRemedicalDiagnosis AddToRemedicalDiagnosisJumpQueue check error, record code:{remedicalInfo.RecordCode}, remedical code:{remedicalInfo.RemedicalCode}, ex:{ex}");
|
|
|
+ }
|
|
|
try
|
|
|
{
|
|
|
if (remedicalInfo != null && !string.IsNullOrWhiteSpace(remedicalInfo.RemedicalCode))
|