diff --git a/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs b/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs index a018ece..5152882 100644 --- a/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs +++ b/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs @@ -820,6 +820,10 @@ namespace Shentun.Peis.PatientRegisters } //创建人员登记信息 createPatientRegisterArg.PatientId = patient.Id; + if(patient.BirthDate != null) + { + createPatientRegisterArg.BirthDate = patient.BirthDate; + } PatientRegister entity = null; PatientRegisterExter patientRegisterExterEntity = null; CreateRegisterCheckAsbitemEntity createRegisterCheckAsbitemEntity = null; diff --git a/src/Shentun.Peis.Domain/Patients/PatientManager.cs b/src/Shentun.Peis.Domain/Patients/PatientManager.cs index 0d785bb..185bedf 100644 --- a/src/Shentun.Peis.Domain/Patients/PatientManager.cs +++ b/src/Shentun.Peis.Domain/Patients/PatientManager.cs @@ -158,30 +158,31 @@ namespace Shentun.Peis.Patients } targetEntity.BirthPlaceId = sourceEntity.BirthPlaceId; - if (!string.IsNullOrWhiteSpace(sourceEntity.Email)) - { - targetEntity.Email = sourceEntity.Email; - } - if (!string.IsNullOrWhiteSpace(sourceEntity.IdNo)) - { - targetEntity.IdNo = sourceEntity.IdNo; - } - if (!string.IsNullOrWhiteSpace(sourceEntity.MobileTelephone)) - { - targetEntity.MobileTelephone = sourceEntity.MobileTelephone; - } - if (!string.IsNullOrWhiteSpace(sourceEntity.Telephone)) - { - targetEntity.Telephone = sourceEntity.Telephone; - } - if (!string.IsNullOrWhiteSpace(sourceEntity.NationId)) - { - targetEntity.NationId = sourceEntity.NationId; - } - if (!string.IsNullOrWhiteSpace(sourceEntity.PostalCode)) - { - targetEntity.PostalCode = sourceEntity.PostalCode; - } + //if (!string.IsNullOrWhiteSpace(sourceEntity.Email)) + //{ + targetEntity.Email = sourceEntity.Email; + //} + //if (!string.IsNullOrWhiteSpace(sourceEntity.IdNo)) + //{ + targetEntity.IdNo = sourceEntity.IdNo; + //} + targetEntity.IdNo = sourceEntity.IdNo; + //if (!string.IsNullOrWhiteSpace(sourceEntity.MobileTelephone)) + //{ + targetEntity.MobileTelephone = sourceEntity.MobileTelephone; + //} + //if (!string.IsNullOrWhiteSpace(sourceEntity.Telephone)) + //{ + targetEntity.Telephone = sourceEntity.Telephone; + //} + //if (!string.IsNullOrWhiteSpace(sourceEntity.NationId)) + //{ + targetEntity.NationId = sourceEntity.NationId; + //} + //if (!string.IsNullOrWhiteSpace(sourceEntity.PostalCode)) + //{ + targetEntity.PostalCode = sourceEntity.PostalCode; + //} if (sourceEntity.SexId != SexFlag.UnKnown) { targetEntity.SexId = sourceEntity.SexId; diff --git a/test/Shentun.Peis.Application.Tests/PatientRegisterAppServiceTest.cs b/test/Shentun.Peis.Application.Tests/PatientRegisterAppServiceTest.cs index 3d5be80..95e8e9b 100644 --- a/test/Shentun.Peis.Application.Tests/PatientRegisterAppServiceTest.cs +++ b/test/Shentun.Peis.Application.Tests/PatientRegisterAppServiceTest.cs @@ -34,7 +34,7 @@ namespace Shentun.Peis [Fact] public async Task CreatePatientRegisterAsync() { - for (var i = 0; i < 3; i++) + for (var i = 0; i < 1; i++) { using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true)) { @@ -45,10 +45,12 @@ namespace Shentun.Peis //PatientId = new Guid("3a119be6-d9aa-2e13-a764-0b363c60169d"), CustomerOrgId = new Guid("00000000-0000-0000-0000-000000000001"), CustomerOrgRegisterId = new Guid("00000000-0000-0000-0000-000000000001"), + IdNo = "43062419790909931X", + PatientId = new Guid("3a126baf-7640-5698-cab6-c0ef3072622c"), PatientName = "test", - SexId = SexFlag.UnKnown, - BirthDate = null, - Age = 38, + SexId = SexFlag.Male, + BirthDate = (new DateTime(1979,9,9)).ToString("yyyy-MM-dd"), + Age = 44, Telephone = "010-0000001", MobileTelephone = "18911254911", JobCardNo = "jobCardNo", diff --git a/test/Shentun.Peis.Application.Tests/PrintReportAppServiceTest.cs b/test/Shentun.Peis.Application.Tests/PrintReportAppServiceTest.cs index 8ad3dee..e25478e 100644 --- a/test/Shentun.Peis.Application.Tests/PrintReportAppServiceTest.cs +++ b/test/Shentun.Peis.Application.Tests/PrintReportAppServiceTest.cs @@ -34,7 +34,7 @@ namespace Shentun.Peis using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true)) { var items = await _appService.GetLisRequestReportByPatientRegisterIdAsync(new PatientRegisterIdInputDto() - { PatientRegisterId = new Guid("3a125ed8-991d-4304-5ca9-36edd0485450") }); + { PatientRegisterId = new Guid("3a126cec-ae51-8273-67aa-3003d6e7a70b") }); _output.WriteLine(items.Count().ToString()); foreach (var item in items) { diff --git a/test/Shentun.Peis.Application.Tests/appsettings.json b/test/Shentun.Peis.Application.Tests/appsettings.json index 0aa3856..a734ba5 100644 --- a/test/Shentun.Peis.Application.Tests/appsettings.json +++ b/test/Shentun.Peis.Application.Tests/appsettings.json @@ -6,7 +6,7 @@ }, "ConnectionStrings": { //"Default": "Host=140.143.162.39;Port=5432;Database=ShentunPeis070703;User ID=postgres;Password=shentun123;", - "Default": "Host=10.1.12.140;Port=5432;Database=ShentunPeis;User ID=postgres;Password=st123;" + "Default": "Host=10.1.12.140;Port=5432;Database=ShentunPeis0508;User ID=postgres;Password=st123;" }, "RemoteServices": { "Default": { diff --git a/test/Shentun.Peis.Domain.Tests/appsettings.json b/test/Shentun.Peis.Domain.Tests/appsettings.json index 429b5a4..f4ae6cd 100644 --- a/test/Shentun.Peis.Domain.Tests/appsettings.json +++ b/test/Shentun.Peis.Domain.Tests/appsettings.json @@ -1,7 +1,7 @@ { "ConnectionStrings": { //"Default": "Host=140.143.162.39;Port=5432;Database=ShentunPeis070703;User ID=postgres;Password=shentun123;", - "Default": "Host=10.1.12.140;Port=5432;Database=ShentunPeis;User ID=postgres;Password=st123;" + "Default": "Host=10.1.12.140;Port=5432;Database=ShentunPeis0508;User ID=postgres;Password=st123;" }, "OpenIddict": { "Applications": { diff --git a/test/Shentun.Peis.EntityFrameworkCore.Tests/EntityFrameworkCore/PeisEntityFrameworkCoreTestModule.cs b/test/Shentun.Peis.EntityFrameworkCore.Tests/EntityFrameworkCore/PeisEntityFrameworkCoreTestModule.cs index 199c37d..c3f7909 100644 --- a/test/Shentun.Peis.EntityFrameworkCore.Tests/EntityFrameworkCore/PeisEntityFrameworkCoreTestModule.cs +++ b/test/Shentun.Peis.EntityFrameworkCore.Tests/EntityFrameworkCore/PeisEntityFrameworkCoreTestModule.cs @@ -41,7 +41,7 @@ public class PeisEntityFrameworkCoreTestModule : AbpModule private void ConfigurePostGress(IServiceCollection services) { //string connectStr = "Host=140.143.162.39;Port=5432;Database=ShentunPeis070703;User ID=postgres;Password=shentun123"; - string connectStr = "Host=10.1.12.140;Port=5432;Database=ShentunPeis;User ID=postgres;Password=st123;"; + string connectStr = "Host=10.1.12.140;Port=5432;Database=ShentunPeis0508;User ID=postgres;Password=st123;"; services.Configure(options => {