|
|
|
@ -1685,7 +1685,7 @@ namespace Shentun.Peis.DiagnosisFunctions |
|
|
|
isCritical = diagnosisBuilder.GetAsbitemCriticalResult(patientAsbitemDiagnosisInput, asbitem.DiagnosisFunction); |
|
|
|
if (isCritical) |
|
|
|
{ |
|
|
|
await CreateRegisterCheckCritical(asbitem.RegisterCheckId, 'Y'); |
|
|
|
await CreateRegisterCheckCritical(asbitem.RegisterCheckId, 'Y', ""); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1730,28 +1730,30 @@ namespace Shentun.Peis.DiagnosisFunctions |
|
|
|
Result = item.Result |
|
|
|
}; |
|
|
|
patientItemDiagnosisInput.Item = itemResult; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
isCritical = diagnosisBuilder.GetItemCriticalResult(patientItemDiagnosisInput, item.CriticalValueFunction); |
|
|
|
|
|
|
|
if (isCritical) |
|
|
|
{ |
|
|
|
await CreateRegisterCheckItemCritical(item.RegisterCheckId, item.ItemId, 'Y'); |
|
|
|
await CreateRegisterCheckItemCritical(item.RegisterCheckId, item.ItemId, 'Y', ""); |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var isCriticalFollowValue = criticalFollowValueList.FirstOrDefault(m => item.Result.Contains(m.DisplayName)); |
|
|
|
|
|
|
|
//关键字检索
|
|
|
|
if (criticalFollowValueList.Count(m => item.Result.Contains(m.DisplayName)) > 0) |
|
|
|
if (isCriticalFollowValue != null) |
|
|
|
{ |
|
|
|
isCritical = true; |
|
|
|
} |
|
|
|
|
|
|
|
if (isCritical) |
|
|
|
{ |
|
|
|
await CreateRegisterCheckItemCritical(item.RegisterCheckId, item.ItemId, 'Y'); |
|
|
|
await CreateRegisterCheckItemCritical(item.RegisterCheckId, item.ItemId, 'Y', isCriticalFollowValue.DisplayName); |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
@ -1794,7 +1796,7 @@ namespace Shentun.Peis.DiagnosisFunctions |
|
|
|
isFollowUp = diagnosisBuilder.GetAsbitemFollowUpResult(patientAsbitemDiagnosisInput, asbitem.DiagnosisFunction); |
|
|
|
if (isFollowUp) |
|
|
|
{ |
|
|
|
await CreateRegisterCheckCritical(asbitem.RegisterCheckId, 'Y'); |
|
|
|
await CreateRegisterCheckCritical(asbitem.RegisterCheckId, 'Y', ""); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1845,20 +1847,22 @@ namespace Shentun.Peis.DiagnosisFunctions |
|
|
|
|
|
|
|
if (isFollowUp) |
|
|
|
{ |
|
|
|
await CreateRegisterCheckItemCritical(item.RegisterCheckId, item.ItemId, 'N'); |
|
|
|
await CreateRegisterCheckItemCritical(item.RegisterCheckId, item.ItemId, 'N', ""); |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (criticalFollowValueList.Count(m => item.Result.Contains(m.DisplayName)) > 0) |
|
|
|
var isCriticalFollowValue = criticalFollowValueList.FirstOrDefault(m => item.Result.Contains(m.DisplayName)); |
|
|
|
|
|
|
|
if (isCriticalFollowValue != null) |
|
|
|
{ |
|
|
|
isFollowUp = true; |
|
|
|
} |
|
|
|
|
|
|
|
if (isFollowUp) |
|
|
|
{ |
|
|
|
await CreateRegisterCheckItemCritical(item.RegisterCheckId, item.ItemId, 'N'); |
|
|
|
await CreateRegisterCheckItemCritical(item.RegisterCheckId, item.ItemId, 'N', isCriticalFollowValue.DisplayName); |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
@ -1891,7 +1895,12 @@ namespace Shentun.Peis.DiagnosisFunctions |
|
|
|
/// <summary>
|
|
|
|
/// 生成明细表危急值相关数据
|
|
|
|
/// </summary>
|
|
|
|
private async Task CreateRegisterCheckItemCritical(Guid registerCheckId, Guid itemId, char isCriticalValue) |
|
|
|
/// <param name="registerCheckId"></param>
|
|
|
|
/// <param name="itemId"></param>
|
|
|
|
/// <param name="isCriticalValue"></param>
|
|
|
|
/// <param name="CriticalRangeValue"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
private async Task CreateRegisterCheckItemCritical(Guid registerCheckId, Guid itemId, char isCriticalValue, string CriticalRangeValue) |
|
|
|
{ |
|
|
|
var registerCheckItemEnt = await _registerCheckItemRepository.FirstOrDefaultAsync(m => m.RegisterCheckId == registerCheckId |
|
|
|
&& m.ItemId == itemId); |
|
|
|
@ -1908,13 +1917,17 @@ namespace Shentun.Peis.DiagnosisFunctions |
|
|
|
await _registerCheckItemRepository.UpdateAsync(registerCheckItemEnt); |
|
|
|
} |
|
|
|
|
|
|
|
await CreateRegisterCheckCritical(registerCheckId, isCriticalValue); |
|
|
|
await CreateRegisterCheckCritical(registerCheckId, isCriticalValue, CriticalRangeValue); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 生成registerCheck表危急值相关数据
|
|
|
|
/// </summary>
|
|
|
|
private async Task CreateRegisterCheckCritical(Guid registerCheckId, char isCriticalValue) |
|
|
|
/// <param name="registerCheckId"></param>
|
|
|
|
/// <param name="isCriticalValue"></param>
|
|
|
|
/// <param name="CriticalRangeValue"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
private async Task CreateRegisterCheckCritical(Guid registerCheckId, char isCriticalValue, string CriticalRangeValue) |
|
|
|
{ |
|
|
|
var registerCheckEnt = await _registerCheckRepository.FirstOrDefaultAsync(m => m.Id == registerCheckId); |
|
|
|
if (registerCheckEnt != null) |
|
|
|
|