Browse Source

检查申请单

bjmzak
DESKTOP-G961P6V\Zhh 2 years ago
parent
commit
a1b8a646d1
  1. 11
      src/Shentun.Peis.Application/RegisterChecks/RegisterCheckAppService.cs
  2. 5
      src/Shentun.Peis.Domain/RegisterCheckAsbitems/RegisterCheckAsbitemManager.cs

11
src/Shentun.Peis.Application/RegisterChecks/RegisterCheckAppService.cs

@ -278,7 +278,16 @@ namespace Shentun.Peis.RegisterChecks
{
throw new UserFriendlyException("input参数不能为空");
}
var registerCheck = await _registerCheckRepository.GetAsync(input.RegisterCheckId);
if (input.RegisterCheckItems == null)
{
throw new UserFriendlyException("RegisterCheckItems参数不能为空");
}
if(!input.RegisterCheckItems.Where(o=>!string.IsNullOrWhiteSpace(o.Result)).ToList().Any())
{
throw new UserFriendlyException("明细结果不能全部为空");
}
var registerCheck = await _registerCheckRepository.GetAsync(input.RegisterCheckId);
var patientRegister = await _patientRegisterRepository.GetAsync(registerCheck.PatientRegisterId);
//修改医生和检查日期
if(string.IsNullOrWhiteSpace(input.CheckDoctorId))

5
src/Shentun.Peis.Domain/RegisterCheckAsbitems/RegisterCheckAsbitemManager.cs

@ -539,6 +539,11 @@ namespace Shentun.Peis.RegisterAsbitems
createRegisterCheckAsbitemEntity.DeleteRegisterCheckItems.Add(registerItem);
}
}
//没有检查申请单号的,重新生成检查申请单号
if(string.IsNullOrWhiteSpace(registerCheck.CheckRequestNo))
{
registerCheck.CheckRequestNo = await _registerCheckManager.CreateCheckRequestNo(patientRegister.MedicalCenterId);
}
}
//获取所有已有的itemtype和checkId

Loading…
Cancel
Save