diff --git a/IRaCIS.Core.API/Controllers/ExtraController.cs b/IRaCIS.Core.API/Controllers/ExtraController.cs index e20a5051e..203a4fc97 100644 --- a/IRaCIS.Core.API/Controllers/ExtraController.cs +++ b/IRaCIS.Core.API/Controllers/ExtraController.cs @@ -295,9 +295,9 @@ namespace IRaCIS.Api.Controllers [HttpGet, Route("user/getPublicKey")] public IResponseOutput GetPublicKey([FromServices] IOptionsMonitor _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); } diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs index f65699bcd..a66522634 100644 --- a/IRaCIS.Core.Application/TestService.cs +++ b/IRaCIS.Core.Application/TestService.cs @@ -253,7 +253,7 @@ namespace IRaCIS.Application.Services public string Code { get; set; } } - public IResponseOutput TestEncreptTest(TestEncrept testModel) + public IResponseOutput TestEncreptTest(TestEncrept testModel) { return ResponseOutput.Ok(testModel); } @@ -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)}"); diff --git a/IRaCIS.Core.Domain/Allocation/SubjectTaskCategory.cs b/IRaCIS.Core.Domain/Allocation/SubjectTaskCategory.cs deleted file mode 100644 index 9cf314130..000000000 --- a/IRaCIS.Core.Domain/Allocation/SubjectTaskCategory.cs +++ /dev/null @@ -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 -{ - /// - ///是否需要拆表 - /// - [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; } - - - - - - - - } - -} diff --git a/IRaCIS.Core.Domain/Common/CommonDocument.cs b/IRaCIS.Core.Domain/Common/CommonDocument.cs index 1b2af8ff8..6e7aad650 100644 --- a/IRaCIS.Core.Domain/Common/CommonDocument.cs +++ b/IRaCIS.Core.Domain/Common/CommonDocument.cs @@ -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 +using Microsoft.EntityFrameworkCore; +namespace IRaCIS.Core.Domain.Models; + + +[Comment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)")] +[Table("CommonDocument")] +public class CommonDocument : BaseFullDeleteAuditEntity { - /// - ///CommonDocument - /// - [Table("CommonDocument")] - public class CommonDocument : BaseFullDeleteAuditEntity - { + [Comment(" 业务场景")] + public EmailBusinessScenario BusinessScenarioEnum { get; set; } - public string Code { get; set; } = String.Empty; + public string Code { get; set; } = null!; + [Comment(" 系统标准枚举")] + public CriterionType? CriterionTypeEnum { get; set; } - public string Name { get; set; } = String.Empty; + public string Description { get; set; } = null!; - public string NameCN { get; set; } = string.Empty; + [Comment(" 类型-上传|导出|邮件附件")] + public CommonDocumentFileType FileTypeEnum { get; set; } - public string Path { get; set; } = String.Empty; + public string Name { get; set; } = null!; + public string NameCN { get; set; } = null!; - public string Description { get; set; } = String.Empty; - - public CriterionType? CriterionTypeEnum { get; set; } - public CommonDocumentFileType FileTypeEnum { get; set; } - public EmailBusinessScenario BusinessScenarioEnum { get; set; } - - - } - + public string Path { get; set; } = null!; } + + diff --git a/IRaCIS.Core.Domain/Common/Dictionary.cs b/IRaCIS.Core.Domain/Common/Dictionary.cs index 6e18c561a..e8483c8fc 100644 --- a/IRaCIS.Core.Domain/Common/Dictionary.cs +++ b/IRaCIS.Core.Domain/Common/Dictionary.cs @@ -1,60 +1,63 @@ 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 { - [Table("Dictionary")] - public partial class Dictionary : BaseFullAuditEntity - { - #region - [JsonIgnore] - public List DoctorDicRelationList { get; set; } = new List(); + #region + [JsonIgnore] + public List DoctorDicRelationList { get; set; } = new List(); - [JsonIgnore] - [ForeignKey("ConfigTypeId")] - public Dictionary ConfigDictionary { get; set; } + [JsonIgnore] + [ForeignKey("ConfigTypeId")] + public Dictionary ConfigDictionary { get; set; } - [JsonIgnore] - [ForeignKey("ParentId")] - public Dictionary Parent { get; set; } - [JsonIgnore] - public List ChildList { get; set; } = new List(); + [JsonIgnore] + [ForeignKey("ParentId")] + public Dictionary Parent { get; set; } + [JsonIgnore] + public List ChildList { get; set; } = new List(); - #endregion + #endregion - public string ChildGroup { get; set; } = string.Empty; + [StringLength(400)] + public string ChildGroup { get; set; } = null!; + public string Code { get; set; } = null!; - public DicDataTypeEnum DataTypeEnum { get; set; } + public Guid? ConfigTypeId { get; set; } + [Comment(" ֵ- ö|bool|")] + public DicDataTypeEnum DataTypeEnum { get; set; } - [Column("Value")] - public string Value { get; set; } = string.Empty; + [StringLength(512)] + public string Description { get; set; } = null!; - [Column("ValueCN")] - public string ValueCN { get; set; } = string.Empty; + [Comment(" Ƿֵ")] + public bool IsConfig { get; set; } + public bool IsEnable { get; set; } - [StringLength(512)] - public string Description { get; set; } = string.Empty; + public Guid? ParentId { get; set; } - public int ShowOrder { get; set; } + public int ShowOrder { get; set; } - public string Code { get; set; } = string.Empty; + [StringLength(400)] + public string Value { get; set; } = null!; - public Guid? ParentId { get; set; } - - public bool IsEnable { get; set; } - - public Guid? ConfigTypeId { get; set; } + [StringLength(400)] + public string ValueCN { get; set; } = null!; - } } diff --git a/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs b/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs index 1efc058dc..235b1ff9a 100644 --- a/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs +++ b/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs @@ -9,215 +9,213 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Collections.Generic; -namespace IRaCIS.Core.Domain.Models +namespace IRaCIS.Core.Domain.Models; + +/// +///FrontAuditConfig +/// +[Table("FrontAuditConfig")] +public class FrontAuditConfig : BaseFullAuditEntity { - /// - ///FrontAuditConfig - /// - [Table("FrontAuditConfig")] - public class FrontAuditConfig : BaseFullAuditEntity - { - #region 导航属性 + #region 导航属性 - #endregion - public string Value { get; set; } = String.Empty; + #endregion + public string Value { get; set; } = String.Empty; - public string ValueCN { get; set; } = String.Empty; + public string ValueCN { get; set; } = String.Empty; - public string Description { get; set; } = String.Empty; + public string Description { get; set; } = String.Empty; - public string DescriptionCN { get; set; } = String.Empty; + public string DescriptionCN { get; set; } = String.Empty; - + - /// - /// 是否有签名 - /// - public bool IsHaveSign { get; set; } + /// + /// 是否有签名 + /// + public bool IsHaveSign { get; set; } - /// - /// 是否有原因 - /// - public bool IsHaveReason { get; set; } + /// + /// 是否有原因 + /// + public bool IsHaveReason { get; set; } - /// - /// 是否完成 - /// - public bool IsFinish { get; set; } + /// + /// 是否完成 + /// + public bool IsFinish { get; set; } - /// - /// 是否加入计划 - /// - public bool IsJoinPlan { get; set; } + /// + /// 是否加入计划 + /// + public bool IsJoinPlan { get; set; } - /// - /// 标识 - /// - public string Identification { get; set; } = string.Empty; + /// + /// 标识 + /// + public string Identification { get; set; } = string.Empty; - public Guid? ParentId { get; set; } + public Guid? ParentId { get; set; } - public bool IsEnable { get; set; } + public bool IsEnable { get; set; } - public int Sort { get; set; } + public int Sort { get; set; } - public Guid? ModuleTypeId { get; set; } + public Guid? ModuleTypeId { get; set; } - public Guid? ObjectTypeId { get; set; } - public Guid? OptTypeId { get; set; } + public Guid? ObjectTypeId { get; set; } + public Guid? OptTypeId { get; set; } - public Guid? ChildrenTypeId { get; set; } + public Guid? ChildrenTypeId { get; set; } - public int IsShowParent { get; set; } + public int IsShowParent { get; set; } - public string InterfaceName { get; set; } = String.Empty; + public string InterfaceName { get; set; } = String.Empty; - //前端使用 C M - public string ConfigType { get; set; } = String.Empty; + //前端使用 C M + public string ConfigType { get; set; } = String.Empty; - //翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了 - public string Code { get; set; } = String.Empty; + //翻译的字段名 这里有可能是一个数组名 那么具体的翻译字段名就不是这个了 + public string Code { get; set; } = String.Empty; - /// - /// 字段的英文值 - /// - public string CodeEn { get; set; } = string.Empty; + /// + /// 字段的英文值 + /// + public string CodeEn { get; set; } = string.Empty; - //前端渲染数组 数组名 和数组值 - public string ChildDataLabel { get; set; } = String.Empty; + //前端渲染数组 数组名 和数组值 + public string ChildDataLabel { get; set; } = String.Empty; - /// - /// 前端渲染数组 数组名 和数组值 英文名称 - /// - public string ChildDataEnLabel { get; set; } = string.Empty; - - public string ChildDataValue { get; set; } = String.Empty; + /// + /// 前端渲染数组 数组名 和数组值 英文名称 + /// + public string ChildDataEnLabel { get; set; } = string.Empty; + + public string ChildDataValue { get; set; } = String.Empty; - /// - /// 翻译的字典名(单个字段翻译的时候) - /// + /// + /// 翻译的字典名(单个字段翻译的时候) + /// - public string DictionaryCode { get; set; } = String.Empty; + public string DictionaryCode { get; set; } = String.Empty; - /// - /// 前端展示类型 Router, Array,Table - /// + /// + /// 前端展示类型 Router, Array,Table + /// - public string DataType { get; set; } = String.Empty; + public string DataType { get; set; } = String.Empty; - // 后端翻译的类型 对应前端界面 "",Dictionary,Date - public string EnumType { get; set; } = String.Empty; + // 后端翻译的类型 对应前端界面 "" Dictionary Date + public string EnumType { get; set; } = String.Empty; - /// - /// 翻译的类型 FrontAudit 的描述 可能是Id Code - /// - public string DictionaryType { get; set; } = String.Empty; + /// + /// 翻译的类型 FrontAudit 的描述 可能是Id Code + /// + public string DictionaryType { get; set; } = String.Empty; - /// - /// 后端翻译的 日期类型 - /// + /// + /// 后端翻译的 日期类型 + /// - public string DateType { get; set; } = String.Empty; + public string DateType { get; set; } = String.Empty; - /// 字典表 - public string ForeignKeyTableName { get; set; } = String.Empty; + /// 字典表 + public string ForeignKeyTableName { get; set; } = String.Empty; - /// 字典Value - public string ForeignKeyValue { get; set; } = String.Empty; + /// 字典Value + public string ForeignKeyValue { get; set; } = String.Empty; - /// 字典 - public string ForeignKeyText { get; set; } = String.Empty; + /// 字典 + public string ForeignKeyText { get; set; } = String.Empty; - /// - /// 英文的翻译 - /// - public string ForeignKeyEnText { get; set; } = string.Empty; + /// + /// 英文的翻译 + /// + public string ForeignKeyEnText { get; set; } = string.Empty; - public string TableConfigJsonStr { get; set; } = String.Empty; + public string TableConfigJsonStr { get; set; } = String.Empty; - public string UrlConfigJsonStr { get; set; } = String.Empty; + public string UrlConfigJsonStr { get; set; } = String.Empty; - #region 废弃 - //未知是否有用 - public bool IsConfig { get; set; } - /// - /// 是否为特殊类型 - /// - public bool IsSpecialType { get; set; } - public string DictionaryKey { get; set; } = string.Empty; + #region 废弃 + //未知是否有用 + public bool IsConfig { get; set; } + /// + /// 是否为特殊类型 + /// + public bool IsSpecialType { get; set; } + public string DictionaryKey { get; set; } = string.Empty; - public bool IsShowByTrialConfig { get; set; } - public string TrialConfigRelyFieldName { get; set; } = string.Empty; + public bool IsShowByTrialConfig { get; set; } + public string TrialConfigRelyFieldName { get; set; } = string.Empty; - #endregion - - } - - - - - public class UrlConfig - { - public bool IsRoute { get; set; } - - public string RoutePath { get; set; } = string.Empty; - - public bool IsHaveParameters { get; set; } - - public List ParameterList { get; set; } = new List(); - - public class ParameterConfig - { - public string UrlParameterName { get; set; } = String.Empty; - public string UrlParameterValueName { get; set; } = String.Empty; - } - } - - public class TableConfig - { - public bool IsList { get; set; } - public string ListName { get; set; } = String.Empty; - public bool IsFixedColumn { get; set; } - public string FixedColumnName { get; set; } = String.Empty; - - public string FixedColumnEnName { get; set; } = String.Empty; - public string ColumnName { get; set; } = String.Empty; - public string ColumnValue { get; set; } = String.Empty; - public bool IsMerge { get; set; } - public string MergeColumnName { get; set; } = String.Empty; - - public string MergeColumnEnName { get; set; } = String.Empty; - - public string ColumnEnName { get; set; } = String.Empty; - public bool IsPicture { get; set; } - - - public bool IsNeedTransalate { get; set; } - public string TranslateDictionaryName { get; set; } = String.Empty; - - - public bool IsDynamicTranslate { get; set; } - - } + #endregion + +} + + + + +public class UrlConfig +{ + public bool IsRoute { get; set; } + + public string RoutePath { get; set; } = string.Empty; + + public bool IsHaveParameters { get; set; } + + public List ParameterList { get; set; } = new List(); + + public class ParameterConfig + { + public string UrlParameterName { get; set; } = String.Empty; + public string UrlParameterValueName { get; set; } = String.Empty; + } +} + +public class TableConfig +{ + public bool IsList { get; set; } + public string ListName { get; set; } = String.Empty; + public bool IsFixedColumn { get; set; } + public string FixedColumnName { get; set; } = String.Empty; + + public string FixedColumnEnName { get; set; } = String.Empty; + public string ColumnName { get; set; } = String.Empty; + public string ColumnValue { get; set; } = String.Empty; + public bool IsMerge { get; set; } + public string MergeColumnName { get; set; } = String.Empty; + + public string MergeColumnEnName { get; set; } = String.Empty; + + public string ColumnEnName { get; set; } = String.Empty; + public bool IsPicture { get; set; } + + + public bool IsNeedTransalate { get; set; } + public string TranslateDictionaryName { get; set; } = String.Empty; + + + public bool IsDynamicTranslate { get; set; } } diff --git a/IRaCIS.Core.Domain/Dcotor/Attachment.cs b/IRaCIS.Core.Domain/Dcotor/Attachment.cs index 85aaf8f47..858043679 100644 --- a/IRaCIS.Core.Domain/Dcotor/Attachment.cs +++ b/IRaCIS.Core.Domain/Dcotor/Attachment.cs @@ -1,37 +1,49 @@ +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,//头像 +// Resume=2,//简历 +// GCP=3,//GCP证书 +// MedicalLicence=4,//医师资格证 +// PracticeCertificate=5,//执业资格证 +// LargeEquipmentWorkingCertificate=6,//大型器械上岗证 +// HighestDegreeCertificate=7//最高学历证书 +//} +[Comment("医生 - 简历|证书 文档表")] +[Table("Attachment")] +public class Attachment : BaseAddAuditEntity { - //public enum AttachmentType - //{ - // Avatar=1,//头像 - // Resume=2,//简历 - // GCP=3,//GCP证书 - // MedicalLicence=4,//医师资格证 - // PracticeCertificate=5,//执业资格证 - // LargeEquipmentWorkingCertificate=6,//大型器械上岗证 - // HighestDegreeCertificate=7//最高学历证书 - //} - [Table("Attachment")] - public partial class Attachment : BaseAddAuditEntity - { - [JsonIgnore] - public Doctor Doctor { get; set; } + [JsonIgnore] + public Doctor Doctor { get; set; } - 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; - public DateTime? ExpiryDate { get; set; } - public string FileName { get; set; } = string.Empty; + [Comment(" 编码")] + [StringLength(400)] + public string Code { get; set; } = null!; - //language=1 中文, 2为英文 - public int Language { get; set; } = 0; + public Guid DoctorId { get; set; } - //public Guid CreateUserId { get; set; } = Guid.Empty; - //public DateTime? CreateTime { get; set; } - } + [Comment(" 过期时间")] + public DateTime? ExpiryDate { get; set; } + + public string FileName { get; set; } = null!; + + [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!; } diff --git a/IRaCIS.Core.Domain/Dcotor/Doctor.cs b/IRaCIS.Core.Domain/Dcotor/Doctor.cs index 0d698ebb9..d05e5b886 100644 --- a/IRaCIS.Core.Domain/Dcotor/Doctor.cs +++ b/IRaCIS.Core.Domain/Dcotor/Doctor.cs @@ -1,186 +1,194 @@ 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 class Doctor : BaseFullAuditEntity { - [Table("Doctor")] - public partial class Doctor : BaseFullAuditEntity - { - #region + #region - // - [JsonIgnore] - public List DoctorDicRelationList { get; set; } = new List(); - [JsonIgnore] - public List TrialExperienceCriteriaList { get; set; } + // + [JsonIgnore] + public List DoctorDicRelationList { get; set; } = new List(); + [JsonIgnore] + public List TrialExperienceCriteriaList { get; set; } - [JsonIgnore] - public List EnrollList { get; set; } + [JsonIgnore] + public List EnrollList { get; set; } - [JsonIgnore] - [ForeignKey("HospitalId")] - public Hospital Hospital { get; set; } - [JsonIgnore] - [ForeignKey("SpecialityId")] - public virtual Dictionary Speciality { get; set; } - [JsonIgnore] - [ForeignKey("DepartmentId")] - public virtual Dictionary Department { get; set; } + [JsonIgnore] + [ForeignKey("HospitalId")] + public Hospital Hospital { get; set; } + [JsonIgnore] + [ForeignKey("SpecialityId")] + public virtual Dictionary Speciality { get; set; } + [JsonIgnore] + [ForeignKey("DepartmentId")] + public virtual Dictionary Department { get; set; } - [JsonIgnore] - [ForeignKey("RankId")] - public virtual Dictionary Rank { get; set; } + [JsonIgnore] + [ForeignKey("RankId")] + public virtual Dictionary Rank { get; set; } - [JsonIgnore] - [ForeignKey("PositionId")] - public virtual Dictionary Position { get; set; } - [JsonIgnore] - public List AttachmentList { get; set; } - [JsonIgnore] - public List CriterionFileList { get; set; } + [JsonIgnore] + [ForeignKey("PositionId")] + public virtual Dictionary Position { get; set; } + [JsonIgnore] + public List AttachmentList { get; set; } + [JsonIgnore] + public List CriterionFileList { get; set; } - [JsonIgnore] - public User User { get; set; } - #endregion + [JsonIgnore] + public User User { get; set; } + #endregion + public bool AcceptingNewTrial { get; set; } - public string ReviewerCode { get; set; } = string.Empty; + public bool ActivelyReading { get; set; } - public int Code { get; set; } + [MaxLength] + public string? AdminComment { get; set; } - [StringLength(100)] - public string Phone { get; set; } = string.Empty; + public DateTime? AuditTime { get; set; } + public Guid AuditUserId { get; set; } - [StringLength(100)] - public string Password { get; set; } = string.Empty; + public string BlindName { get; set; } = null!; + public string BlindNameCN { get; set; } = null!; - [StringLength(50)] - public string ChineseName { get; set; } = string.Empty; + [MaxLength] + public string? BlindPublications { get; set; } - [StringLength(100)] - public string FirstName { get; set; } = string.Empty; + [StringLength(400)] + public string ChineseName { get; set; } = null!; + public int Code { get; set; } - [StringLength(100)] - public string LastName { get; set; } = string.Empty; + public ContractorStatusEnum CooperateStatus { get; set; } = ContractorStatusEnum.Noncooperation; - [NotMapped] - public string FullName => LastName + " / " + FirstName; + public Guid DepartmentId { get; set; } - public int Sex { get; set; } + [StringLength(400)] + public string DepartmentOther { get; set; } = null!; + [StringLength(400)] + public string DepartmentOtherCN { get; set; } = null!; - [StringLength(100)] - public string EMail { get; set; } = string.Empty; + [StringLength(400)] + public string EMail { get; set; } = null!; + [StringLength(400)] + public string FirstName { get; set; } = null!; - [StringLength(100)] - public string WeChat { get; set; } = string.Empty; + public int GCP { get; set; } + public Guid GCPId { get; set; } - [StringLength(1000)] - public string Introduction { get; set; } = string.Empty; + public Guid HospitalId { get; set; } - public Guid? DepartmentId { get; set; } = Guid.Empty; + public string HospitalOther { get; set; } = null!; + public string HospitalOtherCN { get; set; } = null!; - [StringLength(100)] - public string DepartmentOther { get; set; } = string.Empty; + [StringLength(2000)] + public string Introduction { get; set; } = null!; - public Guid? PhysicianId { get; set; } - public string Physician { get; set; } = string.Empty; - public string PhysicianCN { get; set; } = string.Empty; + public bool IsVirtual { get; set; } - public Guid? RankId { get; set; } = Guid.Empty; + public DateTime? LastLoginTime { get; set; } + [StringLength(400)] + public string LastName { get; set; } = null!; - [StringLength(100)] - public string RankOther { get; set; } = string.Empty; + public int Nation { get; set; } - public Guid? PositionId { get; set; } = Guid.Empty; + public Guid OrganizationId { get; set; } - [StringLength(100)] - public string PositionOther { get; set; } = string.Empty; + [MaxLength] + public string? OtherClinicalExperience { get; set; } - // Ƿɿ ζ һֱ - public Guid? HospitalId { get; set; } = Guid.Empty; + [MaxLength] + public string? OtherClinicalExperienceCN { get; set; } - [StringLength(200)] - public string HospitalOther { get; set; } = string.Empty; + [StringLength(400)] + public string Password { get; set; } = null!; - [StringLength(100)] - public string ReadingTypeOther { get; set; } = string.Empty; + [StringLength(400)] + public string Phone { get; set; } = null!; + public string PhotoPath { get; set; } = null!; - [StringLength(100)] - public string SubspecialityOther { get; set; } = string.Empty; + public string Physician { get; set; } = null!; - public int GCP { get; set; } + public string PhysicianCN { get; set; } = null!; - public Guid? GCPId { get; set; } = Guid.Empty; + public Guid? PhysicianId { get; set; } - public Guid OrganizationId { get; set; } = Guid.Empty; + public Guid? PositionId { get; set; } - public string OtherClinicalExperience { get; set; } = string.Empty; - public string OtherClinicalExperienceCN { get; set; } = string.Empty; + [StringLength(400)] + public string PositionOther { get; set; } = null!; - public ContractorStatusEnum CooperateStatus { get; set; } = ContractorStatusEnum.Noncooperation; + [StringLength(400)] + public string PositionOtherCN { get; set; } = null!; - public ResumeStatusEnum ResumeStatus { get; set; } = ResumeStatusEnum.Failed; + public Guid RankId { get; set; } + [StringLength(400)] + public string RankOther { get; set; } = null!; + [StringLength(400)] + public string RankOtherCN { get; set; } = null!; - [StringLength(512)] - public string PhotoPath { get; set; } = string.Empty; + [StringLength(400)] + public string ReadingTypeOther { get; set; } = null!; - [StringLength(512)] - public string ResumePath { get; set; } = string.Empty; - public Guid? SpecialityId { get; set; } = Guid.Empty; + [StringLength(400)] + public string ReadingTypeOtherCN { get; set; } = null!; - public string SpecialityOther { get; set; } = string.Empty; + [StringLength(512)] + public string ResumePath { get; set; } = null!; - public string AdminComment { get; set; } = string.Empty; + public ResumeStatusEnum ResumeStatus { get; set; } = ResumeStatusEnum.Failed; - public ReviewerInformationConfirmStatus ReviewStatus { get; set; } = ReviewerInformationConfirmStatus.ConfirmRefuse; + [StringLength(400)] + public string ReviewerCode { get; set; } = null!; - public bool AcceptingNewTrial { get; set; } = false; - public bool ActivelyReading { get; set; } = false; + public ReviewerInformationConfirmStatus ReviewStatus { get; set; } = ReviewerInformationConfirmStatus.ConfirmRefuse; - public DateTime? LastLoginTime { get; set; } + public int Sex { get; set; } - public Guid AuditUserId { get; set; } = Guid.Empty; + public Guid SpecialityId { get; set; } - public DateTime? AuditTime { get; set; } + [StringLength(400)] + public string SpecialityOther { get; set; } = null!; - public int Nation { get; set; } = 0; // ֧ͣ0-йҽCN1-ҽUS + [StringLength(400)] + public string SpecialityOtherCN { get; set; } = null!; + [StringLength(400)] + public string SubspecialityOther { get; set; } = null!; - 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; + [StringLength(400)] + public string SubspecialityOtherCN { get; set; } = null!; + [StringLength(400)] + public string WeChat { get; set; } = null!; - public bool IsVirtual { get; set; } + [NotMapped] + public string FullName => LastName + " / " + FirstName; - public string BlindName { get; set; } = string.Empty; - public string BlindNameCN { get; set; } = string.Empty; - - - public string BlindPublications { get; set; } = string.Empty; - } } diff --git a/IRaCIS.Core.Domain/Image/DicomInstance.cs b/IRaCIS.Core.Domain/Image/DicomInstance.cs index 8893ae3b8..4931c820d 100644 --- a/IRaCIS.Core.Domain/Image/DicomInstance.cs +++ b/IRaCIS.Core.Domain/Image/DicomInstance.cs @@ -1,58 +1,85 @@ -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 { - [Table("DicomInstance")] - public class DicomInstance : BaseFullAuditEntity, IEntitySeqId - { - #region 导航属性 - [JsonIgnore] - [ForeignKey("SeriesId")] - public DicomSeries DicomSerie { get; set; } + #region 导航属性 + [JsonIgnore] + [ForeignKey("SeriesId")] + public DicomSeries DicomSerie { get; set; } - [JsonIgnore] - [ForeignKey("StudyId")] - public DicomStudy DicomStudy { get; set; } - #endregion + [JsonIgnore] + [ForeignKey("StudyId")] + public DicomStudy DicomStudy { get; set; } + #endregion + + public bool Anonymize { get; set; } + + 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!; - 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; } + [StringLength(400)] + public string PixelSpacing { get; set; } = null!; + public Guid SeqId { get; set; } - public string SliceThickness { get; set; } = String.Empty; - public int NumberOfFrames { get; set; } - public string PixelSpacing { get; set; } = String.Empty; + public Guid SeriesId { get; set; } - 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 string SeriesInstanceUid { get; set; } = null!; + public int SliceLocation { get; set; } - public Guid TrialId { get; set; } + [StringLength(400)] + public string SliceThickness { get; set; } = null!; - public Guid SubjectId { get; set; } - public Guid SubjectVisitId { get; set; } - public bool Anonymize { get; set; } - public string Path { get; set; } = String.Empty; + public string SopInstanceUid { get; set; } = null!; - public string HtmlPath { get; set; } = string.Empty; + public Guid StudyId { get; set; } - public long? FileSize { 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!; } + + diff --git a/IRaCIS.Core.Domain/Image/DicomSeries.cs b/IRaCIS.Core.Domain/Image/DicomSeries.cs index a6f3b5ae0..7ac515c26 100644 --- a/IRaCIS.Core.Domain/Image/DicomSeries.cs +++ b/IRaCIS.Core.Domain/Image/DicomSeries.cs @@ -1,62 +1,79 @@ -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 +namespace IRaCIS.Core.Domain.Models; + +[Comment("归档 - 序列表")] +public partial class DicomSeries : BaseFullDeleteAuditEntity, IEntitySeqId { - [Table("DicomSeries")] - public class DicomSeries : BaseFullDeleteAuditEntity, IEntitySeqId - { - #region 导航属性 - [JsonIgnore] - [ForeignKey("StudyId")] - public DicomStudy DicomStudy { get; set; } + #region 导航属性 + [JsonIgnore] + [ForeignKey("StudyId")] + public DicomStudy DicomStudy { get; set; } - [JsonIgnore] - public List DicomInstanceList { get; set; } + [JsonIgnore] + public List DicomInstanceList { get; set; } - [JsonIgnore] - public List SubjectCriteriaEvaluationVisitStudyFilterList { get; set; } - #endregion + [JsonIgnore] + public List SubjectCriteriaEvaluationVisitStudyFilterList { get; set; } + #endregion + public string AcquisitionNumber { get; set; } = null!; + public string AcquisitionTime { 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 BodyPartExamined { get; set; } = null!; - 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 BodyPartForEdit { get; set; } = null!; - public string AcquisitionTime { get; set; } = string.Empty; - public string AcquisitionNumber { get; set; } = string.Empty; - public string TriggerTime { get; set; } = string.Empty; + [StringLength(500)] + public string Description { get; set; } = null!; - public Guid TrialId { get; set; } + public string ImageOrientationPatient { get; set; } = null!; - public Guid SubjectId { get; set; } - public Guid SubjectVisitId { get; set; } + public string ImagePositionPatient { get; set; } = null!; + [StringLength(1600)] + public string ImageResizePath { get; set; } = null!; - public string BodyPartForEdit { get; set; } = string.Empty; + public string ImagerPixelSpacing { get; set; } = null!; - public bool IsReading { get; set; } = true; + public int InstanceCount { get; set; } - public string ImageResizePath { get; set; }=string.Empty; + public bool IsReading { get; set; } = true; - public Guid? VisitTaskId { get; set; } + 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; } } + diff --git a/IRaCIS.Core.Domain/Image/DicomStudy.cs b/IRaCIS.Core.Domain/Image/DicomStudy.cs index be3b91965..02d3bfabe 100644 --- a/IRaCIS.Core.Domain/Image/DicomStudy.cs +++ b/IRaCIS.Core.Domain/Image/DicomStudy.cs @@ -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,58 +37,75 @@ 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 Uploader { get; set; } = null!; - 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; } - - } diff --git a/IRaCIS.Core.Domain/Institution/CRO.cs b/IRaCIS.Core.Domain/Institution/CRO.cs index a592a7680..8d988648f 100644 --- a/IRaCIS.Core.Domain/Institution/CRO.cs +++ b/IRaCIS.Core.Domain/Institution/CRO.cs @@ -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 class CRO : BaseFullAuditEntity { - [Table("CROCompany")] - public partial class CRO : BaseFullAuditEntity - { - #region + #region - #endregion - public string CROName { get; set; } = string.Empty; - public string CRONameCN { get; set; } = string.Empty; - public string CROCode { get; set; } = string.Empty; + #endregion + public string CROCode { get; set; } = null!; - public bool IsTrialLevel { get; set; } + [StringLength(1000)] + public string CROName { get; set; } = null!; + [StringLength(1000)] + public string CRONameCN { get; set; } = null!; - public Guid? TrialId { get; set; } - } + [Comment(" ǷĿ")] + public bool IsTrialLevel { get; set; } + + public Guid? TrialId { get; set; } } + + diff --git a/IRaCIS.Core.Domain/QC/CheckChallengeDialog.cs b/IRaCIS.Core.Domain/QC/CheckChallengeDialog.cs index f956548f0..7e60e00dc 100644 --- a/IRaCIS.Core.Domain/QC/CheckChallengeDialog.cs +++ b/IRaCIS.Core.Domain/QC/CheckChallengeDialog.cs @@ -1,29 +1,36 @@ 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 { - - public class CheckChallengeDialog : BaseAddAuditEntity - { - #region 导航属性 - [JsonIgnore] - public SubjectVisit SubjectVisit { get; set; } - #endregion + #region 导航属性 + [JsonIgnore] + public SubjectVisit SubjectVisit { get; set; } + #endregion - public string TalkContent { get; set; } = string.Empty; - - public Guid SubjectVisitId { get; set; } + [Comment(" CRC是否需要回复 前端使用")] + public bool? IsCRCNeedReply { get; set; } + [Comment(" 核查的检查信息Json")] + [MaxLength] + public string ParamInfo { get; set; } = null!; - public UserTypeEnum UserTypeEnum { get; set; } + public Guid SubjectVisitId { get; set; } - - public bool? IsCRCNeedReply { get; set; } + [MaxLength] + public string TalkContent { get; set; } = null!; + + [Comment(" 核查过程中的操作用户类型")] + public UserTypeEnum UserTypeEnum { get; set; } - public string ParamInfo { get; set; } = string.Empty; - } } diff --git a/IRaCIS.Core.Domain/Reading/ClinicalData/ClinicalDataSystemSet.cs b/IRaCIS.Core.Domain/Reading/ClinicalData/ClinicalDataSystemSet.cs index 7e04dfa4f..09e241534 100644 --- a/IRaCIS.Core.Domain/Reading/ClinicalData/ClinicalDataSystemSet.cs +++ b/IRaCIS.Core.Domain/Reading/ClinicalData/ClinicalDataSystemSet.cs @@ -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 +namespace IRaCIS.Core.Domain.Models; + +[Comment("系统 - 临床数据配置")] +[Table("ClinicalDataSystemSet")] +public class ClinicalDataSystemSet : BaseAddAuditEntity { - /// - /// 临床资料系统配置 - /// - [Table("ClinicalDataSystemSet")] - public class ClinicalDataSystemSet : BaseAddAuditEntity - { - #region 导航属性 + #region 导航属性 - #endregion + [NotMapped] + public List 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 int ClinicalDataSetEnum { get; set; } + #endregion - /// - /// 名称 - /// - public string ClinicalDataSetName { get; set; } = string.Empty; + public ClinicalLevel ClinicalDataLevel { get; set; } - /// - /// 是否应用 - /// - public bool IsApply { get; set; } = false; + [StringLength(400)] + public string ClinicalDataSetEnName { get; set; } = null!; - /// - /// 英文名称 - /// - public string ClinicalDataSetEnName { get; set; } = string.Empty; + + [Comment(" 枚举(字典里面取的)")] + public int ClinicalDataSetEnum { get; set; } - /// - /// 临床级别 - /// - public ClinicalLevel ClinicalDataLevel { get; set; } + public string ClinicalDataSetName { get; set; } = null!; - /// - /// 上传方式 - /// - public ClinicalUploadType ClinicalUploadType { get; set; } - - - - /// - /// 是否启用 - /// - public bool IsEnable { get; set; } - - /// - /// 上传角色 - /// - public UploadRole UploadRole { get; set; } - - /// - /// 模板文件名称 - /// - public string FileName { get; set; } = string.Empty; - - /// - /// 文件路径 - /// - public string Path { get; set; } = string.Empty; - - public string CriterionEnumListStr { get; set; } = String.Empty; - - - - - [NotMapped] - public List 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 SystemClinicalDataCriterionList { get; set; } = new List(); - - } + [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; } } diff --git a/IRaCIS.Core.Domain/Reading/ClinicalData/ClinicalDataTrialSet.cs b/IRaCIS.Core.Domain/Reading/ClinicalData/ClinicalDataTrialSet.cs index 478db8018..e67d254b0 100644 --- a/IRaCIS.Core.Domain/Reading/ClinicalData/ClinicalDataTrialSet.cs +++ b/IRaCIS.Core.Domain/Reading/ClinicalData/ClinicalDataTrialSet.cs @@ -6,105 +6,65 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Collections.Generic; using System.Linq; +using Microsoft.EntityFrameworkCore; -namespace IRaCIS.Core.Domain.Models +namespace IRaCIS.Core.Domain.Models; + +[Comment("项目 - 临床数据适应标准配置")] +[Table("ClinicalDataTrialSet")] +public class ClinicalDataTrialSet : BaseAddAuditEntity { - /// - /// 临床资料项目配置 - /// - [Table("ClinicalDataTrialSet")] - public class ClinicalDataTrialSet : BaseAddAuditEntity - { - #region 导航属性 + #region 导航属性 - [JsonIgnore] - public List ReadingClinicalDataList { get; set; } + [JsonIgnore] + public List ReadingClinicalDataList { get; set; } - [JsonIgnore] - [ForeignKey("TrialId")] - public Trial Trial { get; set; } + [JsonIgnore] + [ForeignKey("TrialId")] + public Trial Trial { get; set; } - [JsonIgnore] - public List TrialClinicalDataSetCriteriaList { get; set; } + [JsonIgnore] + public List TrialClinicalDataSetCriteriaList { get; set; } - [JsonIgnore] - public List TrialClinicalQuestionList { get; set; } - [JsonIgnore] - [ForeignKey("SystemClinicalDataSetId")] - public ClinicalDataSystemSet? ClinicalDataSystemSet { get; set; } - #endregion + [JsonIgnore] + public List TrialClinicalQuestionList { get; set; } + [JsonIgnore] + [ForeignKey("SystemClinicalDataSetId")] + public ClinicalDataSystemSet? ClinicalDataSystemSet { get; set; } + #endregion - public Guid TrialId { get; set; } + [Comment("临床级别")] + public ClinicalLevel ClinicalDataLevel { get; set; } - /// - /// 名称 - /// - public string ClinicalDataSetName { get; set; }=string.Empty; + [StringLength(400)] + public string ClinicalDataSetEnName { get; set; } = null!; - /// - /// 英文名称 - /// - public string ClinicalDataSetEnName { get; set; } = string.Empty; + public string ClinicalDataSetName { get; set; } = null!; - /// - /// 临床级别 - /// - public ClinicalLevel ClinicalDataLevel { get; set; } + [Comment("上传方式")] + public ClinicalUploadType ClinicalUploadType { get; set; } + [StringLength(512)] + public string CriterionEnumListStr { get; set; } = null!; - /// - /// 上传方式 - /// - public ClinicalUploadType ClinicalUploadType { get; set; } + [StringLength(400)] + public string FileName { get; set; } = null!; + [Comment("是否应用")] + public bool IsApply { get; set; } - /// - /// 系统的ClinicalDataSetId - /// - public Guid? SystemClinicalDataSetId { get; set; } - - /// - /// SystemClinicalDataSetId - /// - - - /// - /// 是否确认 - /// - public bool IsConfirm { get; set; } - - - /// - /// 是否应用 - /// - public bool IsApply { get; set; } = false; - - /// - /// 上传角色 - /// - public UploadRole UploadRole { get; set; } - - /// - /// 模板文件名称 - /// - public string FileName { get; set; } = string.Empty; - - /// - /// 文件路径 - /// - public string Path { get; set; } = string.Empty; - - - - public string CriterionEnumListStr { get; set; } = String.Empty; - - public List 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 bool IsConfirm { get; set; } + [StringLength(4000)] + public string Path { get; set; } = null!; + public Guid? SystemClinicalDataSetId { get; set; } + public Guid TrialId { get; set; } + public UploadRole UploadRole { get; set; } + public List CriterionEnumList => CriterionEnumListStr.Split('|', StringSplitOptions.RemoveEmptyEntries).Where(t => !string.IsNullOrEmpty(t) && int.TryParse(t.Trim(), out var s)).Select(t => int.Parse(t.Trim())).ToList(); } + diff --git a/IRaCIS.Core.Domain/Reading/ClinicalQuestionAnswer/ClinicalAnswerRowInfo.cs b/IRaCIS.Core.Domain/Reading/ClinicalQuestionAnswer/ClinicalAnswerRowInfo.cs index c08e94424..e036c418b 100644 --- a/IRaCIS.Core.Domain/Reading/ClinicalQuestionAnswer/ClinicalAnswerRowInfo.cs +++ b/IRaCIS.Core.Domain/Reading/ClinicalQuestionAnswer/ClinicalAnswerRowInfo.cs @@ -7,37 +7,31 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace IRaCIS.Core.Domain.Models +using Microsoft.EntityFrameworkCore; +namespace IRaCIS.Core.Domain.Models; + + + +[Comment("受试者 - 临床表单表格问题行记录")] +[Table("ClinicalAnswerRowInfo")] +public class ClinicalAnswerRowInfo : BaseAddAuditEntity { - /// - ///ClinicalAnswerRowInfo - /// - [Table("ClinicalAnswerRowInfo")] - public class ClinicalAnswerRowInfo : BaseAddAuditEntity - { - #region 导航属性 + #region 导航属性 + + #endregion + + + [Comment(" 表单Id")] + public Guid ClinicalFormId { get; set; } + + [Comment(" 问题Id")] + public Guid QuestionId { get; set; } + + public int RowIndex { get; set; } + + [Comment(" 受试者Id")] + public Guid SubjectId { get; set; } +} - #endregion - public Guid SubjectId { get; set; } - - /// - /// 表单Id - /// - public Guid ClinicalFormId { get; set; } - - - /// - /// 问题Id - /// - public Guid QuestionId { get; set; } - - /// - /// RowIndex - /// - public int RowIndex { get; set; } - } - - -} diff --git a/IRaCIS.Core.Domain/Reading/ClinicalQuestionAnswer/ClinicalForm.cs b/IRaCIS.Core.Domain/Reading/ClinicalQuestionAnswer/ClinicalForm.cs index dfa39ad93..2143151fb 100644 --- a/IRaCIS.Core.Domain/Reading/ClinicalQuestionAnswer/ClinicalForm.cs +++ b/IRaCIS.Core.Domain/Reading/ClinicalQuestionAnswer/ClinicalForm.cs @@ -7,50 +7,42 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace IRaCIS.Core.Domain.Models +using Microsoft.EntityFrameworkCore; +namespace IRaCIS.Core.Domain.Models; + + +[Comment("受试者 - 临床表单")] +[Table("ClinicalForm")] +public class ClinicalForm : BaseAddAuditEntity { - /// - ///ClinicalForm - /// - [Table("ClinicalForm")] - public class ClinicalForm : BaseAddAuditEntity - { - #region 导航属性 - [JsonIgnore] - [ForeignKey("ClinicalDataTrialSetId")] - public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; } + #region 导航属性 + [JsonIgnore] + [ForeignKey("ClinicalDataTrialSetId")] + public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; } - [JsonIgnore] - [ForeignKey("SubjectId")] - public Subject Subject { get; set; } - #endregion + [JsonIgnore] + [ForeignKey("SubjectId")] + public Subject Subject { get; set; } + #endregion - public Guid SubjectId { get; set; } + [Comment(" 检查日期")] + public DateTime? CheckDate { get; set; } + + public Guid ClinicalDataTrialSetId { get; set; } + + [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; } +} - public Guid TrialId { get; set; } - - /// - /// 检查日期 - /// - public DateTime? CheckDate { get; set; } - - /// - /// 截图地址 - /// - public string PicturePath { get; set; } = string.Empty; - - - public Guid ClinicalDataTrialSetId { get; set; } - - /// - /// VisitId - /// - public Guid? ReadingId { get; set; } - - - - - } - -} + diff --git a/IRaCIS.Core.Domain/Reading/ClinicalQuestionAnswer/ClinicalQuestionAnswer.cs b/IRaCIS.Core.Domain/Reading/ClinicalQuestionAnswer/ClinicalQuestionAnswer.cs index 45cd279f7..74feb333b 100644 --- a/IRaCIS.Core.Domain/Reading/ClinicalQuestionAnswer/ClinicalQuestionAnswer.cs +++ b/IRaCIS.Core.Domain/Reading/ClinicalQuestionAnswer/ClinicalQuestionAnswer.cs @@ -7,42 +7,36 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace IRaCIS.Core.Domain.Models +using Microsoft.EntityFrameworkCore; +namespace IRaCIS.Core.Domain.Models; + +[Comment("受试者 - 临床表单问题答案")] +[Table("ClinicalQuestionAnswer")] +public class ClinicalQuestionAnswer : BaseAddAuditEntity { - /// - ///ClinicalQuestionAnswer - /// - [Table("ClinicalQuestionAnswer")] - public class ClinicalQuestionAnswer : BaseAddAuditEntity - { - #region 导航属性 + #region 导航属性 - [JsonIgnore] - [ForeignKey("ClinicalFormId")] - public ClinicalForm ClinicalForm { get; set; } - #endregion + [JsonIgnore] + [ForeignKey("ClinicalFormId")] + public ClinicalForm ClinicalForm { get; set; } + #endregion - public Guid SubjectId { get; set; } - - /// - /// 表单Id - /// - public Guid ClinicalFormId { get; set; } - + [StringLength(4000)] + public string Answer { get; set; } = null!; - - /// - /// 问题Id - /// - public Guid QuestionId { get; set; } + public Guid ClinicalDataTrialSetId { get; set; } - public string Answer { get; set; } = string.Empty; + [Comment(" 表单Id")] + public Guid ClinicalFormId { get; set; } - public Guid ClinicalDataTrialSetId { get; set; } + [Comment(" 问题Id")] + public Guid QuestionId { get; set; } + + [Comment(" 受试者Id")] + public Guid SubjectId { get; set; } +} - } - - -} + + diff --git a/IRaCIS.Core.Domain/Reading/ClinicalQuestionAnswer/ClinicalTableAnswer.cs b/IRaCIS.Core.Domain/Reading/ClinicalQuestionAnswer/ClinicalTableAnswer.cs index e3fed2f34..11aa95f8b 100644 --- a/IRaCIS.Core.Domain/Reading/ClinicalQuestionAnswer/ClinicalTableAnswer.cs +++ b/IRaCIS.Core.Domain/Reading/ClinicalQuestionAnswer/ClinicalTableAnswer.cs @@ -7,37 +7,38 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace IRaCIS.Core.Domain.Models +using Microsoft.EntityFrameworkCore; +namespace IRaCIS.Core.Domain.Models; + +[Comment("受试者 - 临床表单表格问题答案")] +[Table("ClinicalTableAnswer")] +public partial class ClinicalTableAnswer : BaseAddAuditEntity { - /// - ///ClinicalTableAnswer - /// - [Table("ClinicalTableAnswer")] - public class ClinicalTableAnswer : BaseAddAuditEntity - { - #region 导航属性 - [JsonIgnore] - [ForeignKey("RowId")] - public ClinicalAnswerRowInfo ClinicalAnswerRowInfo{get; set;} - #endregion + #region 导航属性 + [JsonIgnore] + [ForeignKey("RowId")] + public ClinicalAnswerRowInfo ClinicalAnswerRowInfo { get; set; } + #endregion - public Guid SubjectId { get; set; } - + [Comment(" 答案")] + [StringLength(4000)] + public string Answer { get; set; } = null!; - public Guid ClinicalFormId { get; set; } + [Comment(" 表单Id")] + public Guid ClinicalFormId { get; set; } - public Guid QuestionId { get; set; } + [Comment(" 问题Id")] + public Guid QuestionId { get; set; } - public Guid RowId { 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; } + public Guid TableQuestionId { get; set; } +} - - - } - - -} + + diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidusSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidusSystem.cs index 6ad40a4a8..f27caeccc 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidusSystem.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidusSystem.cs @@ -7,46 +7,31 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace IRaCIS.Core.Domain.Models +using Microsoft.EntityFrameworkCore; +namespace IRaCIS.Core.Domain.Models; + + + +[Comment("系统标准 - 病灶器官表 (需要同步)")] +[Table("CriterionNidusSystem")] +public class CriterionNidusSystem : BaseAddAuditEntity { - /// - /// 标准病灶中间表 - /// - [Table("CriterionNidusSystem")] - public class CriterionNidusSystem : BaseAddAuditEntity - { - #region 导航属性 - [ForeignKey("CriterionId")] - [JsonIgnore] - public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; } - #endregion - /// - /// 标准ID - /// - public Guid CriterionId { get; set; } + #region 导航属性 + [ForeignKey("CriterionId")] + [JsonIgnore] + public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; } + #endregion + + public Guid CriterionId { get; set; } + + public bool IsSystemCriterion { get; set; } + + [Comment("病灶类型")] + public LesionType LesionType { get; set; } + + [Comment("器官类型")] + public OrganType OrganType { get; set; } +} - /// - /// 器官类型 - /// - public OrganType OrganType { get; set; } - - - /// - /// 病灶类型 - /// - public LesionType LesionType { get; set; } - - /// - /// 是否是系统标准 - /// - public bool IsSystemCriterion { get; set; } - - - - - - } - - -} + diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidusTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidusTrial.cs index 821203b13..78146a97f 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidusTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidusTrial.cs @@ -7,28 +7,24 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace IRaCIS.Core.Domain.Models +using Microsoft.EntityFrameworkCore; +namespace IRaCIS.Core.Domain.Models; + +[Comment("项目标准 - 病灶器官表")] +[Table("CriterionNidusTrial")] +public class CriterionNidusTrial : BaseAddAuditEntity { - /// - ///CriterionNidusTrial - /// - [Table("CriterionNidusTrial")] - public class CriterionNidusTrial : BaseAddAuditEntity - { - #region 导航属性 + #region 导航属性 - #endregion + #endregion - public Guid CriterionId { get; set; } + public Guid CriterionId { get; set; } - public LesionType LesionType { get; set; } + public LesionType LesionType { get; set; } - /// - /// 器官类型 - /// - public OrganType OrganType { get; set; } + public OrganType OrganType { get; set; } +} - } - -} + + diff --git a/IRaCIS.Core.Domain/Trial/DataInspection.cs b/IRaCIS.Core.Domain/Trial/DataInspection.cs index e37cb1b85..7d6dc9255 100644 --- a/IRaCIS.Core.Domain/Trial/DataInspection.cs +++ b/IRaCIS.Core.Domain/Trial/DataInspection.cs @@ -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 +using Microsoft.EntityFrameworkCore; +namespace IRaCIS.Core.Domain.Models; + +[Comment("稽查 - 记录表")] +[Table("DataInspection")] +public class DataInspection : BaseAddAuditEntity { - /// - ///DataInspection - /// - [Table("DataInspection")] - public class DataInspection : BaseAddAuditEntity - { + #region 导航属性 + [JsonIgnore] + [ForeignKey("TrialReadingCriterionId")] + public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; } + [JsonIgnore] + public VisitTask VisitTask { get; set; } + #endregion - #region 导航属性 - [JsonIgnore] - [ForeignKey("TrialReadingCriterionId")] - public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; } - #endregion + [Comment(" 批次Id")] + public Guid BatchId { get; set; } + [Comment(" 子类")] + public Guid? ChildrenTypeId { get; set; } - public Guid? TrialId { get; set; } + [Comment(" 创建人姓名")] + public string CreateUserName { get; set; } = null!; - public Guid? TrialSiteId { get; set; } + public string CreateUserRealName { get; set; } = null!; - public Guid? SubjectId { get; set; } + [Comment(" 阅片医生")] + public Guid? DoctorUserId { get; set; } + [Comment(" 被稽查实体名")] + public string EntityName { get; set; } = null!; - public Guid? SubjectVisitId { get; set; } + [Comment(" 要稽查对象Id")] + public Guid? GeneralId { get; set; } - public Guid? VisitTaskId { get; set; } + [Comment(" 标识")] + public string Identification { get; set; } = null!; - public VisitTask VisitTask { get; set; } + public string IP { get; set; } = null!; - public string IP { get; set; } = string.Empty; + [Comment(" 是否是前端添加")] + public bool? IsFrontAdd { get; set; } - public string Reason { get; set; } = string.Empty; + public bool? IsSign { get; set; } - public bool IsSign { get; set; } + [MaxLength] + public string? JsonDetail { get; set; } - /// - /// 签名ID - /// - public Guid? SignId { get; set; } + [Comment(" 上一条json")] + [MaxLength] + public string? LastJsonDetail { get; set; } - /// - /// 父类ID - /// + public Guid? ModuleTypeId { get; set; } - public Guid? ParentId { get; set; } + [Comment(" 被稽查对象外键1")] + public Guid? ObjectRelationParentId { get; set; } - /// - /// 子类 - /// - public Guid? ChildrenTypeId { get; set; } - /// - /// 对象类型 - /// - public Guid? ObjectTypeId { get; set; } + public Guid? ObjectRelationParentId2 { get; set; } - /// - /// 操作类型 - /// - public Guid? OptTypeId { get; set; } + public Guid? ObjectRelationParentId3 { get; set; } - /// - /// 功能模块 - /// - public Guid? ModuleTypeId { get; set; } + public Guid? ObjectTypeId { get; set; } - public string JsonDetail { get; set; } = string.Empty; + public Guid? OptTypeId { get; set; } - public string CreateUserName { get; set; } = string.Empty; + [Comment(" 父ID")] + public Guid? ParentId { get; set; } - public string CreateUserRealName { get; set; } = string.Empty; + public string Reason { get; set; } = null!; - public string RoleName { get; set; } = string.Empty; + [Comment(" 角色名称")] + public string RoleName { get; set; } = null!; - /// - /// 标识 - /// - public string Identification { get; set; } = string.Empty; + public Guid? SignId { get; set; } + public Guid? SubjectId { get; set; } - /// - /// 稽查的对象Id - /// - public Guid? GeneralId { get; set; } + public Guid? SubjectVisitId { get; set; } + public Guid? TrialId { get; set; } + public Guid? TrialReadingCriterionId { get; set; } - /// - /// 批次Id - /// - public Guid BatchId { get; set; } - - - /// - /// 稽查对象,关联的父对象Id - /// - public Guid? ObjectRelationParentId { get; set; } - - public Guid? ObjectRelationParentId2 { get; set; } - - public Guid? ObjectRelationParentId3 { get; set; } - - - public string EntityName { get; set; } = string.Empty; - - - 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; } } + diff --git a/IRaCIS.Core.Test/CodeTemplates/EFCore/EntityType.t4 b/IRaCIS.Core.Test/CodeTemplates/EFCore/EntityType.t4 index db80a2a87..dadd73b8f 100644 --- a/IRaCIS.Core.Test/CodeTemplates/EFCore/EntityType.t4 +++ b/IRaCIS.Core.Test/CodeTemplates/EFCore/EntityType.t4 @@ -98,9 +98,11 @@ public partial class <#= EntityType.Name #>: BaseFullAuditEntity [StringLength(<#= maxLength.Value #>)] <# } + else if(maxLength.HasValue && maxLength == 200){} else { #> + [MaxLength] <# }