DESKTOP-G961P6V\Zhh 2 years ago
parent
commit
f267ce069a
  1. 5
      src/Shentun.Peis.Application.Contracts/MedicalConclusions/MedicalConclusionDto.cs
  2. 70
      src/Shentun.Peis.Application.Contracts/PatientRegisters/PatientRegisterOrNoDto.cs
  3. 5
      src/Shentun.Peis.Application.Contracts/SumSuggestionHeaders/SumSuggestionDto.cs
  4. 40
      src/Shentun.Peis.Application/MedicalConclusions/MedicalConclusionAppService.cs
  5. 188
      src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
  6. 26
      src/Shentun.Peis.Application/RegisterCheckPictures/RegisterCheckPictureAppService.cs
  7. 9
      src/Shentun.Peis.Application/SumSuggestionHeaders/SumSuggestionHeaderAppService.cs
  8. 78
      src/Shentun.Peis.Domain/PatientRegisterExters/PatientRegisterExter.cs
  9. 24
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/PatientRegisterExters/PatientRegisterExterDbMapping.cs
  10. 6
      src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
  11. 14242
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240503145648_init20240503002.Designer.cs
  12. 45
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240503145648_init20240503002.cs
  13. 14246
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240503145945_init20240503003.Designer.cs
  14. BIN
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240503145945_init20240503003.cs
  15. 76
      src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs
  16. 2
      src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs

5
src/Shentun.Peis.Application.Contracts/MedicalConclusions/MedicalConclusionDto.cs

@ -14,6 +14,11 @@ namespace Shentun.Peis.MedicalConclusions
/// </summary>
public string MedicalConclusionTypeId { get; set; }
/// <summary>
/// 类别名称
/// </summary>
public string MedicalConclusionTypeName { get; set; }
public string SimpleCode { get; set; }
public int DisplayOrder { get; set; }

70
src/Shentun.Peis.Application.Contracts/PatientRegisters/PatientRegisterOrNoDto.cs

@ -258,6 +258,76 @@ namespace Shentun.Peis.PatientRegisters
#endregion
#region 人员登记扩展信息
/// <summary>
/// 0-高原 1-健康
/// </summary>
public char? QztlType { get; set; }
/// <summary>
/// 扩展
/// </summary>
public char? QztlIsCw { get; set; } = 'N';
/// <summary>
/// 扩展
/// </summary>
public char? QztlIsCy { get; set; } = 'N';
/// <summary>
/// 扩展
/// </summary>
public char? QztlIsGt { get; set; } = 'N';
/// <summary>
/// 扩展
/// </summary>
public char? QztlIsMain { get; set; } = 'N';
/// <summary>
/// 扩展
/// </summary>
public char? QztlIsWh { get; set; } = 'N';
/// <summary>
/// 扩展
/// </summary>
public char? QztlIsFj { get; set; } = 'N';
/// <summary>
/// 扩展
/// </summary>
public char? IsQztlImport { get; set; } = 'N';
/// <summary>
/// 扩展
/// </summary>
public char? UploadQztlFlag { get; set; } = 'N';
/// <summary>
/// 扩展
/// </summary>
public string Planuserid { get; set; }
/// <summary>
/// 扩展
/// </summary>
public string Remark2 { get; set; }
/// <summary>
/// 扩展
/// </summary>
public string Remark3 { get; set; }
/// <summary>
/// 扩展
/// </summary>
public string Remark4 { get; set; }
#endregion
public List<RegisterCheckAsbitemOrAsbitemDto> RegisterCheckAsbitems { get; set; }
}

5
src/Shentun.Peis.Application.Contracts/SumSuggestionHeaders/SumSuggestionDto.cs

@ -20,6 +20,11 @@ namespace Shentun.Peis.SumSuggestionHeaders
/// </summary>
public List<Guid> DiagnosisIds { get; set; }
/// <summary>
/// 诊断名称列表
/// </summary>
public List<string> DiagnosisNames { get; set; }
/// <summary>
/// 排序值
/// </summary>

40
src/Shentun.Peis.Application/MedicalConclusions/MedicalConclusionAppService.cs

@ -35,16 +35,19 @@ namespace Shentun.Peis.MedicalConclusions
private readonly IRepository<IdentityUser, Guid> _userRepository;
private readonly MedicalConclusionManager _manager;
private readonly CacheService _cacheService;
private readonly IRepository<MedicalConclusionType> _medicalConclusionTypeRepository;
public MedicalConclusionAppService(
IRepository<MedicalConclusion, Guid> repository,
IRepository<IdentityUser, Guid> userRepository,
MedicalConclusionManager manager,
CacheService cacheService)
CacheService cacheService,
IRepository<MedicalConclusionType> medicalConclusionTypeRepository)
: base(repository)
{
_userRepository = userRepository;
_manager = manager;
_cacheService = cacheService;
_medicalConclusionTypeRepository = medicalConclusionTypeRepository;
}
/// <summary>
/// 获取通过主键
@ -70,25 +73,34 @@ namespace Shentun.Peis.MedicalConclusions
/// <returns></returns>
public async Task<List<MedicalConclusionDto>> GetListInTypeAsync(GetListInTypeDto input)
{
var entlist = await Repository.GetQueryableAsync();
var entlist = from medicalConclusion in await Repository.GetQueryableAsync()
join medicalConclusionType in await _medicalConclusionTypeRepository.GetQueryableAsync()
on medicalConclusion.MedicalConclusionTypeId equals medicalConclusionType.Id into medicalConclusionTypeTemp
from medicalConclusionType in medicalConclusionTypeTemp.DefaultIfEmpty()
select new
{
medicalConclusion,
MedicalConclusionTypeName = medicalConclusionType != null ? medicalConclusionType.DisplayName : ""
};
if (!string.IsNullOrEmpty(input.TypeId))
entlist = entlist.Where(m => m.MedicalConclusionTypeId == input.TypeId);
entlist = entlist.Where(m => m.medicalConclusion.MedicalConclusionTypeId == input.TypeId);
var entdto = entlist.Select(s => new MedicalConclusionDto
{
CreationTime = s.CreationTime,
CreatorId = s.CreatorId,
DisplayName = s.DisplayName,
DisplayOrder = s.DisplayOrder,
Id = s.Id,
LastModificationTime = s.LastModificationTime,
LastModifierId = s.LastModifierId,
SimpleCode = s.SimpleCode,
MedicalConclusionTypeId = s.MedicalConclusionTypeId,
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result,
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result
CreationTime = s.medicalConclusion.CreationTime,
CreatorId = s.medicalConclusion.CreatorId,
DisplayName = s.medicalConclusion.DisplayName,
DisplayOrder = s.medicalConclusion.DisplayOrder,
Id = s.medicalConclusion.Id,
LastModificationTime = s.medicalConclusion.LastModificationTime,
LastModifierId = s.medicalConclusion.LastModifierId,
SimpleCode = s.medicalConclusion.SimpleCode,
MedicalConclusionTypeId = s.medicalConclusion.MedicalConclusionTypeId,
MedicalConclusionTypeName = s.MedicalConclusionTypeName,
CreatorName = _cacheService.GetSurnameAsync(s.medicalConclusion.CreatorId).Result,
LastModifierName = _cacheService.GetSurnameAsync(s.medicalConclusion.LastModifierId).Result
}).OrderBy(m => m.DisplayOrder).ToList();
return entdto;

188
src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs

@ -101,11 +101,10 @@ namespace Shentun.Peis.PatientRegisters
private readonly PatientRegisterManager _manager;
private readonly CacheService _cacheService;
private readonly SysParmValueManager _sysParmValueManager;
private readonly IRepository<PatientRegister, Guid> _patientRegisterRepository;
private readonly IRepository<PatientRegisterExter> _patientRegisterExterRepository;
public PatientRegisterAppService(
IRepository<PatientRegister, Guid> repository,
IRepository<Patient, Guid> patientRepository,
IRepository<PatientRegister, Guid> patientRegisterRepository,
IRepository<IdentityUser, Guid> userRepository,
IRepository<Sex> sexRepository,
IRepository<BirthPlace, Guid> birthPlaceRepository,
@ -146,8 +145,8 @@ namespace Shentun.Peis.PatientRegisters
SumSummaryContentManager sumSummaryContentManager,
SumSuggestionHeaderManager sumSuggestionHeaderManager,
SumSuggestionContentManager sumSuggestionContentManager,
SysParmValueManager sysParmValueManager
)
SysParmValueManager sysParmValueManager,
IRepository<PatientRegisterExter> patientRegisterExterRepository)
: base(repository)
{
this._repository = repository;
@ -193,7 +192,7 @@ namespace Shentun.Peis.PatientRegisters
_sumSuggestionHeaderManager = sumSuggestionHeaderManager;
_sumSuggestionContentManager = sumSuggestionContentManager;
_sysParmValueManager = sysParmValueManager;
_patientRegisterRepository = patientRegisterRepository;
_patientRegisterExterRepository = patientRegisterExterRepository;
}
/// <summary>
/// 获取通过主键
@ -215,83 +214,84 @@ namespace Shentun.Peis.PatientRegisters
[HttpPost("api/app/patientregister/getinfoorpatient")]
public async Task<PatientRegisterOrNoDto> GetInfoOrPatientAsync(PatientRegisterIdInputDto input)
{
var ent = (await _repository.GetDbSetAsync()).Include(x => x.Patient).Where(m => m.Id == input.PatientRegisterId).FirstOrDefault();
return await GetPatientRegisterOrNo(input.PatientRegisterId);
//var ent = (await _repository.GetQueryableAsync()).Include(x => x.Patient).Where(m => m.Id == input.PatientRegisterId).FirstOrDefault();
var entdto = new PatientRegisterOrNoDto();
if (ent != null)
{
//var userList = await _userRepository.GetListAsync();
//var customerOrgList = await _customerOrgRepository.GetListAsync();
//var entdto = new PatientRegisterOrNoDto();
//if (ent != null)
//{
// //var userList = await _userRepository.GetListAsync();
// //var customerOrgList = await _customerOrgRepository.GetListAsync();
entdto = new PatientRegisterOrNoDto
{
HisPatientId = ent.HisPatientId,
Age = ent.Age,
AuditDate = DataHelper.ConversionDateToString(ent.AuditDate),
Id = ent.Id,
AuditDoctorId = ent.AuditDoctorId,
BirthDate = DataHelper.ConversionDateToString(ent.BirthDate),
CompleteFlag = ent.CompleteFlag,
CreationTime = ent.CreationTime,
CreatorId = ent.CreatorId,
CustomerOrgGroupId = ent.CustomerOrgGroupId,
CustomerOrgId = ent.CustomerOrgId,
CustomerOrgRegisterId = ent.CustomerOrgRegisterId,
GuidePrintTimes = ent.GuidePrintTimes,
InterposeMeasure = ent.InterposeMeasure,
IsAudit = ent.IsAudit,
IsLock = ent.IsLock,
IsMedicalStart = ent.IsMedicalStart,
IsNameHide = ent.IsNameHide,
IsPhoneFollow = ent.IsPhoneFollow,
IsRecoverGuide = ent.IsRecoverGuide,
IsUpload = ent.IsUpload,
IsVip = ent.IsVip,
JobCardNo = ent.JobCardNo,
JobPost = ent.JobPost,
JobTitle = ent.JobTitle,
LastModificationTime = ent.LastModificationTime,
LastModifierId = ent.LastModifierId,
MaritalStatusId = ent.MaritalStatusId,
MedicalCardNo = ent.MedicalCardNo,
MedicalConclusionId = ent.MedicalConclusionId,
MedicalPackageId = ent.MedicalPackageId,
MedicalStartDate = DataHelper.ConversionDateToString(ent.MedicalStartDate),
MedicalTimes = ent.MedicalTimes,
MedicalTypeId = ent.MedicalTypeId,
MedicalCenterId = ent.MedicalCenterId,
PatientId = ent.PatientId,
PatientName = ent.PatientName,
PatientRegisterNo = ent.PatientRegisterNo,
PersonnelTypeId = ent.PersonnelTypeId,
Photo = ent.Photo,
Remark = ent.Remark,
ReportPrintTimes = ent.ReportPrintTimes,
Salesman = ent.Salesman,
SexHormoneTermId = ent.SexHormoneTermId,
SexId = ent.SexId,
SummaryDate = DataHelper.ConversionDateToString(ent.SummaryDate),
SummaryDoctorId = ent.SummaryDoctorId,
ThirdInfo = ent.ThirdInfo,
CreatorName = _cacheService.GetSurnameAsync(ent.CreatorId).Result,
LastModifierName = _cacheService.GetSurnameAsync(ent.LastModifierId).Result,
Address = ent.Patient.Address, //档案表信息
BirthPlaceId = ent.Patient.BirthPlaceId,
DisplayName = ent.Patient.DisplayName,
Email = ent.Patient.Email,
IdNo = ent.Patient.IdNo,
MobileTelephone = ent.Patient.MobileTelephone,
NationId = ent.Patient.NationId,
PatientNo = ent.Patient.PatientNo,
PatientPassword = ent.Patient.PatientPassword,
PostalCode = ent.Patient.PostalCode,
Telephone = ent.Patient.Telephone,
CustomerOrgName = _cacheService.GetCustomerOrgNameAsync(ent.CustomerOrgId).Result,
CustomerOrgParentId = _cacheService.GetTopCustomerOrgAsync(ent.CustomerOrgId).Result.Id,
//CustomerOrgParentName = EntityHelper.GetCustomerOrgParentNameNoSql(customerOrgList, ent.CustomerOrgId)
};
}
return entdto;
// entdto = new PatientRegisterOrNoDto
// {
// HisPatientId = ent.HisPatientId,
// Age = ent.Age,
// AuditDate = DataHelper.ConversionDateToString(ent.AuditDate),
// Id = ent.Id,
// AuditDoctorId = ent.AuditDoctorId,
// BirthDate = DataHelper.ConversionDateToString(ent.BirthDate),
// CompleteFlag = ent.CompleteFlag,
// CreationTime = ent.CreationTime,
// CreatorId = ent.CreatorId,
// CustomerOrgGroupId = ent.CustomerOrgGroupId,
// CustomerOrgId = ent.CustomerOrgId,
// CustomerOrgRegisterId = ent.CustomerOrgRegisterId,
// GuidePrintTimes = ent.GuidePrintTimes,
// InterposeMeasure = ent.InterposeMeasure,
// IsAudit = ent.IsAudit,
// IsLock = ent.IsLock,
// IsMedicalStart = ent.IsMedicalStart,
// IsNameHide = ent.IsNameHide,
// IsPhoneFollow = ent.IsPhoneFollow,
// IsRecoverGuide = ent.IsRecoverGuide,
// IsUpload = ent.IsUpload,
// IsVip = ent.IsVip,
// JobCardNo = ent.JobCardNo,
// JobPost = ent.JobPost,
// JobTitle = ent.JobTitle,
// LastModificationTime = ent.LastModificationTime,
// LastModifierId = ent.LastModifierId,
// MaritalStatusId = ent.MaritalStatusId,
// MedicalCardNo = ent.MedicalCardNo,
// MedicalConclusionId = ent.MedicalConclusionId,
// MedicalPackageId = ent.MedicalPackageId,
// MedicalStartDate = DataHelper.ConversionDateToString(ent.MedicalStartDate),
// MedicalTimes = ent.MedicalTimes,
// MedicalTypeId = ent.MedicalTypeId,
// MedicalCenterId = ent.MedicalCenterId,
// PatientId = ent.PatientId,
// PatientName = ent.PatientName,
// PatientRegisterNo = ent.PatientRegisterNo,
// PersonnelTypeId = ent.PersonnelTypeId,
// Photo = ent.Photo,
// Remark = ent.Remark,
// ReportPrintTimes = ent.ReportPrintTimes,
// Salesman = ent.Salesman,
// SexHormoneTermId = ent.SexHormoneTermId,
// SexId = ent.SexId,
// SummaryDate = DataHelper.ConversionDateToString(ent.SummaryDate),
// SummaryDoctorId = ent.SummaryDoctorId,
// ThirdInfo = ent.ThirdInfo,
// CreatorName = _cacheService.GetSurnameAsync(ent.CreatorId).Result,
// LastModifierName = _cacheService.GetSurnameAsync(ent.LastModifierId).Result,
// Address = ent.Patient.Address, //档案表信息
// BirthPlaceId = ent.Patient.BirthPlaceId,
// DisplayName = ent.Patient.DisplayName,
// Email = ent.Patient.Email,
// IdNo = ent.Patient.IdNo,
// MobileTelephone = ent.Patient.MobileTelephone,
// NationId = ent.Patient.NationId,
// PatientNo = ent.Patient.PatientNo,
// PatientPassword = ent.Patient.PatientPassword,
// PostalCode = ent.Patient.PostalCode,
// Telephone = ent.Patient.Telephone,
// CustomerOrgName = _cacheService.GetCustomerOrgNameAsync(ent.CustomerOrgId).Result,
// CustomerOrgParentId = _cacheService.GetTopCustomerOrgAsync(ent.CustomerOrgId).Result.Id
// //CustomerOrgParentName = EntityHelper.GetCustomerOrgParentNameNoSql(customerOrgList, ent.CustomerOrgId)
// };
//}
//return entdto;
}
/// <summary>
@ -1486,7 +1486,7 @@ namespace Shentun.Peis.PatientRegisters
}
}
entity.CompleteFlag = PatientRegisterCompleteFlag.PartCheck;
var newentity = await _patientRegisterRepository.UpdateAsync(entity);
var newentity = await _repository.UpdateAsync(entity);
return ObjectMapper.Map<PatientRegister, PatientRegisterDto>(newentity);
}
/// <summary>
@ -1946,7 +1946,7 @@ namespace Shentun.Peis.PatientRegisters
if (CustomerOrgIds.Any())
{
query = query.Where(m => m.a.CustomerOrgId != null && CustomerOrgIds.Contains(m.a.CustomerOrgId));
query = query.Where(m => CustomerOrgIds.Contains(m.a.CustomerOrgId));
}
//体检次数
if (input.CustomerOrgRegisterId != Guid.Empty)
@ -2538,6 +2538,30 @@ namespace Shentun.Peis.PatientRegisters
}
entdto.RegisterCheckAsbitems = entdto.RegisterCheckAsbitems.OrderByDescending(o => o.IsBelongGroupPackage).
OrderBy(o => o.Id).ToList();
#region 扩展信息
var patientRegisterExterEnt = await _patientRegisterExterRepository.FirstOrDefaultAsync(m => m.PatientRegisterId == PatientRegisterId);
if (patientRegisterExterEnt != null)
{
entdto.QztlIsCw = patientRegisterExterEnt.QztlIsCw;
entdto.QztlIsCy = patientRegisterExterEnt.QztlIsCy;
entdto.QztlIsFj = patientRegisterExterEnt.QztlIsFj;
entdto.QztlIsGt = patientRegisterExterEnt.QztlIsGt;
entdto.QztlIsMain = patientRegisterExterEnt.QztlIsMain;
entdto.QztlIsWh = patientRegisterExterEnt.QztlIsWh;
entdto.QztlType = patientRegisterExterEnt.QztlType;
entdto.Remark2 = patientRegisterExterEnt.Remark2;
entdto.Remark3 = patientRegisterExterEnt.Remark3;
entdto.Remark4 = patientRegisterExterEnt.Remark4;
entdto.UploadQztlFlag = patientRegisterExterEnt.UploadQztlFlag;
entdto.IsQztlImport = patientRegisterExterEnt.IsQztlImport;
entdto.Planuserid = patientRegisterExterEnt.Planuserid;
}
#endregion
}
return entdto;
}

26
src/Shentun.Peis.Application/RegisterCheckPictures/RegisterCheckPictureAppService.cs

@ -92,8 +92,6 @@ namespace Shentun.Peis.RegisterCheckPictures
public async Task UpdateRegisterCheckPictureStatusManyAsync(List<UpdateRegisterCheckPictureStatusManyDto> input)
{
//
if (!input.Any())
{
throw new UserFriendlyException("请求参数有误");
@ -107,7 +105,6 @@ namespace Shentun.Peis.RegisterCheckPictures
foreach (var item in input)
{
//修改
var ent = await _registerCheckPictureRepository.FirstOrDefaultAsync(m => m.Id == item.RegisterCheckPictureId);
if (ent != null)
{
@ -161,8 +158,6 @@ namespace Shentun.Peis.RegisterCheckPictures
throw new UserFriendlyException("体检人员不存在");
}
// string PicName = DateTime.Now.ToString("yyyyMMddHHmmss") + rd.Next(1000, 9999);
List<RegisterCheckPicture> entlist_insert = new List<RegisterCheckPicture>();
@ -183,7 +178,18 @@ namespace Shentun.Peis.RegisterCheckPictures
throw new UserFriendlyException("图片数据有误");
}
var ent = new RegisterCheckPicture
var ent = await _registerCheckPictureRepository.FirstOrDefaultAsync(m => m.RegisterCheckId == input.RegisterCheckId
&& m.PictureFilename == PictureUrl);
if (ent != null)
{
ent.PictureFilename = PictureUrl;
await _registerCheckPictureRepository.UpdateAsync(ent);
}
else
{
ent = new RegisterCheckPicture
{
DisplayOrder = input.PictureBaseStrs.IndexOf(item) + 1,
IsPrint = 'N',
@ -191,16 +197,14 @@ namespace Shentun.Peis.RegisterCheckPictures
RegisterCheckId = input.RegisterCheckId
};
entlist_insert.Add(ent);
await _registerCheckPictureRepository.InsertAsync(ent);
}
msg.Add(PictureUrl);
}
if (entlist_insert.Any())
{
await _registerCheckPictureRepository.InsertManyAsync(entlist_insert);
}
return msg;
}

9
src/Shentun.Peis.Application/SumSuggestionHeaders/SumSuggestionHeaderAppService.cs

@ -76,6 +76,9 @@ namespace Shentun.Peis.SumSuggestionHeaders
join sumDiagnosis in await _sumDiagnosisRepository.GetQueryableAsync()
on new { sumSuggestionHeader.PatientRegisterId, sumSuggestionHeader.Id } equals new { sumDiagnosis.PatientRegisterId, Id = sumDiagnosis.SumSuggestionHeaderId } into bb
from sumDiagnosisHaveEmpty in bb.DefaultIfEmpty()
join diagnosis in await _diagnosisRepository.GetQueryableAsync()
on sumDiagnosisHaveEmpty.DiagnosisId equals diagnosis.Id into diagnosisTemp
from diagnosisHaveEmpty in diagnosisTemp.DefaultIfEmpty()
join sumSuggestionContent in await _sumSuggestionContentRepository.GetQueryableAsync()
on sumSuggestionHeader.Id equals sumSuggestionContent.SumSuggestionHeaderId into cc
from sumSuggestionContentHaveEmpty in cc.DefaultIfEmpty()
@ -85,6 +88,7 @@ namespace Shentun.Peis.SumSuggestionHeaders
{
sumSuggestionHeader,
sumDiagnosisHaveEmpty,
diagnosisHaveEmpty,
sumSuggestionContentHaveEmpty
};
@ -98,6 +102,7 @@ namespace Shentun.Peis.SumSuggestionHeaders
DisplayOrder = s.FirstOrDefault().sumSuggestionHeader.DisplayOrder,
DiagnosisIds = s.Where(o => o.sumDiagnosisHaveEmpty != null).
Select(x => x.sumDiagnosisHaveEmpty.DiagnosisId).Distinct().ToList(),
DiagnosisNames = s.Where(m => m.diagnosisHaveEmpty != null).Select(x => x.diagnosisHaveEmpty.DisplayName).Distinct().ToList(),
MedicalInterpretations = s.Where(m => m.sumSuggestionContentHaveEmpty != null &&
m.sumSuggestionContentHaveEmpty.SuggestionType == SuggestionTypeFlag.MedicalInterpretation).
Select(sa => new SumSuggestionContentData
@ -156,6 +161,7 @@ namespace Shentun.Peis.SumSuggestionHeaders
SuggestionFlag = null,
DisplayOrder = 0,
DiagnosisIds = new List<Guid>() { matchDiagnosis.Id },
DiagnosisNames = new List<string>() { matchDiagnosis.DisplayName },
MedicalInterpretations = matchDiagnosis.Suggestions.
Where(o => o.SuggestionType == SuggestionTypeFlag.MedicalInterpretation)
.OrderBy(o => o.DisplayOrder)
@ -199,6 +205,7 @@ namespace Shentun.Peis.SumSuggestionHeaders
SuggestionFlag = null,
DisplayOrder = 0,
DiagnosisIds = null,
DiagnosisNames = null
});
}
@ -301,4 +308,4 @@ namespace Shentun.Peis.SumSuggestionHeaders
}
}
}
}
}

78
src/Shentun.Peis.Domain/PatientRegisterExters/PatientRegisterExter.cs

@ -0,0 +1,78 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace Shentun.Peis.Models
{
/// <summary>
///
/// </summary>
[Table("patient_register_exter")]
public class PatientRegisterExter : Entity, IHasConcurrencyStamp
{
/// <summary>
/// 人员登记ID
/// </summary>
[Key]
[Column("patient_register_id")]
public Guid PatientRegisterId { get; set; }
[Column("qztl_type")]
public char? QztlType { get; set; }
[Column("qztl_is_cw")]
public char? QztlIsCw { get; set; }
[Column("qztl_is_cy")]
public char? QztlIsCy { get; set; }
[Column("qztl_is_gt")]
public char? QztlIsGt { get; set; }
[Column("qztl_is_main")]
public char? QztlIsMain { get; set; }
[Column("qztl_is_wh")]
public char? QztlIsWh { get; set; }
[Column("qztl_is_fj")]
public char? QztlIsFj { get; set; }
[Column("is_qztl_import")]
public char? IsQztlImport { get; set; }
[Column("upload_qztl_flag")]
public char? UploadQztlFlag { get; set; }
[Column("planuserid")]
[StringLength(20)]
public string Planuserid { get; set; }
[Column("remark2")]
[StringLength(100)]
public string Remark2 { get; set; }
[Column("remark3")]
[StringLength(100)]
public string Remark3 { get; set; }
[Column("remark4")]
[StringLength(100)]
public string Remark4 { get; set; }
[Column("concurrency_stamp")]
public string ConcurrencyStamp { get; set; }
public override object[] GetKeys()
{
return new object[] { PatientRegisterId };
}
}
}

24
src/Shentun.Peis.EntityFrameworkCore/DbMapping/PatientRegisterExters/PatientRegisterExterDbMapping.cs

@ -0,0 +1,24 @@
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore;
using Shentun.Peis.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Shentun.Peis.EntityFrameworkCore;
namespace Shentun.Peis.DbMapping.PatientRegisterExters
{
internal class PatientRegisterExterDbMapping : IEntityTypeConfiguration<PatientRegisterExter>
{
public void Configure(EntityTypeBuilder<PatientRegisterExter> entity)
{
entity.HasComment("人员登记信息扩展");
entity.ConfigureByConvention();
}
}
}

6
src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs

@ -9,6 +9,7 @@ using Shentun.Peis.Books;
using Shentun.Peis.DbMapping;
using Shentun.Peis.DbMapping.ChargeRequestAsbitems;
using Shentun.Peis.DbMapping.ChargeRequests;
using Shentun.Peis.DbMapping.PatientRegisterExters;
using Shentun.Peis.DbMapping.ThirdInterfaces;
using Shentun.Peis.Models;
using Shentun.Peis.RoleMenuInfos;
@ -334,7 +335,7 @@ public class PeisDbContext :
public DbSet<CollectItemType> CollectItemTypes { get; set; } = null!;
public DbSet<PatientRegisterExter> PatientRegisterExters { get; set; } = null!;
public PeisDbContext(DbContextOptions<PeisDbContext> options)
: base(options)
{
@ -566,7 +567,8 @@ public class PeisDbContext :
.ApplyConfiguration(new ChargeRequestDbMapping())
.ApplyConfiguration(new ChargeRequestAsbitemDbMapping())
.ApplyConfiguration(new ThirdInterfaceDbMapping())
.ApplyConfiguration(new CollectItemTypeDbMapping());
.ApplyConfiguration(new CollectItemTypeDbMapping())
.ApplyConfiguration(new PatientRegisterExterDbMapping());
#endregion

14242
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240503145648_init20240503002.Designer.cs
File diff suppressed because it is too large
View File

45
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240503145648_init20240503002.cs

@ -0,0 +1,45 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Shentun.Peis.Migrations
{
public partial class init20240503002 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "patient_register_exter",
columns: table => new
{
patient_register_id = table.Column<Guid>(type: "uuid", nullable: false),
qztl_type = table.Column<char>(type: "character(1)", nullable: false),
qztl_is_cw = table.Column<char>(type: "character(1)", nullable: false),
qztl_is_cy = table.Column<char>(type: "character(1)", nullable: false),
qztl_is_gt = table.Column<char>(type: "character(1)", nullable: false),
qztl_is_main = table.Column<char>(type: "character(1)", nullable: false),
qztl_is_wh = table.Column<char>(type: "character(1)", nullable: false),
qztl_is_fj = table.Column<char>(type: "character(1)", nullable: false),
is_qztl_import = table.Column<char>(type: "character(1)", nullable: false),
upload_qztl_flag = table.Column<char>(type: "character(1)", nullable: false),
planuserid = table.Column<string>(type: "text", nullable: true),
remark2 = table.Column<string>(type: "text", nullable: true),
remark3 = table.Column<string>(type: "text", nullable: true),
remark4 = table.Column<string>(type: "text", nullable: true),
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_patient_register_exter", x => x.patient_register_id);
},
comment: "人员登记信息扩展");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "patient_register_exter");
}
}
}

14246
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240503145945_init20240503003.Designer.cs
File diff suppressed because it is too large
View File

BIN
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240503145945_init20240503003.cs

76
src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

@ -6813,6 +6813,82 @@ namespace Shentun.Peis.Migrations
b.HasComment("体检登记主档");
});
modelBuilder.Entity("Shentun.Peis.Models.PatientRegisterExter", b =>
{
b.Property<Guid>("PatientRegisterId")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("patient_register_id");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("concurrency_stamp");
b.Property<char?>("IsQztlImport")
.HasColumnType("character(1)")
.HasColumnName("is_qztl_import");
b.Property<string>("Planuserid")
.HasMaxLength(20)
.HasColumnType("character varying(20)")
.HasColumnName("planuserid");
b.Property<char?>("QztlIsCw")
.HasColumnType("character(1)")
.HasColumnName("qztl_is_cw");
b.Property<char?>("QztlIsCy")
.HasColumnType("character(1)")
.HasColumnName("qztl_is_cy");
b.Property<char?>("QztlIsFj")
.HasColumnType("character(1)")
.HasColumnName("qztl_is_fj");
b.Property<char?>("QztlIsGt")
.HasColumnType("character(1)")
.HasColumnName("qztl_is_gt");
b.Property<char?>("QztlIsMain")
.HasColumnType("character(1)")
.HasColumnName("qztl_is_main");
b.Property<char?>("QztlIsWh")
.HasColumnType("character(1)")
.HasColumnName("qztl_is_wh");
b.Property<char?>("QztlType")
.HasColumnType("character(1)")
.HasColumnName("qztl_type");
b.Property<string>("Remark2")
.HasMaxLength(100)
.HasColumnType("character varying(100)")
.HasColumnName("remark2");
b.Property<string>("Remark3")
.HasMaxLength(100)
.HasColumnType("character varying(100)")
.HasColumnName("remark3");
b.Property<string>("Remark4")
.HasMaxLength(100)
.HasColumnType("character varying(100)")
.HasColumnName("remark4");
b.Property<char?>("UploadQztlFlag")
.HasColumnType("character(1)")
.HasColumnName("upload_qztl_flag");
b.HasKey("PatientRegisterId");
b.ToTable("patient_register_exter");
b.HasComment("人员登记信息扩展");
});
modelBuilder.Entity("Shentun.Peis.Models.PatientSymptom", b =>
{
b.Property<Guid>("PatientRegisterId")

2
src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs

@ -487,7 +487,7 @@ public class PeisHttpApiHostModule : AbpModule
app.UseStaticFiles(new StaticFileOptions
{
FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "UpLoad")),
FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "photo")),
RequestPath = "/photo"
});

Loading…
Cancel
Save