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("身份证号解析出的性别与填入的性别不一致");
}
}