using Castle.Core.Internal; using IRaCIS.Application.Contracts; using IRaCIS.Core.Application.Contracts; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IRaCIS.Core.Application.Service.Inspection.DTO { public class DataInspectionAddDTO { public Guid? TrialId { get; set; } public Guid? SiteId { get; set; } public Guid? SubjectId { get; set; } public Guid? SubjectVisitId { get; set; } public string ModuleType { get; set; } = string.Empty; public string OptType { get; set; } = string.Empty; public string BlindName { get; set; } = string.Empty; public string Reason { get; set; } = string.Empty; /// /// 子类 /// public string ChildrenType { get; set; } = string.Empty; public bool IsSign { get; set; } public string JsonDetail { get; set; } = string.Empty; /// /// 创建人名称 /// public string CreateUserName { get; set; } = string.Empty; /// /// 项目名称 /// public string TrialName { get; set; } = string.Empty; /// /// 中心名称 /// public string SiteName { get; set; } = string.Empty; /// /// 受试者Code /// public string SubjectCode { get; set; } = string.Empty; /// /// 访视名称 /// public string SubjectVisitName { get; set; } = string.Empty; /// /// 角色名称 /// public string RoleName { get; set; } = string.Empty; /// /// 中心Code /// public string SiteCode { get; set; } = string.Empty; /// /// 项目编码 /// public string ResearchProgramNo { get; set; } = string.Empty; public List EnumList { get; set; }=new List { }; /// /// 对象名称 /// public string ObjectType { get; set; } = string.Empty; /// /// 标识 /// public string Identification { get; set; } = string.Empty; /// /// 访视计划ID /// public Guid? VisitStageId { get; set; } ////需要单独处理 //public string IP { get; set; } //public Guid? SignId { get; set; } } public class EnumList { public string Key { get; set; } = string.Empty; public string Code { get; set; } = string.Empty; public string Type { get; set; } = string.Empty; } public interface IInspectionDTO { public DataInspectionAddDTO AuditInfo { get; set; } } public interface ISignDTO { public SignDTO SignInfo { get; set; } } #region Setting /// /// 配置 基础逻辑信息 /// public class InsBasicTrialConfig : InspectionBase, IInspectionDTO, ISignDTO { public BasicTrialConfig OptCommand { get; set; } } /// /// 配置流程 /// public class InsTrialProcessConfig : InspectionBase, IInspectionDTO, ISignDTO { public TrialProcessConfig OptCommand { get; set; } } /// /// 配置加急信息 /// public class InsTrialUrgentConfig : InspectionBase, IInspectionDTO, ISignDTO { public TrialUrgentConfig OptCommand { get; set; } } #endregion public class DataInspectionDto : IInspectionDTO, ISignDTO { public T OptCommand { get; set; } public DataInspectionAddDTO AuditInfo { get { if (auditInfo.JsonDetail.IsNullOrEmpty()) { auditInfo.JsonDetail = JsonConvert.SerializeObject(OptCommand); } return auditInfo; } set { auditInfo = value; } } private DataInspectionAddDTO auditInfo=new DataInspectionAddDTO (); public SignDTO SignInfo { get; set; } = new SignDTO() { }; } #region Qc public class DeleteStudyList { public Guid[] ids { get; set; } public Guid subjectVisitId { get; set; } public Guid trialId { get; set; } } #endregion #region 受试者 public class InsSubjectCommand : InspectionBase, IInspectionDTO, ISignDTO { public SubjectCommand OptCommand { get; set; } } public class InsUpdateSubjectStatus : InspectionBase, IInspectionDTO, ISignDTO { public SubjectStatusChangeCommand OptCommand { get; set; } } public class InsDeleteSubjectDto : InspectionBase, IInspectionDTO, ISignDTO { public DeleteSubjectDto OptCommand { get; set; } } public class DeleteSubjectDto { public Guid SubjectId { get; set; } public Guid TrialId { get; set; } public Guid SiteId { get; set; } public string Code { get; set; } = string.Empty; } #endregion /// /// 用户 签名某个文档 Dto /// public class TrialDocumentConfirmDTO : InspectionBase, IInspectionDTO, ISignDTO { public UserConfirmCommand OptCommand { get; set; } } public class GetDataInspectionOutDto : DataInspection { public string ExperimentName { get; set; } = string.Empty; public string FirstName { get; set; } = string.Empty; public string LastName { get; set; } = string.Empty; public string VisitName { get; set; } = string.Empty; public string ParentJson { get; set; } = string.Empty; public string CreateUser { get; set; } = string.Empty; public string UserFirstName { get; set; } = string.Empty; public string UserLastName { get; set; } = string.Empty; public string Description { get; set; } = string.Empty; public string ModuleTypeName { get; set; } = string.Empty; public string SignText { get; set; } = string.Empty; //public string OptType { get; set; } = string.Empty; } public class GetDataInspectionDto : PageInput { /// /// 功能模块 /// public string ModuleType { get; set; } = string.Empty; /// /// 盲态访视名 /// public string BlindName { get; set; } = string.Empty; /// /// 项目iD /// public Guid? TrialId { get; set; } /// /// 中心 /// public Guid? SiteId { get; set; } /// /// 受试者 /// public Guid? SubjectId { get; set; } /// /// 访视 /// public Guid? SubjectVisitId { get; set; } /// /// 操作类型 /// public string OptType { get; set; } = string.Empty; /// /// 子类 /// public string ChildrenType { get; set; } = string.Empty; /// /// 修改原因 /// public string Reason { get; set; } = string.Empty; /// /// 是否有签名 /// public bool? IsSign { get; set; } /// /// 对象名称 /// public string ObjectType { get; set; } = string.Empty; } public class InspectionBase { public DataInspectionAddDTO AuditInfo { get; set; } public SignDTO SignInfo { get; set; } = new SignDTO(); } }