From 00fbfb3b057f549723b428afbf92a2321591c578 Mon Sep 17 00:00:00 2001
From: wxd <123@qq.com>
Date: Wed, 25 Dec 2024 10:50:11 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=87=BA=E7=94=9F=E6=97=A5?=
=?UTF-8?q?=E6=9C=9F=E8=BD=AC=E6=8D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Devices/CreateDeviceDto.cs | 5 +
.../Devices/DeviceDto.cs | 6 +
.../Devices/UpdateDeviceDto.cs | 5 +
.../GetPatientRegisterPacsCheckDto.cs | 5 +
...rtPeisCheckDataByCheckRequestNoInputDto.cs | 5 +
.../Devices/DeviceAppService.cs | 5 +-
.../PacsBusiness/PacsBusinessAppService.cs | 145 +-
src/Shentun.Pacs.Domain/Devices/Device.cs | 7 +
.../Devices/DeviceManager.cs | 8 +-
.../DbMapping/Devices/DeviceDbMapping.cs | 5 +-
...pdate_device_add_encoding_flag.Designer.cs | 16293 ++++++++++++++++
...4090148_update_device_add_encoding_flag.cs | 28 +
.../Migrations/PeisDbContextModelSnapshot.cs | 10 +-
src/Shentun.Utilities/LanguageConverter.cs | 1 +
14 files changed, 16493 insertions(+), 35 deletions(-)
create mode 100644 src/Shentun.Pacs.EntityFrameworkCore/Migrations/20241224090148_update_device_add_encoding_flag.Designer.cs
create mode 100644 src/Shentun.Pacs.EntityFrameworkCore/Migrations/20241224090148_update_device_add_encoding_flag.cs
diff --git a/src/Shentun.Pacs.Application.Contracts/Devices/CreateDeviceDto.cs b/src/Shentun.Pacs.Application.Contracts/Devices/CreateDeviceDto.cs
index 4e052ef..e62203a 100644
--- a/src/Shentun.Pacs.Application.Contracts/Devices/CreateDeviceDto.cs
+++ b/src/Shentun.Pacs.Application.Contracts/Devices/CreateDeviceDto.cs
@@ -36,6 +36,11 @@ namespace Shentun.Pacs.Devices
///
public char DeviceImageType { get; set; }
+ ///
+ /// 设备支持的语言编码(0-中文 1-英文) 默认中文
+ ///
+ public char EncodingFlag { get; set; } = '0';
+
}
}
diff --git a/src/Shentun.Pacs.Application.Contracts/Devices/DeviceDto.cs b/src/Shentun.Pacs.Application.Contracts/Devices/DeviceDto.cs
index ec6c43a..24daac4 100644
--- a/src/Shentun.Pacs.Application.Contracts/Devices/DeviceDto.cs
+++ b/src/Shentun.Pacs.Application.Contracts/Devices/DeviceDto.cs
@@ -49,5 +49,11 @@ namespace Shentun.Pacs.Devices
/// 仪器图片类型 (0-仪器图片 1-报告图片)
///
public char DeviceImageType { get; set; }
+
+
+ ///
+ /// 设备支持的语言编码(0-中文 1-英文) 默认中文
+ ///
+ public char EncodingFlag { get; set; }
}
}
diff --git a/src/Shentun.Pacs.Application.Contracts/Devices/UpdateDeviceDto.cs b/src/Shentun.Pacs.Application.Contracts/Devices/UpdateDeviceDto.cs
index 5b3f032..ea3e2ca 100644
--- a/src/Shentun.Pacs.Application.Contracts/Devices/UpdateDeviceDto.cs
+++ b/src/Shentun.Pacs.Application.Contracts/Devices/UpdateDeviceDto.cs
@@ -40,5 +40,10 @@ namespace Shentun.Pacs.Devices
/// 仪器图片类型 (0-仪器图片 1-报告图片)
///
public char DeviceImageType { get; set; }
+
+ ///
+ /// 设备支持的语言编码(0-中文 1-英文) 默认中文
+ ///
+ public char EncodingFlag { get; set; } = '0';
}
}
diff --git a/src/Shentun.Pacs.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckDto.cs b/src/Shentun.Pacs.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckDto.cs
index e524131..8ce32a4 100644
--- a/src/Shentun.Pacs.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckDto.cs
+++ b/src/Shentun.Pacs.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckDto.cs
@@ -40,5 +40,10 @@ namespace Shentun.Pacs.PacsBusiness
/// 项目检查状态 0(为未检), 1(已检), 2(弃检)
///
public char CompleteFlag { get; set; }
+
+ ///
+ /// 项目描述
+ ///
+ public string PacsDesc { get; set; }
}
}
diff --git a/src/Shentun.Pacs.Application.Contracts/PacsBusiness/ImportPeisCheckDataByCheckRequestNoInputDto.cs b/src/Shentun.Pacs.Application.Contracts/PacsBusiness/ImportPeisCheckDataByCheckRequestNoInputDto.cs
index 3e56223..5be7ca5 100644
--- a/src/Shentun.Pacs.Application.Contracts/PacsBusiness/ImportPeisCheckDataByCheckRequestNoInputDto.cs
+++ b/src/Shentun.Pacs.Application.Contracts/PacsBusiness/ImportPeisCheckDataByCheckRequestNoInputDto.cs
@@ -20,5 +20,10 @@ namespace Shentun.Pacs.PacsBusiness
/// 预检Aet
///
public string ScheduledAet { get; set; }
+
+ ///
+ /// 条码模式(0-人员条码 1-检查条码) 默认0-人员条码
+ ///
+ public char BarcodeMode { get; set; } = '0';
}
}
diff --git a/src/Shentun.Pacs.Application/Devices/DeviceAppService.cs b/src/Shentun.Pacs.Application/Devices/DeviceAppService.cs
index aebf880..6563969 100644
--- a/src/Shentun.Pacs.Application/Devices/DeviceAppService.cs
+++ b/src/Shentun.Pacs.Application/Devices/DeviceAppService.cs
@@ -86,7 +86,8 @@ namespace Shentun.Pacs.Devices
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).GetAwaiter().GetResult(),
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).GetAwaiter().GetResult(),
DeviceCode = s.DeviceCode,
- DeviceImageType = s.DeviceImageType
+ DeviceImageType = s.DeviceImageType,
+ EncodingFlag = s.EncodingFlag
}).OrderBy(o => o.DisplayOrder).ToList();
return entdto;
@@ -115,7 +116,7 @@ namespace Shentun.Pacs.Devices
return new GetDeviceImageTypeByDeviceCodeDto
{
- DeviceImageType = deviceEnt.DeviceImageType
+ DeviceImageType = deviceEnt.DeviceImageType
};
}
diff --git a/src/Shentun.Pacs.Application/PacsBusiness/PacsBusinessAppService.cs b/src/Shentun.Pacs.Application/PacsBusiness/PacsBusinessAppService.cs
index 136f15b..49512e1 100644
--- a/src/Shentun.Pacs.Application/PacsBusiness/PacsBusinessAppService.cs
+++ b/src/Shentun.Pacs.Application/PacsBusiness/PacsBusinessAppService.cs
@@ -34,6 +34,7 @@ using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
+using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Uow;
using Volo.Abp.Users;
@@ -388,6 +389,8 @@ namespace Shentun.Pacs.PacsBusiness
join registerCheckAsbitem in await _registerCheckAsbitemRepository.GetQueryableAsync() on registerCheck.Id equals registerCheckAsbitem.RegisterCheckId
join asbitem in await _asbitemRepository.GetQueryableAsync() on registerCheckAsbitem.AsbitemId equals asbitem.Id
join itemType in await _itemTypeRepository.GetQueryableAsync() on asbitem.ItemTypeId equals itemType.Id
+ join device in await _deviceRepository.GetQueryableAsync() on patientRegister.DeviceId equals device.Id into deviceTemp
+ from deviceHaveEmpty in deviceTemp.DefaultIfEmpty()
orderby registerCheck.PacsCheckDate descending
select new
{
@@ -396,6 +399,8 @@ namespace Shentun.Pacs.PacsBusiness
checkRequestNo = registerCheck.CheckRequestNo,
registerCheckCompleteFlag = registerCheck.CompleteFlag,
asbitemName = asbitem.DisplayName,
+ asbitemShortName = !string.IsNullOrWhiteSpace(asbitem.ShortName) ? asbitem.ShortName : asbitem.DisplayName,
+ endAsbitemShortName = !string.IsNullOrWhiteSpace(asbitem.EnglishShortName) ? asbitem.EnglishShortName : asbitem.DisplayName,
asbitemId = registerCheckAsbitem.AsbitemId,
isPacsCheck = registerCheck.IsPacsCheck,
pacsCheckDate = registerCheck.PacsCheckDate,
@@ -403,7 +408,9 @@ namespace Shentun.Pacs.PacsBusiness
registerCheckCreationTime = registerCheck.CreationTime,
registerCheckId = registerCheck.Id,
checkTypeFlag = itemType.CheckTypeFlag,
- deviceId = patientRegister.DeviceId
+ deviceId = patientRegister.DeviceId,
+ encodingFlag = deviceHaveEmpty == null ? '0' : deviceHaveEmpty.EncodingFlag,
+ isFilmRelease = asbitem.IsFilmRelease
};
if (!string.IsNullOrWhiteSpace(input.PatientName))
@@ -501,18 +508,54 @@ namespace Shentun.Pacs.PacsBusiness
int totalCount = checkRequestNoGroup.Count();
+ List entListDto = new List();
+ var entListGroup = checkRequestNoGroup.Skip(input.SkipCount * input.MaxResultCount).Take(input.MaxResultCount);
- var entListDto = checkRequestNoGroup.Skip(input.SkipCount * input.MaxResultCount).Take(input.MaxResultCount)
- .Select(s => new GetPatientRegisterPacsCheckDto
+ foreach (var item in entListGroup)
+ {
+ var fisrtItem = item.FirstOrDefault();
+
+ string pacsDesc = "";
+
+ if (fisrtItem.encodingFlag == '0')
+ {
+ string examDescription = string.Join(",", item.Select(ss => ss.asbitemShortName).Distinct());
+ if (item.Where(m => m.isFilmRelease == 'N').Count() > 0)
+ {
+ examDescription += ",不出片";
+ }
+
+ if (examDescription.Length > 64)
+ {
+ examDescription = examDescription.Substring(0, 64);
+ }
+
+ pacsDesc = examDescription;
+ }
+ else
{
- CheckRequestNo = s.FirstOrDefault().checkRequestNo,
- AsbitemName = s.FirstOrDefault().asbitemName,
- PatientName = s.FirstOrDefault().patientName,
- PacsCheckDate = DataHelper.ConversionDateToString(s.FirstOrDefault().pacsCheckDate),
- PacsUploadDate = DataHelper.ConversionDateToString(s.FirstOrDefault().pacsUploadDate),
- RegisterCheckId = s.Key,
- CompleteFlag = s.FirstOrDefault().registerCheckCompleteFlag
- }).ToList();
+ string examEngDescription = string.Join(",", item.Select(ss => ss.isFilmRelease == 'N' ? ss.endAsbitemShortName + "(BU)" : ss.endAsbitemShortName).Distinct());
+
+ if (examEngDescription.Length > 64)
+ {
+ examEngDescription = examEngDescription.Substring(0, 64);
+ }
+
+ pacsDesc = examEngDescription;
+ }
+
+ entListDto.Add(new GetPatientRegisterPacsCheckDto
+ {
+ CheckRequestNo = fisrtItem.checkRequestNo,
+ AsbitemName = fisrtItem.asbitemName,
+ PatientName = fisrtItem.patientName,
+ PacsCheckDate = DataHelper.ConversionDateToString(fisrtItem.pacsCheckDate),
+ PacsUploadDate = DataHelper.ConversionDateToString(fisrtItem.pacsUploadDate),
+ RegisterCheckId = item.Key,
+ CompleteFlag = fisrtItem.registerCheckCompleteFlag,
+ PacsDesc = pacsDesc
+ });
+ }
return new PagedResultDto(totalCount, entListDto);
@@ -1134,7 +1177,7 @@ namespace Shentun.Pacs.PacsBusiness
if (string.IsNullOrWhiteSpace(input.CheckRequestNo))
{
- throw new UserFriendlyException("检查条码不能为空");
+ throw new UserFriendlyException("条码不能为空");
}
if (string.IsNullOrWhiteSpace(input.DeviceId))
@@ -1182,13 +1225,30 @@ namespace Shentun.Pacs.PacsBusiness
});
+ string registerAsbitemSql = "";
+
+ if (input.BarcodeMode == '0')
+ {
+ registerAsbitemSql = "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.patient_register_id,b.print_barcode_no,b.asbitem_id,b.price,b.standard_price,b.charge_flag,b.payment_mode " +
+ "from patient_register as a left join register_asbitem as b on a.patient_register_id=b.patient_register_id " +
+ " left join asbitem as c on b.asbitem_id=c.asbitem_id " +
+ $" where a.barcode_no='{input.CheckRequestNo}' and c.device_type_id='{oldDeviceTypeId}' ";
+ }
+ else
+ {
- var oldRegisterAsbitemList = await oldDb.Ado.GetDataTableAsync("select a.name as patient_name,a.sex_id,a.mobile_telephone,a.telephone," +
+ registerAsbitemSql = "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.patient_register_id,b.print_barcode_no,b.asbitem_id,b.price,b.standard_price,b.charge_flag,b.payment_mode " +
"from patient_register as a left join register_asbitem as b on a.patient_register_id=b.patient_register_id " +
" left join asbitem as c on b.asbitem_id=c.asbitem_id " +
- $" where b.print_barcode_no='{input.CheckRequestNo}' and c.device_type_id='{oldDeviceTypeId}' ");
+ $" where b.print_barcode_no='{input.CheckRequestNo}' and c.device_type_id='{oldDeviceTypeId}' ";
+
+ }
+
+ var oldRegisterAsbitemList = await oldDb.Ado.GetDataTableAsync(registerAsbitemSql);
if (oldRegisterAsbitemList.Rows.Count > 0)
{
@@ -1246,6 +1306,33 @@ namespace Shentun.Pacs.PacsBusiness
patientQuery = patientQuery.Where(m => m.IdNo == idNo);
}
+
+ #region 出生日期转换
+
+ DateTime? newBirthDate = null;
+ try
+ {
+ string birthDate = row["birth_date"].ToString();
+ if (!string.IsNullOrWhiteSpace(birthDate))
+ {
+ newBirthDate = Convert.ToDateTime(birthDate);
+ }
+ else if (!string.IsNullOrWhiteSpace(idNo))
+ {
+ newBirthDate = ConvertExtr.ToBirthDateByIdNo(idNo);
+ }
+ else if (age != null)
+ {
+ newBirthDate = ConvertExtr.ToBirthDateByAge(age.Value);
+ }
+ }
+ catch (Exception ex)
+ {
+
+ }
+
+ #endregion
+
//档案
var patientEnt = await patientQuery.FirstOrDefaultAsync();
@@ -1253,7 +1340,7 @@ namespace Shentun.Pacs.PacsBusiness
{
patientEnt = new Patient(GuidGenerator.Create())
{
- BirthDate = null,
+ BirthDate = newBirthDate,
BirthPlaceId = null,
DisplayName = patientName,
Email = null,
@@ -1421,7 +1508,7 @@ namespace Shentun.Pacs.PacsBusiness
#endregion
}
- }
+ }
#endregion
entDto = await _patientRegisterAppService.GetPatientRegisterOrNo(tempPatientRegisterId);
@@ -1535,22 +1622,22 @@ namespace Shentun.Pacs.PacsBusiness
foreach (var item in registerCheckPictureList)
{
- string pacsDeviceId = registerCheckFirst.patientRegister.DeviceId.ToString();
+ //string pacsDeviceId = registerCheckFirst.patientRegister.DeviceId.ToString();
- Guid deviceColumnReferenId = Guid.Parse(_configuration.GetValue("OldPeis:DeviceColumnReferenId", Guid.Empty.ToString()));
+ //Guid deviceColumnReferenId = Guid.Parse(_configuration.GetValue("OldPeis:DeviceColumnReferenId", Guid.Empty.ToString()));
- var deviceCodeValues = await _columnReferenceCodeManager.GetInterfaceCodeValueAsync(deviceColumnReferenId, pacsDeviceId);
- if (!deviceCodeValues.Any())
- {
- throw new UserFriendlyException($"Pacs仪器id:{pacsDeviceId}没有对照");
- }
+ //var deviceCodeValues = await _columnReferenceCodeManager.GetInterfaceCodeValueAsync(deviceColumnReferenId, pacsDeviceId);
+ //if (!deviceCodeValues.Any())
+ //{
+ // throw new UserFriendlyException($"Pacs仪器id:{pacsDeviceId}没有对照");
+ //}
- if (deviceCodeValues.Count() > 1)
- {
- throw new UserFriendlyException($"Pacs仪器id:{pacsDeviceId}有多个pacs项目进行了对照");
- }
+ //if (deviceCodeValues.Count() > 1)
+ //{
+ // throw new UserFriendlyException($"Pacs仪器id:{pacsDeviceId}有多个pacs项目进行了对照");
+ //}
- string deviceId = deviceCodeValues.First(); //pacs系统组合项目id
+ //string deviceId = deviceCodeValues.First(); //pacs系统组合项目id
string pictureFilename = $"{shareAddress}{item.PictureFilename.Replace(pacsRequestPath, "/").Replace("//", "/").Replace("/", @"\")}";
@@ -1562,7 +1649,7 @@ namespace Shentun.Pacs.PacsBusiness
new List() {
new SugarParameter("patient_register_id",registerCheckFirst.registerCheckAsbitem.OldPatientRegisterId),
new SugarParameter("asbitem_id",registerCheckFirst.registerCheckAsbitem.OldAsbitemId),
- new SugarParameter("device_id",deviceId),
+ new SugarParameter("device_id",null),
new SugarParameter("picture_filename",pictureFilename),
new SugarParameter("print_flag",'Y'),
new SugarParameter("local_store_flag",'Y'),
diff --git a/src/Shentun.Pacs.Domain/Devices/Device.cs b/src/Shentun.Pacs.Domain/Devices/Device.cs
index 87131ed..f434bed 100644
--- a/src/Shentun.Pacs.Domain/Devices/Device.cs
+++ b/src/Shentun.Pacs.Domain/Devices/Device.cs
@@ -80,6 +80,13 @@ namespace Shentun.Pacs.Models
[MaxLength(1)]
public char DeviceImageType { get; set; }
+ ///
+ /// 设备支持的语言编码(0-中文 1-英文) 默认中文
+ ///
+ [Column("encoding_flag")]
+ [MaxLength(1)]
+ public char EncodingFlag { get; set; }
+
[Column("concurrency_stamp")]
public string ConcurrencyStamp { get; set; }
diff --git a/src/Shentun.Pacs.Domain/Devices/DeviceManager.cs b/src/Shentun.Pacs.Domain/Devices/DeviceManager.cs
index 4e28082..7d594be 100644
--- a/src/Shentun.Pacs.Domain/Devices/DeviceManager.cs
+++ b/src/Shentun.Pacs.Domain/Devices/DeviceManager.cs
@@ -57,7 +57,8 @@ namespace Shentun.Pacs.Devices
DeviceTypeId = entity.DeviceTypeId,
DisplayOrder = await EntityHelper.CreateMaxDisplayOrder(_deviceRepository),
DeviceImageType = entity.DeviceImageType,
- DeviceCode = entity.DeviceCode
+ DeviceCode = entity.DeviceCode,
+ EncodingFlag = entity.EncodingFlag
};
}
@@ -94,6 +95,7 @@ namespace Shentun.Pacs.Devices
targetEntity.AeTitle = sourceEntity.AeTitle;
targetEntity.DeviceImageType = sourceEntity.DeviceImageType;
targetEntity.DeviceCode = sourceEntity.DeviceCode;
+ targetEntity.EncodingFlag = sourceEntity.EncodingFlag;
}
@@ -159,6 +161,10 @@ namespace Shentun.Pacs.Devices
{
throw new ArgumentException($"设备协议只能为0,1");
}
+ if (entity.EncodingFlag != '0' && entity.EncodingFlag != '1')
+ {
+ throw new ArgumentException($"设备支持的语言编码只能为0,1");
+ }
}
diff --git a/src/Shentun.Pacs.EntityFrameworkCore/DbMapping/Devices/DeviceDbMapping.cs b/src/Shentun.Pacs.EntityFrameworkCore/DbMapping/Devices/DeviceDbMapping.cs
index 81bd861..0419a73 100644
--- a/src/Shentun.Pacs.EntityFrameworkCore/DbMapping/Devices/DeviceDbMapping.cs
+++ b/src/Shentun.Pacs.EntityFrameworkCore/DbMapping/Devices/DeviceDbMapping.cs
@@ -22,8 +22,9 @@ namespace Shentun.Pacs.DbMapping
entity.Property(t => t.DeviceProtocolFlag).HasComment("设备协议");
entity.Property(t => t.AeTitle).HasComment("DICOM设备AETitle");
entity.Property(t => t.DeviceCode).HasComment("设备编码");
- entity.Property(t => t.DeviceImageType).HasComment("仪器图片类型").HasDefaultValueSql("'0'"); ;
-
+ entity.Property(t => t.DeviceImageType).HasComment("仪器图片类型").HasDefaultValueSql("'0'");
+ entity.Property(t => t.EncodingFlag).HasComment("设备支持的语言编码(0-中文 1-英文) 默认中文").HasDefaultValueSql("'0'");
+
entity.ConfigureByConvention();
}
}
diff --git a/src/Shentun.Pacs.EntityFrameworkCore/Migrations/20241224090148_update_device_add_encoding_flag.Designer.cs b/src/Shentun.Pacs.EntityFrameworkCore/Migrations/20241224090148_update_device_add_encoding_flag.Designer.cs
new file mode 100644
index 0000000..ef92ac3
--- /dev/null
+++ b/src/Shentun.Pacs.EntityFrameworkCore/Migrations/20241224090148_update_device_add_encoding_flag.Designer.cs
@@ -0,0 +1,16293 @@
+//
+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("20241224090148_update_device_add_encoding_flag")]
+ partial class update_device_add_encoding_flag
+ {
+ 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("EnglishShortName")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("english_short_name")
+ .HasComment("英文简称");
+
+ 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("IsFilmRelease")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("character(1)")
+ .HasColumnName("is_film_release")
+ .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