Browse Source

人员登记

bjmzak
DESKTOP-G961P6V\Zhh 2 years ago
parent
commit
9986fc3f86
  1. 4
      src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
  2. 49
      src/Shentun.Peis.Domain/Patients/PatientManager.cs
  3. 10
      test/Shentun.Peis.Application.Tests/PatientRegisterAppServiceTest.cs
  4. 2
      test/Shentun.Peis.Application.Tests/PrintReportAppServiceTest.cs
  5. 2
      test/Shentun.Peis.Application.Tests/appsettings.json
  6. 2
      test/Shentun.Peis.Domain.Tests/appsettings.json
  7. 2
      test/Shentun.Peis.EntityFrameworkCore.Tests/EntityFrameworkCore/PeisEntityFrameworkCoreTestModule.cs

4
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;

49
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;

10
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",

2
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)
{

2
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": {

2
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": {

2
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<AbpDbContextOptions>(options =>
{

Loading…
Cancel
Save