优化数据库表
continuous-integration/drone/push Build is passing Details

IRC_NewDev
hang 2024-09-19 16:40:17 +08:00
parent 4e7ce826c8
commit b98df9dae8
23 changed files with 876 additions and 971 deletions

View File

@ -295,9 +295,9 @@ namespace IRaCIS.Api.Controllers
[HttpGet, Route("user/getPublicKey")]
public IResponseOutput GetPublicKey([FromServices] IOptionsMonitor<IRCEncreptOption> _IRCEncreptOption)
{
var pemPublicKey = Encoding.UTF8.GetString(Convert.FromBase64String(_IRCEncreptOption.CurrentValue.Base64RSAPublicKey));
//var pemPublicKey = Encoding.UTF8.GetString(Convert.FromBase64String(_IRCEncreptOption.CurrentValue.Base64RSAPublicKey));
return ResponseOutput.Ok(pemPublicKey);
return ResponseOutput.Ok(_IRCEncreptOption.CurrentValue.Base64RSAPublicKey);
}

View File

@ -276,6 +276,12 @@ namespace IRaCIS.Application.Services
{
var _IRCEncreptOption = _encreptResponseMonitor.CurrentValue;
var publicKey = Encoding.UTF8.GetString(Convert.FromBase64String(_IRCEncreptOption.Base64RSAPublicKey));
var privateKey = Encoding.UTF8.GetString(Convert.FromBase64String(_IRCEncreptOption.Base64RSAPrivateKey));
Console.WriteLine(RSAEncryption.Encrypt(publicKey, MD5Helper.Md5("123456")));
string plainText = "Hello, BouncyCastle!";
string key = "12345678901234567890123456789012"; // AES 密钥长度应为 16 字节128 位)
string iv = "your-iv-12345678"; // IV 长度为 16 字节
@ -320,13 +326,12 @@ namespace IRaCIS.Application.Services
var publicKey = Encoding.UTF8.GetString(Convert.FromBase64String(_IRCEncreptOption.Base64RSAPublicKey));
var privateKey = Encoding.UTF8.GetString(Convert.FromBase64String(_IRCEncreptOption.Base64RSAPrivateKey));
Console.WriteLine("Public Key:");
Console.WriteLine(privateKey);
Console.WriteLine("\nPrivate Key:");
Console.WriteLine(publicKey);
Console.WriteLine("\nPrivate Key:");
Console.WriteLine(privateKey);
Console.WriteLine("encrept sys Key:");
Console.WriteLine($"\n{RSAEncryption.Encrypt(publicKey, key)}");

View File

@ -1,61 +0,0 @@
//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2022-06-07 14:09:29
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Collections.Generic;
namespace IRaCIS.Core.Domain.Models
{
///<summary>
///是否需要拆表
///</summary>
[Table("SubjectTaskCategory")]
public class SubjectTaskCategory : BaseAddAuditEntity
{
#region 导航属性
[JsonIgnore]
[ForeignKey("SouceReadModuleId")]
public ReadModule ReadModule { get; set; }
[JsonIgnore]
[ForeignKey("SourceSubjectVisitId")]
public SubjectVisit SubjectVisit { get; set; }
[JsonIgnore]
public Subject Subject { get; set; }
#endregion
public Guid TrialId { get; set; }
public string TaskName { get; set; } = string.Empty;
public string TaskBlindName { get; set; } = string.Empty;
//任务来源访视Id 方便回更访视读片状态
public Guid? SourceSubjectVisitId { get; set; }
public Guid? SouceReadModuleId { get; set; }
public ReadingCategory ReadingCategory { get; set; }
public Guid SubjectId { get; set; }
}
}

View File

@ -7,32 +7,32 @@ using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
///<summary>
///CommonDocument
///</summary>
using Microsoft.EntityFrameworkCore;
namespace IRaCIS.Core.Domain.Models;
[Comment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)")]
[Table("CommonDocument")]
public class CommonDocument : BaseFullDeleteAuditEntity
{
public string Code { get; set; } = String.Empty;
public string Name { get; set; } = String.Empty;
public string NameCN { get; set; } = string.Empty;
public string Path { get; set; } = String.Empty;
public string Description { get; set; } = String.Empty;
public CriterionType? CriterionTypeEnum { get; set; }
public CommonDocumentFileType FileTypeEnum { get; set; }
[Comment(" 业务场景")]
public EmailBusinessScenario BusinessScenarioEnum { get; set; }
public string Code { get; set; } = null!;
[Comment(" 系统标准枚举")]
public CriterionType? CriterionTypeEnum { get; set; }
public string Description { get; set; } = null!;
[Comment(" 类型-上传|导出|邮件附件")]
public CommonDocumentFileType FileTypeEnum { get; set; }
public string Name { get; set; } = null!;
public string NameCN { get; set; } = null!;
public string Path { get; set; } = null!;
}
}

View File

@ -1,11 +1,13 @@
using IRaCIS.Core.Domain.Share;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
namespace IRaCIS.Core.Domain.Models;
[Comment("后台 - 字典表(需要同步)")]
[Table("Dictionary")]
public partial class Dictionary : BaseFullAuditEntity
{
@ -27,34 +29,35 @@ namespace IRaCIS.Core.Domain.Models
#endregion
public string ChildGroup { get; set; } = string.Empty;
[StringLength(400)]
public string ChildGroup { get; set; } = null!;
public DicDataTypeEnum DataTypeEnum { get; set; }
[Column("Value")]
public string Value { get; set; } = string.Empty;
[Column("ValueCN")]
public string ValueCN { get; set; } = string.Empty;
[StringLength(512)]
public string Description { get; set; } = string.Empty;
public int ShowOrder { get; set; }
public string Code { get; set; } = string.Empty;
public Guid? ParentId { get; set; }
public bool IsEnable { get; set; }
public string Code { get; set; } = null!;
public Guid? ConfigTypeId { get; set; }
[Comment(" 字典类型- 枚举|bool|下拉框")]
public DicDataTypeEnum DataTypeEnum { get; set; }
[StringLength(512)]
public string Description { get; set; } = null!;
[Comment(" 是否字典类型配置")]
public bool IsConfig { get; set; }
public bool IsEnable { get; set; }
public Guid? ParentId { get; set; }
public int ShowOrder { get; set; }
[StringLength(400)]
public string Value { get; set; } = null!;
[StringLength(400)]
public string ValueCN { get; set; } = null!;
}
}

View File

@ -9,8 +9,8 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Collections.Generic;
namespace IRaCIS.Core.Domain.Models
{
namespace IRaCIS.Core.Domain.Models;
///<summary>
///FrontAuditConfig
///</summary>
@ -114,7 +114,7 @@ namespace IRaCIS.Core.Domain.Models
public string DataType { get; set; } = String.Empty;
// 后端翻译的类型 对应前端界面 "",Dictionary,Date
// 后端翻译的类型 对应前端界面 "" Dictionary Date
public string EnumType { get; set; } = String.Empty;
@ -219,5 +219,3 @@ namespace IRaCIS.Core.Domain.Models
public bool IsDynamicTranslate { get; set; }
}
}

View File

@ -1,8 +1,10 @@
using Microsoft.EntityFrameworkCore;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
namespace IRaCIS.Core.Domain.Models;
//public enum AttachmentType
//{
// Avatar=1,//头像
@ -13,25 +15,35 @@ namespace IRaCIS.Core.Domain.Models
// LargeEquipmentWorkingCertificate=6,//大型器械上岗证
// HighestDegreeCertificate=7//最高学历证书
//}
[Comment("医生 - 简历|证书 文档表")]
[Table("Attachment")]
public partial class Attachment : BaseAddAuditEntity
public class Attachment : BaseAddAuditEntity
{
[JsonIgnore]
public Doctor Doctor { get; set; }
[Comment(" 编码")]
[StringLength(400)]
public string Code { get; set; } = null!;
public Guid DoctorId { get; set; }
public string Type { get; set; } = string.Empty;
public bool IsOfficial { get; set; } = false;
public string Path { get; set; } = string.Empty;
public string Code { get; set; } = string.Empty;
[Comment(" 过期时间")]
public DateTime? ExpiryDate { get; set; }
public string FileName { get; set; } = string.Empty;
//language=1 中文, 2为英文
public int Language { get; set; } = 0;
public string FileName { get; set; } = null!;
//public Guid CreateUserId { get; set; } = Guid.Empty;
//public DateTime? CreateTime { get; set; }
}
[Comment(" 是否正式简历")]
public bool IsOfficial { get; set; }
[Comment(" 1 中文 2为英文")]
public int Language { get; set; }
[StringLength(512)]
public string Path { get; set; } = null!;
[Comment(" 文件类型名")]
[StringLength(400)]
public string Type { get; set; } = null!;
}

View File

@ -1,13 +1,15 @@
using IRaCIS.Core.Domain.Share;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
namespace IRaCIS.Core.Domain.Models;
[Comment("Ò½Éú - »ù´¡ÐÅÏ¢±í")]
[Table("Doctor")]
public partial class Doctor : BaseFullAuditEntity
public class Doctor : BaseFullAuditEntity
{
#region µ¼º½ÊôÐÔ
@ -47,140 +49,146 @@ namespace IRaCIS.Core.Domain.Models
public User User { get; set; }
#endregion
public bool AcceptingNewTrial { get; set; }
public string ReviewerCode { get; set; } = string.Empty;
public bool ActivelyReading { get; set; }
[MaxLength]
public string? AdminComment { get; set; }
public DateTime? AuditTime { get; set; }
public Guid AuditUserId { get; set; }
public string BlindName { get; set; } = null!;
public string BlindNameCN { get; set; } = null!;
[MaxLength]
public string? BlindPublications { get; set; }
[StringLength(400)]
public string ChineseName { get; set; } = null!;
public int Code { get; set; }
public ContractorStatusEnum CooperateStatus { get; set; } = ContractorStatusEnum.Noncooperation;
[StringLength(100)]
public string Phone { get; set; } = string.Empty;
public Guid DepartmentId { get; set; }
[StringLength(400)]
public string DepartmentOther { get; set; } = null!;
[StringLength(400)]
public string DepartmentOtherCN { get; set; } = null!;
[StringLength(400)]
public string EMail { get; set; } = null!;
[StringLength(400)]
public string FirstName { get; set; } = null!;
public int GCP { get; set; }
public Guid GCPId { get; set; }
public Guid HospitalId { get; set; }
public string HospitalOther { get; set; } = null!;
public string HospitalOtherCN { get; set; } = null!;
[StringLength(2000)]
public string Introduction { get; set; } = null!;
public bool IsVirtual { get; set; }
public DateTime? LastLoginTime { get; set; }
[StringLength(400)]
public string LastName { get; set; } = null!;
public int Nation { get; set; }
public Guid OrganizationId { get; set; }
[StringLength(100)]
public string Password { get; set; } = string.Empty;
[MaxLength]
public string? OtherClinicalExperience { get; set; }
[StringLength(50)]
public string ChineseName { get; set; } = string.Empty;
[MaxLength]
public string? OtherClinicalExperienceCN { get; set; }
[StringLength(400)]
public string Password { get; set; } = null!;
[StringLength(100)]
public string FirstName { get; set; } = string.Empty;
[StringLength(400)]
public string Phone { get; set; } = null!;
public string PhotoPath { get; set; } = null!;
[StringLength(100)]
public string LastName { get; set; } = string.Empty;
public string Physician { get; set; } = null!;
public string PhysicianCN { get; set; } = null!;
public Guid? PhysicianId { get; set; }
public Guid? PositionId { get; set; }
[StringLength(400)]
public string PositionOther { get; set; } = null!;
[StringLength(400)]
public string PositionOtherCN { get; set; } = null!;
public Guid RankId { get; set; }
[StringLength(400)]
public string RankOther { get; set; } = null!;
[StringLength(400)]
public string RankOtherCN { get; set; } = null!;
[StringLength(400)]
public string ReadingTypeOther { get; set; } = null!;
[StringLength(400)]
public string ReadingTypeOtherCN { get; set; } = null!;
[StringLength(512)]
public string ResumePath { get; set; } = null!;
public ResumeStatusEnum ResumeStatus { get; set; } = ResumeStatusEnum.Failed;
[StringLength(400)]
public string ReviewerCode { get; set; } = null!;
public ReviewerInformationConfirmStatus ReviewStatus { get; set; } = ReviewerInformationConfirmStatus.ConfirmRefuse;
public int Sex { get; set; }
public Guid SpecialityId { get; set; }
[StringLength(400)]
public string SpecialityOther { get; set; } = null!;
[StringLength(400)]
public string SpecialityOtherCN { get; set; } = null!;
[StringLength(400)]
public string SubspecialityOther { get; set; } = null!;
[StringLength(400)]
public string SubspecialityOtherCN { get; set; } = null!;
[StringLength(400)]
public string WeChat { get; set; } = null!;
[NotMapped]
public string FullName => LastName + " / " + FirstName;
public int Sex { get; set; }
[StringLength(100)]
public string EMail { get; set; } = string.Empty;
[StringLength(100)]
public string WeChat { get; set; } = string.Empty;
[StringLength(1000)]
public string Introduction { get; set; } = string.Empty;
public Guid? DepartmentId { get; set; } = Guid.Empty;
[StringLength(100)]
public string DepartmentOther { get; set; } = string.Empty;
public Guid? PhysicianId { get; set; }
public string Physician { get; set; } = string.Empty;
public string PhysicianCN { get; set; } = string.Empty;
public Guid? RankId { get; set; } = Guid.Empty;
[StringLength(100)]
public string RankOther { get; set; } = string.Empty;
public Guid? PositionId { get; set; } = Guid.Empty;
[StringLength(100)]
public string PositionOther { get; set; } = string.Empty;
// 是否可空 意味着 左连接 否则 一直是内连接
public Guid? HospitalId { get; set; } = Guid.Empty;
[StringLength(200)]
public string HospitalOther { get; set; } = string.Empty;
[StringLength(100)]
public string ReadingTypeOther { get; set; } = string.Empty;
[StringLength(100)]
public string SubspecialityOther { get; set; } = string.Empty;
public int GCP { get; set; }
public Guid? GCPId { get; set; } = Guid.Empty;
public Guid OrganizationId { get; set; } = Guid.Empty;
public string OtherClinicalExperience { get; set; } = string.Empty;
public string OtherClinicalExperienceCN { get; set; } = string.Empty;
public ContractorStatusEnum CooperateStatus { get; set; } = ContractorStatusEnum.Noncooperation;
public ResumeStatusEnum ResumeStatus { get; set; } = ResumeStatusEnum.Failed;
[StringLength(512)]
public string PhotoPath { get; set; } = string.Empty;
[StringLength(512)]
public string ResumePath { get; set; } = string.Empty;
public Guid? SpecialityId { get; set; } = Guid.Empty;
public string SpecialityOther { get; set; } = string.Empty;
public string AdminComment { get; set; } = string.Empty;
public ReviewerInformationConfirmStatus ReviewStatus { get; set; } = ReviewerInformationConfirmStatus.ConfirmRefuse;
public bool AcceptingNewTrial { get; set; } = false;
public bool ActivelyReading { get; set; } = false;
public DateTime? LastLoginTime { get; set; }
public Guid AuditUserId { get; set; } = Guid.Empty;
public DateTime? AuditTime { get; set; }
public int Nation { get; set; } = 0; // 支付类型0-代表中国医生CN1-代表美国医生US
public string ReadingTypeOtherCN { get; set; } = string.Empty;
public string HospitalOtherCN { get; set; } = string.Empty;
public string PositionOtherCN { get; set; } = string.Empty;
public string RankOtherCN { get; set; } = string.Empty;
public string DepartmentOtherCN { get; set; } = string.Empty;
public string SubspecialityOtherCN { get; set; } = string.Empty;
public string SpecialityOtherCN { get; set; } = string.Empty;
public bool IsVirtual { get; set; }
public string BlindName { get; set; } = string.Empty;
public string BlindNameCN { get; set; } = string.Empty;
public string BlindPublications { get; set; } = string.Empty;
}
}

View File

@ -1,9 +1,11 @@
using System;
using Microsoft.EntityFrameworkCore;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
namespace IRaCIS.Core.Domain.Models;
[Comment("归档 - Instance表")]
[Table("DicomInstance")]
public class DicomInstance : BaseFullAuditEntity, IEntitySeqId
{
@ -17,42 +19,67 @@ namespace IRaCIS.Core.Domain.Models
public DicomStudy DicomStudy { get; set; }
#endregion
public Guid SeqId { get; set; }
public Guid StudyId { get; set; }
public Guid SeriesId { get; set; }
public string StudyInstanceUid { get; set; } = String.Empty;
public string SeriesInstanceUid { get; set; } = String.Empty;
public string SopInstanceUid { get; set; } = String.Empty;
public int InstanceNumber { get; set; }
public DateTime? InstanceTime { get; set; }
public bool CPIStatus { get; set; }
public int ImageRows { get; set; }
public int ImageColumns { get; set; }
public int SliceLocation { get; set; }
public string SliceThickness { get; set; } = String.Empty;
public int NumberOfFrames { get; set; }
public string PixelSpacing { get; set; } = String.Empty;
public string ImagerPixelSpacing { get; set; } = String.Empty;
public string FrameOfReferenceUID { get; set; } = String.Empty;
public string WindowCenter { get; set; } = String.Empty;
public string WindowWidth { get; set; } = String.Empty;
public Guid TrialId { get; set; }
public Guid SubjectId { get; set; }
public Guid SubjectVisitId { get; set; }
public bool Anonymize { get; set; }
public string Path { get; set; } = String.Empty;
public string HtmlPath { get; set; } = string.Empty;
public bool CPIStatus { get; set; }
public long? FileSize { get; set; }
[StringLength(500)]
public string FrameOfReferenceUID { get; set; } = null!;
[StringLength(512)]
public string HtmlPath { get; set; } = null!;
public int ImageColumns { get; set; }
public int ImageRows { get; set; }
[StringLength(400)]
public string ImagerPixelSpacing { get; set; } = null!;
public int InstanceNumber { get; set; }
public DateTime? InstanceTime { get; set; }
public int NumberOfFrames { get; set; }
[MaxLength]
[Unicode(false)]
public string Path { get; set; } = null!;
[StringLength(400)]
public string PixelSpacing { get; set; } = null!;
public Guid SeqId { get; set; }
public Guid SeriesId { get; set; }
public string SeriesInstanceUid { get; set; } = null!;
public int SliceLocation { get; set; }
[StringLength(400)]
public string SliceThickness { get; set; } = null!;
public string SopInstanceUid { get; set; } = null!;
public Guid StudyId { get; set; }
public string StudyInstanceUid { get; set; } = null!;
public Guid SubjectId { get; set; }
public Guid SubjectVisitId { get; set; }
public Guid TrialId { get; set; }
[StringLength(400)]
public string WindowCenter { get; set; } = null!;
[StringLength(400)]
public string WindowWidth { get; set; } = null!;
}
}

View File

@ -1,12 +1,13 @@
using System;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
[Table("DicomSeries")]
public class DicomSeries : BaseFullDeleteAuditEntity, IEntitySeqId
namespace IRaCIS.Core.Domain.Models;
[Comment("归档 - 序列表")]
public partial class DicomSeries : BaseFullDeleteAuditEntity, IEntitySeqId
{
#region 导航属性
[JsonIgnore]
@ -20,43 +21,59 @@ namespace IRaCIS.Core.Domain.Models
public List<SubjectCriteriaEvaluationVisitStudyFilter> SubjectCriteriaEvaluationVisitStudyFilterList { get; set; }
#endregion
public string AcquisitionNumber { get; set; } = null!;
public string AcquisitionTime { get; set; } = null!;
public string BodyPartExamined { get; set; } = null!;
public string BodyPartForEdit { get; set; } = null!;
[StringLength(500)]
public string Description { get; set; } = null!;
public string ImageOrientationPatient { get; set; } = null!;
public string ImagePositionPatient { get; set; } = null!;
[StringLength(1600)]
public string ImageResizePath { get; set; } = null!;
public string ImagerPixelSpacing { get; set; } = null!;
public Guid SeqId { get; set; }
public Guid StudyId { get; set; }
public string StudyInstanceUid { get; set; }=string.Empty;
public string SeriesInstanceUid { get; set; } = string.Empty;
public int SeriesNumber { get; set; }
public DateTime? SeriesTime { get; set; }
public string Modality { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public int InstanceCount { get; set; }
public string SliceThickness { get; set; } = string.Empty;
public string ImagePositionPatient { get; set; } = string.Empty;
public string ImageOrientationPatient { get; set; } = string.Empty;
public string BodyPartExamined { get; set; } = string.Empty;
public string SequenceName { get; set; } = string.Empty;
public string ProtocolName { get; set; } = string.Empty;
public string ImagerPixelSpacing { get; set; } = string.Empty;
public string AcquisitionTime { get; set; } = string.Empty;
public string AcquisitionNumber { get; set; } = string.Empty;
public string TriggerTime { get; set; } = string.Empty;
public Guid TrialId { get; set; }
public Guid SubjectId { get; set; }
public Guid SubjectVisitId { get; set; }
public string BodyPartForEdit { get; set; } = string.Empty;
public bool IsReading { get; set; } = true;
public string ImageResizePath { get; set; }=string.Empty;
public string Modality { get; set; } = null!;
[StringLength(500)]
public string ProtocolName { get; set; } = null!;
public Guid SeqId { get; set; }
public string SequenceName { get; set; } = null!;
public string SeriesInstanceUid { get; set; } = null!;
public int SeriesNumber { get; set; }
public DateTime? SeriesTime { get; set; }
public string SliceThickness { get; set; } = null!;
public Guid StudyId { get; set; }
public string StudyInstanceUid { get; set; } = null!;
public Guid SubjectId { get; set; }
public Guid SubjectVisitId { get; set; }
public Guid TrialId { get; set; }
public string TriggerTime { get; set; } = null!;
public Guid? VisitTaskId { get; set; }
}
}
}

View File

@ -1,4 +1,5 @@
using System;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
@ -36,56 +37,73 @@ namespace IRaCIS.Core.Domain.Models
#endregion
public string AccessionNumber { get; set; } = null!;
public string AcquisitionNumber { get; set; } = null!;
public string AcquisitionTime { get; set; } = null!;
[StringLength(512)]
public string BodyPartExamined { get; set; } = null!;
public string BodyPartForEdit { get; set; } = null!;
public int Code { get; set; }
[StringLength(1000)]
public string Description { get; set; } = null!;
public int InstanceCount { get; set; }
[StringLength(400)]
public string InstitutionName { get; set; } = null!;
public bool IsDoubleReview { get; set; }
public bool IsFromPACS { get; set; }
public string Modalities { get; set; } = null!;
public string ModalityForEdit { get; set; } = null!;
public string PatientAge { get; set; } = null!;
public string PatientBirthDate { get; set; } = null!;
public string PatientId { get; set; } = null!;
public string PatientName { get; set; } = null!;
public string PatientSex { get; set; } = null!;
[Comment(" 序列Id 避免内存移动")]
public Guid SeqId { get; set; }
public Guid TrialId { get; set; }
public int SeriesCount { get; set; }
[StringLength(400)]
public string StudyCode { get; set; } = null!;
[Comment(" DicomTag.StudyID")]
public string StudyId { get; set; } = null!;
[StringLength(500)]
public string StudyInstanceUid { get; set; } = null!;
public DateTime? StudyTime { get; set; }
public Guid SubjectId { get; set; }
public Guid SubjectVisitId { get; set; }
public int Code { get; set; } = 0;
public Guid TrialId { get; set; }
public string StudyCode { get; set; } = string.Empty;
public string TriggerTime { get; set; } = null!;
public string StudyInstanceUid { get; set; } = string.Empty;
public DateTime? StudyTime { get; set; }
public string Modalities { get; set; } = string.Empty;
[Comment(" 上传时间")]
public DateTime? UploadedTime { get; set; }
public string Description { get; set; } = string.Empty;
public int SeriesCount { get; set; } = 0;
public int InstanceCount { get; set; } = 0;
public string InstitutionName { get; set; } = string.Empty;
public string PatientId { get; set; } = string.Empty;
public string PatientName { get; set; } = string.Empty;
public string PatientAge { get; set; } = string.Empty;
public string PatientSex { get; set; } = string.Empty;
public string StudyId { get; set; } = string.Empty;
public string AccessionNumber { get; set; } = string.Empty;
public string PatientBirthDate { get; set; } = string.Empty;
public string AcquisitionTime { get; set; } = string.Empty;
public string AcquisitionNumber { get; set; } = string.Empty;
public string TriggerTime { get; set; } = string.Empty;
public string BodyPartExamined { get; set; } = string.Empty;
public string BodyPartForEdit { get; set; } = string.Empty;
public string ModalityForEdit { get; set; } = string.Empty;
//0 未知 1 单重 2 双重
public bool IsDoubleReview { get; set; }
public bool IsFromPACS { get; set; }
public string Uploader { get; set; } = null!;

View File

@ -1,22 +1,30 @@
using Microsoft.EntityFrameworkCore;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
namespace IRaCIS.Core.Domain.Models;
[Comment("机构 - CRO")]
[Table("CROCompany")]
public partial class CRO : BaseFullAuditEntity
public class CRO : BaseFullAuditEntity
{
#region 导航属性
#endregion
public string CROName { get; set; } = string.Empty;
public string CRONameCN { get; set; } = string.Empty;
public string CROCode { get; set; } = string.Empty;
public string CROCode { get; set; } = null!;
[StringLength(1000)]
public string CROName { get; set; } = null!;
[StringLength(1000)]
public string CRONameCN { get; set; } = null!;
[Comment(" 是否是项目级别")]
public bool IsTrialLevel { get; set; }
public Guid? TrialId { get; set; }
}
}

View File

@ -1,12 +1,16 @@
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Domain.Share;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
namespace IRaCIS.Core.Domain.Models
{
namespace IRaCIS.Core.Domain.Models;
[Comment("一致性核查 - 对话记录表")]
[Table("CheckChallengeDialog")]
public class CheckChallengeDialog : BaseAddAuditEntity
{
#region 导航属性
@ -14,16 +18,19 @@ namespace IRaCIS.Core.Domain.Models
public SubjectVisit SubjectVisit { get; set; }
#endregion
public string TalkContent { get; set; } = string.Empty;
[Comment(" CRC是否需要回复 前端使用")]
public bool? IsCRCNeedReply { get; set; }
[Comment(" 核查的检查信息Json")]
[MaxLength]
public string ParamInfo { get; set; } = null!;
public Guid SubjectVisitId { get; set; }
[MaxLength]
public string TalkContent { get; set; } = null!;
[Comment(" 核查过程中的操作用户类型")]
public UserTypeEnum UserTypeEnum { get; set; }
public bool? IsCRCNeedReply { get; set; }
public string ParamInfo { get; set; } = string.Empty;
}
}

View File

@ -1,91 +1,54 @@
using IRaCIS.Core.Domain.Share;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
namespace IRaCIS.Core.Domain.Models
{
///<summary>
/// 临床资料系统配置
///</summary>
namespace IRaCIS.Core.Domain.Models;
[Comment("系统 - 临床数据配置")]
[Table("ClinicalDataSystemSet")]
public class ClinicalDataSystemSet : BaseAddAuditEntity
{
#region 导航属性
#endregion
/// <summary>
/// 枚举(字典里面取的)
/// </summary>
public int ClinicalDataSetEnum { get; set; }
/// <summary>
/// 名称
/// </summary>
public string ClinicalDataSetName { get; set; } = string.Empty;
/// <summary>
/// 是否应用
/// </summary>
public bool IsApply { get; set; } = false;
/// <summary>
/// 英文名称
/// </summary>
public string ClinicalDataSetEnName { get; set; } = string.Empty;
/// <summary>
/// 临床级别
/// </summary>
public ClinicalLevel ClinicalDataLevel { get; set; }
/// <summary>
/// 上传方式
/// </summary>
public ClinicalUploadType ClinicalUploadType { get; set; }
/// <summary>
/// 是否启用
/// </summary>
public bool IsEnable { get; set; }
/// <summary>
/// 上传角色
/// </summary>
public UploadRole UploadRole { get; set; }
/// <summary>
/// 模板文件名称
/// </summary>
public string FileName { get; set; } = string.Empty;
/// <summary>
/// 文件路径
/// </summary>
public string Path { get; set; } = string.Empty;
public string CriterionEnumListStr { get; set; } = String.Empty;
[NotMapped]
public List<int> CriterionEnumList => CriterionEnumListStr.Split('|', StringSplitOptions.RemoveEmptyEntries).Where(t => !string.IsNullOrEmpty(t) && int.TryParse(t.Trim(), out var s)).Select(t => int.Parse(t.Trim())).ToList();
//public List<SystemClinicalDataCriterion> SystemClinicalDataCriterionList { get; set; } = new List<SystemClinicalDataCriterion>();
}
#endregion
public ClinicalLevel ClinicalDataLevel { get; set; }
[StringLength(400)]
public string ClinicalDataSetEnName { get; set; } = null!;
[Comment(" 枚举(字典里面取的)")]
public int ClinicalDataSetEnum { get; set; }
public string ClinicalDataSetName { get; set; } = null!;
[Comment("上传方式")]
public ClinicalUploadType ClinicalUploadType { get; set; }
[StringLength(512)]
public string CriterionEnumListStr { get; set; } = null!;
[StringLength(400)]
public string FileName { get; set; } = null!;
[Comment("是否应用")]
public bool IsApply { get; set; }
public bool IsEnable { get; set; }
[StringLength(4000)]
public string Path { get; set; } = null!;
public UploadRole UploadRole { get; set; }
}

View File

@ -6,12 +6,11 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Collections.Generic;
using System.Linq;
using Microsoft.EntityFrameworkCore;
namespace IRaCIS.Core.Domain.Models
{
///<summary>
/// 临床资料项目配置
///</summary>
namespace IRaCIS.Core.Domain.Models;
[Comment("项目 - 临床数据适应标准配置")]
[Table("ClinicalDataTrialSet")]
public class ClinicalDataTrialSet : BaseAddAuditEntity
{
@ -34,77 +33,38 @@ namespace IRaCIS.Core.Domain.Models
public ClinicalDataSystemSet? ClinicalDataSystemSet { get; set; }
#endregion
public Guid TrialId { get; set; }
/// <summary>
/// 名称
/// </summary>
public string ClinicalDataSetName { get; set; }=string.Empty;
/// <summary>
/// 英文名称
/// </summary>
public string ClinicalDataSetEnName { get; set; } = string.Empty;
/// <summary>
/// 临床级别
/// </summary>
[Comment("临床级别")]
public ClinicalLevel ClinicalDataLevel { get; set; }
[StringLength(400)]
public string ClinicalDataSetEnName { get; set; } = null!;
/// <summary>
/// 上传方式
/// </summary>
public string ClinicalDataSetName { get; set; } = null!;
[Comment("上传方式")]
public ClinicalUploadType ClinicalUploadType { get; set; }
[StringLength(512)]
public string CriterionEnumListStr { get; set; } = null!;
/// <summary>
/// 系统的ClinicalDataSetId
/// </summary>
public Guid? SystemClinicalDataSetId { get; set; }
[StringLength(400)]
public string FileName { get; set; } = null!;
/// <summary>
/// SystemClinicalDataSetId
/// </summary>
[Comment("是否应用")]
public bool IsApply { get; set; }
/// <summary>
/// 是否确认
/// </summary>
public bool IsConfirm { get; set; }
[StringLength(4000)]
public string Path { get; set; } = null!;
/// <summary>
/// 是否应用
/// </summary>
public bool IsApply { get; set; } = false;
public Guid? SystemClinicalDataSetId { get; set; }
public Guid TrialId { get; set; }
/// <summary>
/// 上传角色
/// </summary>
public UploadRole UploadRole { get; set; }
/// <summary>
/// 模板文件名称
/// </summary>
public string FileName { get; set; } = string.Empty;
/// <summary>
/// 文件路径
/// </summary>
public string Path { get; set; } = string.Empty;
public string CriterionEnumListStr { get; set; } = String.Empty;
public List<int> CriterionEnumList => CriterionEnumListStr.Split('|', StringSplitOptions.RemoveEmptyEntries).Where(t => !string.IsNullOrEmpty(t) && int.TryParse(t.Trim(), out var s)).Select(t => int.Parse(t.Trim())).ToList();
}
}

View File

@ -7,11 +7,12 @@ using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
///<summary>
///ClinicalAnswerRowInfo
///</summary>
using Microsoft.EntityFrameworkCore;
namespace IRaCIS.Core.Domain.Models;
[Comment("受试者 - 临床表单表格问题行记录")]
[Table("ClinicalAnswerRowInfo")]
public class ClinicalAnswerRowInfo : BaseAddAuditEntity
{
@ -19,25 +20,18 @@ namespace IRaCIS.Core.Domain.Models
#endregion
public Guid SubjectId { get; set; }
/// <summary>
/// 表单Id
/// </summary>
[Comment(" 表单Id")]
public Guid ClinicalFormId { get; set; }
/// <summary>
/// 问题Id
/// </summary>
[Comment(" 问题Id")]
public Guid QuestionId { get; set; }
/// <summary>
/// RowIndex
/// </summary>
public int RowIndex { get; set; }
[Comment(" 受试者Id")]
public Guid SubjectId { get; set; }
}
}

View File

@ -7,11 +7,11 @@ using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
///<summary>
///ClinicalForm
///</summary>
using Microsoft.EntityFrameworkCore;
namespace IRaCIS.Core.Domain.Models;
[Comment("受试者 - 临床表单")]
[Table("ClinicalForm")]
public class ClinicalForm : BaseAddAuditEntity
{
@ -25,32 +25,24 @@ namespace IRaCIS.Core.Domain.Models
public Subject Subject { get; set; }
#endregion
public Guid SubjectId { get; set; }
public Guid TrialId { get; set; }
/// <summary>
/// 检查日期
/// </summary>
[Comment(" 检查日期")]
public DateTime? CheckDate { get; set; }
/// <summary>
/// 截图地址
/// </summary>
public string PicturePath { get; set; } = string.Empty;
public Guid ClinicalDataTrialSetId { get; set; }
/// <summary>
/// VisitId
/// </summary>
[Comment(" 截图地址")]
[StringLength(4000)]
public string PicturePath { get; set; } = null!;
public Guid? ReadingId { get; set; }
[Comment(" 受试者Id")]
public Guid SubjectId { get; set; }
public Guid TrialId { get; set; }
public Guid? VisitId { get; set; }
}
}

View File

@ -7,11 +7,10 @@ using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
///<summary>
///ClinicalQuestionAnswer
///</summary>
using Microsoft.EntityFrameworkCore;
namespace IRaCIS.Core.Domain.Models;
[Comment("受试者 - 临床表单问题答案")]
[Table("ClinicalQuestionAnswer")]
public class ClinicalQuestionAnswer : BaseAddAuditEntity
{
@ -23,26 +22,21 @@ namespace IRaCIS.Core.Domain.Models
public ClinicalForm ClinicalForm { get; set; }
#endregion
public Guid SubjectId { get; set; }
/// <summary>
/// 表单Id
/// </summary>
public Guid ClinicalFormId { get; set; }
/// <summary>
/// 问题Id
/// </summary>
public Guid QuestionId { get; set; }
public string Answer { get; set; } = string.Empty;
[StringLength(4000)]
public string Answer { get; set; } = null!;
public Guid ClinicalDataTrialSetId { get; set; }
[Comment(" 表单Id")]
public Guid ClinicalFormId { get; set; }
[Comment(" 问题Id")]
public Guid QuestionId { get; set; }
[Comment(" 受试者Id")]
public Guid SubjectId { get; set; }
}
}

View File

@ -7,13 +7,12 @@ using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
///<summary>
///ClinicalTableAnswer
///</summary>
using Microsoft.EntityFrameworkCore;
namespace IRaCIS.Core.Domain.Models;
[Comment("受试者 - 临床表单表格问题答案")]
[Table("ClinicalTableAnswer")]
public class ClinicalTableAnswer : BaseAddAuditEntity
public partial class ClinicalTableAnswer : BaseAddAuditEntity
{
#region 导航属性
[JsonIgnore]
@ -21,23 +20,25 @@ namespace IRaCIS.Core.Domain.Models
public ClinicalAnswerRowInfo ClinicalAnswerRowInfo { get; set; }
#endregion
public Guid SubjectId { get; set; }
[Comment(" 答案")]
[StringLength(4000)]
public string Answer { get; set; } = null!;
[Comment(" 表单Id")]
public Guid ClinicalFormId { get; set; }
[Comment(" 问题Id")]
public Guid QuestionId { get; set; }
[Comment(" 答案行的Id")]
public Guid RowId { get; set; }
public string Answer { get; set; }=string.Empty;
[Comment(" 受试者Id")]
public Guid SubjectId { get; set; }
public Guid TableQuestionId { get; set; }
}
}

View File

@ -7,11 +7,12 @@ using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
/// <summary>
/// 标准病灶中间表
/// </summary>
using Microsoft.EntityFrameworkCore;
namespace IRaCIS.Core.Domain.Models;
[Comment("系统标准 - 病灶器官表 (需要同步)")]
[Table("CriterionNidusSystem")]
public class CriterionNidusSystem : BaseAddAuditEntity
{
@ -20,33 +21,17 @@ namespace IRaCIS.Core.Domain.Models
[JsonIgnore]
public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; }
#endregion
/// <summary>
/// 标准ID
/// </summary>
public Guid CriterionId { get; set; }
/// <summary>
/// 器官类型
/// </summary>
public OrganType OrganType { get; set; }
/// <summary>
/// 病灶类型
/// </summary>
public LesionType LesionType { get; set; }
/// <summary>
/// 是否是系统标准
/// </summary>
public bool IsSystemCriterion { get; set; }
[Comment("病灶类型")]
public LesionType LesionType { get; set; }
[Comment("器官类型")]
public OrganType OrganType { get; set; }
}
}

View File

@ -7,11 +7,10 @@ using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
///<summary>
///CriterionNidusTrial
///</summary>
using Microsoft.EntityFrameworkCore;
namespace IRaCIS.Core.Domain.Models;
[Comment("项目标准 - 病灶器官表")]
[Table("CriterionNidusTrial")]
public class CriterionNidusTrial : BaseAddAuditEntity
{
@ -23,12 +22,9 @@ namespace IRaCIS.Core.Domain.Models
public LesionType LesionType { get; set; }
/// <summary>
/// 器官类型
/// </summary>
public OrganType OrganType { get; set; }
}
}

View File

@ -6,119 +6,95 @@ using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
///<summary>
///DataInspection
///</summary>
using Microsoft.EntityFrameworkCore;
namespace IRaCIS.Core.Domain.Models;
[Comment("稽查 - 记录表")]
[Table("DataInspection")]
public class DataInspection : BaseAddAuditEntity
{
#region 导航属性
[JsonIgnore]
[ForeignKey("TrialReadingCriterionId")]
public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; }
[JsonIgnore]
public VisitTask VisitTask { get; set; }
#endregion
public Guid? TrialId { get; set; }
public Guid? TrialSiteId { get; set; }
public Guid? SubjectId { get; set; }
public Guid? SubjectVisitId { get; set; }
public Guid? VisitTaskId { get; set; }
public VisitTask VisitTask { get; set; }
public string IP { get; set; } = string.Empty;
public string Reason { get; set; } = string.Empty;
public bool IsSign { get; set; }
/// <summary>
/// 签名ID
/// </summary>
public Guid? SignId { get; set; }
/// <summary>
/// 父类ID
/// </summary>
public Guid? ParentId { get; set; }
/// <summary>
/// 子类
/// </summary>
public Guid? ChildrenTypeId { get; set; }
/// <summary>
/// 对象类型
/// </summary>
public Guid? ObjectTypeId { get; set; }
/// <summary>
/// 操作类型
/// </summary>
public Guid? OptTypeId { get; set; }
/// <summary>
/// 功能模块
/// </summary>
public Guid? ModuleTypeId { get; set; }
public string JsonDetail { get; set; } = string.Empty;
public string CreateUserName { get; set; } = string.Empty;
public string CreateUserRealName { get; set; } = string.Empty;
public string RoleName { get; set; } = string.Empty;
/// <summary>
/// 标识
/// </summary>
public string Identification { get; set; } = string.Empty;
/// <summary>
/// 稽查的对象Id
/// </summary>
public Guid? GeneralId { get; set; }
/// <summary>
/// 批次Id
/// </summary>
[Comment(" 批次Id")]
public Guid BatchId { get; set; }
[Comment(" 子类")]
public Guid? ChildrenTypeId { get; set; }
/// <summary>
/// 稽查对象关联的父对象Id
/// </summary>
[Comment(" 创建人姓名")]
public string CreateUserName { get; set; } = null!;
public string CreateUserRealName { get; set; } = null!;
[Comment(" 阅片医生")]
public Guid? DoctorUserId { get; set; }
[Comment(" 被稽查实体名")]
public string EntityName { get; set; } = null!;
[Comment(" 要稽查对象Id")]
public Guid? GeneralId { get; set; }
[Comment(" 标识")]
public string Identification { get; set; } = null!;
public string IP { get; set; } = null!;
[Comment(" 是否是前端添加")]
public bool? IsFrontAdd { get; set; }
public bool? IsSign { get; set; }
[MaxLength]
public string? JsonDetail { get; set; }
[Comment(" 上一条json")]
[MaxLength]
public string? LastJsonDetail { get; set; }
public Guid? ModuleTypeId { get; set; }
[Comment(" 被稽查对象外键1")]
public Guid? ObjectRelationParentId { get; set; }
public Guid? ObjectRelationParentId2 { get; set; }
public Guid? ObjectRelationParentId3 { get; set; }
public Guid? ObjectTypeId { get; set; }
public string EntityName { get; set; } = string.Empty;
public Guid? OptTypeId { get; set; }
[Comment(" 父ID")]
public Guid? ParentId { get; set; }
public string Reason { get; set; } = null!;
[Comment(" 角色名称")]
public string RoleName { get; set; } = null!;
public Guid? SignId { get; set; }
public Guid? SubjectId { get; set; }
public Guid? SubjectVisitId { get; set; }
public Guid? TrialId { get; set; }
public Guid? TrialReadingCriterionId { get; set; }
public Guid? DoctorUserId { get; set; }
public Guid? TrialSiteId { get; set; }
[Comment(" 访视计划ID")]
public Guid? VisitStageId { get; set; }
public Guid? VisitTaskId { get; set; }
}
}

View File

@ -98,9 +98,11 @@ public partial class <#= EntityType.Name #>: BaseFullAuditEntity
[StringLength(<#= maxLength.Value #>)]
<#
}
else if(maxLength.HasValue && maxLength == 200){}
else
{
#>
[MaxLength]
<#
}