IRC_NewDev
parent
ceda3f8427
commit
d644e150ec
|
@ -465,6 +465,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public List<ChangeDicomReadingQuestionAnswerDto> Answers { get; set; }
|
||||
|
||||
|
||||
public List<QuestionMarkInfo> QuestionMarkInfoList { get; set; } = new List<QuestionMarkInfo>();
|
||||
}
|
||||
|
||||
|
||||
|
@ -707,6 +710,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public class GetReadingQuestionAndAnswerOutDto: GetReadingTableQuestionOutDto
|
||||
{
|
||||
|
||||
public List<QuestionMarkInfo> QuestionMarkInfoList { get; set; }
|
||||
|
||||
public bool IsBaseLineTask { get; set; }
|
||||
|
||||
public decimal TaskNum { get; set; }
|
||||
|
@ -981,6 +986,52 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public Guid? QuestionId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class QuestionMarkInfo
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 问题Id
|
||||
/// </summary>
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// InstanceId
|
||||
/// </summary>
|
||||
public Guid InstanceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// SeriesId
|
||||
/// </summary>
|
||||
public Guid SeriesId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// StudyId
|
||||
/// </summary>
|
||||
public Guid StudyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// MarkTool
|
||||
/// </summary>
|
||||
public string MarkTool { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// PicturePath
|
||||
/// </summary>
|
||||
public string PicturePath { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// NumberOfFrames
|
||||
/// </summary>
|
||||
public int? NumberOfFrames { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// MeasureData
|
||||
/// </summary>
|
||||
public string MeasureData { get; set; } = string.Empty;
|
||||
}
|
||||
public class GetReadingQuestionAndAnswerInDto
|
||||
{
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ namespace IRaCIS.Application.Services
|
|||
private readonly IRepository<TrialDocument> _trialDocumentRepository;
|
||||
private readonly IRepository<User> _userRepository;
|
||||
private readonly IRepository<ReadingCustomTag> _readingCustomTagRepository;
|
||||
private readonly IRepository<ReadingTaskQuestionMark> _readingTaskQuestionMarkRepository;
|
||||
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||
private readonly IRepository<TumorAssessment_RECIST1Point1> _tumorAssessmentRepository;
|
||||
|
@ -86,6 +87,7 @@ namespace IRaCIS.Application.Services
|
|||
IRepository<TrialDocument> trialDocumentRepository,
|
||||
IRepository<User> userRepository,
|
||||
IRepository<ReadingCustomTag> readingCustomTagRepository,
|
||||
IRepository<ReadingTaskQuestionMark> readingTaskQuestionMarkRepository,
|
||||
IMemoryCache cache,
|
||||
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||
|
@ -124,6 +126,7 @@ namespace IRaCIS.Application.Services
|
|||
this._trialDocumentRepository = trialDocumentRepository;
|
||||
this._userRepository = userRepository;
|
||||
this._readingCustomTagRepository = readingCustomTagRepository;
|
||||
this._readingTaskQuestionMarkRepository = readingTaskQuestionMarkRepository;
|
||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||
this._tumorAssessmentRepository = tumorAssessmentRepository;
|
||||
this._readingTableAnswerRowInfoRepository = readingTableAnswerRowInfoRepository;
|
||||
|
@ -898,7 +901,8 @@ namespace IRaCIS.Application.Services
|
|||
result.PublicPage = questionPage.PublicPage;
|
||||
result.BlindName = visitTaskInfo.TaskBlindName;
|
||||
result.TaskNum = visitTaskInfo.VisitTaskNum;
|
||||
|
||||
result.QuestionMarkInfoList=await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ProjectTo<QuestionMarkInfo>(_mapper.ConfigurationProvider)
|
||||
.ToListAsync();
|
||||
return (result, new
|
||||
{
|
||||
readingTaskState = visitTaskInfo.ReadingTaskState,
|
||||
|
@ -1530,6 +1534,25 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
}).ToList();
|
||||
await _readingTaskQuestionAnswerRepository.AddRangeAsync(needAddAnswer);
|
||||
|
||||
await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId);
|
||||
|
||||
List<ReadingTaskQuestionMark> markList = inDto.QuestionMarkInfoList.Select(x => new ReadingTaskQuestionMark
|
||||
{
|
||||
|
||||
Id = NewId.NextGuid(),
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
InstanceId = x.InstanceId,
|
||||
MarkTool = x.MarkTool,
|
||||
NumberOfFrames = x.NumberOfFrames,
|
||||
PicturePath = x.PicturePath,
|
||||
MeasureData = x.PicturePath,
|
||||
QuestionId = x.QuestionId,
|
||||
SeriesId = x.SeriesId,
|
||||
StudyId = x.StudyId,
|
||||
|
||||
});
|
||||
|
||||
await _readingTaskQuestionAnswerRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok(true);
|
||||
}
|
||||
|
|
|
@ -94,16 +94,16 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.Value, u => u.MapFrom(s => s.Dictionary.Value))
|
||||
.ForMember(d => d.ValueCN, u => u.MapFrom(s => s.Dictionary.ValueCN));
|
||||
|
||||
CreateMap<ReadingTaskQuestionMark, QuestionMarkInfo>();
|
||||
|
||||
//CreateMap<ReadingClinicalDataView, GetReadingClinicalDataListOutDto>();
|
||||
// CreateMap<ReadingClinicalData, GetReadingClinicalDataListOutDto>()
|
||||
//.ForMember(d => d.ClinicalDataLevel, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalDataLevel))
|
||||
//.ForMember(d => d.ClinicalDataLevelName, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalDataSetName))
|
||||
//.ForMember(d => d.ClinicalUploadType, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalUploadType));
|
||||
//.ForMember(d => d.FileCount, u => u.MapFrom(s => s.ReadingClinicalDataPDFList.Count()));
|
||||
|
||||
//CreateMap<ReadingClinicalDataView, GetReadingClinicalDataListOutDto>();
|
||||
// CreateMap<ReadingClinicalData, GetReadingClinicalDataListOutDto>()
|
||||
//.ForMember(d => d.ClinicalDataLevel, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalDataLevel))
|
||||
//.ForMember(d => d.ClinicalDataLevelName, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalDataSetName))
|
||||
//.ForMember(d => d.ClinicalUploadType, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalUploadType));
|
||||
//.ForMember(d => d.FileCount, u => u.MapFrom(s => s.ReadingClinicalDataPDFList.Count()));
|
||||
|
||||
CreateMap<ReadingClinicalDataPDF, GetReadingClinicalDataPDFListOutDto>();
|
||||
CreateMap<ReadingClinicalDataPDF, GetReadingClinicalDataPDFListOutDto>();
|
||||
|
||||
//.ForMember(d => d.SiteNames, u => u.MapFrom(s => s.ReadingPeriodSites.SelectMany(x => x.Site.SiteName).ToList()));
|
||||
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2023-09-21 16:08:07
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[Table("ReadingTaskQuestionMark")]
|
||||
public class ReadingTaskQuestionMark : Entity, IAuditAdd
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 任务Id
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题Id
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// InstanceId
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid InstanceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// SeriesId
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid SeriesId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// StudyId
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid StudyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// MarkTool
|
||||
/// </summary>
|
||||
public string MarkTool { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// PicturePath
|
||||
/// </summary>
|
||||
public string PicturePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// NumberOfFrames
|
||||
/// </summary>
|
||||
public int? NumberOfFrames { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// MeasureData
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string MeasureData { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// CreateTime
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateUserId
|
||||
/// </summary>
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -287,6 +287,7 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
public virtual DbSet<SubjectCriteriaEvaluationVisitFilter> SubjectCriteriaEvaluationVisitFilter { get; set; }
|
||||
public virtual DbSet<SubjectCriteriaEvaluationVisitStudyFilter> SubjectCriteriaEvaluationVisitStudyFilter { get; set; }
|
||||
|
||||
public virtual DbSet<ReadingTaskQuestionMark> ReadingTaskQuestionMark { get; set; }
|
||||
|
||||
|
||||
//public virtual DbSet<TrialClinicalDataCriterion> TrialClinicalDataCriterion { get; set; }
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<#+
|
||||
public class config
|
||||
{
|
||||
public static readonly string ConnectionString = "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true";
|
||||
public static readonly string DbDatabase = "IRaCIS_New_Tet";
|
||||
public static readonly string ConnectionString = "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Test.IRC;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true";
|
||||
public static readonly string DbDatabase = "Test.IRC";
|
||||
//表名称用字符串,拼接
|
||||
public static readonly string TableName = "ReadingCustomTag";
|
||||
public static readonly string TableName = "ReadingTaskQuestionMark";
|
||||
//具体文件里面 例如service 可以配置是否分页
|
||||
}
|
||||
#>
|
||||
|
@ -21,12 +21,12 @@
|
|||
}
|
||||
string sql = string.Format(@"SELECT
|
||||
obj.name tablename
|
||||
from {0}.sys.objects obj
|
||||
inner join {0}.dbo.sysindexes idx on obj.object_id=idx.id and idx.indid<=1
|
||||
INNER JOIN {0}.sys.schemas schem ON obj.schema_id=schem.schema_id
|
||||
left join {0}.sys.extended_properties g ON (obj.object_id = g.major_id AND g.minor_id = 0 AND g.name= 'MS_Description')
|
||||
where type='U' {1}
|
||||
order by obj.name", database,tables);
|
||||
from sys.objects obj
|
||||
inner join dbo.sysindexes idx on obj.object_id=idx.id and idx.indid<=1
|
||||
INNER JOIN sys.schemas schem ON obj.schema_id=schem.schema_id
|
||||
left join sys.extended_properties g ON (obj.object_id = g.major_id AND g.minor_id = 0 AND g.name= 'MS_Description')
|
||||
where type='U' {0}
|
||||
order by obj.name",tables);
|
||||
DataTable dt = GetDataTable(connectionString, sql);
|
||||
return dt.Rows.Cast<DataRow>().Select(row =>row.Field<string>("tablename")).ToList();
|
||||
}
|
||||
|
@ -50,11 +50,11 @@
|
|||
ELSE 0
|
||||
END
|
||||
AS BIT) HasPrimaryKey
|
||||
from {0}.sys.objects obj
|
||||
inner join {0}.dbo.sysindexes idx on obj.object_id=idx.id and idx.indid<=1
|
||||
INNER JOIN {0}.sys.schemas schem ON obj.schema_id=schem.schema_id
|
||||
where type='U' {1}
|
||||
order by obj.name", database, tables);
|
||||
from sys.objects obj
|
||||
inner join dbo.sysindexes idx on obj.object_id=idx.id and idx.indid<=1
|
||||
INNER JOIN sys.schemas schem ON obj.schema_id=schem.schema_id
|
||||
where type='U' {0}
|
||||
order by obj.name", tables);
|
||||
#endregion
|
||||
DataTable dt = GetDataTable(connectionString, sql);
|
||||
return dt.Rows.Cast<DataRow>().Select(row => new DbTable
|
||||
|
@ -79,8 +79,8 @@
|
|||
ic.column_id,
|
||||
ic.index_column_id,
|
||||
ic.object_id
|
||||
FROM {0}.sys.indexes idx
|
||||
INNER JOIN {0}.sys.index_columns ic ON idx.index_id = ic.index_id AND idx.object_id = ic.object_id
|
||||
FROM sys.indexes idx
|
||||
INNER JOIN sys.index_columns ic ON idx.index_id = ic.index_id AND idx.object_id = ic.object_id
|
||||
WHERE idx.object_id =OBJECT_ID(@tableName) AND idx.is_primary_key=1
|
||||
)
|
||||
select
|
||||
|
@ -102,14 +102,14 @@
|
|||
cast(colm.precision as int) Precision,
|
||||
cast(colm.scale as int) Scale,
|
||||
prop.value Remark
|
||||
from {0}.sys.columns colm
|
||||
inner join {0}.sys.types systype on colm.system_type_id=systype.system_type_id and colm.user_type_id=systype.user_type_id
|
||||
left join {0}.sys.extended_properties prop on colm.object_id=prop.major_id and colm.column_id=prop.minor_id
|
||||
from sys.columns colm
|
||||
inner join sys.types systype on colm.system_type_id=systype.system_type_id and colm.user_type_id=systype.user_type_id
|
||||
left join sys.extended_properties prop on colm.object_id=prop.major_id and colm.column_id=prop.minor_id
|
||||
LEFT JOIN indexCTE ON colm.column_id=indexCTE.column_id AND colm.object_id=indexCTE.object_id
|
||||
where colm.object_id=OBJECT_ID(@tableName)
|
||||
order by colm.column_id", database);
|
||||
order by colm.column_id");
|
||||
#endregion
|
||||
SqlParameter param = new SqlParameter("@tableName", SqlDbType.NVarChar, 100) { Value = string.Format("{0}.{1}.{2}", database, schema, tableName) };
|
||||
SqlParameter param = new SqlParameter("@tableName", SqlDbType.NVarChar, 100) { Value = string.Format("{0}.{1}", schema, tableName) };
|
||||
DataTable dt = GetDataTable(connectionString, sql, param);
|
||||
return dt.Rows.Cast<DataRow>().Select(row => new DbColumn()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue