From df957859f8baf7995b96878d1f36bbc361de071b Mon Sep 17 00:00:00 2001 From: "DESKTOP-G961P6V\\Zhh" <839860190@qq.com> Date: Wed, 12 Jun 2024 22:53:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=92=E8=97=8F=E5=85=AC=E5=8F=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Qztl/ImportPatientRegisterPlugInsQztl.cs | 3 ++- .../PatientRegisters/CreatePatientRegisterDto.cs | 5 +++++ .../PatientRegisters/PatientRegisterAppService.cs | 1 + .../PatientRegisters/CreatePatientRegisterArg.cs | 2 ++ src/Shentun.Peis.Domain/Patients/PatientManager.cs | 4 +++- 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/ImportPatientRegisterPlugInsQztl.cs b/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/ImportPatientRegisterPlugInsQztl.cs index 1fc4dd3..b65a3c2 100644 --- a/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/ImportPatientRegisterPlugInsQztl.cs +++ b/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/ImportPatientRegisterPlugInsQztl.cs @@ -305,7 +305,8 @@ namespace Shentun.Peis.PlugIns.Extensions.PatientRegisters.Qztl QztlIsCw = patient.ifCw == 1 ? 'Y' : 'N', QztlIsMain = patient.ifMain == 1 ? 'Y' : 'N', QztlIsCy = patient.ifCy == 1 ? 'Y' : 'N', - IsQztlImport = 'Y' + IsQztlImport = 'Y', + IsAllowIdNoSexError = 'Y' }; diff --git a/src/Shentun.Peis.Application.Contracts/PatientRegisters/CreatePatientRegisterDto.cs b/src/Shentun.Peis.Application.Contracts/PatientRegisters/CreatePatientRegisterDto.cs index 11a65fe..c4abfd3 100644 --- a/src/Shentun.Peis.Application.Contracts/PatientRegisters/CreatePatientRegisterDto.cs +++ b/src/Shentun.Peis.Application.Contracts/PatientRegisters/CreatePatientRegisterDto.cs @@ -126,6 +126,11 @@ namespace Shentun.Peis.PatientRegisters /// public char IsMaxMedicalTimes { get; set; } = 'Y'; + /// + /// 允许身份证号中的性别和填写的性别不一致 + /// + public char IsAllowIdNoSexError { get; set; } = 'N'; + #region 添加时不需要 diff --git a/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs b/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs index 7e935b7..ff04dab 100644 --- a/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs +++ b/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs @@ -918,6 +918,7 @@ namespace Shentun.Peis.PatientRegisters updatePatientEntity.DisplayName = input.PatientName; //创建人员信息 Patient patient = null; + _patientManager.IsAllowIdNoSexError = input.IsAllowIdNoSexError; if (createPatientRegisterArg.PatientId == Guid.Empty) { patient = await _patientManager.CreateAsync(updatePatientEntity); diff --git a/src/Shentun.Peis.Domain/PatientRegisters/CreatePatientRegisterArg.cs b/src/Shentun.Peis.Domain/PatientRegisters/CreatePatientRegisterArg.cs index 8a73183..72b70f8 100644 --- a/src/Shentun.Peis.Domain/PatientRegisters/CreatePatientRegisterArg.cs +++ b/src/Shentun.Peis.Domain/PatientRegisters/CreatePatientRegisterArg.cs @@ -120,5 +120,7 @@ namespace Shentun.Peis.PatientRegisters /// public Guid CustomerOrgRegisterId { get; set; } + + } } diff --git a/src/Shentun.Peis.Domain/Patients/PatientManager.cs b/src/Shentun.Peis.Domain/Patients/PatientManager.cs index 62aaf3b..630d7a3 100644 --- a/src/Shentun.Peis.Domain/Patients/PatientManager.cs +++ b/src/Shentun.Peis.Domain/Patients/PatientManager.cs @@ -28,6 +28,7 @@ namespace Shentun.Peis.Patients private readonly IRepository _primarykeyBuilderRepository; private readonly IRepository _nationRepository; private readonly SysParmValueManager _sysParmValueManager; + public char IsAllowIdNoSexError { get; set; } = 'N'; public PatientManager( IRepository repository, IRepository sysParmValueRepository, @@ -370,8 +371,9 @@ namespace Shentun.Peis.Patients } else { - if (sexByIdNo[0] != entity.SexId) + if (sexByIdNo[0] != entity.SexId && IsAllowIdNoSexError == 'N') { + throw new UserFriendlyException("身份证号解析出的性别与填入的性别不一致"); } }