12 changed files with 49644 additions and 2 deletions
			
			
		- 
					16src/Shentun.Pacs.Application.Contracts/PacsBusiness/UpdateCheckStatusByRegisterCheckIdInputDto.cs
 - 
					51src/Shentun.Pacs.Application/PacsBusiness/PacsBusinessAppService.cs
 - 
					97src/Shentun.Pacs.Domain/ThirdPacsResults/ThirdPacsResult.cs
 - 
					35src/Shentun.Pacs.EntityFrameworkCore/DbMapping/ThirdPacsResults/ThirdPacsResultDbMapping.cs
 - 
					5src/Shentun.Pacs.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
 - 
					16412src/Shentun.Pacs.EntityFrameworkCore/Migrations/20250616093830_add_third_pacs_result.Designer.cs
 - 
					51src/Shentun.Pacs.EntityFrameworkCore/Migrations/20250616093830_add_third_pacs_result.cs
 - 
					16413src/Shentun.Pacs.EntityFrameworkCore/Migrations/20250616094200_update_third_pacs_result_id_length.Designer.cs
 - 
					33src/Shentun.Pacs.EntityFrameworkCore/Migrations/20250616094200_update_third_pacs_result_id_length.cs
 - 
					16394src/Shentun.Pacs.EntityFrameworkCore/Migrations/20250618020501_update_third_pacs_result_01.Designer.cs
 - 
					60src/Shentun.Pacs.EntityFrameworkCore/Migrations/20250618020501_update_third_pacs_result_01.cs
 - 
					79src/Shentun.Pacs.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs
 
@ -0,0 +1,97 @@ | 
				
			|||
using System; | 
				
			|||
using System.Collections.Generic; | 
				
			|||
using System.ComponentModel.DataAnnotations.Schema; | 
				
			|||
using System.Linq; | 
				
			|||
using System.Text; | 
				
			|||
using System.Threading.Tasks; | 
				
			|||
using Volo.Abp.Domain.Entities.Auditing; | 
				
			|||
using Volo.Abp.Domain.Entities; | 
				
			|||
using System.ComponentModel.DataAnnotations; | 
				
			|||
using Microsoft.EntityFrameworkCore; | 
				
			|||
 | 
				
			|||
namespace Shentun.Pacs.Models | 
				
			|||
{ | 
				
			|||
 | 
				
			|||
    /// <summary>
 | 
				
			|||
    /// 第三方pacs结果
 | 
				
			|||
    /// </summary>
 | 
				
			|||
    [Table("third_pacs_result")] | 
				
			|||
    [Index(nameof(CheckRequestNo), nameof(AsbitemName), Name = "ix_thirdpacsresult_check_request_no_asbitem_name", IsUnique = true)] | 
				
			|||
    public class ThirdPacsResult : Entity<string> | 
				
			|||
    { | 
				
			|||
 | 
				
			|||
        /// <summary>
 | 
				
			|||
        /// 检查单号
 | 
				
			|||
        /// </summary>
 | 
				
			|||
        [Column("check_request_no")] | 
				
			|||
        [StringLength(20)] | 
				
			|||
        public string CheckRequestNo { get; set; } | 
				
			|||
 | 
				
			|||
        /// <summary>
 | 
				
			|||
        /// 姓名
 | 
				
			|||
        /// </summary>
 | 
				
			|||
        [Column("patient_name")] | 
				
			|||
        [StringLength(50)] | 
				
			|||
        public string PatientName { get; set; } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
        /// <summary>
 | 
				
			|||
        /// 性别  M=男  F=女  U=未知
 | 
				
			|||
        /// </summary>
 | 
				
			|||
        [Column("sex_id")] | 
				
			|||
        [MaxLength(1)] | 
				
			|||
        public char? SexId { get; set; } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
        /// <summary>
 | 
				
			|||
        /// 年龄
 | 
				
			|||
        /// </summary>
 | 
				
			|||
        [Column("age")] | 
				
			|||
        public short? Age { get; set; } | 
				
			|||
 | 
				
			|||
        /// <summary>
 | 
				
			|||
        /// 检查项目
 | 
				
			|||
        /// </summary>
 | 
				
			|||
        [Column("asbitem_name")] | 
				
			|||
        [StringLength(50)] | 
				
			|||
        public string AsbitemName { get; set; } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
        /// <summary>
 | 
				
			|||
        /// 检查描述
 | 
				
			|||
        /// </summary>
 | 
				
			|||
        [Column("check_description")] | 
				
			|||
        [StringLength(8000)] | 
				
			|||
        public string CheckDescription { get; set; } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
        /// <summary>
 | 
				
			|||
        /// 检查结论
 | 
				
			|||
        /// </summary>
 | 
				
			|||
        [Column("check_conclusion")] | 
				
			|||
        [StringLength(8000)] | 
				
			|||
        public string CheckConclusion { get; set; } | 
				
			|||
 | 
				
			|||
        /// <summary>
 | 
				
			|||
        /// 检查时间
 | 
				
			|||
        /// </summary>
 | 
				
			|||
        [Column("check_time")] | 
				
			|||
        public DateTime? CheckTime { get; set; } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
        /// <summary>
 | 
				
			|||
        /// 检查医生
 | 
				
			|||
        /// </summary>
 | 
				
			|||
        [Column("check_doctor")] | 
				
			|||
        [StringLength(50)] | 
				
			|||
        public string CheckDoctor { get; set; } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
        /// <summary>
 | 
				
			|||
        /// 创建时间 自动生成
 | 
				
			|||
        /// </summary>
 | 
				
			|||
        public DateTime CreateTime { get; set; } | 
				
			|||
 | 
				
			|||
  | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
@ -0,0 +1,35 @@ | 
				
			|||
using Microsoft.EntityFrameworkCore.Metadata.Builders; | 
				
			|||
using Microsoft.EntityFrameworkCore; | 
				
			|||
using Shentun.Pacs.Models; | 
				
			|||
using System; | 
				
			|||
using System.Collections.Generic; | 
				
			|||
using System.Linq; | 
				
			|||
using System.Text; | 
				
			|||
using System.Threading.Tasks; | 
				
			|||
using Shentun.Pacs.EntityFrameworkCore; | 
				
			|||
 | 
				
			|||
namespace Shentun.Pacs.DbMapping | 
				
			|||
{ | 
				
			|||
  | 
				
			|||
    internal class ThirdPacsResultDbMapping : IEntityTypeConfiguration<ThirdPacsResult> | 
				
			|||
    { | 
				
			|||
        public void Configure(EntityTypeBuilder<ThirdPacsResult> entity) | 
				
			|||
        { | 
				
			|||
            entity.HasComment("第三方pacs结果"); | 
				
			|||
            entity.Property(t => t.CheckRequestNo).HasComment("检查单号").IsRequired(); | 
				
			|||
            entity.Property(t => t.PatientName).HasComment("姓名"); | 
				
			|||
            entity.Property(t => t.SexId).HasComment("性别  M=男  F=女  U=未知"); | 
				
			|||
            entity.Property(t => t.Age).HasComment("年龄"); | 
				
			|||
            entity.Property(t => t.AsbitemName).HasComment("检查项目").IsRequired(); | 
				
			|||
            entity.Property(t => t.CheckDescription).HasComment("检查描述").IsRequired(); | 
				
			|||
            entity.Property(t => t.CheckConclusion).HasComment("检查结论").IsRequired(); | 
				
			|||
            entity.Property(t => t.CheckDoctor).HasComment("检查医生"); | 
				
			|||
            entity.Property(t => t.CheckTime).HasComment("检查时间"); | 
				
			|||
            entity.Property(t => t.CreateTime).HasComment("创建时间").IsRequired().HasDefaultValueSql("date(timezone('UTC-8'::text, now()))"); | 
				
			|||
            entity.Property(e => e.Id).HasMaxLength(50).IsRequired(); | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            entity.ConfigureByConvention(); | 
				
			|||
        } | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
						
							
						
						
							16412
	
						
						src/Shentun.Pacs.EntityFrameworkCore/Migrations/20250616093830_add_third_pacs_result.Designer.cs
						
							File diff suppressed because it is too large
							
							
								
									View File
								
							
						
					
				File diff suppressed because it is too large
							
							
								
									View File
								
							
						@ -0,0 +1,51 @@ | 
				
			|||
using System; | 
				
			|||
using Microsoft.EntityFrameworkCore.Migrations; | 
				
			|||
 | 
				
			|||
#nullable disable | 
				
			|||
 | 
				
			|||
namespace Shentun.Pacs.Migrations | 
				
			|||
{ | 
				
			|||
    public partial class add_third_pacs_result : Migration | 
				
			|||
    { | 
				
			|||
        protected override void Up(MigrationBuilder migrationBuilder) | 
				
			|||
        { | 
				
			|||
            migrationBuilder.CreateTable( | 
				
			|||
                name: "third_pacs_result", | 
				
			|||
                columns: table => new | 
				
			|||
                { | 
				
			|||
                    id = table.Column<string>(type: "text", nullable: false), | 
				
			|||
                    check_request_no = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: false, comment: "检查单号"), | 
				
			|||
                    patient_name = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true, comment: "姓名"), | 
				
			|||
                    sex_id = table.Column<char>(type: "character(1)", maxLength: 1, nullable: true, comment: "性别  M=男  F=女  U=未知"), | 
				
			|||
                    age = table.Column<short>(type: "smallint", nullable: true, comment: "年龄"), | 
				
			|||
                    asbitem_name = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "检查项目"), | 
				
			|||
                    check_description = table.Column<string>(type: "character varying(8000)", maxLength: 8000, nullable: false, comment: "检查描述"), | 
				
			|||
                    check_conclusion = table.Column<string>(type: "character varying(8000)", maxLength: 8000, nullable: false, comment: "检查结论"), | 
				
			|||
                    check_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: true, comment: "检查时间"), | 
				
			|||
                    check_doctor = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true, comment: "检查医生"), | 
				
			|||
                    CreateTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false, defaultValueSql: "date(timezone('UTC-8'::text, now()))", comment: "创建时间"), | 
				
			|||
                    creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), | 
				
			|||
                    creator_id = table.Column<Guid>(type: "uuid", nullable: false), | 
				
			|||
                    last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), | 
				
			|||
                    last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false) | 
				
			|||
                }, | 
				
			|||
                constraints: table => | 
				
			|||
                { | 
				
			|||
                    table.PrimaryKey("PK_third_pacs_result", x => x.id); | 
				
			|||
                }, | 
				
			|||
                comment: "第三方pacs结果"); | 
				
			|||
 | 
				
			|||
            migrationBuilder.CreateIndex( | 
				
			|||
                name: "ix_thirdpacsresult_check_request_no_asbitem_name", | 
				
			|||
                table: "third_pacs_result", | 
				
			|||
                columns: new[] { "check_request_no", "asbitem_name" }, | 
				
			|||
                unique: true); | 
				
			|||
        } | 
				
			|||
 | 
				
			|||
        protected override void Down(MigrationBuilder migrationBuilder) | 
				
			|||
        { | 
				
			|||
            migrationBuilder.DropTable( | 
				
			|||
                name: "third_pacs_result"); | 
				
			|||
        } | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
						
							
						
						
							16413
	
						
						src/Shentun.Pacs.EntityFrameworkCore/Migrations/20250616094200_update_third_pacs_result_id_length.Designer.cs
						
							File diff suppressed because it is too large
							
							
								
									View File
								
							
						
					
				File diff suppressed because it is too large
							
							
								
									View File
								
							
						@ -0,0 +1,33 @@ | 
				
			|||
using Microsoft.EntityFrameworkCore.Migrations; | 
				
			|||
 | 
				
			|||
#nullable disable | 
				
			|||
 | 
				
			|||
namespace Shentun.Pacs.Migrations | 
				
			|||
{ | 
				
			|||
    public partial class update_third_pacs_result_id_length : Migration | 
				
			|||
    { | 
				
			|||
        protected override void Up(MigrationBuilder migrationBuilder) | 
				
			|||
        { | 
				
			|||
            migrationBuilder.AlterColumn<string>( | 
				
			|||
                name: "id", | 
				
			|||
                table: "third_pacs_result", | 
				
			|||
                type: "character varying(50)", | 
				
			|||
                maxLength: 50, | 
				
			|||
                nullable: false, | 
				
			|||
                oldClrType: typeof(string), | 
				
			|||
                oldType: "text"); | 
				
			|||
        } | 
				
			|||
 | 
				
			|||
        protected override void Down(MigrationBuilder migrationBuilder) | 
				
			|||
        { | 
				
			|||
            migrationBuilder.AlterColumn<string>( | 
				
			|||
                name: "id", | 
				
			|||
                table: "third_pacs_result", | 
				
			|||
                type: "text", | 
				
			|||
                nullable: false, | 
				
			|||
                oldClrType: typeof(string), | 
				
			|||
                oldType: "character varying(50)", | 
				
			|||
                oldMaxLength: 50); | 
				
			|||
        } | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
						
							
						
						
							16394
	
						
						src/Shentun.Pacs.EntityFrameworkCore/Migrations/20250618020501_update_third_pacs_result_01.Designer.cs
						
							File diff suppressed because it is too large
							
							
								
									View File
								
							
						
					
				File diff suppressed because it is too large
							
							
								
									View File
								
							
						@ -0,0 +1,60 @@ | 
				
			|||
using System; | 
				
			|||
using Microsoft.EntityFrameworkCore.Migrations; | 
				
			|||
 | 
				
			|||
#nullable disable | 
				
			|||
 | 
				
			|||
namespace Shentun.Pacs.Migrations | 
				
			|||
{ | 
				
			|||
    public partial class update_third_pacs_result_01 : Migration | 
				
			|||
    { | 
				
			|||
        protected override void Up(MigrationBuilder migrationBuilder) | 
				
			|||
        { | 
				
			|||
            migrationBuilder.DropColumn( | 
				
			|||
                name: "creation_time", | 
				
			|||
                table: "third_pacs_result"); | 
				
			|||
 | 
				
			|||
            migrationBuilder.DropColumn( | 
				
			|||
                name: "creator_id", | 
				
			|||
                table: "third_pacs_result"); | 
				
			|||
 | 
				
			|||
            migrationBuilder.DropColumn( | 
				
			|||
                name: "last_modification_time", | 
				
			|||
                table: "third_pacs_result"); | 
				
			|||
 | 
				
			|||
            migrationBuilder.DropColumn( | 
				
			|||
                name: "last_modifier_id", | 
				
			|||
                table: "third_pacs_result"); | 
				
			|||
        } | 
				
			|||
 | 
				
			|||
        protected override void Down(MigrationBuilder migrationBuilder) | 
				
			|||
        { | 
				
			|||
            migrationBuilder.AddColumn<DateTime>( | 
				
			|||
                name: "creation_time", | 
				
			|||
                table: "third_pacs_result", | 
				
			|||
                type: "timestamp without time zone", | 
				
			|||
                nullable: false, | 
				
			|||
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); | 
				
			|||
 | 
				
			|||
            migrationBuilder.AddColumn<Guid>( | 
				
			|||
                name: "creator_id", | 
				
			|||
                table: "third_pacs_result", | 
				
			|||
                type: "uuid", | 
				
			|||
                nullable: false, | 
				
			|||
                defaultValue: new Guid("00000000-0000-0000-0000-000000000000")); | 
				
			|||
 | 
				
			|||
            migrationBuilder.AddColumn<DateTime>( | 
				
			|||
                name: "last_modification_time", | 
				
			|||
                table: "third_pacs_result", | 
				
			|||
                type: "timestamp without time zone", | 
				
			|||
                nullable: false, | 
				
			|||
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); | 
				
			|||
 | 
				
			|||
            migrationBuilder.AddColumn<Guid>( | 
				
			|||
                name: "last_modifier_id", | 
				
			|||
                table: "third_pacs_result", | 
				
			|||
                type: "uuid", | 
				
			|||
                nullable: false, | 
				
			|||
                defaultValue: new Guid("00000000-0000-0000-0000-000000000000")); | 
				
			|||
        } | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
						Write
						Preview
					
					
					Loading…
					
					Cancel
						Save
					
		Reference in new issue