484 lines
		
	
	
		
			14 KiB
		
	
	
	
		
			C#
		
	
	
			
		
		
	
	
			484 lines
		
	
	
		
			14 KiB
		
	
	
	
		
			C#
		
	
	
using IRaCIS.Application.Contracts;
 | 
						|
using IRaCIS.Core.Domain.Share;
 | 
						|
using Newtonsoft.Json;
 | 
						|
 | 
						|
namespace IRaCIS.Core.Application.Contracts.DTO
 | 
						|
{
 | 
						|
 | 
						|
 | 
						|
    public class VisitQACommand
 | 
						|
    {
 | 
						|
        public QCChallengeCommand QARecord { get; set; }=new QCChallengeCommand();
 | 
						|
 | 
						|
        public List<QARecordTrialTemplateItemCommand> QATrialTemplateItemList { get; set; } = new List<QARecordTrialTemplateItemCommand>();
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    public class QARecordTrialTemplateItemCommand
 | 
						|
    {
 | 
						|
        public int ShowOrder { get; set; }
 | 
						|
        public string TemplateItemName { get; set; } = String.Empty;
 | 
						|
        public Guid QATrialTemplateItemId { get; set; }
 | 
						|
        public string Note { get; set; } = String.Empty;
 | 
						|
        public QAItemStatus Status { get; set; } = QAItemStatus.Undefined;
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
    public class QARecordTrialTemplateItemDTO : QARecordTrialTemplateItemCommand
 | 
						|
    {
 | 
						|
        public Guid QARecordId { get; set; }
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    public class QCQuestionAnswerCommand
 | 
						|
    {
 | 
						|
        public Guid? Id { get; set; }
 | 
						|
        public string Answer { get; set; } = String.Empty;
 | 
						|
 | 
						|
        //public string ChildAnswer { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public Guid? TrialQCQuestionConfigureId { get; set; }
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
    public class QCQuestionAnswerItemDto
 | 
						|
    {
 | 
						|
        //public string ChildAnswer { get; set; } = String.Empty;
 | 
						|
 | 
						|
        [JsonIgnore]
 | 
						|
        public List<QCQuestionAnswerCommand> QCQuestionAnswerList { get; set; } = new List<QCQuestionAnswerCommand>();
 | 
						|
 | 
						|
 | 
						|
        public TrialQCProcess? QCProcessEnum { get; set; }
 | 
						|
 | 
						|
        // 1代表第一个人QC数据  2 代表第二个人QC数据
 | 
						|
        public CurrentQC? CurrentQCEnum { get; set; }
 | 
						|
 | 
						|
        public Guid? SubjectVisitId { get; set; }
 | 
						|
 | 
						|
        public Guid? Id { get; set; }
 | 
						|
        public string Answer { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public Guid TrialQCQuestionConfigureId { get; set; }
 | 
						|
        public Guid TrialId { get; set; }
 | 
						|
        public string QuestionName { get; set; } = String.Empty;
 | 
						|
        public bool IsRequired { get; set; }
 | 
						|
        public bool IsEnable { get; set; }
 | 
						|
        public string Type { get; set; } = String.Empty;
 | 
						|
        public Guid? ParentId { get; set; }
 | 
						|
        public string TypeValue { get; set; } = String.Empty;
 | 
						|
        public string ParentTriggerValue { get; set; } = String.Empty;
 | 
						|
        public int ShowOrder { get; set; }
 | 
						|
 | 
						|
        public int? ParentShowOrder { get; set; }
 | 
						|
 | 
						|
        public bool IsChild => ParentId != null;
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
    public class QATrialTemplateItemDto
 | 
						|
    {
 | 
						|
        public Guid QATrialTemplateId { get; set; }
 | 
						|
        public string TemplateItemName { get; set; } = String.Empty;
 | 
						|
        public Guid QATrialTemplateItemId { get; set; }
 | 
						|
        public int ShowOrder { get; set; }
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
    public class QARecordItemQuery
 | 
						|
    {
 | 
						|
        public Guid QaTrialTemplateId { get; set; }
 | 
						|
        public Guid? QaRecordId { get; set; }
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
    public class QATemplateQuery
 | 
						|
    {
 | 
						|
        public Guid TrialId { get; set; }
 | 
						|
 | 
						|
        public string Modalities { get; set; } = String.Empty;
 | 
						|
    }
 | 
						|
 | 
						|
    public class QCChallengeCommand
 | 
						|
    {
 | 
						|
        public Guid? Id { get; set; }
 | 
						|
 | 
						|
        public string ChallengeType { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public Guid SubjectVisitId { get; set; }
 | 
						|
 | 
						|
        public string Content { get; set; } = string.Empty;
 | 
						|
 | 
						|
        public string ActionContent { get; set; } = string.Empty;
 | 
						|
 | 
						|
        public QCChanllengeReuploadEnum ReuploadEnum { get; set; }
 | 
						|
 | 
						|
 | 
						|
        public DateTime? DeadlineTime { get; set; }
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
    public class QCChanllengeCreatorDto
 | 
						|
    {
 | 
						|
        public Guid CreateUserId { get; set; }
 | 
						|
 | 
						|
        public string Creator { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public string CreatorRealName { get; set; } = String.Empty;
 | 
						|
 | 
						|
        //public string FirstName { get; set; }
 | 
						|
        //public string LastName { get; set; }
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
    public class ParticipantDTO
 | 
						|
    {
 | 
						|
        public Guid HandleUserId { get; set; }
 | 
						|
        public string HandleUser { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public string HandleUserRealName { get; set; } = String.Empty;
 | 
						|
    }
 | 
						|
 | 
						|
    public class QCChallengeWithUser : QCChallengeCommand
 | 
						|
    {
 | 
						|
        public Guid SubjectId { get; set; }
 | 
						|
        public UserTypeEnum UserTypeEnum { get; set; }
 | 
						|
        public Guid CreateUserId { get; set; }
 | 
						|
        public string ChallengeCode { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public DateTime? LatestMsgTime { get; set; }
 | 
						|
 | 
						|
        public string LatestReplyUser { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public DateTime? ClosedTime { get; set; }
 | 
						|
 | 
						|
        public bool IsClosed { get; set; }
 | 
						|
        public DateTime? ReUploadedTime { get; set; }
 | 
						|
        public string CreateUser { get; set; } = String.Empty;
 | 
						|
        public DateTime CreateTime { get; set; }
 | 
						|
 | 
						|
        public bool IsOverTime => IsClosed ? ClosedTime > DeadlineTime : DateTime.Now > DeadlineTime;
 | 
						|
 | 
						|
        public string ChallengeDuration
 | 
						|
        {
 | 
						|
            get
 | 
						|
            {
 | 
						|
                if (!ClosedTime.HasValue)
 | 
						|
                    return "";
 | 
						|
                else return string.Format("{0}天{1}小时{2}分钟", (ClosedTime - CreateTime)?.Days, (ClosedTime - CreateTime)?.Hours, (ClosedTime - CreateTime)?.Minutes);
 | 
						|
            }
 | 
						|
        }
 | 
						|
 | 
						|
 | 
						|
        public QCChanllengeDialogDTO[] DialogList { get; set; } = new QCChanllengeDialogDTO[0];
 | 
						|
 | 
						|
        //public int ReplyCount { get; set; }
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
    public class CRCChallengeAndDialog
 | 
						|
    {
 | 
						|
        public QCChallengeWithUser QCChallenge { get; set; } = new QCChallengeWithUser();
 | 
						|
 | 
						|
        public List<QCChanllengeDialogDTO> DialogList { get; set; } = new List<QCChanllengeDialogDTO>();
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
    public class HistoryGroupDTO
 | 
						|
    {
 | 
						|
        public DateTime CreateTime { get; set; }
 | 
						|
 | 
						|
        public string IQA { get; set; } = string.Empty;
 | 
						|
 | 
						|
        public DateTime? IQADeadline { get; set; }
 | 
						|
 | 
						|
        public string IQANote { get; set; } = string.Empty;
 | 
						|
 | 
						|
        public DateTime? IQACreateTime { get; set; }
 | 
						|
 | 
						|
 | 
						|
        public List<TemplateItemProblem> TemplateItems { get; set; } = new List<TemplateItemProblem>();
 | 
						|
    }
 | 
						|
 | 
						|
    public class TemplateItemProblem
 | 
						|
    {
 | 
						|
        [JsonIgnore]
 | 
						|
        public string IQA { get; set; } = string.Empty;
 | 
						|
        [JsonIgnore]
 | 
						|
        public DateTime? IQADeadline { get; set; }
 | 
						|
        [JsonIgnore]
 | 
						|
        public string IQANote { get; set; } = string.Empty;
 | 
						|
        [JsonIgnore]
 | 
						|
        public DateTime? IQACreateTime { get; set; }
 | 
						|
 | 
						|
        public Guid QARecordId { get; set; }
 | 
						|
        public int ShowOrder { get; set; }
 | 
						|
        public string TemplateItemName { get; set; } = String.Empty;
 | 
						|
        public string Note { get; set; } = String.Empty;
 | 
						|
        public QAItemStatus Status { get; set; } = QAItemStatus.Undefined;
 | 
						|
        public DateTime CreateTime { get; set; } = DateTime.Now;
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
    public class TrialVisitQADTO
 | 
						|
    {
 | 
						|
 | 
						|
        public SubjectClinicalDataDto SubjectClinicalData { get; set; } = new SubjectClinicalDataDto();
 | 
						|
 | 
						|
        public List<NoneDicomStudyView> NoneDicomStudyList { get; set; } = new List<NoneDicomStudyView>();
 | 
						|
 | 
						|
        public List<QCQuestionAnswerItemDto> QCQuestionAnswerList { get; set; } = new List<QCQuestionAnswerItemDto>();
 | 
						|
 | 
						|
        public List<QAStudyInfoDTO> StudyList { get; set; } = new List<QAStudyInfoDTO>();
 | 
						|
 | 
						|
        public List<QASeriesInfoDto> SeriesList { get; set; } = new List<QASeriesInfoDto>();
 | 
						|
 | 
						|
        public QARelationInfo RelationInfo { get; set; } = new QARelationInfo();
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
    public class QAStudySeriesInfo
 | 
						|
    {
 | 
						|
        public List<QAStudyInfoDTO> StudyList { get; set; } = new List<QAStudyInfoDTO>();
 | 
						|
 | 
						|
        public List<QASeriesInfoDto> SeriesList { get; set; } = new List<QASeriesInfoDto>();
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
    public class QADictionaryCommand
 | 
						|
    {
 | 
						|
 | 
						|
        public string Note { get; set; } = String.Empty;
 | 
						|
        public Guid DictionaryId { get; set; }
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
    public class QADictionaryDTO : QADictionaryCommand
 | 
						|
    {
 | 
						|
        public string DictionaryValue { get; set; } = String.Empty;
 | 
						|
    }
 | 
						|
 | 
						|
    public class QADicView
 | 
						|
    {
 | 
						|
        public Guid QARecordId { get; set; }
 | 
						|
        public string DictionaryValue { get; set; } = String.Empty;
 | 
						|
        public string Note { get; set; } = String.Empty;
 | 
						|
        public Guid DictionaryId { get; set; }
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    public class QARecordDTO
 | 
						|
    {
 | 
						|
        public QCChallengeWithUser QARecord { get; set; } = new QCChallengeWithUser();
 | 
						|
 | 
						|
        public List<QADicView> QADictionaryList { get; set; } = new List<QADicView>();
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
    public class QARelationInfo
 | 
						|
    {
 | 
						|
        public int TrialClinicalInformationTransmissionEnum { get; set; }
 | 
						|
        public int TrialChangeDefalutDays { get; set; }
 | 
						|
        public TrialQCProcess TrialQCProcessEnum { get; set; }
 | 
						|
        public string TrialChallengeTypes { get; set; } = String.Empty;
 | 
						|
        public string TrialBodyPartTypes { get; set; } = String.Empty;
 | 
						|
        public string TrialImageQCSignText { get; set; } = String.Empty;
 | 
						|
        public string TrialModalitys { get; set; } = String.Empty;
 | 
						|
 | 
						|
        //public string FirstName { get; set; }
 | 
						|
        //public string LastName { get; set; }
 | 
						|
        //public string Modalities { get; set; }
 | 
						|
 | 
						|
        public Guid SiteId { get; set; }
 | 
						|
        public string SiteName { get; set; } = String.Empty;
 | 
						|
        public Guid SubjectId { get; set; }
 | 
						|
        public Guid SubjectVisitId { get; set; }
 | 
						|
 | 
						|
        public string SubjectCode { get; set; } = String.Empty;
 | 
						|
        public string SubjectName { get; set; } = String.Empty;
 | 
						|
        public int SubjectAge { get; set; }
 | 
						|
        public string SubjectSex { get; set; } = String.Empty;
 | 
						|
 | 
						|
 | 
						|
        public decimal VisitNum { get; set; }
 | 
						|
        public string VisitName { get; set; } = string.Empty;
 | 
						|
        //public DateTime? SVSTDTC { get; set; }
 | 
						|
        //public DateTime? SVENDTC { get; set; }
 | 
						|
        public bool InPlan { get; set; }
 | 
						|
        public int? VisitDay { get; set; }
 | 
						|
        public bool IsBaseLine { get; set; } = false;
 | 
						|
        public string AnonymousVisitName { get; set; } = string.Empty;
 | 
						|
        public int? VisitWindowLeft { get; set; }
 | 
						|
        public int? VisitWindowRight { get; set; }
 | 
						|
 | 
						|
        public DateTime? SubjectFirstGiveMedicineTime { get; set; }
 | 
						|
 | 
						|
        public bool IsHaveFirstGiveMedicineDate { get; set; } = true;
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
        public int? TotalChallengeCount { get; set; }
 | 
						|
 | 
						|
        public int? NotClosedChallengeCount { get; set; }
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    }
 | 
						|
    public class QAStudyInfoDTO
 | 
						|
    {
 | 
						|
 | 
						|
        public bool IsDeleted { get; set; }
 | 
						|
        public string StudyInstanceUid { get; set; } = string.Empty;
 | 
						|
 | 
						|
        public Guid TrialId { get; set; }
 | 
						|
 | 
						|
        public Guid StudyId { get; set; }
 | 
						|
 | 
						|
        public int StudyStatus { get; set; }
 | 
						|
 | 
						|
        public string StudyCode { get; set; } = string.Empty;
 | 
						|
 | 
						|
        public string Modalities { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public int SeriesCount { get; set; }
 | 
						|
 | 
						|
        public int InstanceCount { get; set; }
 | 
						|
 | 
						|
        public string Uploader { get; set; } = string.Empty;
 | 
						|
        public DateTime? StudyTime { get; set; }
 | 
						|
 | 
						|
        public DateTime? UploadedTime { get; set; }
 | 
						|
        public string BodyPartExamined { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public string BodyPartForEdit { 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 Comment { get; set; }
 | 
						|
        //public string QAComment { get; set; }
 | 
						|
 | 
						|
        //public string UploaderFirstName { get; set; }
 | 
						|
        //public string UploaderLastName { get; set; }
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
    public class QASeriesInfoDto
 | 
						|
    {
 | 
						|
        public string StudyCode { get; set; } = string.Empty;
 | 
						|
        public Guid Id { get; set; }
 | 
						|
        public Guid StudyId { get; set; }
 | 
						|
 | 
						|
        public string BodyPartForEdit { 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 DateTime CreateTime { get; set; }
 | 
						|
 | 
						|
        public string BodyPartExamined { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public bool IsReading { get; set; }
 | 
						|
 | 
						|
        public bool IsDeleted { get; set; }
 | 
						|
 | 
						|
        //public bool IsDicomData { get; set; } = true;
 | 
						|
 | 
						|
        public Guid[] InstanceList = new Guid[0];
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
 | 
						|
    public class QADialogCommand
 | 
						|
    {
 | 
						|
        public string TalkContent { get; set; } = String.Empty;
 | 
						|
        public Guid QCChallengeId { get; set; }
 | 
						|
 | 
						|
        public Guid SubjectVisitId { get; set; }
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
    public class CheckChallengeDialogCommand
 | 
						|
    {
 | 
						|
        public string TalkContent { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public Guid SubjectVisitId { get; set; }
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
    public class CheckChanllengeDialogDTO
 | 
						|
    {
 | 
						|
        public Guid Id { get; set; }
 | 
						|
        public string TalkContent { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public DateTime CreateTime { get; set; }
 | 
						|
 | 
						|
        public Guid CreateUserId { get; set; }
 | 
						|
 | 
						|
        public string CreateUser { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public bool IsCurrentUser { get; set; }
 | 
						|
 | 
						|
        public UserTypeEnum UserTypeEnum { get; set; }
 | 
						|
    }
 | 
						|
 | 
						|
    public class QCChanllengeDialogDTO : CheckChanllengeDialogDTO
 | 
						|
    {
 | 
						|
        public Guid QCChallengeId { get; set; }
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
    public class DialogDTO
 | 
						|
    {
 | 
						|
        public Guid Id { get; set; }
 | 
						|
        public string TalkContent { get; set; } = String.Empty;
 | 
						|
        public string From { get; set; } = String.Empty;
 | 
						|
        public string To { get; set; } = string.Empty;
 | 
						|
        public Guid UserId { get; set; }
 | 
						|
 | 
						|
        public string PreviousContent { get; set; } = String.Empty;
 | 
						|
 | 
						|
        public bool HasReply { get; set; }
 | 
						|
 | 
						|
        public DateTime CreateTime { get; set; }
 | 
						|
    }
 | 
						|
 | 
						|
    public class DialogNode
 | 
						|
    {
 | 
						|
        public Guid Id { get; set; }
 | 
						|
        public Guid ParentId { get; set; }
 | 
						|
        public Guid UserId { get; set; }
 | 
						|
        public string UserName { get; set; } = String.Empty;
 | 
						|
        public bool HasReply { get; set; }
 | 
						|
 | 
						|
        public string TalkContent { get; set; } = String.Empty;
 | 
						|
        //public Guid QARecordId { get; set; }
 | 
						|
        public DateTime CreateTime { get; set; }
 | 
						|
    }
 | 
						|
 | 
						|
} |