diff --git a/src/Shentun.Pacs.Application.Contracts/PacsBusiness/ImportPeisCheckDataByCheckRequestNoInputDto.cs b/src/Shentun.Pacs.Application.Contracts/PacsBusiness/ImportPeisCheckDataByCheckRequestNoInputDto.cs new file mode 100644 index 0000000..3e56223 --- /dev/null +++ b/src/Shentun.Pacs.Application.Contracts/PacsBusiness/ImportPeisCheckDataByCheckRequestNoInputDto.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Shentun.Pacs.PacsBusiness +{ + public class ImportPeisCheckDataByCheckRequestNoInputDto + { + /// + /// 检查条码号 + /// + public string CheckRequestNo { get; set; } + + /// + /// 设备Id + /// + public string DeviceId { get; set; } + + /// + /// 预检Aet + /// + public string ScheduledAet { get; set; } + } +} diff --git a/src/Shentun.Pacs.Application/CollectItemTypes/CollectItemTypeAppService.cs b/src/Shentun.Pacs.Application/CollectItemTypes/CollectItemTypeAppService.cs new file mode 100644 index 0000000..e97feed --- /dev/null +++ b/src/Shentun.Pacs.Application/CollectItemTypes/CollectItemTypeAppService.cs @@ -0,0 +1,162 @@ +using AutoMapper.Internal.Mappers; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Shentun.Pacs.HelperDto; +using Shentun.Pacs.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.Identity; + +namespace Shentun.Pacs.CollectItemTypes +{ + /// + /// 汇总项目类别 + /// + [ApiExplorerSettings(GroupName = "Work")] + [Authorize] + public class CollectItemTypeAppService : ApplicationService + { + private readonly IRepository _collectItemTypeRepository; + private readonly CacheService _cacheService; + private readonly CollectItemTypeManager _manager; + private readonly IRepository _userRepository; + public CollectItemTypeAppService( + IRepository collectItemTypeRepository, + IRepository userRepository, + CollectItemTypeManager manager, + CacheService cacheService) + { + _collectItemTypeRepository = collectItemTypeRepository; + _cacheService = cacheService; + _manager = manager; + _userRepository = userRepository; + } + + /// + /// 根据ID查实体内容 + /// + /// + /// + [HttpPost("api/app/CollectItemType/GetById")] + public async Task GetByIdAsync(CollectItemTypeIdInputDto input) + { + var entity = await _collectItemTypeRepository.GetAsync(input.Id); + var entityDto = ObjectMapper.Map(entity); + entityDto.CreatorName = _cacheService.GetSurnameAsync(entityDto.CreatorId).Result; + entityDto.LastModifierName = _cacheService.GetSurnameAsync(entityDto.LastModifierId).Result; + + return entityDto; + } + + + + /// + /// 查询列表 + /// + /// + [HttpPost("api/app/CollectItemType/GetList")] + public async Task> GetListAsync() + { + var userQueryable = await _userRepository.GetQueryableAsync(); + + var entlist = (from a in await _collectItemTypeRepository.GetQueryableAsync() + join b in userQueryable on a.CreatorId equals b.Id into bb + from ab in bb.DefaultIfEmpty() + join c in userQueryable on a.LastModifierId equals c.Id into cc + from ac in cc.DefaultIfEmpty() + select new + { + a, + CreatorName = ab != null ? ab.Surname : "", + LastModifierName = ac != null ? ac.Surname : "" + + }) + .Select(s => new CollectItemTypeDto + { + CreationTime = s.a.CreationTime, + CreatorId = s.a.CreatorId, + LastModifierId = s.a.LastModifierId, + Id = s.a.Id, + DisplayOrder = s.a.DisplayOrder, + DisplayName = s.a.DisplayName, + InvoiceItemTypeId = s.a.InvoiceItemTypeId, + SimpleCode = s.a.SimpleCode, + LastModificationTime = s.a.LastModificationTime, + CreatorName = s.CreatorName, + LastModifierName = s.LastModifierName + }).OrderBy(o => o.DisplayOrder).ToList(); + + return entlist; + } + + /// + /// 创建 + /// + /// + /// + [HttpPost("api/app/CollectItemType/Create")] + public async Task CreateAsync(CreateCollectItemTypeDto input) + { + var createEntity = ObjectMapper.Map(input); + var entity = await _manager.CreateAsync(createEntity); + entity = await _collectItemTypeRepository.InsertAsync(entity); + var dto = ObjectMapper.Map(entity); + return dto; + } + + /// + /// 修改 + /// + /// + /// + [HttpPost("api/app/CollectItemType/Update")] + public async Task UpdateAsync(UpdateCollectItemTypeDto input) + { + var entity = await _collectItemTypeRepository.GetAsync(input.Id); + var sourceEntity = ObjectMapper.Map(input); + await _manager.UpdateAsync(sourceEntity, entity); + entity = await _collectItemTypeRepository.UpdateAsync(entity); + return ObjectMapper.Map(entity); + } + + /// + /// 删除 + /// + /// + /// + [HttpPost("api/app/CollectItemType/Delete")] + public async Task DeleteAsync(CollectItemTypeIdInputDto input) + { + var entity = await _collectItemTypeRepository.GetAsync(input.Id); + await _manager.CheckAndDeleteAsync(entity); + } + + + /// + /// 修改排序 置顶,置底 + /// + /// + /// + [HttpPost("api/app/CollectItemType/UpdateManySort")] + public async Task UpdateManySortAsync(UpdateManySortInput input) + { + await _manager.UpdateManySortAsync(input.Id, input.SortType); + } + + /// + /// 修改排序 拖拽 + /// + /// + /// + [HttpPost("api/app/CollectItemType/UpdateSortMany")] + public async Task UpdateSortManyAsync(UpdateSortManyDto input) + { + await _manager.UpdateSortManyAsync(input); + } + } +} diff --git a/src/Shentun.Pacs.Application/PacsBusiness/PacsBusinessAppService.cs b/src/Shentun.Pacs.Application/PacsBusiness/PacsBusinessAppService.cs index 604b77b..d09e785 100644 --- a/src/Shentun.Pacs.Application/PacsBusiness/PacsBusinessAppService.cs +++ b/src/Shentun.Pacs.Application/PacsBusiness/PacsBusinessAppService.cs @@ -6,10 +6,12 @@ using Microsoft.Extensions.Logging; using NPOI.POIFS.Storage; using NPOI.Util; using NUglify.Helpers; +using Shentun.Pacs.ColumnReferenceCodes; using Shentun.Pacs.CustomerOrgs; using Shentun.Pacs.Enums; using Shentun.Pacs.Models; using Shentun.Pacs.PatientRegisters; +using Shentun.Pacs.Patients; using Shentun.Pacs.PrintReports; using Shentun.Pacs.RegisterCheckItems; using Shentun.Pacs.RegisterCheckPictures; @@ -19,8 +21,11 @@ using Shentun.Pacs.RegisterCheckSummarys; using Shentun.Pacs.SumSummaryReports; using Shentun.Pacs.ThirdBookingPushs; using Shentun.Pacs.ThirdPartyPublicInterfaces; +using Shentun.Utilities; +using SqlSugar; using System; using System.Collections.Generic; +using System.Data; using System.Linq; using System.Net.Http; using System.Text; @@ -61,6 +66,12 @@ namespace Shentun.Pacs.PacsBusiness private readonly IRepository _itemTypeRepository; private readonly CustomerOrgManager _customerOrgManager; private readonly IRepository _organizationUnitRepository; + private readonly IRepository _patientRepository; + private readonly PatientManager _manager; + private readonly PatientRegisterManager _patientRegisterManager; + private readonly ColumnReferenceCodeManager _columnReferenceCodeManager; + private readonly IRepository _registerCheckItemRepository; + public PacsBusinessAppService( IConfiguration configuration, IRepository registerCheckRepository, @@ -82,7 +93,12 @@ namespace Shentun.Pacs.PacsBusiness ILogger logger, IRepository itemTypeRepository, CustomerOrgManager customerOrgManager, - IRepository organizationUnitRepository) + IRepository organizationUnitRepository, + IRepository patientRepository, + PatientManager manager, + PatientRegisterManager patientRegisterManager, + ColumnReferenceCodeManager columnReferenceCodeManager, + IRepository registerCheckItemRepository) { _configuration = configuration; _registerCheckRepository = registerCheckRepository; @@ -105,6 +121,11 @@ namespace Shentun.Pacs.PacsBusiness _itemTypeRepository = itemTypeRepository; _customerOrgManager = customerOrgManager; _organizationUnitRepository = organizationUnitRepository; + _patientRepository = patientRepository; + _manager = manager; + _patientRegisterManager = patientRegisterManager; + _columnReferenceCodeManager = columnReferenceCodeManager; + _registerCheckItemRepository = registerCheckItemRepository; } @@ -751,5 +772,282 @@ namespace Shentun.Pacs.PacsBusiness } + + #region 新流程增加接口 + + /// + /// 导入老系统人员、项目数据,并自动加入worklist + /// + /// + /// + /// + [HttpPost("api/app/PacsBusiness/ImportPeisCheckDataByCheckRequestNo")] + public async Task ImportPeisCheckDataByCheckRequestNoAsync(ImportPeisCheckDataByCheckRequestNoInputDto input) + { + + if (string.IsNullOrWhiteSpace(input.CheckRequestNo)) + { + throw new UserFriendlyException("检查条码不能为空"); + } + + if (string.IsNullOrWhiteSpace(input.DeviceId)) + { + throw new UserFriendlyException("设备id不能为空"); + } + + + if (string.IsNullOrWhiteSpace(input.ScheduledAet)) + { + throw new UserFriendlyException("预检AET不能为空"); + } + + string connectionString = _configuration.GetValue("OldPeis:ConnectionStrings", ""); + SqlSugarClient oldDb = new SqlSugarClient(new ConnectionConfig() + { + ConnectionString = connectionString, + DbType = SqlSugar.DbType.SqlServer, + IsAutoCloseConnection = true + }); + + + + var oldRegisterAsbitemList = await oldDb.Ado.GetDataTableAsync("select a.name as patient_name,a.sex_id,a.mobile_telephone,a.telephone," + + "a.age,a.id_card_no,a.marital_status_id,a.complete_flag," + + "b.print_barcode_no,b.asbitem_id,b.price,b.standard_price,b.charge_flag,b.payment_mode,c.item_id " + + "from patient_register as a left join register_asbitem as b on a.patient_register_id=b.patient_register_id " + + "left join register_item as c on b.asbitem_id=c.asbitem_id and a.patient_register_id=c.patient_register_id" + + $" where b.print_barcode_no='{input.CheckRequestNo}'"); + + if (oldRegisterAsbitemList.Rows.Count > 0) + { + var registerCheckFirst = (from patientRegister in await _patientRegisterRepository.GetQueryableAsync() + join patient in await _patientRepository.GetQueryableAsync() on patientRegister.PatientId equals patient.Id + join registerCheck in await _registerCheckRepository.GetQueryableAsync() on patientRegister.Id equals registerCheck.PatientRegisterId + where registerCheck.CheckRequestNo == input.CheckRequestNo + select new + { + patientRegister, + registerCheck + }).FirstOrDefault(); + + if (registerCheckFirst == null) + { + #region 插入人员 + + #region 档案 + var patientName = oldRegisterAsbitemList.Rows[0]["patient_name"].ToString(); + var sexId = ConvertSex(oldRegisterAsbitemList.Rows[0]["sex_id"].ToString()); + var mobileTelephone = oldRegisterAsbitemList.Rows[0]["mobile_telephone"].ToString(); + var telephone = oldRegisterAsbitemList.Rows[0]["telephone"].ToString(); + var idNo = oldRegisterAsbitemList.Rows[0]["id_card_no"].ToString(); + short? age = string.IsNullOrWhiteSpace(oldRegisterAsbitemList.Rows[0]["age"].ToString()) ? null : Convert.ToInt16(oldRegisterAsbitemList.Rows[0]["age"].ToString()); + var maritalStatusId = oldRegisterAsbitemList.Rows[0]["marital_status_id"].ToString() == "2" ? '4' : Convert.ToChar(oldRegisterAsbitemList.Rows[0]["marital_status_id"].ToString()); + + var patientQuery = await _patientRepository.GetQueryableAsync(); + patientQuery = patientQuery.Where(m => m.DisplayName == patientName && m.SexId == sexId); + if (!string.IsNullOrWhiteSpace(mobileTelephone)) + { + patientQuery = patientQuery.Where(m => m.MobileTelephone == mobileTelephone); + } + if (!string.IsNullOrWhiteSpace(idNo)) + { + patientQuery = patientQuery.Where(m => m.IdNo == idNo); + } + + //档案 + var patientEnt = await patientQuery.FirstOrDefaultAsync(); + + if (patientEnt == null) + { + patientEnt = new Patient(GuidGenerator.Create()) + { + BirthDate = null, + BirthPlaceId = null, + DisplayName = patientName, + Email = null, + IdNo = idNo, + MaritalStatusId = maritalStatusId, + MedicalCenterId = Guid.Empty, + MobileTelephone = mobileTelephone, + NationId = null, + PatientNo = await _manager.CreatePatientNo(Guid.Empty), + PatientPassword = "", + PostalCode = "", + SexId = sexId, + SimpleCode = LanguageConverter.GetPYSimpleCode(patientName), + Telephone = telephone + }; + + patientEnt = await _patientRepository.InsertAsync(patientEnt, true); + } + #endregion + + #region 人员 + var patientRegisterEnt = new PatientRegister(GuidGenerator.Create()) + { + Age = age, + CompleteFlag = Convert.ToChar(oldRegisterAsbitemList.Rows[0]["complete_flag"].ToString()), + CustomerOrgId = GuidFlag.PersonCustomerOrgId, + CustomerOrgRegisterId = GuidFlag.PersonCustomerOrgRegisterId, + DeviceId = Guid.Parse(input.DeviceId), + GuidePrintTimes = 0, + IsAudit = 'N', + IsLock = 'N', + IsMedicalStart = 'Y', + IsNameHide = 'N', + IsPhoneFollow = 'N', + IsVip = 'N', + IsRecoverGuide = 'N', + IsUpload = 'N', + IsUploadAppoint = 'N', + MaritalStatusId = maritalStatusId, + MedicalCenterId = Guid.Empty, + MedicalTimes = 0, + PatientId = patientEnt.Id, + PatientName = patientName, + ReportPrintTimes = 0, + PatientRegisterNo = await _patientRegisterManager.CreatePatientRegisterNo(Guid.Empty), + SendFlag = '0', + SexId = sexId + }; + + patientRegisterEnt = await _patientRegisterRepository.InsertAsync(patientRegisterEnt, true); + #endregion + + #region 登记项目 明细项目 + + string oldAsbitemId = oldRegisterAsbitemList.Rows[0]["asbitem_id"].ToString(); + var oldAsbitemPrice = Convert.ToDecimal(oldRegisterAsbitemList.Rows[0]["price"].ToString()); + var oldAsbitemStandardPrice = Convert.ToDecimal(oldRegisterAsbitemList.Rows[0]["standard_price"].ToString()); + + Guid asbitemColumnReferenId = Guid.Parse(_configuration.GetValue("OldPeis:AsbitemColumnReferenId", Guid.Empty.ToString())); + Guid itemColumnReferenId = Guid.Parse(_configuration.GetValue("OldPeis:ItemColumnReferenId", Guid.Empty.ToString())); + + var asbitemCodeValues = await _columnReferenceCodeManager.GetColumnReferenCodeValueAsync(asbitemColumnReferenId, oldAsbitemId); + if (!asbitemCodeValues.Any()) + { + throw new UserFriendlyException($"组合项目编号:{oldAsbitemId}没有对照"); + } + + if (asbitemCodeValues.Count() > 1) + { + throw new UserFriendlyException($"组合项目编号:{oldAsbitemId}有多个pacs项目进行了对照"); + } + + Guid asbitemId = Guid.Parse(asbitemCodeValues.First()); //pacs系统组合项目id + //检查 + var registerCheckEnt = new RegisterCheck(GuidGenerator.Create()) + { + CheckRequestNo = input.CheckRequestNo, + CheckRequestPrintTimes = 0, + CompleteFlag = RegisterCheckCompleteFlag.UnChecked, + IsAudit = 'N', + IsLock = 'N', + IsPacsCheck = 'N', + IsSignIn = 'Y', + PatientRegisterId = patientRegisterEnt.Id, + ScheduledAet = input.ScheduledAet, + WorklistFlag = '1', + WorklistPreCheckDate = DateTime.Now + }; + + registerCheckEnt = await _registerCheckRepository.InsertAsync(registerCheckEnt, true); + + //组合项目 + var registerCheckAsbitemEnt = new RegisterCheckAsbitem(GuidGenerator.Create()) + { + Amount = 1, + AsbitemId = asbitemId, + ChargePrice = oldAsbitemPrice, + StandardPrice = oldAsbitemStandardPrice, + IsCharge = Convert.ToChar(oldRegisterAsbitemList.Rows[0]["charge_flag"].ToString()), + OldAsbitemId = oldAsbitemId, + PatientRegisterId = patientRegisterEnt.Id, + PayTypeFlag = Convert.ToChar(oldRegisterAsbitemList.Rows[0]["payment_mode"].ToString()), + RegisterCheckId = registerCheckEnt.Id + }; + + registerCheckAsbitemEnt = await _registerCheckAsbitemRepository.InsertAsync(registerCheckAsbitemEnt, true); + + //明细项目 + + List registerCheckItemList = new List(); + + foreach (DataRow row in oldRegisterAsbitemList.Rows) + { + string oldItemId = row["item_id"].ToString(); + + var itemCodeValues = await _columnReferenceCodeManager.GetColumnReferenCodeValueAsync(itemColumnReferenId, oldItemId); + if (!itemCodeValues.Any()) + { + throw new UserFriendlyException($"项目编号:{oldItemId}没有对照"); + } + if (itemCodeValues.Count() > 1) + { + throw new UserFriendlyException($"项目编号:{oldAsbitemId}有多个pacs项目进行了对照"); + } + + Guid itemId = Guid.Parse(itemCodeValues.First()); //pacs系统项目id + + if (registerCheckItemList.Count(c => c.ItemId == itemId) == 0) + { + registerCheckItemList.Add(new RegisterCheckItem + { + ItemId = itemId, + RegisterCheckId = registerCheckEnt.Id, + }); + } + } + + if (registerCheckItemList.Any()) + { + await _registerCheckItemRepository.InsertManyAsync(registerCheckItemList); + } + + #endregion + + #endregion + } + else + { + //更新设备id + registerCheckFirst.patientRegister.DeviceId = Guid.Parse(input.DeviceId); + + await _patientRegisterRepository.UpdateAsync(registerCheckFirst.patientRegister); + + } + } + else + { + throw new UserFriendlyException("检查条码不正确"); + } + + + + } + + + #endregion + + /// + /// 转换老系统性别 + /// + /// + /// + private char ConvertSex(string SexId) + { + if (SexId == "0") + { + return 'M'; + } + else if (SexId == "1") + { + return 'F'; + } + else + { + return 'U'; + } + } } } diff --git a/src/Shentun.Pacs.Application/PacsDataMigrates/PacsDataMigrateAppService.cs b/src/Shentun.Pacs.Application/PacsDataMigrates/PacsDataMigrateAppService.cs index 9700aa9..56c9415 100644 --- a/src/Shentun.Pacs.Application/PacsDataMigrates/PacsDataMigrateAppService.cs +++ b/src/Shentun.Pacs.Application/PacsDataMigrates/PacsDataMigrateAppService.cs @@ -1,11 +1,27 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Configuration; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json; +using SqlSugar; using System; using System.Collections.Generic; +using System.IO; using System.Linq; +using System.Net.Http.Headers; +using System.Net.Http; using System.Text; using System.Threading.Tasks; +using Volo.Abp; using Volo.Abp.Application.Services; +using Microsoft.Extensions.Logging; +using Shentun.Pacs.Models; +using Volo.Abp.Domain.Repositories; +using System.Data; +using Volo.Abp.Uow; +using Shentun.Utilities; +using Shentun.Pacs.ItemTypes; +using Shentun.Pacs.Enums; namespace Shentun.Pacs.PacsDataMigrates { @@ -17,10 +33,834 @@ namespace Shentun.Pacs.PacsDataMigrates public class PacsDataMigrateAppService : ApplicationService { - public PacsDataMigrateAppService() + private readonly ILogger _logger; + private readonly IRepository _itemTypeRepository; + private readonly IRepository _itemRepository; + private readonly IRepository _asbitemRepository; + private readonly UnitOfWorkManager _unitOfWorkManager; + private readonly IRepository _fieldComparisonRepository; + private readonly IRepository _deviceTypeRepository; + private readonly ItemTypeManager _itemTypeManager; + private readonly IRepository _asbitemDetailRepository; + private readonly IRepository _columnReferenceRepository; + private readonly IRepository _columnReferenceCodeRepository; + private readonly IRepository _columnReferenceInterfaceRepository; + + private readonly SqlSugarClient Db = new SqlSugarClient(new ConnectionConfig() + { + ConnectionString = "server=192.168.0.3;uid=sa;pwd=;database=reddolphin;Encrypt=false;", + DbType = SqlSugar.DbType.SqlServer, + IsAutoCloseConnection = true + }); + //默认指引类别ID + private readonly char defaultGuidTypeId = '0'; + //默认体检报告类别ID + private readonly char defaultMedicalReportTypeId = '0'; + + /// + /// 汇总项目类别 + /// + private readonly Guid collectItemTypeId = Guid.Parse("3a11fe49-5719-0e9e-dd44-0c4aff0900b3"); + + public PacsDataMigrateAppService( + ILogger logger, + IRepository itemTypeRepository, + IRepository itemRepository, + IRepository asbitemRepository, + UnitOfWorkManager unitOfWorkManager, + IRepository deviceTypeRepository, + ItemTypeManager itemTypeManager, + IRepository asbitemDetailRepository, + IRepository columnReferenceRepository, + IRepository columnReferenceCodeRepository, + IRepository columnReferenceInterfaceRepository, + IRepository fieldComparisonRepository) + { + _logger = logger; + _itemTypeRepository = itemTypeRepository; + _itemRepository = itemRepository; + _asbitemRepository = asbitemRepository; + _unitOfWorkManager = unitOfWorkManager; + _deviceTypeRepository = deviceTypeRepository; + _itemTypeManager = itemTypeManager; + _asbitemDetailRepository = asbitemDetailRepository; + _columnReferenceRepository = columnReferenceRepository; + _columnReferenceCodeRepository = columnReferenceCodeRepository; + _columnReferenceInterfaceRepository = columnReferenceInterfaceRepository; + _fieldComparisonRepository = fieldComparisonRepository; + } + + + #region 对照 + + /// + /// 组合项目对照 + /// + /// + [HttpPost("api/app/PacsDataMigrate/AsbitemFieldComparison")] + public async Task AsbitemFieldComparison() + { + Guid columnReferenceId = GuidGenerator.Create(); + + var columnReferenceEnt = await _columnReferenceRepository.FirstOrDefaultAsync(f => f.DisplayName.Contains("组合项目对照")); + if (columnReferenceEnt == null) + { + using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true)) + { + + columnReferenceEnt = new ColumnReference(columnReferenceId) + { + DisplayName = "组合项目对照", + DisplayOrder = 1, + ParmValue = "" + }; + + await _columnReferenceRepository.InsertAsync(columnReferenceEnt, true); + + await uow.CompleteAsync(); + + } + } + else + { + columnReferenceId = columnReferenceEnt.Id; + } + + + var fieldComparisonList = await _fieldComparisonRepository.GetListAsync(m => m.TableName == "asbitem"); + + if (fieldComparisonList.Count > 0) + { + foreach (var fieldComparison in fieldComparisonList) + { + using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true)) + { + string pacsId = fieldComparison.NewKeyValue; + string peisId = fieldComparison.OldKeyValue; + + var columnReferenceCodeEnt = await _columnReferenceCodeRepository.FirstOrDefaultAsync(f => f.ColumnReferenceId == columnReferenceId + && f.CodeValue == pacsId); + + Guid columnReferenceCodeId = GuidGenerator.Create(); + + if (columnReferenceCodeEnt == null) + { + columnReferenceCodeEnt = new ColumnReferenceCode(columnReferenceCodeId) + { + CodeValue = pacsId, + ColumnReferenceId = columnReferenceId, + FilterCodeValue = "" + }; + + await _columnReferenceCodeRepository.InsertAsync(columnReferenceCodeEnt, true); + } + else + { + columnReferenceCodeId = columnReferenceCodeEnt.Id; + } + + + #region 对照值 + + var columnReferenceInterfaceEnt = await _columnReferenceInterfaceRepository.FirstOrDefaultAsync(f => f.ColumnReferenceCodeId == columnReferenceCodeId); + if (columnReferenceInterfaceEnt == null) + { + columnReferenceInterfaceEnt = new ColumnReferenceInterface(GuidGenerator.Create()) + { + ColumnReferenceCodeId = columnReferenceCodeId, + InterfaceCodeValue = peisId + }; + + await _columnReferenceInterfaceRepository.InsertAsync(columnReferenceInterfaceEnt, true); + } + + #endregion + + await uow.CompleteAsync(); + } + } + + } + + + } + + /// + /// 明细项目对照 + /// + /// + [HttpPost("api/app/PacsDataMigrate/ItemFieldComparison")] + public async Task ItemFieldComparison() + { + Guid columnReferenceId = GuidGenerator.Create(); + + var columnReferenceEnt = await _columnReferenceRepository.FirstOrDefaultAsync(f => f.DisplayName.Contains("明细项目对照")); + if (columnReferenceEnt == null) + { + using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true)) + { + + columnReferenceEnt = new ColumnReference(columnReferenceId) + { + DisplayName = "明细项目对照", + DisplayOrder = 1, + ParmValue = "" + }; + + await _columnReferenceRepository.InsertAsync(columnReferenceEnt, true); + + await uow.CompleteAsync(); + + } + } + else + { + columnReferenceId = columnReferenceEnt.Id; + } + + + var fieldComparisonList = await _fieldComparisonRepository.GetListAsync(m => m.TableName == "item"); + + if (fieldComparisonList.Count > 0) + { + + foreach (var fieldComparison in fieldComparisonList) + { + using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true)) + { + string pacsId = fieldComparison.NewKeyValue; + string peisId = fieldComparison.OldKeyValue; + + var columnReferenceCodeEnt = await _columnReferenceCodeRepository.FirstOrDefaultAsync(f => f.ColumnReferenceId == columnReferenceId + && f.CodeValue == pacsId); + + Guid columnReferenceCodeId = GuidGenerator.Create(); + + if (columnReferenceCodeEnt == null) + { + columnReferenceCodeEnt = new ColumnReferenceCode(columnReferenceCodeId) + { + CodeValue = pacsId, + ColumnReferenceId = columnReferenceId, + FilterCodeValue = "" + }; + + await _columnReferenceCodeRepository.InsertAsync(columnReferenceCodeEnt, true); + } + else + { + columnReferenceCodeId = columnReferenceCodeEnt.Id; + } + + + #region 对照值 + + var columnReferenceInterfaceEnt = await _columnReferenceInterfaceRepository.FirstOrDefaultAsync(f => f.ColumnReferenceCodeId == columnReferenceCodeId); + if (columnReferenceInterfaceEnt == null) + { + columnReferenceInterfaceEnt = new ColumnReferenceInterface(GuidGenerator.Create()) + { + ColumnReferenceCodeId = columnReferenceCodeId, + InterfaceCodeValue = peisId + }; + + await _columnReferenceInterfaceRepository.InsertAsync(columnReferenceInterfaceEnt, true); + } + + #endregion + + await uow.CompleteAsync(); + } + } + + } + + + } + + + /// + /// 仪器类别对照 + /// + /// + [HttpPost("api/app/PacsDataMigrate/DeviceTypeFieldComparison")] + public async Task DeviceTypeFieldComparison() + { + Guid columnReferenceId = GuidGenerator.Create(); + + var columnReferenceEnt = await _columnReferenceRepository.FirstOrDefaultAsync(f => f.DisplayName.Contains("仪器类别对照")); + if (columnReferenceEnt == null) + { + using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true)) + { + + columnReferenceEnt = new ColumnReference(columnReferenceId) + { + DisplayName = "仪器类别对照", + DisplayOrder = 1, + ParmValue = "" + }; + + await _columnReferenceRepository.InsertAsync(columnReferenceEnt, true); + + await uow.CompleteAsync(); + + } + } + else + { + columnReferenceId = columnReferenceEnt.Id; + } + + + var fieldComparisonList = await _fieldComparisonRepository.GetListAsync(m => m.TableName == "device_type"); + + if (fieldComparisonList.Count > 0) + { + + foreach (var fieldComparison in fieldComparisonList) + { + using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true)) + { + string pacsId = fieldComparison.NewKeyValue; + string peisId = fieldComparison.OldKeyValue; + + var columnReferenceCodeEnt = await _columnReferenceCodeRepository.FirstOrDefaultAsync(f => f.ColumnReferenceId == columnReferenceId + && f.CodeValue == pacsId); + + Guid columnReferenceCodeId = GuidGenerator.Create(); + + if (columnReferenceCodeEnt == null) + { + columnReferenceCodeEnt = new ColumnReferenceCode(columnReferenceCodeId) + { + CodeValue = pacsId, + ColumnReferenceId = columnReferenceId, + FilterCodeValue = "" + }; + + await _columnReferenceCodeRepository.InsertAsync(columnReferenceCodeEnt, true); + } + else + { + columnReferenceCodeId = columnReferenceCodeEnt.Id; + } + + + #region 对照值 + + var columnReferenceInterfaceEnt = await _columnReferenceInterfaceRepository.FirstOrDefaultAsync(f => f.ColumnReferenceCodeId == columnReferenceCodeId); + if (columnReferenceInterfaceEnt == null) + { + columnReferenceInterfaceEnt = new ColumnReferenceInterface(GuidGenerator.Create()) + { + ColumnReferenceCodeId = columnReferenceCodeId, + InterfaceCodeValue = peisId + }; + + await _columnReferenceInterfaceRepository.InsertAsync(columnReferenceInterfaceEnt, true); + } + + #endregion + + await uow.CompleteAsync(); + } + } + + } + } + + #endregion + + + #region 基础数据 + + /// + /// 处理基础数据 + /// + /// + [HttpPost("api/app/PacsDataMigrate/HandBaseData")] + public async Task HandBaseData() + { + await TransferDeviceTypeData(); + await TransferItemTypeData(); + } + + + /// + /// 处理基础项目相关数据 + /// + /// + [HttpPost("api/app/PacsDataMigrate/HandBaseItemData")] + public async Task HandBaseItemData() + { + await TransferItemData(); + await TransferAsbitemData(); + await TransferAsbitemDetailData(); + } + + + + + + #endregion + + + #region 基础数据 + + /// + /// 迁移仪器类别数据 + /// + /// + [RemoteService(false)] + public async Task TransferDeviceTypeData() + { + var count = await _deviceTypeRepository.GetCountAsync(); + if (count == 0) + { + var oldDeviceTypeList = await Db.Ado.GetDataTableAsync("select device_type_id,device_type_name from device_type order by display_order asc"); + if (oldDeviceTypeList.Rows.Count > 0) + { + foreach (DataRow row in oldDeviceTypeList.Rows) + { + using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true)) + { + Guid deviceTypeId = GuidGenerator.Create(); + + var data = new DeviceType(deviceTypeId) + { + CheckTypeFlag = '0', + DisplayName = row["device_type_name"].ToString(), + DisplayOrder = oldDeviceTypeList.Rows.IndexOf(row) + 1, + SimpleCode = LanguageConverter.GetPYSimpleCode(row["device_type_name"].ToString()) + }; + + await _deviceTypeRepository.InsertAsync(data); + + var fieldComparison = new FieldComparison + { + TableName = "device_type", + FieldName = "id", + NewKeyValue = deviceTypeId.ToString(), + OldKeyValue = row["device_type_id"].ToString() + }; + + await _fieldComparisonRepository.InsertAsync(fieldComparison); + + await uow.CompleteAsync(); + } + } + } + + _logger.LogInformation($"仪器类别数据处理完毕,处理数量{oldDeviceTypeList.Rows.Count}"); + } + else + { + _logger.LogInformation("仪器类别数据已存在,未处理"); + } + } + + + /// + /// 迁移项目类别-科室数据 + /// + /// + [RemoteService(false)] + public async Task TransferItemTypeData() + { + var count = await _itemTypeRepository.GetCountAsync(); + if (count == 0) + { + + var oldItemTypeList = await Db.Ado.GetDataTableAsync("select department_id,department_type,department_name,merge_asbitem_flag,print_pacs_barcode_flag from department order by display_order asc"); + if (oldItemTypeList.Rows.Count > 0) + { + foreach (DataRow row in oldItemTypeList.Rows) + { + using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true)) + { + Guid itemTypeId = GuidGenerator.Create(); + + var data = new ItemType(itemTypeId) + { + DisplayName = row["department_name"].ToString(), + DisplayOrder = oldItemTypeList.Rows.IndexOf(row) + 1, + SimpleCode = LanguageConverter.GetPYSimpleCode(row["department_name"].ToString()), + CheckTypeFlag = Convert.ToChar(row["department_type"]), + GuidTypeId = defaultGuidTypeId, + IsMergeAsbitem = Convert.ToChar(row["merge_asbitem_flag"]), + IsWrap = 'N', + MedicalReportTypeId = defaultMedicalReportTypeId, + ParentId = null, + PathCode = _itemTypeManager.CreatePathCode(null).Result, + IsCheckRequest = Convert.ToChar(row["print_pacs_barcode_flag"]) + }; + + await _itemTypeRepository.InsertAsync(data); + + var fieldComparison = new FieldComparison + { + TableName = "item_type", + FieldName = "id", + NewKeyValue = itemTypeId.ToString(), + OldKeyValue = row["department_id"].ToString() + }; + await _fieldComparisonRepository.InsertAsync(fieldComparison); + + await uow.CompleteAsync(); + } + } + + + } + _logger.LogInformation($"项目类别数据处理完毕,处理数量{oldItemTypeList.Rows.Count}"); + } + else + { + _logger.LogInformation($"项目类别数据已存在,未处理"); + } + } + + + + #endregion + + + + #region 基础项目相关数据 + + /// + /// 迁移项目数据 + /// + /// + [RemoteService(false)] + public async Task TransferItemData() + { + var count = await _itemRepository.GetCountAsync(); + if (count == 0) + { + + var oldItemList = await Db.Ado.GetDataTableAsync("select a.* from item as a left join department as b on a.department_id=b.department_id order by b.display_order,a.display_order"); + if (oldItemList.Rows.Count > 0) + { + + foreach (DataRow row in oldItemList.Rows) + { + + using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true)) + { + + #region 根据仪器类别生成二级科室 + + var itemTypeId = Guid.Parse((await _fieldComparisonRepository.GetQueryableAsync()).Where(m => m.TableName == "item_type" && m.OldKeyValue == row["department_id"].ToString()).FirstOrDefault().NewKeyValue); + + Guid? deviceTypeId = null; + + if (!string.IsNullOrWhiteSpace(row["device_type_id"].ToString())) + { + deviceTypeId = Guid.Parse((await _fieldComparisonRepository.GetQueryableAsync()).Where(m => m.TableName == "device_type" && m.OldKeyValue == row["device_type_id"].ToString()).FirstOrDefault().NewKeyValue); + + var itemTypeEnt = await _itemTypeRepository.GetAsync(itemTypeId); + var deviceTypeEnt = await _deviceTypeRepository.GetAsync(deviceTypeId.Value); + + + var itemTypeChildEnt = await _itemTypeRepository.FirstOrDefaultAsync(m => m.ParentId == itemTypeEnt.Id && m.DisplayName == deviceTypeEnt.DisplayName); + if (itemTypeChildEnt == null) + { + Guid autoItemTypeId = GuidGenerator.Create(); + + #region 排序值 + + int displayOrder = (await _itemTypeRepository.CountAsync(m => m.ParentId == itemTypeEnt.Id)) + 1; + + #endregion + + var item_type_data = new ItemType(autoItemTypeId) + { + DisplayName = deviceTypeEnt.DisplayName, + DisplayOrder = displayOrder, + SimpleCode = LanguageConverter.GetPYSimpleCode(deviceTypeEnt.DisplayName), + CheckTypeFlag = itemTypeEnt.CheckTypeFlag, + GuidTypeId = itemTypeEnt.GuidTypeId, + IsMergeAsbitem = itemTypeEnt.IsMergeAsbitem, + IsWrap = itemTypeEnt.IsWrap, + MedicalReportTypeId = itemTypeEnt.MedicalReportTypeId, + ParentId = itemTypeEnt.Id, + PathCode = _itemTypeManager.CreatePathCode(itemTypeEnt.Id).Result, + IsCheckRequest = itemTypeEnt.IsCheckRequest + }; + + await _itemTypeRepository.InsertAsync(item_type_data); + itemTypeId = autoItemTypeId; + } + else + { + itemTypeId = itemTypeChildEnt.Id; + } + + } + + #endregion + + + + + Guid itemId = GuidGenerator.Create(); + + var data = new Item(itemId) + { + DisplayName = row["item_name"].ToString(), + DisplayOrder = oldItemList.Rows.IndexOf(row) + 1, + SimpleCode = LanguageConverter.GetPYSimpleCode(row["item_name"].ToString()), + CalculationFunction = "", + DefaultResult = row["default_result"].ToString(), + DiagnosisFunction = "", + EnglishShortName = row["english_abbreviation"].ToString(), + InputCheck = row["input_check"].ToString(), + IsActive = Convert.ToChar(row["valid_flag"].ToString()), + IsCalculationItem = 'N', + IsContinueProcess = 'N', + IsDiagnosisFunction = 'N', + IsNameIntoSummary = Convert.ToChar(row["name_into_summary_flag"]), + IsProduceSummary = Convert.ToChar(row["produce_summary_flag"]), + ItemTypeId = itemTypeId, + LineModeFlag = '0', + Price = Convert.ToDecimal(row["price"]), + PriceItemId = null, + ReferenceRangeTypeFlag = Convert.ToChar(row["reference_range_type"]), + ResultTemplateTypeFlag = '0', + UnitId = null, + DeviceTypeId = deviceTypeId + }; + + await _itemRepository.InsertAsync(data); + + + var fieldComparison = new FieldComparison + { + TableName = "item", + FieldName = "id", + NewKeyValue = itemId.ToString(), + OldKeyValue = row["item_id"].ToString() + }; + + await _fieldComparisonRepository.InsertAsync(fieldComparison); + + await uow.CompleteAsync(); + } + } + + + + + } + _logger.LogInformation($"项目数据处理完毕,处理数量{oldItemList.Rows.Count}"); + } + else + { + _logger.LogInformation("项目数据已存在,未处理"); + } + } + + /// + /// 迁移组合项目数据 + /// + /// + [RemoteService(false)] + public async Task TransferAsbitemData() { + var count = await _asbitemRepository.GetCountAsync(); + + if (count == 0) + { + var oldAsbitemList = await Db.Ado.GetDataTableAsync("select a.* from asbitem as a left join department as b on a.department_id=b.department_id order by b.display_order,a.display_order "); + if (oldAsbitemList.Rows.Count > 0) + { + foreach (DataRow row in oldAsbitemList.Rows) + { + using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true)) + { + + #region 根据仪器类别生成二级科室 + + var itemTypeId = Guid.Parse((await _fieldComparisonRepository.GetQueryableAsync()).Where(m => m.TableName == "item_type" && m.OldKeyValue == row["department_id"].ToString()).FirstOrDefault().NewKeyValue); + + Guid? deviceTypeId = null; + + if (!string.IsNullOrWhiteSpace(row["device_type_id"].ToString())) + { + deviceTypeId = Guid.Parse((await _fieldComparisonRepository.GetQueryableAsync()).Where(m => m.TableName == "device_type" && m.OldKeyValue == row["device_type_id"].ToString()).FirstOrDefault().NewKeyValue); + + var itemTypeEnt = await _itemTypeRepository.GetAsync(itemTypeId); + var deviceTypeEnt = await _deviceTypeRepository.GetAsync(deviceTypeId.Value); + + + var itemTypeChildEnt = await _itemTypeRepository.FirstOrDefaultAsync(m => m.ParentId == itemTypeEnt.Id && m.DisplayName == deviceTypeEnt.DisplayName); + if (itemTypeChildEnt == null) + { + Guid autoItemTypeId = GuidGenerator.Create(); + + #region 排序值 + + int displayOrder = (await _itemTypeRepository.CountAsync(m => m.ParentId == itemTypeEnt.Id)) + 1; + + #endregion + + var item_type_data = new ItemType(autoItemTypeId) + { + DisplayName = deviceTypeEnt.DisplayName, + DisplayOrder = displayOrder, + SimpleCode = LanguageConverter.GetPYSimpleCode(deviceTypeEnt.DisplayName), + CheckTypeFlag = itemTypeEnt.CheckTypeFlag, + GuidTypeId = itemTypeEnt.GuidTypeId, + IsMergeAsbitem = itemTypeEnt.IsMergeAsbitem, + IsWrap = itemTypeEnt.IsWrap, + MedicalReportTypeId = itemTypeEnt.MedicalReportTypeId, + ParentId = itemTypeEnt.Id, + PathCode = _itemTypeManager.CreatePathCode(itemTypeEnt.Id).Result, + IsCheckRequest = itemTypeEnt.IsCheckRequest + }; + + await _itemTypeRepository.InsertAsync(item_type_data); + itemTypeId = autoItemTypeId; + } + else + { + itemTypeId = itemTypeChildEnt.Id; + } + + } + + #endregion + + + Guid asbitemId = GuidGenerator.Create(); + + + var data = new Asbitem(asbitemId) + { + DisplayName = row["asbitem_name"].ToString(), + DisplayOrder = oldAsbitemList.Rows.IndexOf(row) + 1, + SimpleCode = LanguageConverter.GetPYSimpleCode(row["asbitem_name"].ToString()), + DefaultResult = row["default_result"].ToString(), + DiagnosisFunction = "", + IsActive = Convert.ToChar(row["valid_flag"].ToString()), + IsContinueProcess = 'N', + IsDiagnosisFunction = 'N', + ItemTypeId = itemTypeId, + Price = Convert.ToDecimal(row["price"]), + DeviceTypeId = deviceTypeId, + ClinicalMeaning = row["clinical_meaning"].ToString(), + ForSexId = ConvertForSex(row["for_sex_id"].ToString()), + CollectItemTypeId = collectItemTypeId, + //InvoiceItemTypeId = InvoiceItemTypeId, + IsBeforeEat = Convert.ToChar(row["before_eat_flag"].ToString()), + IsCheck = Convert.ToChar(row["check_flag"].ToString()), + IsItemResultMerger = Convert.ToChar(row["item_result_merger_flag"].ToString()), + IsPictureRotate = Convert.ToChar(row["picture_rotate_flag"].ToString()), + QueueTime = string.IsNullOrEmpty(row["queue_time"].ToString()) ? 0 : Convert.ToDecimal(row["queue_time"].ToString()), + ShortName = row["short_name"].ToString() + }; + + await _asbitemRepository.InsertAsync(data); + + + + + var fieldComparison = new FieldComparison + { + TableName = "asbitem", + FieldName = "id", + NewKeyValue = asbitemId.ToString(), + OldKeyValue = row["asbitem_id"].ToString() + }; + + await _fieldComparisonRepository.InsertAsync(fieldComparison); + + await uow.CompleteAsync(); + } + } + + + + + } + _logger.LogInformation($"组合项目数据处理完毕,处理数量{oldAsbitemList.Rows.Count}"); + } + else + { + _logger.LogInformation("组合项目数据已存在,未处理"); + } + + } + /// + /// 迁移组合项目明细数据 无字典 + /// + /// + [RemoteService(false)] + public async Task TransferAsbitemDetailData() + { + var count = await _asbitemDetailRepository.GetCountAsync(); + + if (count == 0) + { + var oldAsbitemDetailList = await Db.Ado.GetDataTableAsync("select * from asbitem_detail "); + if (oldAsbitemDetailList.Rows.Count > 0) + { + foreach (DataRow row in oldAsbitemDetailList.Rows) + { + using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true)) + { + Guid asbitemId = Guid.Parse((await _fieldComparisonRepository.GetQueryableAsync()).Where(m => m.TableName == "asbitem" && m.OldKeyValue == row["asbitem_id"].ToString()).FirstOrDefault().NewKeyValue); + Guid itemId = Guid.Parse((await _fieldComparisonRepository.GetQueryableAsync()).Where(m => m.TableName == "item" && m.OldKeyValue == row["item_id"].ToString()).FirstOrDefault().NewKeyValue); + var data = new AsbitemDetail + { + AsbitemId = asbitemId, + ItemId = itemId + }; + + await _asbitemDetailRepository.InsertAsync(data); + + await uow.CompleteAsync(); + } + } + } + _logger.LogInformation($"组合项目明细数据处理完毕,处理数量{oldAsbitemDetailList.Rows.Count}"); + } + else + { + _logger.LogInformation("组合项目明细数据已存在,未处理"); + } + + + } + + + #endregion + + + /// + /// 转换老系统适用性别 + /// + /// + /// + private char ConvertForSex(string forSexId) + { + if (forSexId == "0") + { + return 'M'; + } + else if (forSexId == "1") + { + return 'F'; + } + else + { + return 'A'; + } + } } } diff --git a/src/Shentun.Pacs.Domain/PatientRegisters/PatientRegister.cs b/src/Shentun.Pacs.Domain/PatientRegisters/PatientRegister.cs index 3f7616e..5e9b29d 100644 --- a/src/Shentun.Pacs.Domain/PatientRegisters/PatientRegister.cs +++ b/src/Shentun.Pacs.Domain/PatientRegisters/PatientRegister.cs @@ -12,10 +12,7 @@ namespace Shentun.Pacs.Models /// 体检登记主档 /// [Table("patient_register")] - //[Index(nameof(CustomerOrgRegisterId), Name = "fki_fk_patient_register_org_register")] - [Index(nameof(MedicalCenterId), Name = "fki_fk_patient_register_ororganization_unit")] - [Index(nameof(PatientRegisterNo), Name = "ix_patient_register", IsUnique = true)] - [Index(nameof(PatientId), nameof(MedicalTimes), Name = "ix_patient_register_1", IsUnique = true)] + [Index(nameof(PatientRegisterNo), Name = "ix_patient_register")] [Index(nameof(PatientName), Name = "ix_patient_register_2")] public class PatientRegister : AuditedEntity, IHasConcurrencyStamp { @@ -324,6 +321,25 @@ namespace Shentun.Pacs.Models [Column("concurrency_stamp")] public string ConcurrencyStamp { get; set; } + /// + /// 仪器ID pacs系统的仪器id + /// + [Column("device_id")] + public Guid DeviceId { get; set; } + + /// + /// 发送状态 0-未发送 1-发送 + /// + [Column("send_flag")] + public char SendFlag { get; set; } + + + /// + /// 发送时间 + /// + [Column("send_date")] + public DateTime? SendDate { get; set; } + /// /// 修改登记人 /// diff --git a/src/Shentun.Pacs.Domain/Patients/PatientManager.cs b/src/Shentun.Pacs.Domain/Patients/PatientManager.cs index be43a53..f303ee7 100644 --- a/src/Shentun.Pacs.Domain/Patients/PatientManager.cs +++ b/src/Shentun.Pacs.Domain/Patients/PatientManager.cs @@ -291,7 +291,7 @@ namespace Shentun.Pacs.Patients /// /// 体检中心ID /// - private async Task CreatePatientNo(Guid medicalCenterId) + public async Task CreatePatientNo(Guid medicalCenterId) { var patient_id_rule_prefix = ""; //前缀 var patient_id_rule_tail_len = ""; //尾号长度 diff --git a/src/Shentun.Pacs.Domain/RegisterCheckAsbitems/RegisterCheckAsbitem.cs b/src/Shentun.Pacs.Domain/RegisterCheckAsbitems/RegisterCheckAsbitem.cs index f6460f5..dda4675 100644 --- a/src/Shentun.Pacs.Domain/RegisterCheckAsbitems/RegisterCheckAsbitem.cs +++ b/src/Shentun.Pacs.Domain/RegisterCheckAsbitems/RegisterCheckAsbitem.cs @@ -119,6 +119,13 @@ namespace Shentun.Pacs.Models [Column("concurrency_stamp")] public string ConcurrencyStamp { get; set; } + /// + /// 体检系统组合项目id + /// + [StringLength(50)] + [Column("old_asbitem_id")] + public string OldAsbitemId { get; set; } + ///// ///// 主键 ///// diff --git a/src/Shentun.Pacs.Domain/RegisterCheckItems/RegisterCheckItem.cs b/src/Shentun.Pacs.Domain/RegisterCheckItems/RegisterCheckItem.cs index ba7845c..cb08188 100644 --- a/src/Shentun.Pacs.Domain/RegisterCheckItems/RegisterCheckItem.cs +++ b/src/Shentun.Pacs.Domain/RegisterCheckItems/RegisterCheckItem.cs @@ -171,6 +171,13 @@ namespace Shentun.Pacs.Models [Column("concurrency_stamp")] public string ConcurrencyStamp { get; set; } + /// + /// 体检系统明细项目id + /// + [StringLength(50)] + [Column("old_item_id")] + public string OldItemId { get; set; } + //[Column("last_modifier_id")] //public Guid LastModifierId { get; set; } //[Column("last_modification_time", TypeName = "timestamp without time zone")] diff --git a/src/Shentun.Pacs.EntityFrameworkCore/DbMapping/PatientRegisters/PatientRegisterDbMapping.cs b/src/Shentun.Pacs.EntityFrameworkCore/DbMapping/PatientRegisters/PatientRegisterDbMapping.cs index e27a90f..5d80ffa 100644 --- a/src/Shentun.Pacs.EntityFrameworkCore/DbMapping/PatientRegisters/PatientRegisterDbMapping.cs +++ b/src/Shentun.Pacs.EntityFrameworkCore/DbMapping/PatientRegisters/PatientRegisterDbMapping.cs @@ -100,6 +100,9 @@ namespace Shentun.Pacs.DbMapping entity.Property(t => t.CustomerOrgRegisterId).HasComment("客户单位登记ID").HasDefaultValue(Guid.Empty); entity.Property(t => t.AppointPatientRegisterId).HasMaxLength(40).HasComment("预约人员登记ID"); + entity.Property(t => t.SendFlag).HasComment("发送状态 0-未发送 1-发送").IsRequired().HasDefaultValueSql("'0'"); + entity.Property(t => t.SendDate).HasComment("发送时间"); + //entity.HasOne(d => d.CustomerOrgRegister) // .WithMany(p => p.PatientRegisters) // .HasForeignKey(d => d.CustomerOrgRegisterId) diff --git a/src/Shentun.Pacs.EntityFrameworkCore/Migrations/20241213083723_update_patient_register_check.Designer.cs b/src/Shentun.Pacs.EntityFrameworkCore/Migrations/20241213083723_update_patient_register_check.Designer.cs new file mode 100644 index 0000000..a59fc7a --- /dev/null +++ b/src/Shentun.Pacs.EntityFrameworkCore/Migrations/20241213083723_update_patient_register_check.Designer.cs @@ -0,0 +1,16267 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using Shentun.Pacs.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Shentun.Pacs.Migrations +{ + [DbContext(typeof(PeisDbContext))] + [Migration("20241213083723_update_patient_register_check")] + partial class update_patient_register_check + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) + .HasAnnotation("ProductVersion", "6.0.5") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Shentun.Pacs.Books.HelloA", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ADesc") + .HasColumnType("text") + .HasColumnName("a_desc"); + + b.Property("AName") + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasDefaultValue("默认值") + .HasColumnName("a_name"); + + b.Property("AddTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("add_time") + .HasDefaultValueSql("now()"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("HelloTypeId") + .HasColumnType("text") + .HasColumnName("hello_type_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("S2") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") + .HasDefaultValueSql("'A'::bpchar"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "AName" }, "ix_helloa") + .IsUnique(); + + b.ToTable("hello_a"); + }); + + modelBuilder.Entity("Shentun.Pacs.Books.HelloType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("TypeName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("type_name") + .HasComment("类型名称"); + + b.Property("s1") + .HasColumnType("uuid") + .HasColumnName("s1"); + + b.Property("s2") + .HasColumnType("uuid") + .HasColumnName("s2"); + + b.Property("s3") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("s3"); + + b.HasKey("Id"); + + b.ToTable("hello_type"); + }); + + modelBuilder.Entity("Shentun.Pacs.Books.Ma", b => + { + b.Property("Id") + .HasColumnType("text") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.HasKey("Id"); + + b.ToTable("ma"); + }); + + modelBuilder.Entity("Shentun.Pacs.Books.Mb", b => + { + b.Property("Id") + .HasColumnType("text") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MaId") + .HasColumnType("text") + .HasColumnName("ma_id"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.HasKey("Id"); + + b.HasIndex("MaId"); + + b.ToTable("mb"); + }); + + modelBuilder.Entity("Shentun.Pacs.Books.Mc", b => + { + b.Property("Id") + .HasColumnType("text") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MbId") + .HasColumnType("text") + .HasColumnName("mb_id"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.HasKey("Id"); + + b.HasIndex("MbId"); + + b.ToTable("mc"); + }); + + modelBuilder.Entity("Shentun.Pacs.Books.Student", b => + { + b.Property("Sid") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("sid"); + + b.Property("Cid") + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("Uid") + .HasColumnType("uuid"); + + b.HasKey("Sid"); + + b.ToTable("student"); + }); + + modelBuilder.Entity("Shentun.Pacs.Books.TestA", b => + { + b.Property("AId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("AName") + .HasColumnType("text"); + + b.HasKey("AId"); + + b.ToTable("testa"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Pacs.Books.TestB", b => + { + b.Property("BId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AId") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("AName") + .HasColumnType("text"); + + b.Property("TestAsAId") + .HasColumnType("uuid"); + + b.HasKey("BId"); + + b.HasIndex("TestAsAId"); + + b.ToTable("testb"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Pacs.Books.TestCT", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("TName") + .HasColumnType("text") + .HasColumnName("t_name"); + + b.HasKey("Id"); + + b.ToTable("test_ct"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.AbpUserDepartment", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("UserId", "OrganizationUnitId") + .HasName("pk_user_organizationunitid"); + + b.ToTable("abp_user_department"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Asbitem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("编号"); + + b.Property("BarcodeMode") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("barcode_mode") + .HasDefaultValueSql("'0'") + .HasComment("条码模式"); + + b.Property("ClinicalMeaning") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("clinical_meaning") + .HasComment("临床意义"); + + b.Property("CollectItemTypeId") + .HasColumnType("uuid") + .HasColumnName("collect_item_type_id") + .IsFixedLength() + .HasComment("汇总项目类别"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CriticalValueFunction") + .HasColumnType("text") + .HasColumnName("critical_value_function") + .HasComment("危急值函数"); + + b.Property("DefaultResult") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("default_result") + .HasComment("默认结果"); + + b.Property("DeviceTypeId") + .HasColumnType("uuid") + .HasColumnName("device_type_id") + .HasComment("仪器类别"); + + b.Property("DiagnosisFunction") + .HasMaxLength(4000) + .HasColumnType("character varying(4000)") + .HasColumnName("diagnosis_function") + .HasComment("诊断函数"); + + b.Property("DiseaseScreeningTypeId") + .HasColumnType("uuid") + .HasColumnName("disease_screening_type_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("FollowUpFunction") + .HasColumnType("text") + .HasColumnName("follow_up_function") + .HasComment("随访函数"); + + b.Property("ForPregnantFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_pregnant_flag") + .HasDefaultValueSql("'A'") + .HasComment("备怀孕期间禁止检查"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'") + .HasComment("适用性别,M-男,F-女,A-全部"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasDefaultValueSql("'Y'") + .HasComment("是启用"); + + b.Property("IsBeforeEat") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_before_eat") + .HasDefaultValueSql("'N'") + .HasComment("餐前项目"); + + b.Property("IsCheck") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_check") + .HasDefaultValueSql("'Y'") + .HasComment("是检查项目"); + + b.Property("IsContinueProcess") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process") + .HasDefaultValueSql("'N'") + .HasComment("诊断函数处理完毕后继续处理"); + + b.Property("IsCriticalValueFunction") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_critical_value_function") + .HasDefaultValueSql("'N'") + .HasComment("是否启用危急值函数"); + + b.Property("IsDiagnosisFunction") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function") + .HasDefaultValueSql("'N'") + .HasComment("启用诊断函数"); + + b.Property("IsFollowUpFunction") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_follow_up_function") + .HasDefaultValueSql("'N'") + .HasComment("是否启用随访函数"); + + b.Property("IsItemResultMerger") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_item_result_merger") + .HasDefaultValueSql("'N'") + .HasComment("项目结果合并"); + + b.Property("IsPictureRotate") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_picture_rotate") + .HasDefaultValueSql("'N'") + .HasComment("体检报告图片旋转90°"); + + b.Property("IsPrivacy") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") + .HasColumnName("is_privacy") + .HasDefaultValueSql("'N'") + .HasComment("是否隐私项目"); + + b.Property("IsWebAppoint") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_web_appoint") + .HasDefaultValueSql("'Y'") + .HasComment("是否支持网上预约"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MaritalStatusId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasDefaultValueSql("'A'") + .HasComment("适用婚姻状况,0-未婚,1-已婚,A-全部"); + + b.Property("Price") + .ValueGeneratedOnAdd() + .HasPrecision(8, 2) + .HasColumnType("numeric(8,2)") + .HasColumnName("price") + .HasDefaultValueSql("0") + .HasComment("价格"); + + b.Property("QueueTime") + .ValueGeneratedOnAdd() + .HasPrecision(3, 1) + .HasColumnType("numeric(3,1)") + .HasColumnName("queue_time") + .HasDefaultValueSql("0") + .HasComment("候诊时间"); + + b.Property("ShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("short_name") + .HasComment("简称"); + + b.Property("SimpleCode") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code"); + + b.Property("Warn") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("warn"); + + b.HasKey("Id"); + + b.HasIndex("CollectItemTypeId"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_asbitem") + .IsUnique(); + + b.ToTable("asbitem"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.AsbitemDetail", b => + { + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编码"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.HasKey("AsbitemId", "ItemId") + .HasName("pk_department_asbitem_detail"); + + b.HasIndex("ItemId"); + + b.ToTable("asbitem_detail"); + + b.HasComment("组合项目包含项目"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.AsbitemGuide", b => + { + b.Property("MedicalCenterId") + .HasColumnType("uuid") + .HasColumnName("medical_center_id") + .IsFixedLength() + .HasComment("单位科室ID"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目ID"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'") + .HasComment("适用性别ID"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("Guide") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("guide") + .HasComment("指引单内容"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("MedicalCenterId", "AsbitemId", "ForSexId") + .HasName("pk_department_asbitem_guide"); + + b.ToTable("asbitem_guide"); + + b.HasComment("体检中心组和项目指引内容"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.AsbitemPriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("Amount") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("amount") + .HasDefaultValueSql("0") + .HasComment("数量"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PriceItemId") + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength() + .HasComment("价表项目编码"); + + b.HasKey("Id"); + + b.ToTable("asbitem_price_item"); + + b.HasComment("组和项目包含价表项目"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.BigtextResultConclusion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("Conclusion") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("conclusion") + .HasComment("结论"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999"); + + b.Property("IsAbnormal") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_abnormal") + .HasDefaultValueSql("'Y'") + .HasComment("是否为异常结论"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTemplateId"); + + b.ToTable("bigtext_result_conclusion"); + + b.HasComment("大文本结果结论"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.BigtextResultDescription", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("Description") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("description") + .HasComment("描述"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTemplateId"); + + b.ToTable("bigtext_result_description"); + + b.HasComment("大文本结果描述"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.BigtextResultTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("BigtextResultTypeId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_type_id") + .IsFixedLength() + .HasComment("结果类别编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTypeId"); + + b.ToTable("bigtext_result_template"); + + b.HasComment("大文本结果模板"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.BigtextResultType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父编号"); + + b.Property("PathCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("bigtext_result_type"); + + b.HasComment("大文本结果类别"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.BirthPlace", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CountryCode") + .IsRequired() + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("country_code") + .HasComment("国家标准码"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_birth_place") + .IsUnique(); + + b.ToTable("birth_place"); + + b.HasComment("出生地"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CardBill", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .HasComment("编号"); + + b.Property("BillFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("bill_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("记账标志"); + + b.Property("BillMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("bill_money") + .HasComment("记账金额"); + + b.Property("CardRegisterId") + .HasColumnType("uuid") + .HasColumnName("card_register_id") + .HasComment("卡登记编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PayModeId") + .IsRequired() + .HasMaxLength(4) + .HasColumnType("character varying(4)") + .HasColumnName("pay_mode_id") + .HasComment("支付方式"); + + b.HasKey("Id"); + + b.HasIndex("CardRegisterId"); + + b.HasIndex("PayModeId"); + + b.ToTable("card_bill"); + + b.HasComment("卡记账记录"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CardRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .HasComment("编号"); + + b.Property("CardBalance") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("card_balance"); + + b.Property("CardNo") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("card_no") + .HasComment("卡号"); + + b.Property("CardPassword") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("card_password"); + + b.Property("CardTypeId") + .HasColumnType("uuid") + .HasColumnName("card_type_id") + .IsFixedLength() + .HasComment("卡类型"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CustomerName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("customer_name") + .HasComment("领用者"); + + b.Property("Discount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("discount") + .HasDefaultValueSql("100") + .HasComment("折扣"); + + b.Property("ExpiryDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("expiry_date") + .HasComment("有效期"); + + b.Property("IdNo") + .IsRequired() + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no") + .HasComment("身份证号"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasDefaultValueSql("0") + .HasComment("使用标志"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MedicalCenterId") + .HasColumnType("uuid") + .HasColumnName("medical_center_id"); + + b.Property("MobileTelephone") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone") + .HasComment("手机"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("telephone") + .HasComment("电话"); + + b.HasKey("Id"); + + b.HasIndex("CardTypeId"); + + b.HasIndex(new[] { "CardNo", "IsActive" }, "ix_card_register") + .IsUnique(); + + b.ToTable("card_register"); + + b.HasComment("会员卡登记"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CardType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CardModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("card_mode_id") + .HasDefaultValueSql("0") + .HasComment("卡模式"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("Discount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("discount") + .HasDefaultValueSql("100") + .HasComment("折扣"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("ExpiryDay") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("expiry_day") + .HasDefaultValueSql("3650") + .HasComment("有效期"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.ToTable("card_type"); + + b.HasComment("会员卡类别"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Charge", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .HasComment("收据号"); + + b.Property("ChargeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag") + .HasDefaultValueSql("0"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("InvoiceNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("invoice_no"); + + b.Property("InvoiceOrgName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("invoice_org_name"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.Property("SettleTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("settle_time"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterId" }, "fki_fk_patient_register_charge"); + + b.HasIndex(new[] { "PatientRegisterId" }, "ix_charge"); + + b.ToTable("charge"); + + b.HasComment("收费主档"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargeAsbitem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("价格"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("RegisterAsbitemId") + .HasColumnType("uuid") + .HasColumnName("register_asbitem_id"); + + b.HasKey("Id"); + + b.HasIndex("AsbitemId"); + + b.HasIndex("ChargeId"); + + b.ToTable("charge_asbitem"); + + b.HasComment("收费包含组合项目"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargeBack", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .HasComment("退费编号"); + + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id") + .HasComment("结账ID"); + + b.Property("SettleTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("settle_time"); + + b.HasKey("Id"); + + b.HasIndex("ChargeId"); + + b.ToTable("charge_back"); + + b.HasComment("退费主档"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargeBackAsbitem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("ChargeAsbitemId") + .HasColumnType("uuid") + .HasColumnName("charge_asbitem_id"); + + b.Property("ChargeBackId") + .HasColumnType("uuid") + .HasColumnName("charge_back_id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.HasIndex("ChargeAsbitemId"); + + b.HasIndex(new[] { "ChargeBackId", "ChargeAsbitemId" }, "IX_charge_bak_asbitem_asbitem_id") + .IsUnique(); + + b.ToTable("charge_back_asbitem"); + + b.HasComment("退费组合项目表"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargeBackPay", b => + { + b.Property("ChargeBackId") + .HasColumnType("uuid") + .HasColumnName("charge_back_id"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character varying(4)") + .HasColumnName("pay_mode_id") + .HasComment("支付方式ID"); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny") + .HasComment("退费金额"); + + b.Property("CardBillId") + .HasColumnType("uuid") + .HasColumnName("card_bill_id") + .HasComment("会员卡ID"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.HasKey("ChargeBackId", "PayModeId") + .HasName("pk_department_charge_back_pay"); + + b.HasIndex("PayModeId"); + + b.HasIndex(new[] { "ChargeBackId", "PayModeId" }, "IX_charge_back_pay_pay_mode_id") + .IsUnique() + .HasDatabaseName("IX_charge_back_pay_pay_mode_id1"); + + b.ToTable("charge_back_pay"); + + b.HasComment("退费支付方式"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargePay", b => + { + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character varying(4)") + .HasColumnName("pay_mode_id") + .HasComment("支付方式"); + + b.Property("CardBillId") + .HasColumnType("uuid") + .HasColumnName("card_bill_id") + .HasComment("会员卡ID"); + + b.Property("ChargeMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_money") + .HasComment("金额"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.HasKey("ChargeId", "PayModeId") + .HasName("pk_department_charge_pay"); + + b.HasIndex("PayModeId"); + + b.HasIndex(new[] { "ChargeId", "PayModeId" }, "IX_charge_pay_pay_mode_id") + .IsUnique() + .HasDatabaseName("IX_charge_pay_pay_mode_id1"); + + b.ToTable("charge_pay"); + + b.HasComment("收费支付方式"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargePriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("ChargeAsbitemId") + .HasColumnType("uuid") + .HasColumnName("charge_asbitem_id"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PriceItemId") + .HasColumnType("uuid") + .HasColumnName("price_item_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ChargeAsbitemId" }, "fki_fk_charge_asbitem"); + + b.HasIndex(new[] { "ChargeAsbitemId", "PriceItemId" }, "ix_charge_price_item"); + + b.ToTable("charge_price_item"); + + b.HasComment("收费价表项目"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargeRequest", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .HasComment("收据申请单号"); + + b.Property("ChargeRequestFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_request_flag") + .HasDefaultValueSql("0"); + + b.Property("ChargeRequestNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("charge_request_no"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("HisChargeNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("his_charge_no"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("charge_request"); + + b.HasComment("收费申请单主档"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargeRequestAsbitem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("价格"); + + b.Property("ChargeRequestId") + .HasColumnType("uuid") + .HasColumnName("charge_request_id") + .HasComment("收费申请单号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("IsCharge") + .HasColumnType("character(1)") + .HasColumnName("is_charge"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("RegisterCheckAsbitemId") + .HasColumnType("uuid") + .HasColumnName("register_check_asbitem_id"); + + b.HasKey("Id"); + + b.HasIndex("AsbitemId"); + + b.HasIndex("ChargeRequestId"); + + b.ToTable("charge_request_asbitem"); + + b.HasComment("收费申请包含组合项目"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CollectItemType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .HasComment("发票项目类别ID"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.HasIndex("InvoiceItemTypeId"); + + b.ToTable("collect_item_type"); + + b.HasComment("汇总项目类别"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ColumnReference", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParmValue") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("parm_value"); + + b.HasKey("Id"); + + b.ToTable("column_reference"); + + b.HasComment("字段对照主表"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ColumnReferenceCode", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CodeValue") + .IsRequired() + .HasColumnType("text") + .HasColumnName("code_value") + .HasComment("本系统编码值"); + + b.Property("ColumnReferenceId") + .HasColumnType("uuid") + .HasColumnName("column_reference_id") + .HasComment("字段对照主表ID"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("FilterCodeValue") + .HasColumnType("text") + .HasColumnName("filter_code_value") + .HasComment("过滤编码值"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.HasIndex("ColumnReferenceId"); + + b.ToTable("column_reference_code"); + + b.HasComment("字段对照本系统编码表"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ColumnReferenceInterface", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("编号"); + + b.Property("ColumnReferenceCodeId") + .HasColumnType("uuid") + .HasColumnName("column_reference_code_id") + .HasComment("字段对照本系统编码表ID"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("InterfaceCodeValue") + .IsRequired() + .HasColumnType("text") + .HasColumnName("interface_code_value") + .HasComment("第三方系统编码值"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.HasIndex("ColumnReferenceCodeId"); + + b.ToTable("column_reference_interface"); + + b.HasComment("字段对照第三方系统编码表"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CommonChar", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CommonCharTypeId") + .HasColumnType("uuid") + .HasColumnName("common_char_type_id") + .IsFixedLength() + .HasComment("常用字符类别编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("CommonCharTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_common_char") + .IsUnique(); + + b.ToTable("common_char"); + + b.HasComment("常用字符"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CommonCharType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_common_char_type") + .IsUnique(); + + b.ToTable("common_char_type"); + + b.HasComment("常用字符类别"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CommonTable", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CommonTableTypeId") + .IsRequired() + .HasMaxLength(3) + .HasColumnType("character(3)") + .HasColumnName("common_table_type_id") + .IsFixedLength() + .HasComment("通用字段对照类别编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DataCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("data_code"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("CommonTableTypeId"); + + b.ToTable("common_table"); + + b.HasComment("通用字段对照"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CommonTableType", b => + { + b.Property("Id") + .HasMaxLength(3) + .HasColumnType("character(3)") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("common_table_type"); + + b.HasComment("通用字段对照类别"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ContactMethod", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("ContactMethodType") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("contact_method_type") + .HasDefaultValueSql("'M'::bpchar") + .HasComment("联系方式类别-比如0-手机、1-电子邮箱"); + + b.Property("ContactMethodValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("contact_method_value") + .HasComment("联系方式,比如18911254911,839860190@qq.com"); + + b.Property("ContactPersonId") + .HasColumnType("uuid") + .HasColumnName("contact_person_id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.HasIndex("ContactPersonId"); + + b.ToTable("contact_method"); + + b.HasComment("联系方式新增量主键,更新映射关系"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ContactPerson", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("客户单位编号"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("姓名"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Title") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("title") + .HasComment("职务"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_contact"); + + b.HasIndex(new[] { "SimpleCode" }, "ix_contact_simple_code"); + + b.ToTable("contact_person"); + + b.HasComment("联系人"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CriticalFollowValue", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CriticalFollowValueFlag") + .HasColumnType("character(1)") + .HasColumnName("critical_follow_value_flag") + .HasComment("危急随访值标志"); + + b.Property("CriticalFollowValueTypeId") + .HasColumnType("uuid") + .HasColumnName("critical_follow_value_type_id") + .IsFixedLength() + .HasComment("危急值类别编号"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.HasIndex("CriticalFollowValueTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_critical_follow_value") + .IsUnique(); + + b.ToTable("critical_follow_value"); + + b.HasComment("危急值关键字设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CriticalFollowValueType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .HasComment("父编号"); + + b.Property("PathCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_critical_follow_value_type") + .IsUnique(); + + b.ToTable("critical_follow_value_type"); + + b.HasComment("危急值类别"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrg", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("单位ID"); + + b.Property("Accounts") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("accounts") + .HasComment("银行帐号"); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address") + .HasComment("联系地址"); + + b.Property("Bank") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("bank") + .HasComment("业务银行"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CountryOrgCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("country_org_code"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CustomerOrgCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("customer_org_code"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("单位名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("Fax") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("fax") + .HasComment("传真"); + + b.Property("InvoiceName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("invoice_name") + .HasComment("开票名称"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasDefaultValueSql("'Y'") + .HasComment("状态"); + + b.Property("IsLock") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock") + .HasDefaultValueSql("'N'") + .HasComment("锁住"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MedicalCenterId") + .HasColumnType("uuid") + .HasColumnName("medical_center_id") + .HasComment("体检中心ID"); + + b.Property("OrgTypeId") + .HasColumnType("uuid") + .HasColumnName("org_type_id") + .IsFixedLength() + .HasComment("单位性质"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父编号"); + + b.Property("PathCode") + .IsRequired() + .HasMaxLength(60) + .HasColumnType("character varying(60)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("postal_code") + .HasComment("邮政编码"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SalesPerson") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sales_person") + .HasComment("销售员"); + + b.Property("SalesPersonPhone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("sales_person_phone") + .HasComment("销售员电话"); + + b.Property("ShortName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("short_name") + .HasComment("简称"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.Property("Telephone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("telephone") + .HasComment("联系电话"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "MedicalCenterId" }, "fki_fk_customer_org_organization_units"); + + b.HasIndex(new[] { "ParentId", "DisplayName" }, "ix_org") + .IsUnique(); + + b.ToTable("customer_org"); + + b.HasComment("团检单位设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgCharge", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ChargeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag") + .HasComment("收退费标志"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id") + .HasComment("客户单位登记ID"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Payer") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("payer") + .HasComment("付款人"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id") + .HasComment("结算账户ID"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_customer_org_charge_register"); + + b.ToTable("customer_org_charge"); + + b.HasComment("团检单位收费"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgChargeBack", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CustomerOrgChargeId") + .HasColumnType("uuid") + .HasColumnName("customer_org_charge_id") + .HasComment("收费编号"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id") + .HasComment("结算账户ID"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgChargeId"); + + b.ToTable("customer_org_charge_back"); + + b.HasComment("团检单位退费"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgChargeBackPay", b => + { + b.Property("CustomerOrgChargeBackId") + .HasColumnType("uuid") + .HasColumnName("customer_org_charge_back_id"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character varying(4)") + .HasColumnName("pay_mode_id") + .HasComment("支付方式"); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny") + .HasComment("退费金额"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.HasKey("CustomerOrgChargeBackId", "PayModeId") + .HasName("pk_org_charge_back_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("customer_org_charge_back_pay"); + + b.HasComment("团检退费支付方式"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgChargePay", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ChargeMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_money") + .HasComment("支付金额"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PayModeId") + .IsRequired() + .HasMaxLength(4) + .HasColumnType("character varying(4)") + .HasColumnName("pay_mode_id") + .HasComment("支付方式"); + + b.HasKey("Id"); + + b.HasIndex("PayModeId"); + + b.ToTable("customer_org_charge_pay"); + + b.HasComment("团检收费支付方式"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgGroup", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("分组编号"); + + b.Property("AgeLowerLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasDefaultValueSql("0") + .HasComment("适用年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200") + .HasComment("适用年龄上限"); + + b.Property("CanAddMoney") + .ValueGeneratedOnAdd() + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("can_add_money") + .HasDefaultValueSql("0") + .HasComment("可增加单位支付金额"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("分组名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("JobPost") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_post") + .HasComment("适用职务"); + + b.Property("JobTitle") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_title") + .HasComment("适用职称"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MaritalStatusId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasComment("适用婚姻状况"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_customer_org_group_register"); + + b.ToTable("customer_org_group"); + + b.HasComment("团体分组主档"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgGroupDetail", b => + { + b.Property("CustomerOrgGroupId") + .HasColumnType("uuid") + .HasColumnName("customer_org_group_id") + .IsFixedLength() + .HasComment("分组编号"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目编号"); + + b.Property("Amount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("amount") + .HasDefaultValueSql("1") + .HasComment("数量"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.HasKey("CustomerOrgGroupId", "AsbitemId") + .HasName("pk_org_group_detail"); + + b.HasIndex("AsbitemId"); + + b.ToTable("customer_org_group_detail"); + + b.HasComment("团检分组包含组合项目"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("BeginTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("begin_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("开始日期"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("单位编号"); + + b.Property("EndTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("end_time") + .HasComment("结束日期"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("完成标志"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MedicalTimes") + .HasColumnType("smallint") + .HasColumnName("medical_times") + .HasComment("单位体检次数"); + + b.Property("RegisterName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("register_name") + .HasComment("计划名称"); + + b.Property("RegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("register_no") + .HasComment("计划号"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgId"); + + b.ToTable("customer_org_register"); + + b.HasComment("团检体检登记"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_org_type") + .IsUnique(); + + b.ToTable("customer_org_type"); + + b.HasComment("客户单位类别"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Department", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CodePrefix") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("code_prefix"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DepartmentTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("department_type_flag"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParentId") + .HasMaxLength(4) + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName", "ParentId" }, "ix_department") + .IsUnique(); + + b.ToTable("department"); + + b.HasComment("部门,已经废弃"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Device", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("AeTitle") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("ae_title") + .HasComment("DICOM设备AETitle"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DeviceCode") + .HasMaxLength(3) + .HasColumnType("character varying(3)") + .HasColumnName("device_code") + .HasComment("设备编码"); + + b.Property("DeviceImageType") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("device_image_type") + .HasDefaultValueSql("'0'") + .HasComment("仪器图片类型"); + + b.Property("DeviceProtocolFlag") + .HasColumnType("character(1)") + .HasColumnName("device_protocol_flag") + .HasComment("设备协议"); + + b.Property("DeviceTypeId") + .HasColumnType("uuid") + .HasColumnName("device_type_id") + .HasComment("仪器类别ID"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("Display_Name") + .HasComment("设备名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("device"); + + b.HasComment("设备表"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.DeviceType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("仪器类别编号"); + + b.Property("Alias") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("alias"); + + b.Property("CheckTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("仪器类别名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.ToTable("device_type"); + + b.HasComment("仪器类别设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Diagnosis", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DiagnosisLevelId") + .HasColumnType("smallint") + .HasColumnName("diagnosis_level_id") + .HasComment("诊断级别"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'") + .HasComment("适用性别"); + + b.Property("IsIll") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_ill") + .HasComment("是疾病"); + + b.Property("IsSummaryTemplate") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_summary_template") + .HasDefaultValueSql("'N'") + .HasComment("是总检模板"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("simple_code"); + + b.Property("SuggestionName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_name") + .HasComment("建议名称"); + + b.HasKey("Id"); + + b.HasIndex("DiagnosisLevelId"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("diagnosis"); + + b.HasComment("诊断设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.DiagnosisLevel", b => + { + b.Property("Id") + .HasColumnType("smallint") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_level"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.DiagnosisPostfix", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_diagnosis_postfix") + .IsUnique(); + + b.ToTable("diagnosis_postfix"); + + b.HasComment("诊断后缀设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.DiagnosisTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_diagnosis_template") + .IsUnique(); + + b.ToTable("diagnosis_template"); + + b.HasComment("诊断模板设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.DiagnosisTemplateDetail", b => + { + b.Property("DiagnosisTemplateId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_template_id") + .IsFixedLength() + .HasComment("诊断模板编号"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.HasKey("DiagnosisTemplateId", "DiagnosisId") + .HasName("pk_diagnosis_template_detail"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("diagnosis_template_detail"); + + b.HasComment("诊断模板包含明细"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.DiagnosisType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父编号"); + + b.Property("PathCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_type"); + + b.HasComment("诊断类别"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.DicomFileDetail", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("FileName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("file_name") + .HasComment("文件名称"); + + b.Property("InstanceId") + .IsRequired() + .HasColumnType("text") + .HasColumnName("instance_id") + .HasComment("实例ID"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParentPatientId") + .IsRequired() + .HasColumnType("text") + .HasColumnName("parent_patient_id") + .HasComment("患者ID"); + + b.Property("ParentSeriesId") + .IsRequired() + .HasColumnType("text") + .HasColumnName("parent_series_id") + .HasComment("系列ID"); + + b.Property("ParentStudyId") + .IsRequired() + .HasColumnType("text") + .HasColumnName("parent_study_id") + .HasComment("研究ID"); + + b.Property("Path") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("path") + .HasComment("路径"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("RegisterCheck表ID"); + + b.Property("Status") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("status") + .HasComment("状态"); + + b.HasKey("Id"); + + b.ToTable("dicom_file_detail"); + + b.HasComment("dicom文件数据"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.DiseaseScreeningType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("体检类别名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.ToTable("disease_screening_type"); + + b.HasComment("疾病筛查类别设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.DoctorSignIn", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("RoomId") + .HasColumnType("uuid") + .HasColumnName("room_id") + .HasComment("房间ID"); + + b.Property("SignInFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sign_in_flag") + .HasComment("0-签到,1-签退"); + + b.Property("SignOutDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("sign_out_date") + .HasComment("签退日期"); + + b.HasKey("Id"); + + b.ToTable("doctor_sign_in"); + + b.HasComment("医生签到表"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.FieldComparison", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("FieldName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("field_name") + .HasComment("字段名"); + + b.Property("NewKeyValue") + .IsRequired() + .HasColumnType("text") + .HasColumnName("new_key_value") + .HasComment("新系统主键值"); + + b.Property("OldKeyValue") + .IsRequired() + .HasColumnType("text") + .HasColumnName("old_key_value") + .HasComment("老系统主键值"); + + b.Property("TableName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("table_name") + .HasComment("表名"); + + b.HasKey("Id"); + + b.ToTable("field_comparison"); + + b.HasComment("字段对照"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.FollowUp", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("IsPhoneComplete") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_phone_complete") + .HasDefaultValueSql("'N'") + .HasComment("是否电话随访创建完成"); + + b.Property("IsSmsComplete") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_sms_complete") + .HasDefaultValueSql("'N'") + .HasComment("是否短信随访创建完成"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("人员登记ID"); + + b.HasKey("Id"); + + b.ToTable("follow_up"); + + b.HasComment("随访表"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.FollowUpMode", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_mode"); + + b.HasComment("随访方式"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.FollowUpPlan", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content") + .HasComment("随访内容"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CycleDays") + .HasColumnType("smallint") + .HasColumnName("cycle_days") + .HasComment("周期天数"); + + b.Property("DoctorUserId") + .HasColumnType("uuid") + .HasColumnName("doctor_user_id") + .HasComment("医生"); + + b.Property("FollowUpModeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_mode_id") + .IsFixedLength() + .HasComment("随访方式"); + + b.Property("FollowUpTypeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_type_id") + .IsFixedLength() + .HasComment("随访类别"); + + b.Property("IsLoop") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_loop") + .HasDefaultValueSql("'N'") + .HasComment("是否循环"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PerfomFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("perfom_flag") + .HasComment("执行标志"); + + b.Property("PerfomTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("perfom_time") + .HasComment("执行时间"); + + b.Property("PerfomUserId") + .HasColumnType("uuid") + .HasColumnName("perfom_user_id") + .HasComment("执行者用户ID"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.ToTable("follow_up_plan"); + + b.HasComment("随访计划"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.FollowUpType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_type"); + + b.HasComment("随访类别"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ForSex", b => + { + b.Property("Id") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("for_sex"); + + b.HasComment("适用性别设置,固定编码"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Grouping", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ModifiedDate") + .HasColumnType("date") + .HasColumnName("modified_date"); + + b.Property("Modifier") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("modifier"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_grouping") + .IsUnique(); + + b.ToTable("grouping"); + + b.HasComment("废弃"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.GuideType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") + .HasColumnName("id") + .IsFixedLength(); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.ToTable("guide_type"); + + b.HasComment("指引类别"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.HealthCertificate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .HasComment("登记流水号"); + + b.Property("CertificateDate") + .HasColumnType("date") + .HasColumnName("certificate_date") + .HasComment("发证日期"); + + b.Property("CertificateNo") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("certificate_no") + .HasComment("证件编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ServiceOrg") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("service_org") + .HasComment("服务单位"); + + b.Property("ServiceTradesId") + .IsRequired() + .HasColumnType("smallint") + .HasColumnName("service_trades_id") + .HasComment("服务行业"); + + b.HasKey("Id"); + + b.ToTable("health_certificate"); + + b.HasComment("健康证办理"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ImportLisResult", b => + { + b.Property("LisRequestNo") + .HasColumnType("uuid") + .HasColumnName("lis_request_no") + .HasComment("条码号"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .HasComment("项目"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CheckTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("check_time") + .HasComment("检查日期"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CriticalRangeValue") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("critical_range_value"); + + b.Property("ImportTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("导入日期"); + + b.Property("ItemName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("item_name"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no") + .HasComment("条码号"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("reference_range_value") + .HasComment("参考范围"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("ReportPrompt") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("report_prompt") + .HasComment("报告单提示"); + + b.Property("Result") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("Unit") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("unit") + .HasComment("单位"); + + b.HasKey("LisRequestNo", "ItemId") + .HasName("pk_import_lis_result"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_import_lis_result"); + + b.ToTable("import_lis_result"); + + b.HasComment("检验结果中间表"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ImportPacsPicture", b => + { + b.Property("CheckRequestNo") + .HasColumnType("uuid") + .HasColumnName("check_request_no") + .HasComment("检查申请单号"); + + b.Property("PictureFilename") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("picture_filename") + .HasComment("图片文件名"); + + b.Property("AsbitemNames") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("asbitem_names") + .HasComment("组合项目名称"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("诊断结论"); + + b.Property("ImportTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasComment("导入日期"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("检查所见"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no"); + + b.HasKey("CheckRequestNo", "PictureFilename") + .HasName("pk_import_pacs_picture_1"); + + b.ToTable("import_pacs_picture"); + + b.HasComment("pacs图片中间表"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ImportPacsResult", b => + { + b.Property("CheckRequestNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("check_request_no"); + + b.Property("AsbitemNames") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("asbitem_names") + .HasComment("组合项目名称"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CheckItems") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("check_items") + .HasComment("检查部位"); + + b.Property("CheckTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("check_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("检查日期"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("description") + .HasComment("检查所见"); + + b.Property("ImportTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("导入日期"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no"); + + b.Property("Suggestion") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("suggestion") + .HasComment("建议"); + + b.Property("Summary") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("summary") + .HasComment("诊断结论"); + + b.HasKey("CheckRequestNo"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_import_pacs_result"); + + b.ToTable("import_pacs_result"); + + b.HasComment("PACS结果中间表"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.InvoiceItemType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_invoice_item_type") + .IsUnique(); + + b.ToTable("invoice_item_type"); + + b.HasComment("发票项目类别设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.InvoiceOrg", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_invoice_org") + .IsUnique(); + + b.ToTable("invoice_org"); + + b.HasComment("发票单位设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Item", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CalculationFunction") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("calculation_function") + .HasComment("计算函数"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CriticalValueFunction") + .HasColumnType("text") + .HasColumnName("critical_value_function") + .HasComment("危急值函数"); + + b.Property("DefaultResult") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("default_result") + .HasComment("默认结果"); + + b.Property("DeviceTypeId") + .HasColumnType("uuid") + .HasColumnName("device_type_id"); + + b.Property("DiagnosisFunction") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("diagnosis_function") + .HasComment("诊断函数"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("EnglishShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("english_short_name") + .HasComment("英文缩写"); + + b.Property("FollowUpFunction") + .HasColumnType("text") + .HasColumnName("follow_up_function") + .HasComment("随访函数"); + + b.Property("InputCheck") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("input_check") + .HasComment("输入结果校验公式"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasDefaultValueSql("'Y'") + .HasComment("启用"); + + b.Property("IsCalculationItem") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_calculation_item") + .HasDefaultValueSql("'N'") + .HasComment("是计算项目"); + + b.Property("IsContinueProcess") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process") + .HasDefaultValueSql("'Y'") + .HasComment("是继续处理"); + + b.Property("IsCriticalValueFunction") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_critical_value_function") + .HasDefaultValueSql("'N'") + .HasComment("是否启用危急值函数"); + + b.Property("IsDiagnosisFunction") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function") + .HasDefaultValueSql("'N'") + .HasComment("启用诊断函数"); + + b.Property("IsFollowUpFunction") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_follow_up_function") + .HasDefaultValueSql("'N'") + .HasComment("是否启用随访函数"); + + b.Property("IsNameIntoSummary") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_into_summary") + .HasDefaultValueSql("'N'") + .HasComment("名称进入小结"); + + b.Property("IsProduceSummary") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_produce_summary") + .HasDefaultValueSql("'Y'") + .HasComment("是生成小结"); + + b.Property("IsReportContrast") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_report_contrast") + .HasDefaultValueSql("'N'") + .HasComment("是否报告对比"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LineModeFlag") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") + .HasDefaultValue('2') + .HasColumnName("line_mode_flag") + .HasComment("项目结果行模式"); + + b.Property("Price") + .ValueGeneratedOnAdd() + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasDefaultValueSql("0") + .HasComment("价格"); + + b.Property("PriceItemId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .HasComment("价表项目编码"); + + b.Property("ReferenceRangeTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); + + b.Property("ResultTemplateTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("result_template_type_flag") + .HasDefaultValueSql("0") + .HasComment("结果模板类别标志"); + + b.Property("SimpleCode") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code"); + + b.Property("UnitId") + .HasColumnType("uuid") + .HasColumnName("unit_id") + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName", "ItemTypeId" }, "ix_item") + .IsUnique(); + + b.ToTable("item"); + + b.HasComment("项目设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ItemBigtextResultType", b => + { + b.Property("BigtextResultTypeId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_type_id") + .IsFixedLength() + .HasComment("词条类别id"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编码"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.HasKey("BigtextResultTypeId", "ItemId") + .HasName("pk_item_bigtext_result_type"); + + b.ToTable("item_bigtext_result_type"); + + b.HasComment("项目对应词条类别表"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ItemDefaultResult", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item_default_result") + .IsUnique(); + + b.ToTable("item_default_result"); + + b.HasComment("项目默认结果设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ItemResultMatch", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("结果匹配编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Result") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("result") + .HasComment("结果"); + + b.HasKey("Id"); + + b.HasIndex("DiagnosisId"); + + b.HasIndex("ItemId"); + + b.ToTable("item_result_match"); + + b.HasComment("结果匹配设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ItemResultTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("结果模板编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .HasComment("诊断编号"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("IsNameIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_into_summary") + .HasComment("小结前是否加名称"); + + b.Property("IsResultIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_result_into_summary"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Result") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("ResultStatusId") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("result_status_id") + .HasComment("结果状态"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ItemId", "Result" }, "ix_item_result_template") + .IsUnique(); + + b.ToTable("item_result_template"); + + b.HasComment("项目结果模板设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ItemResultTemplateType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ItemId", "DisplayName" }, "ix_item_result_template_type") + .IsUnique(); + + b.ToTable("item_result_template_type"); + + b.HasComment("项目结果模板类别"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ItemTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item_template") + .IsUnique(); + + b.ToTable("item_template"); + + b.HasComment("项目模板设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ItemTemplateDetail", b => + { + b.Property("ItemTemplateId") + .HasColumnType("uuid") + .HasColumnName("item_template_id") + .IsFixedLength(); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.HasKey("ItemTemplateId", "ItemId") + .HasName("pk_item_template_detail"); + + b.HasIndex("ItemId"); + + b.ToTable("item_template_detail"); + + b.HasComment("项目模板明细"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ItemType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CheckTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag") + .HasDefaultValueSql("'G'::bpchar") + .HasComment("检查类别,0-普通检查,1-检验,2-影像检查"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999"); + + b.Property("GuidTypeId") + .HasColumnType("character(1)") + .HasColumnName("guid_type_id") + .IsFixedLength() + .HasComment("指引类别"); + + b.Property("IsCheckRequest") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") + .HasColumnName("is_check_request") + .HasDefaultValueSql("'N'") + .HasComment("支持检查申请"); + + b.Property("IsMergeAsbitem") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_merge_asbitem") + .HasDefaultValueSql("'N'") + .HasComment("合并组合项目,Y-是,N-否"); + + b.Property("IsWrap") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") + .HasColumnName("is_wrap") + .HasDefaultValueSql("'N'") + .HasComment("项目结果是否可以换行"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MedicalReportTypeId") + .HasColumnType("character(1)") + .HasColumnName("medical_report_type_id") + .IsFixedLength() + .HasComment("体检报告类别"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父id"); + + b.Property("PathCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex("GuidTypeId"); + + b.HasIndex("MedicalReportTypeId"); + + b.HasIndex(new[] { "DisplayName", "ParentId" }, "ix_item_type") + .IsUnique(); + + b.ToTable("item_type"); + + b.HasComment("项目类别设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.LisRequest", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("IsPrint") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasDefaultValueSql("'N'") + .HasComment("是否已打印"); + + b.Property("IsSignIn") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_sign_in") + .HasDefaultValueSql("'N'") + .HasComment("是签收"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LisRequestNo") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("lis_request_no") + .HasComment("检验申请单号"); + + b.Property("SampleContainerId") + .HasColumnType("uuid") + .HasColumnName("sample_container_id") + .HasComment("标本容器编号"); + + b.Property("SampleTypeId") + .HasColumnType("uuid") + .HasColumnName("sample_type_id") + .HasComment("标本类型"); + + b.Property("SamplerId") + .HasColumnType("uuid") + .HasColumnName("sampler_id") + .HasComment("采样人ID"); + + b.Property("SamplingTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("sampling_time") + .HasComment("采样时间"); + + b.Property("SignInOrder") + .HasColumnType("integer") + .HasColumnName("sign_in_order") + .HasComment("签收顺序"); + + b.Property("SignInPerson") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sign_in_person") + .HasComment("签收人姓名"); + + b.Property("SignInTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("sign_in_time") + .HasComment("签收时间"); + + b.HasKey("Id"); + + b.HasIndex("SampleContainerId"); + + b.HasIndex("SampleTypeId"); + + b.HasIndex(new[] { "LisRequestNo" }, "ix_lis_request") + .IsUnique(); + + b.ToTable("lis_request"); + + b.HasComment("检验申请单"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.MaritalStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("婚姻状况编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name") + .HasComment("婚姻状况名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_marital_status") + .IsUnique(); + + b.ToTable("marital_status"); + + b.HasComment("婚姻状况设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.MedicalConclusion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("体检结论编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("体检结论名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MedicalConclusionTypeId") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("medical_conclusion_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex("MedicalConclusionTypeId"); + + b.ToTable("medical_conclusion"); + + b.HasComment("体检结论设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.MedicalConclusionType", b => + { + b.Property("Id") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_conclusion_type") + .IsUnique(); + + b.ToTable("medical_conclusion_type"); + + b.HasComment("体检结论类别设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.MedicalPackage", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("套餐主档编号"); + + b.Property("AgeLowerLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasDefaultValueSql("0") + .HasComment("适用年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200") + .HasComment("适用年龄上限"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("启用标志"); + + b.Property("IsBasicRecommend") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_basic_recommend") + .HasDefaultValueSql("'N'") + .HasComment("是否基础推荐套餐"); + + b.Property("IsWebAppoint") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_web_appoint") + .HasDefaultValueSql("'Y'") + .HasComment("是否支持网上预约"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MaritalStatusId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用婚姻状况"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_package") + .IsUnique(); + + b.ToTable("medical_package"); + + b.HasComment("体检套餐主档设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.MedicalPackageDetail", b => + { + b.Property("MedicalPackageId") + .HasColumnType("uuid") + .HasColumnName("medical_package_id") + .IsFixedLength() + .HasComment("套餐编号"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目编号"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price"); + + b.HasKey("MedicalPackageId", "AsbitemId") + .HasName("pk_medical_package_detail"); + + b.HasIndex("AsbitemId"); + + b.ToTable("medical_package_detail"); + + b.HasComment("体检套餐包含的组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.MedicalReportType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") + .HasColumnName("id") + .IsFixedLength(); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.ToTable("medical_report_type"); + + b.HasComment("体检报告类别设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.MedicalType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("体检类别编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("体检类别名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_type") + .IsUnique(); + + b.ToTable("medical_type"); + + b.HasComment("体检类别设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.MenuInfo", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(999999) + .HasColumnName("display_order"); + + b.Property("IconName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("icon_name") + .HasComment("菜单图标"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasDefaultValueSql("'Y'") + .HasComment("是否启用"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MenuType") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") + .HasDefaultValue('1') + .HasColumnName("menu_type"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父id"); + + b.Property("RouteUrl") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("route_url") + .HasComment("路由地址"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName", "ParentId" }, "ix_menu_info") + .IsUnique(); + + b.ToTable("menu_info"); + + b.HasComment("菜单设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Nation", b => + { + b.Property("Id") + .HasMaxLength(3) + .HasColumnType("character(3)") + .HasColumnName("id") + .IsFixedLength() + .HasComment("编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CountryCode") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("country_code"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_nation") + .IsUnique(); + + b.ToTable("nation"); + + b.HasComment("民族设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.OcCheckType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("职业病检查类别编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("职业病检查类别名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("显示顺序"); + + b.HasKey("Id"); + + b.ToTable("oc_check_type"); + + b.HasComment("职业病检查类别设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.OccupationalAbnormal", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("职业体检结论编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("职业体检结论名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.ToTable("occupational_abnormal"); + + b.HasComment("职业体检结论"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.OccupationalContraindications", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("职业禁忌症编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("职业禁忌症名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.ToTable("occupational_contraindications"); + + b.HasComment("职业禁忌症"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.OperateLog", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ComputerName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("computer_name"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("OperateContent") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("operate_content"); + + b.Property("OperateTime") + .HasColumnType("date") + .HasColumnName("operate_time"); + + b.Property("OperateType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("operate_type"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("Sqlsyntax") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sqlsyntax"); + + b.Property("TableName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("table_name"); + + b.Property("UserId") + .HasMaxLength(16) + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("WindowName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("window_name"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ComputerName" }, "ix_operate_log"); + + b.HasIndex(new[] { "WindowName" }, "ix_operate_log_1"); + + b.ToTable("operate_log"); + + b.HasComment("操作日志,已经废弃"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.OrganizationUnitsCustomerOrg", b => + { + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("客户单位编号"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength() + .HasComment("体检中心编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.HasKey("CustomerOrgId", "OrganizationUnitId") + .HasName("pk_medical_center_org"); + + b.HasIndex("OrganizationUnitId"); + + b.ToTable("organization_units_customer_org"); + + b.HasComment("体检中心单位权限"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Patient", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Address") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("address") + .HasComment("地址"); + + b.Property("BirthDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("birth_date") + .HasComment("出生日期"); + + b.Property("BirthPlaceId") + .HasColumnType("uuid") + .HasColumnName("birth_place_id") + .IsFixedLength() + .HasComment("出生地"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name") + .HasComment("姓名"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("email") + .HasComment("email"); + + b.Property("IdNo") + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no") + .HasComment("身份证号"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MaritalStatusId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasDefaultValueSql("'9'") + .HasComment("婚姻状况"); + + b.Property("MedicalCenterId") + .HasColumnType("uuid") + .HasColumnName("medical_center_id") + .HasComment("组织单位ID"); + + b.Property("MobileTelephone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("mobile_telephone") + .HasComment("手机号"); + + b.Property("NationId") + .HasColumnType("text") + .HasColumnName("nation_id") + .IsFixedLength() + .HasComment("民族编号"); + + b.Property("PatientNo") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("patient_no") + .HasComment("档案号"); + + b.Property("PatientPassword") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("patient_password") + .HasComment("登录密码"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("postal_code") + .HasComment("邮政编码"); + + b.Property("SexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id") + .HasDefaultValueSql("'U'") + .HasComment("性别"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.Property("Telephone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("telephone") + .HasComment("电话"); + + b.HasKey("Id"); + + b.HasIndex("PatientNo") + .IsUnique(); + + b.HasIndex(new[] { "IdNo" }, "ix_patient"); + + b.HasIndex(new[] { "DisplayName" }, "ix_patient_1"); + + b.ToTable("patient"); + + b.HasComment("体检人员档案"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PatientOccupationalDisease", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("AbnormalTimes") + .HasColumnType("integer") + .HasColumnName("abnormal_times"); + + b.Property("AbortionTimes") + .HasColumnType("integer") + .HasColumnName("abortion_times"); + + b.Property("ChildrenNum") + .HasColumnType("integer") + .HasColumnName("children_num"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DrinkFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("drink_flag"); + + b.Property("DrinkNum") + .HasColumnType("integer") + .HasColumnName("drink_num"); + + b.Property("DrinkYears") + .HasColumnType("integer") + .HasColumnName("drink_years"); + + b.Property("FamilyGeneticHistory") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("family_genetic_history"); + + b.Property("FirstMenstruation") + .HasColumnType("integer") + .HasColumnName("first_menstruation"); + + b.Property("HandleSuggestion") + .HasColumnType("text") + .HasColumnName("handle_suggestion"); + + b.Property("JobType") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("job_type"); + + b.Property("LastMenstrualPeriodDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("Last_menstrual_period_date"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MenstruationCycle") + .HasColumnType("integer") + .HasColumnName("menstruation_cycle"); + + b.Property("MenstruationEndAge") + .HasColumnType("integer") + .HasColumnName("menstruation_end_age"); + + b.Property("MenstruationFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("menstruation_flag"); + + b.Property("MenstruationTimeLength") + .HasColumnType("integer") + .HasColumnName("menstruation_time_length"); + + b.Property("NoOccupAbSuggestion") + .HasMaxLength(1) + .HasColumnType("text") + .HasColumnName("no_occup_ab_suggestion"); + + b.Property("NoOccupationalAbnormal") + .HasColumnType("text") + .HasColumnName("no_occupational_abnormal"); + + b.Property("OcCheckTypeId") + .HasColumnType("uuid") + .HasColumnName("oc_check_type_id") + .IsFixedLength(); + + b.Property("OccupationalAbSuggestion") + .HasMaxLength(1) + .HasColumnType("text") + .HasColumnName("occupational_ab_suggestion"); + + b.Property("OccupationalAbnormal") + .HasColumnType("text") + .HasColumnName("occupational_abnormal"); + + b.Property("OccupationalDiseaseNumber") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("occupational_disease_number"); + + b.Property("Other") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("other"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("PoisonWorkTime") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("poison_work_time"); + + b.Property("PrematureBirthTimes") + .HasColumnType("integer") + .HasColumnName("premature_birth_times"); + + b.Property("RiskFactors") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("risk_factors"); + + b.Property("SmokeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("smoke_flag"); + + b.Property("SmokeNum") + .HasColumnType("integer") + .HasColumnName("smoke_num"); + + b.Property("SmokeYears") + .HasColumnType("integer") + .HasColumnName("smoke_years"); + + b.Property("StillbirthTimes") + .HasColumnType("integer") + .HasColumnName("stillbirth_times"); + + b.Property("TotalWorkTime") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("total_work_time"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId") + .IsUnique(); + + b.ToTable("patient_occupational_disease"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PatientOccupationalHistory", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("BeginDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("begin_date"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("EndDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("end_date"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Org") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("org"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("Poison") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("poison"); + + b.Property("ProtectiveMeasures") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("protective_measures"); + + b.Property("WorkShop") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("work_shop"); + + b.Property("WorkType") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("work_type"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("patient_occupational_history"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PatientOccupationalMedicalHistory", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("职业病史编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DiagnosisDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("diagnosis_date") + .HasComment("诊断日期"); + + b.Property("DiagnosisHospital") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("diagnosis_hospital") + .HasComment("诊断单位"); + + b.Property("IsRecovery") + .HasColumnType("character(1)") + .HasColumnName("is_recovery") + .HasComment("是否恢复"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("OccupationalDisease") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("occupational_disease") + .HasComment("病名"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .IsFixedLength() + .HasComment("简码"); + + b.Property("TreatmentMethods") + .HasColumnType("text") + .HasColumnName("treatment_methods") + .HasComment("治疗方式"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("patient_occupational_medical_history"); + + b.HasComment("职业病史"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PatientPastMedicalHistory", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("既往病史编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DiagnosisDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("diagnosis_date") + .HasComment("诊断日期"); + + b.Property("DiagnosisHospital") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("diagnosis_hospital") + .HasComment("诊断单位"); + + b.Property("IsRecovery") + .HasColumnType("character(1)") + .HasColumnName("is_recovery") + .HasComment("是否恢复"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("OccupationalDisease") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("occupational_disease") + .HasComment("病名"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .IsFixedLength() + .HasComment("简码"); + + b.Property("TreatmentMethods") + .HasColumnType("text") + .HasColumnName("treatment_methods") + .HasComment("治疗方式"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("patient_past_medical_history"); + + b.HasComment("既往病史"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PatientPoison", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("PoisonId") + .HasColumnType("uuid") + .HasColumnName("poison_id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("OccupationalAbnormalId") + .HasColumnType("uuid") + .HasColumnName("occupational_abnormal_id"); + + b.HasKey("PatientRegisterId", "PoisonId") + .HasName("pk_patient_poison"); + + b.HasIndex("PoisonId"); + + b.ToTable("patient_poison"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PatientRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .HasComment("登记流水号"); + + b.Property("Age") + .HasColumnType("smallint") + .HasColumnName("age") + .HasComment("年龄"); + + b.Property("AppointPatientRegisterId") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("appoint_patient_register_id") + .HasComment("预约人员登记ID"); + + b.Property("AuditDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("audit_date") + .HasComment("审核日期"); + + b.Property("AuditDoctorId") + .HasColumnType("uuid") + .HasColumnName("audit_doctor_id") + .HasComment("审核医生"); + + b.Property("BirthDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("birth_date") + .HasComment("出生日期"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("完成标志"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CustomerOrgGroupId") + .HasColumnType("uuid") + .HasColumnName("customer_org_group_id") + .IsFixedLength() + .HasComment("分组"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("单位编号"); + + b.Property("CustomerOrgRegisterId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasDefaultValue(new Guid("00000000-0000-0000-0000-000000000000")) + .HasColumnName("customer_org_register_id") + .HasComment("客户单位登记ID"); + + b.Property("DeviceId") + .HasColumnType("uuid") + .HasColumnName("device_id"); + + b.Property("GuidePrintTimes") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0) + .HasColumnName("guide_print_times") + .HasComment("指引单打印次数"); + + b.Property("HisPatientId") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("his_patient_id"); + + b.Property("InterposeMeasure") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("interpose_measure") + .HasComment("干预措施"); + + b.Property("IsAudit") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit") + .HasDefaultValueSql("'N'") + .HasComment("审核"); + + b.Property("IsLock") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock") + .HasDefaultValueSql("'N'") + .HasComment("锁住"); + + b.Property("IsMedicalStart") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_medical_start") + .HasDefaultValueSql("'N'") + .HasComment("体检开始标志"); + + b.Property("IsNameHide") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_hide") + .HasDefaultValueSql("'N'") + .HasComment("隐藏姓名"); + + b.Property("IsPhoneFollow") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_phone_follow") + .HasDefaultValueSql("'N'") + .HasComment("电话随访"); + + b.Property("IsRecoverGuide") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_recover_guide") + .HasDefaultValueSql("'N'") + .HasComment("指引单收回"); + + b.Property("IsUpload") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_upload") + .HasDefaultValueSql("'N'") + .HasComment("是否上传到WEB"); + + b.Property("IsUploadAppoint") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_upload_appoint") + .HasDefaultValueSql("'N'") + .HasComment("是否上传预约备单到WEB"); + + b.Property("IsVip") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_vip") + .HasDefaultValueSql("'N'") + .HasComment("vip客户"); + + b.Property("JobCardNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_card_no") + .HasComment("工卡号"); + + b.Property("JobPost") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("job_post") + .HasComment("职务"); + + b.Property("JobTitle") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("job_title") + .HasComment("职称"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MaritalStatusId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasDefaultValueSql("'9'") + .HasComment("婚姻状况"); + + b.Property("MedicalCardNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("medical_card_no") + .HasComment("体检卡号"); + + b.Property("MedicalCenterId") + .HasColumnType("uuid") + .HasColumnName("medical_center_id") + .HasComment("体检中心ID"); + + b.Property("MedicalConclusionId") + .HasColumnType("uuid") + .HasColumnName("medical_conclusion_id") + .IsFixedLength() + .HasComment("体检结论"); + + b.Property("MedicalPackageId") + .HasColumnType("uuid") + .HasColumnName("medical_package_id") + .IsFixedLength() + .HasComment("套餐"); + + b.Property("MedicalStartDate") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("medical_start_date") + .HasDefaultValueSql("date(timezone('UTC-8'::text, now()))") + .HasComment("体检开始日期"); + + b.Property("MedicalTimes") + .HasColumnType("smallint") + .HasColumnName("medical_times") + .HasComment("体检次数"); + + b.Property("MedicalTypeId") + .HasColumnType("uuid") + .HasColumnName("medical_type_id") + .IsFixedLength() + .HasComment("体检类别"); + + b.Property("PatientId") + .HasColumnType("uuid") + .HasColumnName("patient_id") + .HasComment("档案号"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("patient_name") + .HasComment("姓名"); + + b.Property("PatientRegisterNo") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("patient_register_no") + .HasComment("条码号"); + + b.Property("PersonnelTypeId") + .HasColumnType("uuid") + .HasColumnName("personnel_type_id") + .IsFixedLength() + .HasComment("人员类别"); + + b.Property("Photo") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("photo") + .HasComment("照片"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("ReportPrintTimes") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0) + .HasColumnName("report_print_times") + .HasComment("体检报告打印次数"); + + b.Property("Salesman") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("salesman") + .HasComment("介绍人"); + + b.Property("SendDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("send_date") + .HasComment("发送时间"); + + b.Property("SendFlag") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") + .HasColumnName("send_flag") + .HasDefaultValueSql("'0'") + .HasComment("发送状态 0-未发送 1-发送"); + + b.Property("SexHormoneTermId") + .HasColumnType("uuid") + .HasColumnName("sex_hormone_term_id") + .HasComment("性激素期限"); + + b.Property("SexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id") + .HasDefaultValueSql("'U'") + .HasComment("性别"); + + b.Property("SummaryDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("summary_date") + .HasComment("总检日期"); + + b.Property("SummaryDoctorId") + .HasColumnType("uuid") + .HasColumnName("summary_doctor_id") + .HasComment("总检医生"); + + b.Property("ThirdBookingId") + .HasColumnType("text") + .HasColumnName("third_booking_id"); + + b.Property("ThirdInfo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("third_info") + .HasComment("附加第三方信息"); + + b.HasKey("Id"); + + b.HasIndex("MaritalStatusId"); + + b.HasIndex("PatientId"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_patient_register"); + + b.HasIndex(new[] { "PatientName" }, "ix_patient_register_2"); + + b.ToTable("patient_register"); + + b.HasComment("体检登记主档"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PatientRegisterExter", b => + { + b.Property("PatientRegisterId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("IsQztlImport") + .HasColumnType("character(1)") + .HasColumnName("is_qztl_import"); + + b.Property("Planuserid") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("planuserid"); + + b.Property("QztlIsCw") + .HasColumnType("character(1)") + .HasColumnName("qztl_is_cw"); + + b.Property("QztlIsCy") + .HasColumnType("character(1)") + .HasColumnName("qztl_is_cy"); + + b.Property("QztlIsFj") + .HasColumnType("character(1)") + .HasColumnName("qztl_is_fj"); + + b.Property("QztlIsGt") + .HasColumnType("character(1)") + .HasColumnName("qztl_is_gt"); + + b.Property("QztlIsMain") + .HasColumnType("character(1)") + .HasColumnName("qztl_is_main"); + + b.Property("QztlIsWh") + .HasColumnType("character(1)") + .HasColumnName("qztl_is_wh"); + + b.Property("QztlType") + .HasColumnType("character(1)") + .HasColumnName("qztl_type"); + + b.Property("Remark2") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark2"); + + b.Property("Remark3") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark3"); + + b.Property("Remark4") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark4"); + + b.Property("UploadQztlFlag") + .HasColumnType("character(1)") + .HasColumnName("upload_qztl_flag"); + + b.HasKey("PatientRegisterId"); + + b.ToTable("patient_register_exter"); + + b.HasComment("人员登记信息扩展"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PatientSymptom", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SymptomId") + .HasColumnType("uuid") + .HasColumnName("symptom_id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("Degree") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("degree"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("TimeLength") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("time_length"); + + b.HasKey("PatientRegisterId", "SymptomId") + .HasName("pk_patient_symptom"); + + b.HasIndex("SymptomId"); + + b.ToTable("patient_symptom"); + + b.HasComment("职业病-体检病人症状"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PayMode", b => + { + b.Property("Id") + .HasMaxLength(4) + .HasColumnType("character varying(4)") + .HasColumnName("id") + .HasComment("编号,固定编码"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") + .HasDefaultValue('Y') + .HasColumnName("is_active"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_payment_mode") + .IsUnique(); + + b.ToTable("pay_mode"); + + b.HasComment("支付方式设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PersonnelType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("人员类别编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("人员类别名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_personnel_type") + .IsUnique(); + + b.ToTable("personnel_type"); + + b.HasComment("人员类别设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PhoneFollowUp", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("FollowUpContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("follow_up_content") + .HasComment("随访内容"); + + b.Property("FollowUpId") + .HasColumnType("uuid") + .HasColumnName("follow_up_id"); + + b.Property("IsComplete") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasDefaultValueSql("'N'") + .HasComment("是否完成"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PlanFollowDate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("plan_follow_date") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("ReplyContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("reply_content") + .HasComment("回复内容"); + + b.HasKey("Id"); + + b.HasIndex("FollowUpId"); + + b.ToTable("phone_follow_up"); + + b.HasComment("电话随访"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Poison", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("毒害编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("毒害名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PoisonTypeId") + .HasColumnType("uuid") + .HasColumnName("poison_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.HasIndex("PoisonTypeId"); + + b.ToTable("poison"); + + b.HasComment("毒害因素设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PoisonType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("毒害类别编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("毒害类别名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.ToTable("poison_type"); + + b.HasComment("毒害因素类别设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PositionType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("职务编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("职务名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time") + .HasComment("最后修改日期"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id") + .HasComment("最后修改者"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_position_type") + .IsUnique(); + + b.ToTable("position_type"); + + b.HasComment("职务类别设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength() + .HasComment("发票项目类别ID"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("PriceItemCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("price_item_code") + .HasComment("价表编码"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.HasIndex("InvoiceItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_price_item") + .IsUnique(); + + b.ToTable("price_item"); + + b.HasComment("价表项目设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PrimarykeyBuilder", b => + { + b.Property("PrimarykeyBuilderId") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("primarykey_builder_id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DateString") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("date_string") + .HasComment("日期"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SerialNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("serial_no") + .HasComment("序列号"); + + b.HasKey("PrimarykeyBuilderId"); + + b.ToTable("primarykey_builder"); + + b.HasComment("主键产生器"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ProtectiveMeasures", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("protective_measures"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.QueueRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CallTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("call_time") + .HasComment("叫号时间"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0") + .HasComment("完成标志"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("排队顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("NoCompleteReason") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_complete_reason") + .HasDefaultValueSql("0") + .HasComment("未完成原因"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("RoomId") + .HasColumnType("uuid") + .HasColumnName("room_id") + .IsFixedLength() + .HasComment("房间ID"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("queue_register"); + + b.HasComment("排队登记"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("参考范围编号"); + + b.Property("AgeLowerLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasDefaultValueSql("0") + .HasComment("年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200") + .HasComment("年龄上限"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CriticalRangeValue") + .HasMaxLength(150) + .HasColumnType("character varying(150)") + .HasColumnName("critical_range_value"); + + b.Property("FollowUpRangeValue") + .HasMaxLength(150) + .HasColumnType("character varying(150)") + .HasColumnName("follow_up_range_value"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("性别"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength() + .HasComment("偏低诊断"); + + b.Property("ReferenceRangeTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag") + .HasComment("参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(150) + .HasColumnType("character varying(150)") + .HasColumnName("reference_range_value"); + + b.Property("UpperDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("upper_diagnosis_id") + .IsFixedLength() + .HasComment("偏高诊断"); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.ToTable("reference_range"); + + b.HasComment("项目参考范围设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RegisterCheck", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("AuditTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("audit_time") + .HasComment("审核时间"); + + b.Property("AuditorName") + .HasColumnType("text") + .HasColumnName("auditor_name"); + + b.Property("AuditorTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("auditor_time"); + + b.Property("AuditorUserId") + .HasColumnType("uuid") + .HasColumnName("auditor_user_id") + .HasComment("审核医生ID"); + + b.Property("CheckDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("check_date") + .HasComment("检查日期"); + + b.Property("CheckDoctorId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("check_doctor_id") + .HasComment("检查医生ID"); + + b.Property("CheckRequestNo") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("check_request_no") + .HasComment("检查单号"); + + b.Property("CheckRequestPrintTimes") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("check_request_print_times") + .HasDefaultValueSql("0") + .HasComment("检查申请单打印次数"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0") + .HasComment("完成标志"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CriticalRangeValue") + .HasMaxLength(300) + .HasColumnType("character varying(300)") + .HasColumnName("critical_range_value") + .HasComment("危急值"); + + b.Property("CriticalValue") + .HasMaxLength(300) + .HasColumnType("character varying(300)") + .HasColumnName("critical_value"); + + b.Property("CriticalValueContent") + .HasMaxLength(300) + .HasColumnType("character varying(300)") + .HasColumnName("critical_value_content") + .HasComment("危急值处理内容"); + + b.Property("CriticalValueCreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("critical_value_creation_time"); + + b.Property("CriticalValueCreatorId") + .HasColumnType("uuid") + .HasColumnName("critical_value_creator_id"); + + b.Property("CriticalValuePhoneCreatorId") + .HasColumnType("uuid") + .HasColumnName("critical_value_phone_creator_id"); + + b.Property("CriticalValueSmsCreatorId") + .HasColumnType("uuid") + .HasColumnName("critical_value_sms_creator_id"); + + b.Property("DiagnosisLevelId") + .HasColumnType("smallint") + .HasColumnName("diagnosis_level_id"); + + b.Property("ExecOrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("exec_organization_unit_id"); + + b.Property("FollowUpCreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("follow_up_creation_time"); + + b.Property("FollowUpCreatorId") + .HasColumnType("uuid") + .HasColumnName("follow_up_creator_id"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit") + .HasComment("是审核"); + + b.Property("IsCriticalValue") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_critical_value"); + + b.Property("IsCriticalValueAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_critical_value_audit"); + + b.Property("IsCriticalValuePhoneComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_critical_value_phone_complete"); + + b.Property("IsCriticalValueSmsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_critical_value_sms_complete"); + + b.Property("IsFollowUp") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_follow_up"); + + b.Property("IsLock") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock") + .HasDefaultValueSql("'N'") + .HasComment("是否锁住"); + + b.Property("IsPacsCheck") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_pacs_check") + .HasDefaultValueSql("'N'") + .HasComment("是否pacs检查 dicom上传为准"); + + b.Property("IsReview") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_review"); + + b.Property("IsSignIn") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_sign_in") + .HasDefaultValueSql("'N'") + .HasComment("是签收"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LisSampleNo") + .HasColumnType("text") + .HasColumnName("lis_sample_no"); + + b.Property("PacsCheckDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("pacs_check_date") + .HasComment("pacs dicom检查日期"); + + b.Property("PacsUploadDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("pacs_upload_date") + .HasComment("pacs dicom文件上传日期"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("ScheduledAet") + .HasColumnType("text") + .HasColumnName("scheduled_aet") + .HasComment("预检AET"); + + b.Property("SignInPerson") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sign_in_person") + .HasComment("签收人姓名"); + + b.Property("SignInTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("sign_in_time") + .HasComment("签收时间"); + + b.Property("SubmissionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("submission_time"); + + b.Property("ThirdInfo") + .HasMaxLength(80) + .HasColumnType("character varying(80)") + .HasColumnName("third_info") + .HasComment("第三方信息"); + + b.Property("WorklistFlag") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") + .HasColumnName("worklist_flag") + .HasDefaultValueSql("'0'") + .HasComment("Worklist标记(0-默认值,1-已扫码登记,2-设备已获取数据,预留设计)"); + + b.Property("WorklistPreCheckDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("worklist_pre_check_date"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CheckRequestNo" }, "ix_register_check_1"); + + b.HasIndex(new[] { "IsPacsCheck" }, "ix_register_check_is_pacs_check"); + + b.HasIndex(new[] { "PatientRegisterId" }, "ix_register_check_patient_register_id"); + + b.ToTable("register_check"); + + b.HasComment("登记检查单"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RegisterCheckAsbitem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .HasComment("主键"); + + b.Property("Amount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("amount") + .HasDefaultValueSql("1") + .HasComment("数量"); + + b.Property("AsbitemId") + .HasMaxLength(6) + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("ChargeAsbitemId") + .HasColumnType("uuid") + .HasColumnName("charge_asbitem_id"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("实收价格"); + + b.Property("ChargeRequestId") + .HasColumnType("uuid") + .HasColumnName("charge_request_id"); + + b.Property("ChargeSourceFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_source_flag"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("GroupPackageId") + .HasColumnType("uuid") + .HasColumnName("group_package_id"); + + b.Property("IsCharge") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_charge") + .HasDefaultValueSql("'N'") + .HasComment("是否已收费"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LisRequestId") + .HasColumnType("uuid") + .HasColumnName("lis_request_id") + .HasComment("LIS申请ID"); + + b.Property("OldAsbitemId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("old_asbitem_id"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.Property("PayTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("pay_type_flag") + .HasDefaultValueSql("0") + .HasComment("支付方式,比如是自费、免费、单位支付"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("StandardPrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("standard_price") + .HasComment("标准价格"); + + b.HasKey("Id"); + + b.HasIndex("AsbitemId"); + + b.HasIndex("RegisterCheckId"); + + b.HasIndex(new[] { "PatientRegisterId", "AsbitemId" }, "ix_register_asbitem") + .IsUnique(); + + b.HasIndex(new[] { "ChargeRequestId" }, "ix_register_check_charge_request_id"); + + b.ToTable("register_check_asbitem"); + + b.HasComment("检查组合项目记录"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RegisterCheckCriticalValue", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value") + .HasComment("危急值"); + + b.Property("Doctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("doctor") + .HasComment("处理医生"); + + b.Property("IsComplete") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasDefaultValueSql("'N'") + .HasComment("是否完成"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ProcessTypeFlag") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasDefaultValue('0') + .HasColumnName("process_type_flag") + .HasComment("处理类别标志"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记检查ID"); + + b.HasKey("Id"); + + b.ToTable("register_check_critical_value"); + + b.HasComment("检查危急值"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RegisterCheckItem", b => + { + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("CheckDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("check_date") + .HasComment("检查日期"); + + b.Property("CheckDoctorName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value") + .HasComment("危急值范围"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value") + .HasComment("危急值"); + + b.Property("CriticalValueContent") + .HasMaxLength(300) + .HasColumnType("character varying(300)") + .HasColumnName("critical_value_content"); + + b.Property("CriticalValueCreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("critical_value_creation_time"); + + b.Property("CriticalValueCreatorId") + .HasColumnType("uuid") + .HasColumnName("critical_value_creator_id"); + + b.Property("CriticalValuePhoneCreatorId") + .HasColumnType("uuid") + .HasColumnName("critical_value_phone_creator_id"); + + b.Property("CriticalValueSmsCreatorId") + .HasColumnType("uuid") + .HasColumnName("critical_value_sms_creator_id"); + + b.Property("DiagnosisLevelId") + .HasColumnType("smallint") + .HasColumnName("diagnosis_level_id"); + + b.Property("FollowUpCreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("follow_up_creation_time"); + + b.Property("FollowUpCreatorId") + .HasColumnType("uuid") + .HasColumnName("follow_up_creator_id"); + + b.Property("IsCriticalValue") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_critical_value"); + + b.Property("IsCriticalValueAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_critical_value_audit"); + + b.Property("IsCriticalValuePhoneComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_critical_value_phone_complete"); + + b.Property("IsCriticalValueSmsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_critical_value_sms_complete"); + + b.Property("IsFollowUp") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_follow_up"); + + b.Property("IsReview") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_review"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("OldItemId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("old_item_id"); + + b.Property("ReferenceRangeValue") + .ValueGeneratedOnAdd() + .HasMaxLength(300) + .HasColumnType("character varying(300)") + .HasColumnName("reference_range_value") + .HasDefaultValueSql("''::character varying") + .HasComment("参考范围"); + + b.Property("Result") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("ResultStatusId") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("result_status_id") + .HasComment("报告单提示"); + + b.Property("Unit") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("unit") + .HasComment("单位"); + + b.HasKey("RegisterCheckId", "ItemId") + .HasName("pk_register_item_1"); + + b.HasIndex("ItemId"); + + b.HasIndex("ResultStatusId"); + + b.ToTable("register_check_item"); + + b.HasComment("检查明细项目记录"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RegisterCheckPacs", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .HasComment("检查图片编号"); + + b.Property("CheckDesc") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("check_desc") + .HasComment("检查描述"); + + b.Property("CheckResult") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("check_result") + .HasComment("检查结果"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DicomPathName") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("dicom_path_name") + .HasComment("DICOM文件路径"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LocalPathName") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("local_path_name"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记流水号"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_pacs"); + + b.HasComment("pacs检查信息主表"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RegisterCheckPacsPicture", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .HasComment("检查图片编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name") + .HasComment("图片名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LocalPathName") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("local_path_name"); + + b.Property("PicturePathName") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("picture_path_name") + .HasComment("图片文件"); + + b.Property("RegisterCheckPacsId") + .HasColumnType("uuid") + .HasColumnName("register_check_pacs_id") + .HasComment("pacs检查信息主表id"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckPacsId"); + + b.ToTable("register_check_pacs_picture"); + + b.HasComment("pacs检查信息图片"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RegisterCheckPicture", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .HasComment("检查图片编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DeviceId") + .HasColumnType("uuid") + .HasColumnName("device_id") + .HasComment("设备ID"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("IsPrint") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasDefaultValueSql("'N'") + .HasComment("打印标志"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LocalPathName") + .HasColumnType("text") + .HasColumnName("local_path_name") + .HasComment("本地资源路径"); + + b.Property("PictureFileType") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("picture_file_type") + .HasDefaultValueSql("'0'") + .HasComment("图片文件类型"); + + b.Property("PictureFilename") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("picture_filename") + .HasComment("图片名"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记流水号"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "RegisterCheckId", "PictureFilename" }, "ix_check_picture") + .IsUnique(); + + b.ToTable("register_check_picture"); + + b.HasComment("体检登记组合项目图片"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RegisterCheckSuggestion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记检查ID"); + + b.Property("Suggestion") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion") + .HasComment("建议"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_suggestion"); + + b.HasComment("登记检查建议"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RegisterCheckSummary", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记检查ID"); + + b.Property("Summary") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("summary") + .HasComment("综述"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag") + .HasComment("综述标志"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_summary"); + + b.HasComment("登记检查综述"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Report", b => + { + b.Property("Id") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("id") + .HasComment("主键Id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("display_name") + .HasComment("报表名称"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasDefaultValue('N') + .HasColumnName("is_active") + .HasComment("启用标志(N:禁用,Y:启用)"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.ToTable("report"); + + b.HasComment("自定义报表主表"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ReportFormat", b => + { + b.Property("Id") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("id") + .HasComment("主键Id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("display_name") + .HasComment("格式名称"); + + b.Property("IsDefault") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasDefaultValue('N') + .HasColumnName("is_default") + .HasComment("默认标志(N:不默认,Y:默认)"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ReportId") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("report_id") + .HasComment("报表ID"); + + b.HasKey("Id"); + + b.HasIndex("ReportId"); + + b.ToTable("report_format"); + + b.HasComment("自定义报表格式表"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ReportFormatTemplate", b => + { + b.Property("Id") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("id") + .HasComment("主键Id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DataSetJson") + .HasColumnType("text") + .HasColumnName("data_set_json") + .HasComment("模板文件"); + + b.Property("DisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("display_name") + .HasComment("模板名称"); + + b.Property("IsDefault") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasDefaultValue('N') + .HasColumnName("is_default") + .HasComment("是否默认(N:不默认,Y:默认)"); + + b.Property("IsSystem") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasDefaultValue('N') + .HasColumnName("is_system") + .HasComment("是否系统自定义(N:停用,Y:启用)"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ReportFormatId") + .HasColumnType("character varying(16)") + .HasColumnName("report_format_id") + .HasComment("报表格式ID"); + + b.Property("TemplateFile") + .HasColumnType("text") + .HasColumnName("template_file") + .HasComment("模板文件"); + + b.Property("TemplateFileType") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("template_file_type") + .HasDefaultValueSql("1") + .HasComment("模板文件类型(0:FastReport,1:Grid++Report)"); + + b.HasKey("Id"); + + b.HasIndex("ReportFormatId"); + + b.ToTable("report_format_template"); + + b.HasComment("自定义报表格式模板表"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ReportPrinter", b => + { + b.Property("Id") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("id") + .HasComment("主键Id"); + + b.Property("ComputerName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("pc_name") + .HasComment("计算机名称"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PrinterName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("printer_name") + .HasComment("打印机名称"); + + b.Property("ReportId") + .HasColumnType("character varying(16)") + .HasColumnName("report_id") + .HasComment("报表ID"); + + b.HasKey("Id"); + + b.HasIndex("ReportId"); + + b.ToTable("report_printer"); + + b.HasComment("自定义报表客户端打印机设置表"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ResultStatus", b => + { + b.Property("Id") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DataInputBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("data_input_background_color") + .HasDefaultValueSql("16777215") + .HasComment("数据录入报告单颜色"); + + b.Property("DataInputFontColor") + .HasColumnType("integer") + .HasColumnName("data_input_font_color") + .HasComment("数据录入字体颜色"); + + b.Property("DataInputPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("data_input_prompt") + .HasComment("数据录入提示"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ReportBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("report_background_color") + .HasDefaultValueSql("16777215") + .HasComment("报告单背景颜色"); + + b.Property("ReportFontColor") + .HasColumnType("integer") + .HasColumnName("report_font_color") + .HasComment("报告单字体颜色"); + + b.Property("ReportPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("report_prompt") + .HasComment("报告单提示"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_result_status") + .IsUnique(); + + b.ToTable("result_status"); + + b.HasComment("结果状态设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Room", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别编号"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MedicalCenterId") + .HasColumnType("uuid") + .HasColumnName("medical_center_id") + .IsFixedLength() + .HasComment("体检中心"); + + b.Property("QueueTime") + .HasPrecision(3, 1) + .HasColumnType("numeric(3,1)") + .HasColumnName("queue_time"); + + b.Property("RoomNo") + .IsRequired() + .HasMaxLength(3) + .HasColumnType("character(3)") + .HasColumnName("room_no") + .IsFixedLength() + .HasComment("房间号"); + + b.Property("RoomTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("room_type_flag") + .HasDefaultValueSql("0"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_room") + .IsUnique(); + + b.HasIndex(new[] { "RoomNo" }, "ix_room_room_no") + .IsUnique(); + + b.ToTable("room"); + + b.HasComment("房间设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RoomDetail", b => + { + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("RoomId") + .HasColumnType("uuid") + .HasColumnName("room_id") + .IsFixedLength() + .HasComment("房间编码"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.HasKey("AsbitemId", "RoomId") + .HasName("pk_room_detail"); + + b.HasIndex("RoomId"); + + b.ToTable("room_detail"); + + b.HasComment("组合项目包含项目"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SampleContainer", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("ContainerColor") + .HasColumnType("integer") + .HasColumnName("container_color") + .HasComment("颜色"); + + b.Property("ContainerColorName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("container_color_name") + .HasComment("颜色名"); + + b.Property("ContainerRemark") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("container_remark"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_container") + .IsUnique(); + + b.ToTable("sample_container"); + + b.HasComment("标本容器设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SampleGroup", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SampleContainerId") + .HasColumnType("uuid") + .HasColumnName("sample_container_id") + .IsFixedLength() + .HasComment("标本容器ID"); + + b.Property("SamplePrintCount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("sample_print_count") + .HasDefaultValueSql("1") + .HasComment("条码打印数量"); + + b.Property("SampleTypeId") + .HasColumnType("uuid") + .HasColumnName("sample_type_id") + .IsFixedLength() + .HasComment("标本类型ID"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("SampleContainerId"); + + b.HasIndex("SampleTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_group") + .IsUnique(); + + b.ToTable("sample_group"); + + b.HasComment("标本分组设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SampleGroupDetail", b => + { + b.Property("SampleGroupId") + .HasColumnType("uuid") + .HasColumnName("sample_group_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.HasKey("SampleGroupId", "AsbitemId") + .HasName("pk_sample_group_detail"); + + b.HasIndex("AsbitemId") + .IsUnique(); + + b.ToTable("sample_group_detail"); + + b.HasComment("标本分组包含组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SampleType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_type"); + + b.ToTable("sample_type"); + + b.HasComment("标本类型设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ServiceTrade", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.Property("ValidPeriod") + .HasColumnType("smallint") + .HasColumnName("valid_period") + .HasComment("有效期"); + + b.Property("ValidPeriodDisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("valid_period_display_name"); + + b.Property("ValidPeriodUnit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("valid_period_unit"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "OrganizationUnitId", "DisplayName" }, "ix_service_trades") + .IsUnique(); + + b.ToTable("service_trades"); + + b.HasComment("服务行业设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SettleAccount", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CompletedBy") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("completed_by") + .HasComment("结账人"); + + b.Property("CompletedTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("completed_time") + .HasComment("结账时间"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("是完成"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.ToTable("settle_account"); + + b.HasComment("结账"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Sex", b => + { + b.Property("Id") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.ToTable("sex"); + + b.HasComment("性别设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SexHormoneReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasComment("年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200") + .HasComment("年龄上限"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value") + .HasComment("危急值参考范围"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength() + .HasComment("下限诊断"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("reference_range_value") + .HasComment("参考范围"); + + b.Property("SexHormoneTermId") + .HasColumnType("uuid") + .HasColumnName("sex_hormone_term_id") + .IsFixedLength() + .HasComment("性激素期限ID"); + + b.Property("UpperDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("upper_diagnosis_id") + .IsFixedLength() + .HasComment("上限诊断"); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.HasIndex("SexHormoneTermId"); + + b.ToTable("sex_hormone_reference_range"); + + b.HasComment("性激素参考范围设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SexHormoneTerm", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sex_hormone_term") + .IsUnique(); + + b.ToTable("sex_hormone_term"); + + b.HasComment("性激素期限设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SmsSend", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content") + .HasComment("短信内容"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("FollowUpId") + .HasColumnType("uuid") + .HasColumnName("follow_up_id"); + + b.Property("IsComplete") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasDefaultValueSql("'N'") + .HasComment("是否完成"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MobileTelephone") + .IsRequired() + .HasMaxLength(11) + .HasColumnType("character varying(11)") + .HasColumnName("mobile_telephone") + .HasComment("手机号"); + + b.Property("PatientId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("patient_id") + .HasComment("人员ID"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("patient_name") + .HasComment("姓名"); + + b.Property("PlanSendDate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("plan_send_date") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("SmsTypeId") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("sms_type_id") + .IsFixedLength() + .HasComment("短信类别ID"); + + b.HasKey("Id"); + + b.ToTable("sms_send"); + + b.HasComment("短信发送"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SmsTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content") + .HasComment("短信内容"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength() + .HasComment("短信类别ID"); + + b.HasKey("Id"); + + b.ToTable("sms_template"); + + b.HasComment("短信模板"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SmsType", b => + { + b.Property("Id") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("id") + .IsFixedLength() + .HasComment("主键Id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.ToTable("sms_type"); + + b.HasComment("短信类别"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Suggestion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断ID"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SuggestionContent") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("suggestion_content") + .HasComment("建议内容"); + + b.Property("SuggestionType") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("suggestion_type") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("建议类别"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DiagnosisId", "SuggestionContent" }, "ix_suggestion") + .IsUnique(); + + b.ToTable("suggestion"); + + b.HasComment("建议设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SumDiagnosis", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断ID"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id") + .HasComment("建议头ID"); + + b.HasKey("PatientRegisterId", "DiagnosisId") + .HasName("pk_summary_diagnosis"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("sum_diagnosis"); + + b.HasComment("总检诊断"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SummaryTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.Property("TemplateContent") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("template_content") + .HasComment("模板内容"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_summary_template") + .IsUnique(); + + b.ToTable("summary_template"); + + b.HasComment("综述模板设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SumSuggestionContent", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SuggestionContent") + .IsRequired() + .HasMaxLength(10000) + .HasColumnType("character varying(10000)") + .HasColumnName("suggestion_content") + .HasComment("建议内容"); + + b.Property("SuggestionType") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("suggestion_type") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("建议类型"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id") + .HasComment("建议头ID"); + + b.HasKey("Id"); + + b.HasIndex("SumSuggestionHeaderId"); + + b.ToTable("sum_suggestion_content"); + + b.HasComment("总检建议内容"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SumSuggestionHeader", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("SuggestionFlag") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasDefaultValue('0') + .HasColumnName("suggestion_flag") + .HasComment("建议标志"); + + b.Property("SuggestionTitle") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_title") + .HasComment("建议标题"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterId", "SuggestionTitle" }, "ix_sum_suggestion_title") + .IsUnique(); + + b.ToTable("sum_suggestion_header"); + + b.HasComment("总检建议头"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SumSummaryContent", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SumSummaryHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_summary_header_id") + .HasComment("建议头ID"); + + b.Property("SummaryContent") + .IsRequired() + .HasMaxLength(3000) + .HasColumnType("character varying(3000)") + .HasColumnName("summary_content") + .HasComment("建议内容"); + + b.HasKey("Id"); + + b.HasIndex("SumSummaryHeaderId"); + + b.ToTable("sum_summary_content"); + + b.HasComment("总检综述内容"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SumSummaryHeader", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("SummaryFlag") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasDefaultValue('0') + .HasColumnName("summary_flag") + .HasComment("综述标志"); + + b.Property("SummaryTitle") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_title") + .HasComment("综述标题"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("sum_summary_header"); + + b.HasComment("总检综述头"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SuspectedOccupationalDisease", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("疑似职业病编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("疑似职业病名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.ToTable("suspected_occupational_disease"); + + b.HasComment("疑似职业病"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Symptom", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("症状编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.ToTable("symptom"); + + b.HasComment("症状"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Sysdiagram", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("Definition") + .HasColumnType("bytea") + .HasColumnName("definition"); + + b.Property("DisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("display_name"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PrincipalId") + .HasColumnType("uuid") + .HasColumnName("principal_id"); + + b.Property("Version") + .HasColumnType("integer") + .HasColumnName("version"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PrincipalId", "DisplayName" }, "uk_principal_name") + .IsUnique(); + + b.ToTable("sysdiagrams"); + + b.HasComment("不是本软件的表,估计是系统自动生成的"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SysParm", b => + { + b.Property("Id") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name") + .HasComment("参数名"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("IsPublic") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasDefaultValue('N') + .HasColumnName("is_public") + .HasComment("是否支持设置按体检中心设置参数值(Y 直接取公共参数,无法设置 N.可以设置多个参数)"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SimpleCode") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("simple_code"); + + b.Property("SysParmTypeId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("sys_parm_type_id") + .HasComment("参数类别ID"); + + b.Property("ValueType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("value_type") + .HasComment("结果类别"); + + b.HasKey("Id"); + + b.HasIndex("SysParmTypeId"); + + b.ToTable("sys_parm"); + + b.HasComment("系统参数设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SysParmType", b => + { + b.Property("Id") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParentId") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("parent_id") + .HasComment("父ID"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.ToTable("sys_parm_type"); + + b.HasComment("系统参数类别设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SysParmValue", b => + { + b.Property("SysParmId") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("sys_parm_id") + .HasComment("参数ID"); + + b.Property("MedicalCenterId") + .HasColumnType("uuid") + .HasColumnName("medical_center_id") + .IsFixedLength() + .HasComment("体检中心ID"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParmValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("parm_value") + .HasComment("参数值"); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("SysParmId", "MedicalCenterId") + .HasName("pk_sys_parm_value"); + + b.ToTable("sys_parm_value"); + + b.HasComment("系统参数值设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SysParmValueOption", b => + { + b.Property("SysParmId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_id"); + + b.Property("ValueOption") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("value_option") + .HasComment("可选项"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("ValueOptionName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("value_option_name") + .HasComment("可选项名"); + + b.HasKey("SysParmId", "ValueOption") + .HasName("pk_sys_parm_value_option"); + + b.ToTable("sys_parm_value_option"); + + b.HasComment("系统参数可选值设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ThirdBooking", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("Age") + .HasColumnType("smallint") + .HasColumnName("age") + .HasComment("年龄"); + + b.Property("BookingDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("booking_date") + .HasComment("预约日期"); + + b.Property("BookingType") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("booking_type"); + + b.Property("ChildCompanyName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("child_company_name") + .HasComment("分公司"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("ConfirmType") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("confirm_type"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CustomerOrgGroupId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("customer_org_group_id") + .HasComment("单位分组ID"); + + b.Property("DepartmentName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("department_name") + .HasComment("部门"); + + b.Property("EmpStatus") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("emp_status"); + + b.Property("ICode") + .HasColumnType("text") + .HasColumnName("icode"); + + b.Property("IdNo") + .IsRequired() + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no") + .HasComment("身份证"); + + b.Property("IdType") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("id_type") + .HasComment("身份证类型"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MaritalStatus") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("marital_status") + .HasComment("婚姻状况"); + + b.Property("MedicalStatus") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") + .HasColumnName("medical_status") + .HasDefaultValueSql("'0'") + .HasComment("体检状态 0未开始 1已登记 2已完成体检"); + + b.Property("PatientName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("patient_name") + .HasComment("姓名"); + + b.Property("Phone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("phone") + .HasComment("电话"); + + b.Property("PositionName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("position_name"); + + b.Property("SexName") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("sex_name") + .HasComment("性别"); + + b.Property("SourceChannel") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("source_channel"); + + b.Property("ThirdMedicalCenterId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("third_medical_center_id") + .HasComment("第三方体检中心Id"); + + b.HasKey("Id"); + + b.ToTable("third_booking"); + + b.HasComment("第三方预约人员记录"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ThirdInterface", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("是否启用"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MedicalCenterId") + .HasColumnType("uuid") + .HasColumnName("medical_center_id"); + + b.Property("ParmValue") + .HasMaxLength(6000) + .HasColumnType("character varying(6000)") + .HasColumnName("parm_value"); + + b.Property("ThirdInterfaceType") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("third_interface_type") + .HasComment("接口类型"); + + b.HasKey("Id"); + + b.ToTable("third_interface"); + + b.HasComment("第三方接口表"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ThirdLisRequest", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("编号"); + + b.Property("AsbitemCodes") + .HasMaxLength(400) + .HasColumnType("character varying(400)") + .HasColumnName("asbitem_codes"); + + b.Property("AsbitemNames") + .HasMaxLength(400) + .HasColumnType("character varying(400)") + .HasColumnName("asbitem_names"); + + b.Property("ChargeFlag") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("charge_flag"); + + b.Property("ChargeType") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("charge_type"); + + b.Property("Charges") + .HasColumnType("numeric(8,2)") + .HasColumnName("charges"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DepartmentCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("department_code"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LisRequestId") + .HasColumnType("uuid") + .HasColumnName("lis_request_id"); + + b.Property("PatientType") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("patient_type"); + + b.Property("RequestDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("request_date"); + + b.Property("RequesterCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("requester_code"); + + b.Property("SampleRequestFlag") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("sample_request_flag"); + + b.Property("SampleType") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("sample_type"); + + b.Property("SamplerCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("sampler_code"); + + b.Property("Telephone") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("telephone"); + + b.HasKey("Id"); + + b.ToTable("third_lis_request"); + + b.HasComment("LIS对接表"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ThirdMedicalCenter", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name") + .HasComment("体检中心名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.ToTable("third_medical_center"); + + b.HasComment("第三方预约人员记录"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ThirdMedicalCenterBookingDate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("BookingDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("booking_date") + .HasComment("可以预约日期"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ThirdMedicalCenterId") + .HasColumnType("uuid") + .HasColumnName("third_medical_center_id") + .HasComment("第三方体检中心id"); + + b.HasKey("Id"); + + b.ToTable("third_medical_center_booking_date"); + + b.HasComment("第三方体检中心预约日期"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ThirdMedicalCenterDetail", b => + { + b.Property("ThirdMedicalCenterId") + .HasColumnType("uuid") + .HasColumnName("third_medical_center_id") + .IsFixedLength() + .HasComment("分院ID"); + + b.Property("CustomerOrgGroupId") + .HasColumnType("uuid") + .HasColumnName("customer_org_group_id") + .IsFixedLength() + .HasComment("单位分组ID"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.HasKey("ThirdMedicalCenterId", "CustomerOrgGroupId") + .HasName("pk_third_medical_center_detail"); + + b.ToTable("third_medical_center_detail"); + + b.HasComment("分院对应的分组"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.TitleType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("职称类别编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_title_type") + .IsUnique(); + + b.ToTable("title_type"); + + b.HasComment("职称类别设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Unit", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("999999") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("简码"); + + b.HasKey("Id"); + + b.ToTable("unit"); + + b.HasComment("单位设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.User", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("email"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("LastModificationTime") + .IsRequired() + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .IsRequired() + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LockScreenTimeInterval") + .HasColumnType("integer") + .HasColumnName("lock_screen_time_interval"); + + b.Property("ModifiedDate") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("modified_date") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("Modifier") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("modifier"); + + b.Property("PasswordHash") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("password_hash"); + + b.Property("PasswordSalt") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("password_salt"); + + b.Property("Photo") + .HasColumnType("bytea") + .HasColumnName("photo"); + + b.Property("PositionTypeId") + .HasColumnType("uuid") + .HasColumnName("position_type_id"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Telephone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("telephone"); + + b.Property("TitleTypeId") + .HasColumnType("uuid") + .HasColumnName("title_type_id"); + + b.Property("UserTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("user_type_flag") + .HasDefaultValueSql("0") + .HasComment("用户类型"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.ToTable("users"); + + b.HasComment("用户表,废弃"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.UserDepartment", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.HasKey("UserId", "DepartmentId") + .HasName("pk_user_operate_department"); + + b.HasIndex("DepartmentId"); + + b.ToTable("user_department"); + + b.HasComment("用户科室操作权限,废弃"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.UserGrouping", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("GroupingId") + .HasColumnType("uuid") + .HasColumnName("grouping_id"); + + b.HasKey("UserId", "GroupingId") + .HasName("pk_user_grouping"); + + b.HasIndex("GroupingId"); + + b.ToTable("user_grouping"); + + b.HasComment("用户组权限-废弃"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.UserItemType", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别ID"); + + b.HasKey("UserId", "ItemTypeId") + .HasName("pk_user_item_type"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("user_item_type"); + + b.HasComment("用户项目类别权限设置"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.UserRight", b => + { + b.Property("Application") + .HasMaxLength(32) + .HasColumnType("character varying(32)") + .HasColumnName("application"); + + b.Property("WindowName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("window_name"); + + b.Property("ControlName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("control_name"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("IsUser") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_user"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("Status") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("status"); + + b.HasKey("Application", "WindowName", "ControlName", "UserId", "IsUser") + .HasName("pk_sys_function"); + + b.ToTable("user_rights"); + + b.HasComment("用户控件权限-废弃"); + }); + + modelBuilder.Entity("Shentun.Pacs.OcCheckTypeDetails.OcCheckTypeDetail", b => + { + b.Property("OcCheckTypeId") + .HasColumnType("uuid") + .HasColumnName("oc_check_type_id") + .IsFixedLength() + .HasComment("检查类别"); + + b.Property("PoisonId") + .HasColumnType("uuid") + .HasColumnName("poison_id"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目编号"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price"); + + b.HasKey("OcCheckTypeId", "PoisonId", "AsbitemId") + .HasName("pk_oc_check_type_detail"); + + b.ToTable("oc_check_type_detail"); + + b.HasComment("职业病检查类别、毒害因素对应的组合项目"); + }); + + modelBuilder.Entity("Shentun.Pacs.RoleMenuInfos.RoleMenuInfo", b => + { + b.Property("RoleId") + .HasColumnType("uuid") + .HasColumnName("role_id") + .IsFixedLength(); + + b.Property("MenuInfoId") + .HasColumnType("uuid") + .HasColumnName("menu_info_id") + .IsFixedLength(); + + b.HasKey("RoleId", "MenuInfoId") + .HasName("pk_role_menuinfo"); + + b.ToTable("role_menu_info"); + + b.HasComment("角色对应菜单权限"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)") + .HasColumnName("application_name"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("browser_info"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("client_id"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("client_ip_address"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("client_name"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("correlation_id"); + + b.Property("Exceptions") + .HasColumnType("text") + .HasColumnName("exceptions"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("execution_duration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("execution_time"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("extra_properties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("http_method"); + + b.Property("HttpStatusCode") + .HasColumnType("integer") + .HasColumnName("http_status_code"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uuid") + .HasColumnName("impersonator_tenant_id"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("impersonator_tenant_name"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uuid") + .HasColumnName("impersonator_user_id"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("impersonator_user_name"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("tenant_id"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("tenant_name"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("url"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("user_name"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("abp_audit_logs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("audit_log_id"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("execution_duration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("execution_time"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("extra_properties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("method_name"); + + b.Property("Parameters") + .HasMaxLength(50000) + .HasColumnType("text") + .HasColumnName("parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("service_name"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("tenant_id"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("abp_audit_log_actions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("audit_log_id"); + + b.Property("ChangeTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("change_time"); + + b.Property("ChangeType") + .HasColumnType("smallint") + .HasColumnName("change_type"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("entity_id"); + + b.Property("EntityTenantId") + .HasColumnType("uuid") + .HasColumnName("entity_tenant_id"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("entity_type_full_name"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("extra_properties"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("tenant_id"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("abp_entity_changes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("EntityChangeId") + .HasColumnType("uuid") + .HasColumnName("entity_change_id"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("new_value"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("original_value"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("property_name"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("property_type_full_name"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("tenant_id"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("abp_entity_property_changes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("extra_properties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("is_abandoned"); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("character varying(1048576)") + .HasColumnName("job_args"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("job_name"); + + b.Property("LastTryTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_try_time"); + + b.Property("NextTryTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("next_try_time"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((byte)15) + .HasColumnName("priority"); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0) + .HasColumnName("try_count"); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("abp_background_jobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("name"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("provider_key"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("provider_name"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("value"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("abp_feature_values", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("description"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("extra_properties"); + + b.Property("IsStatic") + .HasColumnType("boolean") + .HasColumnName("is_static"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("name"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("regex"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("regex_description"); + + b.Property("Required") + .HasColumnType("boolean") + .HasColumnName("required"); + + b.Property("ValueType") + .HasColumnType("integer") + .HasColumnName("value_type"); + + b.HasKey("Id"); + + b.ToTable("abp_claim_types", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("SourceTenantId") + .HasColumnType("uuid") + .HasColumnName("source_tenant_id"); + + b.Property("SourceUserId") + .HasColumnType("uuid") + .HasColumnName("source_user_id"); + + b.Property("TargetTenantId") + .HasColumnType("uuid") + .HasColumnName("target_tenant_id"); + + b.Property("TargetUserId") + .HasColumnType("uuid") + .HasColumnName("target_user_id"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("abp_link_users", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("extra_properties"); + + b.Property("IsDefault") + .HasColumnType("boolean") + .HasColumnName("is_default"); + + b.Property("IsPublic") + .HasColumnType("boolean") + .HasColumnName("is_public"); + + b.Property("IsStatic") + .HasColumnType("boolean") + .HasColumnName("is_static"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("name"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("normalized_name"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("tenant_id"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("abp_roles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("claim_type"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("claim_value"); + + b.Property("RoleId") + .HasColumnType("uuid") + .HasColumnName("role_id"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("tenant_id"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("abp_role_claims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("character varying(96)") + .HasColumnName("action"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)") + .HasColumnName("application_name"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("browser_info"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("client_id"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("client_ip_address"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("correlation_id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("extra_properties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("character varying(96)") + .HasColumnName("identity"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("tenant_id"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("tenant_name"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("user_name"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("abp_security_logs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("access_failed_count"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("deleter_id"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("deletion_time"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("email_confirmed"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("extra_properties"); + + b.Property("IsActive") + .HasColumnType("boolean") + .HasColumnName("is_active"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("is_deleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("is_external"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("lockout_enabled"); + + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone") + .HasColumnName("lockout_end"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("normalized_email"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("normalized_user_name"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("password_hash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("phone_number"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("phone_number_confirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("security_stamp"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("surname"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("tenant_id"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("two_factor_enabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("user_name"); + + b.Property("operator_type") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasDefaultValueSql("'0'"); + + b.Property("user_photo") + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.Property("user_sign") + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("abp_users", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("claim_type"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("claim_value"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("tenant_id"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("abp_user_claims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("login_provider"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("provider_display_name"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("character varying(196)") + .HasColumnName("provider_key"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("tenant_id"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("abp_user_logins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("tenant_id"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("abp_user_organization_units", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("RoleId") + .HasColumnType("uuid") + .HasColumnName("role_id"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("tenant_id"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("abp_user_role", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("login_provider"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("name"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("tenant_id"); + + b.Property("Value") + .HasColumnType("text") + .HasColumnName("value"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("abp_user_tokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("character varying(95)") + .HasColumnName("code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("deleter_id"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("deletion_time"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("display_name"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("extra_properties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("is_deleted"); + + b.Property("IsPeis") + .HasMaxLength(1) + .HasColumnType("character varying(1)"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("tenant_id"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("abp_organization_units", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id"); + + b.Property("RoleId") + .HasColumnType("uuid") + .HasColumnName("role_id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("tenant_id"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("abp_organization_unit_roles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("client_id"); + + b.Property("ClientSecret") + .HasColumnType("text") + .HasColumnName("client_secret"); + + b.Property("ClientUri") + .HasColumnType("text") + .HasColumnName("client_uri"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("consent_type"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("deleter_id"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("deletion_time"); + + b.Property("DisplayName") + .HasColumnType("text") + .HasColumnName("display_name"); + + b.Property("DisplayNames") + .HasColumnType("text") + .HasColumnName("display_names"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("extra_properties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("is_deleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LogoUri") + .HasColumnType("text") + .HasColumnName("logo_uri"); + + b.Property("Permissions") + .HasColumnType("text") + .HasColumnName("permissions"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("text") + .HasColumnName("post_logout_redirect_uris"); + + b.Property("Properties") + .HasColumnType("text") + .HasColumnName("properties"); + + b.Property("RedirectUris") + .HasColumnType("text") + .HasColumnName("redirect_uris"); + + b.Property("Requirements") + .HasColumnType("text") + .HasColumnName("requirements"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("type"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("open_iddict_applications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ApplicationId") + .HasColumnType("uuid") + .HasColumnName("application_id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_date"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("deleter_id"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("deletion_time"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("extra_properties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("is_deleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Properties") + .HasColumnType("text") + .HasColumnName("properties"); + + b.Property("Scopes") + .HasColumnType("text") + .HasColumnName("scopes"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("status"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)") + .HasColumnName("subject"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("type"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("open_iddict_authorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("deleter_id"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("deletion_time"); + + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description"); + + b.Property("Descriptions") + .HasColumnType("text") + .HasColumnName("descriptions"); + + b.Property("DisplayName") + .HasColumnType("text") + .HasColumnName("display_name"); + + b.Property("DisplayNames") + .HasColumnType("text") + .HasColumnName("display_names"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("extra_properties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("is_deleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("name"); + + b.Property("Properties") + .HasColumnType("text") + .HasColumnName("properties"); + + b.Property("Resources") + .HasColumnType("text") + .HasColumnName("resources"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("open_iddict_scopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ApplicationId") + .HasColumnType("uuid") + .HasColumnName("application_id"); + + b.Property("AuthorizationId") + .HasColumnType("uuid") + .HasColumnName("authorization_id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_date"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("deleter_id"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("deletion_time"); + + b.Property("ExpirationDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("expiration_date"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("extra_properties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("is_deleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Payload") + .HasColumnType("text") + .HasColumnName("payload"); + + b.Property("Properties") + .HasColumnType("text") + .HasColumnName("properties"); + + b.Property("RedemptionDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("redemption_date"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("reference_id"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("status"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)") + .HasColumnName("subject"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("type"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("open_iddict_tokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("name"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("provider_key"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("provider_name"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("tenant_id"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("abp_permission_grants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("name"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("provider_key"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("provider_name"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("character varying(2048)") + .HasColumnName("value"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("abp_settings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("deleter_id"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("deletion_time"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("extra_properties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("is_deleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("name"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("abp_tenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("tenant_id"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("name"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("value"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("abp_tenant_connection_strings", (string)null); + }); + + modelBuilder.Entity("Shentun.Pacs.Books.Mb", b => + { + b.HasOne("Shentun.Pacs.Books.Ma", "Ma") + .WithMany("Mbs") + .HasForeignKey("MaId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_mb_ma_1"); + + b.Navigation("Ma"); + }); + + modelBuilder.Entity("Shentun.Pacs.Books.Mc", b => + { + b.HasOne("Shentun.Pacs.Books.Mb", "Mb") + .WithMany("Mcs") + .HasForeignKey("MbId") + .HasConstraintName("fk_mc_mb_1"); + + b.Navigation("Mb"); + }); + + modelBuilder.Entity("Shentun.Pacs.Books.TestB", b => + { + b.HasOne("Shentun.Pacs.Books.TestA", "TestAs") + .WithMany("TestBs") + .HasForeignKey("TestAsAId"); + + b.Navigation("TestAs"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Asbitem", b => + { + b.HasOne("Shentun.Pacs.Models.CollectItemType", "CollectItemType") + .WithMany("Asbitems") + .HasForeignKey("CollectItemTypeId") + .IsRequired() + .HasConstraintName("fk_asbitem_collect_item_type"); + + b.HasOne("Shentun.Pacs.Models.ItemType", "ItemType") + .WithMany("Asbitems") + .HasForeignKey("ItemTypeId") + .IsRequired() + .HasConstraintName("fk_asbitem_item_type"); + + b.Navigation("CollectItemType"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.AsbitemDetail", b => + { + b.HasOne("Shentun.Pacs.Models.Asbitem", "Asbitem") + .WithMany("AsbitemDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_asbitem_detail_asbitem"); + + b.HasOne("Shentun.Pacs.Models.Item", "Item") + .WithMany("AsbitemDetails") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_asbitem_detail_item"); + + b.Navigation("Asbitem"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.BigtextResultConclusion", b => + { + b.HasOne("Shentun.Pacs.Models.BigtextResultTemplate", "BigtextResultTemplate") + .WithMany("BigtextResultConclusions") + .HasForeignKey("BigtextResultTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultTemplate"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.BigtextResultDescription", b => + { + b.HasOne("Shentun.Pacs.Models.BigtextResultTemplate", "BigtextResultTemplate") + .WithMany("BigtextResultDescriptions") + .HasForeignKey("BigtextResultTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultTemplate"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.BigtextResultTemplate", b => + { + b.HasOne("Shentun.Pacs.Models.BigtextResultType", "BigtextResultType") + .WithMany("BigtextResultTemplates") + .HasForeignKey("BigtextResultTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultType"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CardBill", b => + { + b.HasOne("Shentun.Pacs.Models.CardRegister", "CardRegister") + .WithMany("CardBills") + .HasForeignKey("CardRegisterId") + .IsRequired() + .HasConstraintName("fk_card_bil_reference_card_reg"); + + b.HasOne("Shentun.Pacs.Models.PayMode", "PayMode") + .WithMany("CardBills") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_card_bill_payment_mode"); + + b.Navigation("CardRegister"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CardRegister", b => + { + b.HasOne("Shentun.Pacs.Models.CardType", "CardType") + .WithMany("CardRegisters") + .HasForeignKey("CardTypeId") + .IsRequired() + .HasConstraintName("fk_card_reg_reference_card_typ"); + + b.Navigation("CardType"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Charge", b => + { + b.HasOne("Shentun.Pacs.Models.PatientRegister", "PatientRegister") + .WithMany("Charges") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_patient_register_charge"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargeAsbitem", b => + { + b.HasOne("Shentun.Pacs.Models.Asbitem", "Asbitem") + .WithMany("ChargeAsbitems") + .HasForeignKey("AsbitemId") + .IsRequired() + .HasConstraintName("fk_charge_asbitem_asbitem"); + + b.HasOne("Shentun.Pacs.Models.Charge", "Charge") + .WithMany("ChargeAsbitems") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_charge_asbitem_charge"); + + b.Navigation("Asbitem"); + + b.Navigation("Charge"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargeBack", b => + { + b.HasOne("Shentun.Pacs.Models.Charge", "Charge") + .WithMany("ChargeBacks") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bill_bac_reference_bill"); + + b.Navigation("Charge"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargeBackAsbitem", b => + { + b.HasOne("Shentun.Pacs.Models.ChargeAsbitem", "ChargeAsbitem") + .WithMany("ChargeBackAsbitems") + .HasForeignKey("ChargeAsbitemId") + .IsRequired() + .HasConstraintName("fk_chargebackasbitem_chargeasbitem"); + + b.HasOne("Shentun.Pacs.Models.ChargeBack", "ChargeBack") + .WithMany("ChargeBackAsbitems") + .HasForeignKey("ChargeBackId") + .IsRequired() + .HasConstraintName("fk_chargebackasbitem_chargeback"); + + b.Navigation("ChargeAsbitem"); + + b.Navigation("ChargeBack"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargeBackPay", b => + { + b.HasOne("Shentun.Pacs.Models.ChargeBack", "ChargeBack") + .WithMany("ChargeBackPays") + .HasForeignKey("ChargeBackId") + .IsRequired() + .HasConstraintName("fk_charge_back_pay_charge_back"); + + b.HasOne("Shentun.Pacs.Models.PayMode", "PayMode") + .WithMany("ChargeBackPays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_charge_back_pay_pay_mode"); + + b.Navigation("ChargeBack"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargePay", b => + { + b.HasOne("Shentun.Pacs.Models.Charge", "Charge") + .WithMany("ChargePays") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_charge_payment_mode_charge"); + + b.HasOne("Shentun.Pacs.Models.PayMode", "PayMode") + .WithMany("ChargePays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_charge_"); + + b.Navigation("Charge"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargePriceItem", b => + { + b.HasOne("Shentun.Pacs.Models.ChargeAsbitem", "ChargeAsbitem") + .WithMany("ChargePriceItems") + .HasForeignKey("ChargeAsbitemId") + .IsRequired() + .HasConstraintName("fk_charge_asbitem"); + + b.Navigation("ChargeAsbitem"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargeRequest", b => + { + b.HasOne("Shentun.Pacs.Models.PatientRegister", "PatientRegister") + .WithMany("ChargeRequests") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargeRequestAsbitem", b => + { + b.HasOne("Shentun.Pacs.Models.Asbitem", "Asbitem") + .WithMany("ChargeRequestAsbitems") + .HasForeignKey("AsbitemId") + .IsRequired() + .HasConstraintName("fk_charge_request_asbitem_asbitem"); + + b.HasOne("Shentun.Pacs.Models.ChargeRequest", "ChargeRequest") + .WithMany("ChargeRequestAsbitems") + .HasForeignKey("ChargeRequestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_charge_request_asbitem_charge"); + + b.Navigation("Asbitem"); + + b.Navigation("ChargeRequest"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CollectItemType", b => + { + b.HasOne("Shentun.Pacs.Models.InvoiceItemType", "InvoiceItemType") + .WithMany("CollectItemTypes") + .HasForeignKey("InvoiceItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("InvoiceItemType"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ColumnReferenceCode", b => + { + b.HasOne("Shentun.Pacs.Models.ColumnReference", "ColumnReference") + .WithMany("ColumnReferenceCodes") + .HasForeignKey("ColumnReferenceId") + .IsRequired() + .HasConstraintName("fk_columnreferencecode_columnreference"); + + b.Navigation("ColumnReference"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ColumnReferenceInterface", b => + { + b.HasOne("Shentun.Pacs.Models.ColumnReferenceCode", "ColumnReferenceCode") + .WithMany("ColumnReferenceInterfaces") + .HasForeignKey("ColumnReferenceCodeId") + .IsRequired() + .HasConstraintName("fk_columnreferenceinterface_columnreferencecode"); + + b.Navigation("ColumnReferenceCode"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CommonChar", b => + { + b.HasOne("Shentun.Pacs.Models.CommonCharType", "CommonCharType") + .WithMany("CommonChars") + .HasForeignKey("CommonCharTypeId") + .IsRequired() + .HasConstraintName("fk_common_char_common_char_type"); + + b.Navigation("CommonCharType"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CommonTable", b => + { + b.HasOne("Shentun.Pacs.Models.CommonTableType", "CommonTableType") + .WithMany("CommonTables") + .HasForeignKey("CommonTableTypeId") + .IsRequired() + .HasConstraintName("fk_common_table_common_table_type"); + + b.Navigation("CommonTableType"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ContactMethod", b => + { + b.HasOne("Shentun.Pacs.Models.ContactPerson", "ContactPerson") + .WithMany("ContactMethods") + .HasForeignKey("ContactPersonId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_contact_method_contact"); + + b.Navigation("ContactPerson"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ContactPerson", b => + { + b.HasOne("Shentun.Pacs.Models.CustomerOrg", "CustomerOrg") + .WithMany("ContactPeople") + .HasForeignKey("CustomerOrgId") + .IsRequired() + .HasConstraintName("fk_contact_org"); + + b.Navigation("CustomerOrg"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CriticalFollowValue", b => + { + b.HasOne("Shentun.Pacs.Models.CriticalFollowValueType", "CriticalFollowValueType") + .WithMany("CriticalValues") + .HasForeignKey("CriticalFollowValueTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_critical_follow_value_type_critical_follow_value"); + + b.Navigation("CriticalFollowValueType"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgCharge", b => + { + b.HasOne("Shentun.Pacs.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("CustomerOrgCharges") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_customer_org_charge_register"); + + b.Navigation("CustomerOrgRegister"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgChargeBack", b => + { + b.HasOne("Shentun.Pacs.Models.CustomerOrgCharge", "CustomerOrgCharge") + .WithMany("CustomerOrgChargeBacks") + .HasForeignKey("CustomerOrgChargeId") + .IsRequired() + .HasConstraintName("fk_org_charge_back_org_charge"); + + b.Navigation("CustomerOrgCharge"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgChargeBackPay", b => + { + b.HasOne("Shentun.Pacs.Models.CustomerOrgChargeBack", "CustomerOrgChargeBack") + .WithMany("CustomerOrgChargeBackPays") + .HasForeignKey("CustomerOrgChargeBackId") + .IsRequired() + .HasConstraintName("fk_org_cha"); + + b.HasOne("Shentun.Pacs.Models.PayMode", "PayMode") + .WithMany("CustomerOrgChargeBackPays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_org_charge_back_pay_pay_mode"); + + b.Navigation("CustomerOrgChargeBack"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgChargePay", b => + { + b.HasOne("Shentun.Pacs.Models.CustomerOrgCharge", "CustomerOrgCharge") + .WithOne("CustomerOrgChargePay") + .HasForeignKey("Shentun.Pacs.Models.CustomerOrgChargePay", "Id") + .IsRequired() + .HasConstraintName("fk_org_charge_pay_org_charge"); + + b.HasOne("Shentun.Pacs.Models.PayMode", "PayMode") + .WithMany("CustomerOrgChargePays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_org_charge_pay_pay_mode"); + + b.Navigation("CustomerOrgCharge"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgGroup", b => + { + b.HasOne("Shentun.Pacs.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("CustomerOrgGroups") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_customer_org_group_register"); + + b.Navigation("CustomerOrgRegister"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgGroupDetail", b => + { + b.HasOne("Shentun.Pacs.Models.Asbitem", "Asbitem") + .WithMany("CustomerOrgGroupDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_group_detail_asbitem"); + + b.HasOne("Shentun.Pacs.Models.CustomerOrgGroup", "CustomerOrgGroup") + .WithMany("CustomerOrgGroupDetails") + .HasForeignKey("CustomerOrgGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_group_detail_org_group"); + + b.Navigation("Asbitem"); + + b.Navigation("CustomerOrgGroup"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgRegister", b => + { + b.HasOne("Shentun.Pacs.Models.CustomerOrg", "CustomerOrg") + .WithMany("CustomerOrgRegisters") + .HasForeignKey("CustomerOrgId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_medi_reference_org"); + + b.Navigation("CustomerOrg"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Diagnosis", b => + { + b.HasOne("Shentun.Pacs.Models.DiagnosisLevel", "DiagnosisLevel") + .WithMany("Diagnoses") + .HasForeignKey("DiagnosisLevelId") + .IsRequired() + .HasConstraintName("fk_diagnosis_diagnosis_level"); + + b.HasOne("Shentun.Pacs.Models.ItemType", "ItemType") + .WithMany("Diagnoses") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagnosis_item_type"); + + b.Navigation("DiagnosisLevel"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.DiagnosisTemplateDetail", b => + { + b.HasOne("Shentun.Pacs.Models.Diagnosis", "Diagnosis") + .WithMany("DiagnosisTemplateDetails") + .HasForeignKey("DiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagnos"); + + b.HasOne("Shentun.Pacs.Models.DiagnosisTemplate", "DiagnosisTemplate") + .WithMany("DiagnosisTemplateDetails") + .HasForeignKey("DiagnosisTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagno2"); + + b.Navigation("Diagnosis"); + + b.Navigation("DiagnosisTemplate"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.HealthCertificate", b => + { + b.HasOne("Shentun.Pacs.Models.PatientRegister", "PatientRegister") + .WithOne("HealthCertificate") + .HasForeignKey("Shentun.Pacs.Models.HealthCertificate", "Id") + .IsRequired() + .HasConstraintName("fk_health_"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Item", b => + { + b.HasOne("Shentun.Pacs.Models.ItemType", "ItemType") + .WithMany("Items") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_item_type"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ItemResultMatch", b => + { + b.HasOne("Shentun.Pacs.Models.Diagnosis", "Diagnosis") + .WithMany("ItemResultMatches") + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_item_result_match_diagnosis"); + + b.HasOne("Shentun.Pacs.Models.Item", "Item") + .WithMany("ItemResultMatches") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_res_reference_item1"); + + b.Navigation("Diagnosis"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ItemResultTemplate", b => + { + b.HasOne("Shentun.Pacs.Models.Item", "Item") + .WithMany("ItemResultTemplates") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_res_reference_item"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ItemResultTemplateType", b => + { + b.HasOne("Shentun.Pacs.Models.Item", "Item") + .WithMany("ItemResultTemplateTypes") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_re"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ItemTemplateDetail", b => + { + b.HasOne("Shentun.Pacs.Models.Item", "Item") + .WithMany("ItemTemplateDetails") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_template_detail_item"); + + b.HasOne("Shentun.Pacs.Models.ItemTemplate", "ItemTemplate") + .WithMany("ItemTemplateDetails") + .HasForeignKey("ItemTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_te"); + + b.Navigation("Item"); + + b.Navigation("ItemTemplate"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ItemType", b => + { + b.HasOne("Shentun.Pacs.Models.GuideType", "GuidType") + .WithMany("ItemTypes") + .HasForeignKey("GuidTypeId") + .IsRequired() + .HasConstraintName("fk_item_type_guide_type"); + + b.HasOne("Shentun.Pacs.Models.MedicalReportType", "MedicalReportType") + .WithMany("ItemTypes") + .HasForeignKey("MedicalReportTypeId") + .IsRequired() + .HasConstraintName("fk_item_type_medical_report_type"); + + b.Navigation("GuidType"); + + b.Navigation("MedicalReportType"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.LisRequest", b => + { + b.HasOne("Shentun.Pacs.Models.SampleContainer", "SampleContainer") + .WithMany("LisRequests") + .HasForeignKey("SampleContainerId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired() + .HasConstraintName("fk_lis_request_sample_container"); + + b.HasOne("Shentun.Pacs.Models.SampleType", "SampleType") + .WithMany("LisRequests") + .HasForeignKey("SampleTypeId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired() + .HasConstraintName("fk_lis_request_sample_type"); + + b.Navigation("SampleContainer"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.MedicalConclusion", b => + { + b.HasOne("Shentun.Pacs.Models.MedicalConclusionType", "MedicalConclusionType") + .WithMany("MedicalConclusions") + .HasForeignKey("MedicalConclusionTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medical"); + + b.Navigation("MedicalConclusionType"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.MedicalPackageDetail", b => + { + b.HasOne("Shentun.Pacs.Models.Asbitem", "Asbitem") + .WithMany("MedicalPackageDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medical"); + + b.HasOne("Shentun.Pacs.Models.MedicalPackage", "MedicalPackage") + .WithMany("MedicalPackageDetails") + .HasForeignKey("MedicalPackageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medica2"); + + b.Navigation("Asbitem"); + + b.Navigation("MedicalPackage"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.OrganizationUnitsCustomerOrg", b => + { + b.HasOne("Shentun.Pacs.Models.CustomerOrg", "CustomerOrg") + .WithMany("OrganizationUnitsCustomerOrgs") + .HasForeignKey("CustomerOrgId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medical_center_org_org"); + + b.HasOne("Shentun.Pacs.Models.Department", "OrganizationUnit") + .WithMany("OrganizationUnitsCustomerOrgs") + .HasForeignKey("OrganizationUnitId") + .IsRequired() + .HasConstraintName("fk_medical"); + + b.Navigation("CustomerOrg"); + + b.Navigation("OrganizationUnit"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PatientOccupationalDisease", b => + { + b.HasOne("Shentun.Pacs.Models.PatientRegister", "PatientRegister") + .WithOne("PatientOccupationalDisease") + .HasForeignKey("Shentun.Pacs.Models.PatientOccupationalDisease", "PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PatientOccupationalHistory", b => + { + b.HasOne("Shentun.Pacs.Models.PatientRegister", "PatientRegister") + .WithMany("PatientOccupationalHistories") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_occupat"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PatientOccupationalMedicalHistory", b => + { + b.HasOne("Shentun.Pacs.Models.PatientRegister", "PatientRegister") + .WithMany("PatientOccupationalMedicalHistorys") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient_occupational_medical_history_patient_register"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PatientPastMedicalHistory", b => + { + b.HasOne("Shentun.Pacs.Models.PatientRegister", "PatientRegister") + .WithMany("PatientPastMedicalHistorys") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient_past_medical_historys_patient_register"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PatientPoison", b => + { + b.HasOne("Shentun.Pacs.Models.PatientRegister", "PatientRegister") + .WithMany("PatientPoisons") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.HasOne("Shentun.Pacs.Models.Poison", "Poison") + .WithMany("PatientPoisons") + .HasForeignKey("PoisonId") + .IsRequired() + .HasConstraintName("fk_patient_poison_poison"); + + b.Navigation("PatientRegister"); + + b.Navigation("Poison"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PatientRegister", b => + { + b.HasOne("Shentun.Pacs.Models.MaritalStatus", "MaritalStatus") + .WithMany("PatientRegisters") + .HasForeignKey("MaritalStatusId") + .IsRequired() + .HasConstraintName("fk_patient_register_marital_status_id"); + + b.HasOne("Shentun.Pacs.Models.Patient", "Patient") + .WithMany("PatientRegisters") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient_register_patient"); + + b.Navigation("MaritalStatus"); + + b.Navigation("Patient"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PatientSymptom", b => + { + b.HasOne("Shentun.Pacs.Models.PatientRegister", "PatientRegister") + .WithMany("PatientSymptoms") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.HasOne("Shentun.Pacs.Models.Symptom", "Symptom") + .WithMany("PatientSymptoms") + .HasForeignKey("SymptomId") + .IsRequired() + .HasConstraintName("fk_patient_symptom_symptom"); + + b.Navigation("PatientRegister"); + + b.Navigation("Symptom"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PhoneFollowUp", b => + { + b.HasOne("Shentun.Pacs.Models.FollowUp", "FollowUp") + .WithMany("PhoneFollowUps") + .HasForeignKey("FollowUpId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_phone_follow_follow_up"); + + b.Navigation("FollowUp"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Poison", b => + { + b.HasOne("Shentun.Pacs.Models.PoisonType", "PoisonType") + .WithMany("Poisons") + .HasForeignKey("PoisonTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_poison_poison_type"); + + b.Navigation("PoisonType"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PriceItem", b => + { + b.HasOne("Shentun.Pacs.Models.InvoiceItemType", "InvoiceItemType") + .WithMany("PriceItems") + .HasForeignKey("InvoiceItemTypeId") + .IsRequired() + .HasConstraintName("fk_price_item_invoice_item_type"); + + b.Navigation("InvoiceItemType"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.QueueRegister", b => + { + b.HasOne("Shentun.Pacs.Models.PatientRegister", "PatientRegister") + .WithMany("QueueRegisters") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_queue_r"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ReferenceRange", b => + { + b.HasOne("Shentun.Pacs.Models.Item", "Item") + .WithMany("ReferenceRanges") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_referenc_reference_item"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RegisterCheckAsbitem", b => + { + b.HasOne("Shentun.Pacs.Models.Asbitem", "Asbitem") + .WithMany("RegisterCheckAsbitems") + .HasForeignKey("AsbitemId") + .IsRequired() + .HasConstraintName("fk_register_reference_asbitem"); + + b.HasOne("Shentun.Pacs.Models.PatientRegister", "PatientRegister") + .WithMany("RegisterCheckAsbitems") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_register_reference_patient_"); + + b.HasOne("Shentun.Pacs.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckAsbitems") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registerasbitem_registercheck"); + + b.Navigation("Asbitem"); + + b.Navigation("PatientRegister"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RegisterCheckItem", b => + { + b.HasOne("Shentun.Pacs.Models.Item", "Item") + .WithMany("RegisterCheckItems") + .HasForeignKey("ItemId") + .IsRequired() + .HasConstraintName("fk_register_reference_item"); + + b.HasOne("Shentun.Pacs.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckItems") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_register_item_register_check"); + + b.HasOne("Shentun.Pacs.Models.ResultStatus", "ResultStatus") + .WithMany("RegisterCheckItems") + .HasForeignKey("ResultStatusId") + .HasConstraintName("fk_register_item_result_status"); + + b.Navigation("Item"); + + b.Navigation("RegisterCheck"); + + b.Navigation("ResultStatus"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RegisterCheckPacs", b => + { + b.HasOne("Shentun.Pacs.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckPacss") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_register_check_pacs_register_check"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RegisterCheckPacsPicture", b => + { + b.HasOne("Shentun.Pacs.Models.RegisterCheckPacs", "RegisterCheckPacs") + .WithMany("RegisterCheckPacsPictures") + .HasForeignKey("RegisterCheckPacsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_register_check_pacs_picture_register_check_pacs"); + + b.Navigation("RegisterCheckPacs"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RegisterCheckPicture", b => + { + b.HasOne("Shentun.Pacs.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckPictures") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_check_picture_register_check"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RegisterCheckSuggestion", b => + { + b.HasOne("Shentun.Pacs.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckSuggestions") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RegisterCheckSummary", b => + { + b.HasOne("Shentun.Pacs.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckSummaries") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ReportFormat", b => + { + b.HasOne("Shentun.Pacs.Models.Report", "Report") + .WithMany("ReportFormats") + .HasForeignKey("ReportId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_reportformat_report_1"); + + b.Navigation("Report"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ReportFormatTemplate", b => + { + b.HasOne("Shentun.Pacs.Models.ReportFormat", "ReportFormat") + .WithMany("ReportFormatTemplates") + .HasForeignKey("ReportFormatId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_reportformattemplate_reportprinter_1"); + + b.Navigation("ReportFormat"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ReportPrinter", b => + { + b.HasOne("Shentun.Pacs.Models.Report", "Report") + .WithMany("ReportPrinters") + .HasForeignKey("ReportId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_reportprinter_report_1"); + + b.Navigation("Report"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Room", b => + { + b.HasOne("Shentun.Pacs.Models.ItemType", "ItemType") + .WithMany("Rooms") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_item_type"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RoomDetail", b => + { + b.HasOne("Shentun.Pacs.Models.Asbitem", "Asbitem") + .WithMany("RoomDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_detail_asbitem"); + + b.HasOne("Shentun.Pacs.Models.Room", "Room") + .WithMany("RoomDetails") + .HasForeignKey("RoomId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_detail_room"); + + b.Navigation("Asbitem"); + + b.Navigation("Room"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SampleGroup", b => + { + b.HasOne("Shentun.Pacs.Models.SampleContainer", "SampleContainer") + .WithMany("SampleGroups") + .HasForeignKey("SampleContainerId") + .IsRequired() + .HasConstraintName("fk_sample_group_sample_container"); + + b.HasOne("Shentun.Pacs.Models.SampleType", "SampleType") + .WithMany("SampleGroups") + .HasForeignKey("SampleTypeId") + .IsRequired() + .HasConstraintName("fk_sample_group_sample_type"); + + b.Navigation("SampleContainer"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SampleGroupDetail", b => + { + b.HasOne("Shentun.Pacs.Models.Asbitem", "Asbitem") + .WithOne("SampleGroupDetail") + .HasForeignKey("Shentun.Pacs.Models.SampleGroupDetail", "AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sample_group_detail_asbitem"); + + b.HasOne("Shentun.Pacs.Models.SampleGroup", "SampleGroup") + .WithMany("SampleGroupDetails") + .HasForeignKey("SampleGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sample_"); + + b.Navigation("Asbitem"); + + b.Navigation("SampleGroup"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ServiceTrade", b => + { + b.HasOne("Shentun.Pacs.Models.Department", "Department") + .WithMany("ServiceTrades") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_service_trades_department"); + + b.Navigation("Department"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SexHormoneReferenceRange", b => + { + b.HasOne("Shentun.Pacs.Models.Item", "Item") + .WithMany("SexHormoneReferenceRanges") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sex_hor"); + + b.HasOne("Shentun.Pacs.Models.SexHormoneTerm", "SexHormoneTerm") + .WithMany("SexHormoneReferenceRanges") + .HasForeignKey("SexHormoneTermId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sex_ho2"); + + b.Navigation("Item"); + + b.Navigation("SexHormoneTerm"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Suggestion", b => + { + b.HasOne("Shentun.Pacs.Models.Diagnosis", "Diagnosis") + .WithMany("Suggestions") + .HasForeignKey("DiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_suggestion_diagnosis"); + + b.Navigation("Diagnosis"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SumDiagnosis", b => + { + b.HasOne("Shentun.Pacs.Models.Diagnosis", "Diagnosis") + .WithMany("SumDiagnoses") + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_sum_diagnosis_diagnosis"); + + b.HasOne("Shentun.Pacs.Models.PatientRegister", "PatientRegister") + .WithMany("SumDiagnoses") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_dia"); + + b.Navigation("Diagnosis"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SumSuggestionContent", b => + { + b.HasOne("Shentun.Pacs.Models.SumSuggestionHeader", "SumSuggestionHeader") + .WithMany("SumSuggestionContents") + .HasForeignKey("SumSuggestionHeaderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sug"); + + b.Navigation("SumSuggestionHeader"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SumSuggestionHeader", b => + { + b.HasOne("Shentun.Pacs.Models.PatientRegister", "PatientRegister") + .WithMany("SumSuggestionHeaders") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sug"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SumSummaryContent", b => + { + b.HasOne("Shentun.Pacs.Models.SumSummaryHeader", "SumSummaryHeader") + .WithMany("SumSummaryContents") + .HasForeignKey("SumSummaryHeaderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sum"); + + b.Navigation("SumSummaryHeader"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SumSummaryHeader", b => + { + b.HasOne("Shentun.Pacs.Models.PatientRegister", "PatientRegister") + .WithMany("SumSummaryHeaders") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sum"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SysParm", b => + { + b.HasOne("Shentun.Pacs.Models.SysParmType", "SysParmType") + .WithMany("SysParms") + .HasForeignKey("SysParmTypeId") + .IsRequired() + .HasConstraintName("fk_sys_parm_sys_parm_type"); + + b.Navigation("SysParmType"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SysParmValue", b => + { + b.HasOne("Shentun.Pacs.Models.SysParm", "SysParm") + .WithMany("SysParmValues") + .HasForeignKey("SysParmId") + .IsRequired() + .HasConstraintName("fk_sys_parm_value_sys_parm"); + + b.Navigation("SysParm"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SysParmValueOption", b => + { + b.HasOne("Shentun.Pacs.Models.SysParm", "SysParm") + .WithMany("SysParmValueOptions") + .HasForeignKey("SysParmId") + .IsRequired() + .HasConstraintName("fk_sys_par"); + + b.Navigation("SysParm"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.User", b => + { + b.HasOne("Shentun.Pacs.Models.Department", "Department") + .WithMany("Users") + .HasForeignKey("DepartmentId") + .IsRequired() + .HasConstraintName("fk_user_department"); + + b.Navigation("Department"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.UserDepartment", b => + { + b.HasOne("Shentun.Pacs.Models.Department", "Department") + .WithMany("UserDepartments") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_op"); + + b.HasOne("Shentun.Pacs.Models.User", "User") + .WithMany("UserDepartments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_o2"); + + b.Navigation("Department"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.UserGrouping", b => + { + b.HasOne("Shentun.Pacs.Models.Grouping", "Grouping") + .WithMany("UserGroupings") + .HasForeignKey("GroupingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_grouping_grouping"); + + b.HasOne("Shentun.Pacs.Models.User", "User") + .WithMany("UserGroupings") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_grouping_users"); + + b.Navigation("Grouping"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.UserItemType", b => + { + b.HasOne("Shentun.Pacs.Models.ItemType", "ItemType") + .WithMany("UserItemTypes") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_item_type_item_type"); + + b.HasOne("Shentun.Pacs.Models.User", "User") + .WithMany("UserItemTypes") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_item_type_users"); + + b.Navigation("ItemType"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Shentun.Pacs.Books.Ma", b => + { + b.Navigation("Mbs"); + }); + + modelBuilder.Entity("Shentun.Pacs.Books.Mb", b => + { + b.Navigation("Mcs"); + }); + + modelBuilder.Entity("Shentun.Pacs.Books.TestA", b => + { + b.Navigation("TestBs"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Asbitem", b => + { + b.Navigation("AsbitemDetails"); + + b.Navigation("ChargeAsbitems"); + + b.Navigation("ChargeRequestAsbitems"); + + b.Navigation("CustomerOrgGroupDetails"); + + b.Navigation("MedicalPackageDetails"); + + b.Navigation("RegisterCheckAsbitems"); + + b.Navigation("RoomDetails"); + + b.Navigation("SampleGroupDetail"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.BigtextResultTemplate", b => + { + b.Navigation("BigtextResultConclusions"); + + b.Navigation("BigtextResultDescriptions"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.BigtextResultType", b => + { + b.Navigation("BigtextResultTemplates"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CardRegister", b => + { + b.Navigation("CardBills"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CardType", b => + { + b.Navigation("CardRegisters"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Charge", b => + { + b.Navigation("ChargeAsbitems"); + + b.Navigation("ChargeBacks"); + + b.Navigation("ChargePays"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargeAsbitem", b => + { + b.Navigation("ChargeBackAsbitems"); + + b.Navigation("ChargePriceItems"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargeBack", b => + { + b.Navigation("ChargeBackAsbitems"); + + b.Navigation("ChargeBackPays"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ChargeRequest", b => + { + b.Navigation("ChargeRequestAsbitems"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CollectItemType", b => + { + b.Navigation("Asbitems"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ColumnReference", b => + { + b.Navigation("ColumnReferenceCodes"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ColumnReferenceCode", b => + { + b.Navigation("ColumnReferenceInterfaces"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CommonCharType", b => + { + b.Navigation("CommonChars"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CommonTableType", b => + { + b.Navigation("CommonTables"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ContactPerson", b => + { + b.Navigation("ContactMethods"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CriticalFollowValueType", b => + { + b.Navigation("CriticalValues"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrg", b => + { + b.Navigation("ContactPeople"); + + b.Navigation("CustomerOrgRegisters"); + + b.Navigation("OrganizationUnitsCustomerOrgs"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgCharge", b => + { + b.Navigation("CustomerOrgChargeBacks"); + + b.Navigation("CustomerOrgChargePay"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgChargeBack", b => + { + b.Navigation("CustomerOrgChargeBackPays"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgGroup", b => + { + b.Navigation("CustomerOrgGroupDetails"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.CustomerOrgRegister", b => + { + b.Navigation("CustomerOrgCharges"); + + b.Navigation("CustomerOrgGroups"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Department", b => + { + b.Navigation("OrganizationUnitsCustomerOrgs"); + + b.Navigation("ServiceTrades"); + + b.Navigation("UserDepartments"); + + b.Navigation("Users"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Diagnosis", b => + { + b.Navigation("DiagnosisTemplateDetails"); + + b.Navigation("ItemResultMatches"); + + b.Navigation("Suggestions"); + + b.Navigation("SumDiagnoses"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.DiagnosisLevel", b => + { + b.Navigation("Diagnoses"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.DiagnosisTemplate", b => + { + b.Navigation("DiagnosisTemplateDetails"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.FollowUp", b => + { + b.Navigation("PhoneFollowUps"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Grouping", b => + { + b.Navigation("UserGroupings"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.GuideType", b => + { + b.Navigation("ItemTypes"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.InvoiceItemType", b => + { + b.Navigation("CollectItemTypes"); + + b.Navigation("PriceItems"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Item", b => + { + b.Navigation("AsbitemDetails"); + + b.Navigation("ItemResultMatches"); + + b.Navigation("ItemResultTemplateTypes"); + + b.Navigation("ItemResultTemplates"); + + b.Navigation("ItemTemplateDetails"); + + b.Navigation("ReferenceRanges"); + + b.Navigation("RegisterCheckItems"); + + b.Navigation("SexHormoneReferenceRanges"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ItemTemplate", b => + { + b.Navigation("ItemTemplateDetails"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ItemType", b => + { + b.Navigation("Asbitems"); + + b.Navigation("Diagnoses"); + + b.Navigation("Items"); + + b.Navigation("Rooms"); + + b.Navigation("UserItemTypes"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.MaritalStatus", b => + { + b.Navigation("PatientRegisters"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.MedicalConclusionType", b => + { + b.Navigation("MedicalConclusions"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.MedicalPackage", b => + { + b.Navigation("MedicalPackageDetails"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.MedicalReportType", b => + { + b.Navigation("ItemTypes"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Patient", b => + { + b.Navigation("PatientRegisters"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PatientRegister", b => + { + b.Navigation("ChargeRequests"); + + b.Navigation("Charges"); + + b.Navigation("HealthCertificate"); + + b.Navigation("PatientOccupationalDisease"); + + b.Navigation("PatientOccupationalHistories"); + + b.Navigation("PatientOccupationalMedicalHistorys"); + + b.Navigation("PatientPastMedicalHistorys"); + + b.Navigation("PatientPoisons"); + + b.Navigation("PatientSymptoms"); + + b.Navigation("QueueRegisters"); + + b.Navigation("RegisterCheckAsbitems"); + + b.Navigation("SumDiagnoses"); + + b.Navigation("SumSuggestionHeaders"); + + b.Navigation("SumSummaryHeaders"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PayMode", b => + { + b.Navigation("CardBills"); + + b.Navigation("ChargeBackPays"); + + b.Navigation("ChargePays"); + + b.Navigation("CustomerOrgChargeBackPays"); + + b.Navigation("CustomerOrgChargePays"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Poison", b => + { + b.Navigation("PatientPoisons"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.PoisonType", b => + { + b.Navigation("Poisons"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RegisterCheck", b => + { + b.Navigation("RegisterCheckAsbitems"); + + b.Navigation("RegisterCheckItems"); + + b.Navigation("RegisterCheckPacss"); + + b.Navigation("RegisterCheckPictures"); + + b.Navigation("RegisterCheckSuggestions"); + + b.Navigation("RegisterCheckSummaries"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.RegisterCheckPacs", b => + { + b.Navigation("RegisterCheckPacsPictures"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Report", b => + { + b.Navigation("ReportFormats"); + + b.Navigation("ReportPrinters"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ReportFormat", b => + { + b.Navigation("ReportFormatTemplates"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.ResultStatus", b => + { + b.Navigation("RegisterCheckItems"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Room", b => + { + b.Navigation("RoomDetails"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SampleContainer", b => + { + b.Navigation("LisRequests"); + + b.Navigation("SampleGroups"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SampleGroup", b => + { + b.Navigation("SampleGroupDetails"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SampleType", b => + { + b.Navigation("LisRequests"); + + b.Navigation("SampleGroups"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SexHormoneTerm", b => + { + b.Navigation("SexHormoneReferenceRanges"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SumSuggestionHeader", b => + { + b.Navigation("SumSuggestionContents"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SumSummaryHeader", b => + { + b.Navigation("SumSummaryContents"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.Symptom", b => + { + b.Navigation("PatientSymptoms"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SysParm", b => + { + b.Navigation("SysParmValueOptions"); + + b.Navigation("SysParmValues"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.SysParmType", b => + { + b.Navigation("SysParms"); + }); + + modelBuilder.Entity("Shentun.Pacs.Models.User", b => + { + b.Navigation("UserDepartments"); + + b.Navigation("UserGroupings"); + + b.Navigation("UserItemTypes"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Shentun.Pacs.EntityFrameworkCore/Migrations/20241213083723_update_patient_register_check.cs b/src/Shentun.Pacs.EntityFrameworkCore/Migrations/20241213083723_update_patient_register_check.cs new file mode 100644 index 0000000..b9ddced --- /dev/null +++ b/src/Shentun.Pacs.EntityFrameworkCore/Migrations/20241213083723_update_patient_register_check.cs @@ -0,0 +1,119 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Shentun.Pacs.Migrations +{ + public partial class update_patient_register_check : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "fki_fk_patient_register_ororganization_unit", + table: "patient_register"); + + migrationBuilder.DropIndex( + name: "ix_patient_register", + table: "patient_register"); + + migrationBuilder.DropIndex( + name: "ix_patient_register_1", + table: "patient_register"); + + migrationBuilder.AddColumn( + name: "old_item_id", + table: "register_check_item", + type: "character varying(50)", + maxLength: 50, + nullable: true); + + migrationBuilder.AddColumn( + name: "old_asbitem_id", + table: "register_check_asbitem", + type: "character varying(50)", + maxLength: 50, + nullable: true); + + migrationBuilder.AddColumn( + name: "device_id", + table: "patient_register", + type: "uuid", + nullable: false, + defaultValue: new Guid("00000000-0000-0000-0000-000000000000")); + + migrationBuilder.AddColumn( + name: "send_date", + table: "patient_register", + type: "timestamp without time zone", + nullable: true, + comment: "发送时间"); + + migrationBuilder.AddColumn( + name: "send_flag", + table: "patient_register", + type: "character(1)", + nullable: false, + defaultValueSql: "'0'", + comment: "发送状态 0-未发送 1-发送"); + + migrationBuilder.CreateIndex( + name: "ix_patient_register", + table: "patient_register", + column: "patient_register_no"); + + migrationBuilder.CreateIndex( + name: "IX_patient_register_patient_id", + table: "patient_register", + column: "patient_id"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "ix_patient_register", + table: "patient_register"); + + migrationBuilder.DropIndex( + name: "IX_patient_register_patient_id", + table: "patient_register"); + + migrationBuilder.DropColumn( + name: "old_item_id", + table: "register_check_item"); + + migrationBuilder.DropColumn( + name: "old_asbitem_id", + table: "register_check_asbitem"); + + migrationBuilder.DropColumn( + name: "device_id", + table: "patient_register"); + + migrationBuilder.DropColumn( + name: "send_date", + table: "patient_register"); + + migrationBuilder.DropColumn( + name: "send_flag", + table: "patient_register"); + + migrationBuilder.CreateIndex( + name: "fki_fk_patient_register_ororganization_unit", + table: "patient_register", + column: "medical_center_id"); + + migrationBuilder.CreateIndex( + name: "ix_patient_register", + table: "patient_register", + column: "patient_register_no", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_patient_register_1", + table: "patient_register", + columns: new[] { "patient_id", "medical_times" }, + unique: true); + } + } +} diff --git a/src/Shentun.Pacs.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs b/src/Shentun.Pacs.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs index 5513240..ef22624 100644 --- a/src/Shentun.Pacs.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs +++ b/src/Shentun.Pacs.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs @@ -7583,6 +7583,10 @@ namespace Shentun.Pacs.Migrations .HasColumnName("customer_org_register_id") .HasComment("客户单位登记ID"); + b.Property("DeviceId") + .HasColumnType("uuid") + .HasColumnName("device_id"); + b.Property("GuidePrintTimes") .ValueGeneratedOnAdd() .HasColumnType("smallint") @@ -7801,6 +7805,18 @@ namespace Shentun.Pacs.Migrations .HasColumnName("salesman") .HasComment("介绍人"); + b.Property("SendDate") + .HasColumnType("timestamp without time zone") + .HasColumnName("send_date") + .HasComment("发送时间"); + + b.Property("SendFlag") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") + .HasColumnName("send_flag") + .HasDefaultValueSql("'0'") + .HasComment("发送状态 0-未发送 1-发送"); + b.Property("SexHormoneTermId") .HasColumnType("uuid") .HasColumnName("sex_hormone_term_id") @@ -7838,13 +7854,9 @@ namespace Shentun.Pacs.Migrations b.HasIndex("MaritalStatusId"); - b.HasIndex(new[] { "MedicalCenterId" }, "fki_fk_patient_register_ororganization_unit"); + b.HasIndex("PatientId"); - b.HasIndex(new[] { "PatientRegisterNo" }, "ix_patient_register") - .IsUnique(); - - b.HasIndex(new[] { "PatientId", "MedicalTimes" }, "ix_patient_register_1") - .IsUnique(); + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_patient_register"); b.HasIndex(new[] { "PatientName" }, "ix_patient_register_2"); @@ -9064,6 +9076,11 @@ namespace Shentun.Pacs.Migrations .HasColumnName("lis_request_id") .HasComment("LIS申请ID"); + b.Property("OldAsbitemId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("old_asbitem_id"); + b.Property("PatientRegisterId") .HasColumnType("uuid") .HasColumnName("patient_register_id") @@ -9304,6 +9321,11 @@ namespace Shentun.Pacs.Migrations .HasColumnType("uuid") .HasColumnName("last_modifier_id"); + b.Property("OldItemId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("old_item_id"); + b.Property("ReferenceRangeValue") .ValueGeneratedOnAdd() .HasMaxLength(300) diff --git a/src/Shentun.Pacs.HttpApi.Host/appsettings.json b/src/Shentun.Pacs.HttpApi.Host/appsettings.json index e1b3df5..b286745 100644 --- a/src/Shentun.Pacs.HttpApi.Host/appsettings.json +++ b/src/Shentun.Pacs.HttpApi.Host/appsettings.json @@ -61,5 +61,11 @@ "Pacs": { "AuthString": "peis:peis@123", "BaseApiUrl": "http://192.168.2.74:8042" + }, + "OldPeis": { + "ConnectionStrings": "server=192.168.0.3;uid=sa;pwd=;database=reddolphin;Encrypt=false;", + "AsbitemColumnReferenId": "", + "ItemColumnReferenId": "", + "DeviceTypeColumnReferenId": "" } } \ No newline at end of file