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

This commit is contained in:
2024-09-19 16:40:17 +08:00
parent 4e7ce826c8
commit b98df9dae8
23 changed files with 876 additions and 971 deletions
+67 -40
View File
@@ -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!;
}
+58 -41
View File
@@ -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<DicomInstance> DicomInstanceList { get; set; }
[JsonIgnore]
public List<DicomInstance> DicomInstanceList { get; set; }
[JsonIgnore]
public List<SubjectCriteriaEvaluationVisitStudyFilter> SubjectCriteriaEvaluationVisitStudyFilterList { get; set; }
#endregion
[JsonIgnore]
public List<SubjectCriteriaEvaluationVisitStudyFilter> 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; }
}
+57 -39
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,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; }
}