修改接口参数
							parent
							
								
									cc1d80d40b
								
							
						
					
					
						commit
						2730987acf
					
				| 
						 | 
				
			
			@ -319,16 +319,16 @@ namespace IRaCIS.Core.API.Controllers
 | 
			
		|||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// QC修改检查部位和 拍片类型
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        [HttpPost, Route("Inspection/QCOperation/UpdateModality")]
 | 
			
		||||
        [UnitOfWork]
 | 
			
		||||
        public async Task<IResponseOutput> UpdateModality(DataInspectionDto<UpdateModalityDto> opt)
 | 
			
		||||
        {
 | 
			
		||||
            var fun = await _qCOperationService.UpdateModality(opt.OptCommand.id, (Guid)opt.AuditInfo.SubjectVisitId, opt.OptCommand.type, opt.OptCommand.modality, opt.OptCommand.bodyPart);
 | 
			
		||||
            return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
 | 
			
		||||
        }
 | 
			
		||||
        ///// <summary>
 | 
			
		||||
        ///// QC修改检查部位和 拍片类型
 | 
			
		||||
        ///// </summary>
 | 
			
		||||
        //[HttpPost, Route("Inspection/QCOperation/UpdateModality")]
 | 
			
		||||
        //[UnitOfWork]
 | 
			
		||||
        //public async Task<IResponseOutput> UpdateModality(DataInspectionDto<UpdateModalityDto> opt)
 | 
			
		||||
        //{
 | 
			
		||||
        //    var fun = await _qCOperationService.UpdateModality(opt.OptCommand.id, (Guid)opt.AuditInfo.SubjectVisitId, opt.OptCommand.type, opt.OptCommand.modality, opt.OptCommand.bodyPart);
 | 
			
		||||
        //    return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
 | 
			
		||||
        //}
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// 1、设置为不读片,2 设置为读片(取消 先前设置为不读片)  4 设置为删除(数据库记录软删除) 5 恢复为未删除
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -146,11 +146,6 @@
 | 
			
		|||
            一致性核查 回退  对话记录不清除  只允许PM回退
 | 
			
		||||
            </summary>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:IRaCIS.Core.API.Controllers.InspectionController.UpdateModality(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Service.Inspection.DTO.UpdateModalityDto})">
 | 
			
		||||
            <summary>
 | 
			
		||||
            QC修改检查部位和 拍片类型
 | 
			
		||||
            </summary>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:IRaCIS.Core.API.Controllers.InspectionController.SetSeriesState(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Service.Inspection.DTO.SetSeriesStateDto})">
 | 
			
		||||
            <summary>
 | 
			
		||||
            1、设置为不读片,2 设置为读片(取消 先前设置为不读片)  4 设置为删除(数据库记录软删除) 5 恢复为未删除
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1563,15 +1563,10 @@
 | 
			
		|||
            <param name="state"></param>
 | 
			
		||||
            <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.UpdateModality(System.Guid,System.Guid,System.Int32,System.String,System.String)">
 | 
			
		||||
        <member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.UpdateModality(IRaCIS.Core.Application.Contracts.DTO.UpdateModalityCommand)">
 | 
			
		||||
             <summary>
 | 
			
		||||
            type 1 :study 2: series 3:非dicom  QC修改检查部位和 拍片类型
 | 
			
		||||
             </summary>
 | 
			
		||||
             <param name="id"></param>
 | 
			
		||||
             <param name="subjectVisitId"></param>
 | 
			
		||||
             <param name="type"></param>
 | 
			
		||||
             <param name="modality"></param>
 | 
			
		||||
             <param name="bodyPart"></param>
 | 
			
		||||
             <returns></returns>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.VerifyCanQCPassedOrFailed(System.Guid)">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,6 +37,18 @@ namespace IRaCIS.Core.Application.Contracts.DTO
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    public class UpdateModalityCommand
 | 
			
		||||
    {
 | 
			
		||||
        public Guid Id { get; set; }
 | 
			
		||||
        public Guid SubjectVisitId { get; set; }
 | 
			
		||||
 | 
			
		||||
        public int Type { get; set; }
 | 
			
		||||
 | 
			
		||||
        public string Modality { get; set; } = String.Empty;
 | 
			
		||||
 | 
			
		||||
        public string BodyPart { get; set; } = String.Empty;
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class QCQuestionAnswerCommand
 | 
			
		||||
    {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -34,7 +34,7 @@ namespace IRaCIS.Core.Application.Image.QA
 | 
			
		|||
        Task<IResponseOutput> SetReuploadFinished(CRCReuploadFinishedCommand cRCReuploadFinishedCommand);
 | 
			
		||||
        Task<IResponseOutput> SetSeriesState(Guid subjectVisitId, Guid studyId, Guid seriesId, int state);
 | 
			
		||||
        Task<IResponseOutput> SetVisitUrgent(Guid trialId, Guid subjectVisitId, bool setOrCancel);
 | 
			
		||||
        Task<IResponseOutput> UpdateModality(Guid id, Guid subjectVisitId, int type, [FromQuery] string modality, [FromQuery] string bodyPart);
 | 
			
		||||
        Task<IResponseOutput> UpdateModality(UpdateModalityCommand updateModalityCommand);
 | 
			
		||||
        Task<IResponseOutput> UpdateSubjectAndSVInfo(UploadSubjectAndVisitCommand command);
 | 
			
		||||
        Task<IResponseOutput> UploadVisitCheckExcel(IFormFile file, Guid trialId);
 | 
			
		||||
        Task<IResponseOutput> VerifyCanQCPassedOrFailed(Guid subjectVisitId);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -784,46 +784,40 @@ namespace IRaCIS.Core.Application.Image.QA
 | 
			
		|||
        /// <summary>
 | 
			
		||||
        ///type 1 :study 2: series 3:非dicom  QC修改检查部位和 拍片类型
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="id"></param>
 | 
			
		||||
        /// <param name="subjectVisitId"></param>
 | 
			
		||||
        /// <param name="type"></param>
 | 
			
		||||
        /// <param name="modality"></param>
 | 
			
		||||
        /// <param name="bodyPart"></param>
 | 
			
		||||
        /// <returns></returns>
 | 
			
		||||
        [HttpPut("{trialId:guid}/{subjectVisitId:guid}/{id:guid}/{type:int}")]
 | 
			
		||||
        [HttpPost("{trialId:guid}")]
 | 
			
		||||
        [TypeFilter(typeof(TrialResourceFilter))]
 | 
			
		||||
        public async Task<IResponseOutput> UpdateModality(Guid id, Guid subjectVisitId, int type,  string modality,  string bodyPart)
 | 
			
		||||
        public async Task<IResponseOutput> UpdateModality(UpdateModalityCommand updateModalityCommand)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            await VerifyIsCanQCAsync(null, subjectVisitId);
 | 
			
		||||
            await VerifyIsCanQCAsync(null, updateModalityCommand.SubjectVisitId);
 | 
			
		||||
 | 
			
		||||
            var DicomSeriesdata = await _repository.GetQueryable<DicomSeries>().Where(x => x.StudyId == id).ToListAsync();
 | 
			
		||||
            var study = await _repository.FirstOrDefaultAsync<DicomStudy>(t => t.Id == id);
 | 
			
		||||
        
 | 
			
		||||
            DateTime time = DateTime.Now.AddMilliseconds(500);
 | 
			
		||||
            if (type == 1)
 | 
			
		||||
            if (updateModalityCommand.Type == 1)
 | 
			
		||||
            {
 | 
			
		||||
 | 
			
		||||
                if (study == null) return Null404NotFound(study);
 | 
			
		||||
                var studyId = updateModalityCommand.Id;
 | 
			
		||||
                var study = (await _repository.FirstOrDefaultAsync<DicomStudy>(t => t.Id == studyId)).IfNullThrowException();
 | 
			
		||||
 | 
			
		||||
                study.BodyPartForEdit = bodyPart;
 | 
			
		||||
                study.Modalities = modality;
 | 
			
		||||
                await _repository.BatchUpdateAsync<DicomSeries>(t => t.StudyId == id, r => new DicomSeries() { BodyPartForEdit = bodyPart, Modality = modality });
 | 
			
		||||
 | 
			
		||||
                study.BodyPartForEdit = updateModalityCommand.BodyPart;
 | 
			
		||||
                study.Modalities = updateModalityCommand.Modality;
 | 
			
		||||
                await _repository.BatchUpdateAsync<DicomSeries>(t => t.StudyId == studyId, r => new DicomSeries() { BodyPartForEdit = updateModalityCommand.BodyPart, Modality = updateModalityCommand.Modality });
 | 
			
		||||
            }
 | 
			
		||||
            else if (type == 2)
 | 
			
		||||
            else if (updateModalityCommand.Type == 2)
 | 
			
		||||
            {
 | 
			
		||||
                var series = await _repository.FirstOrDefaultAsync<DicomSeries>(t => t.Id == id);
 | 
			
		||||
                if (series == null) return Null404NotFound(series);
 | 
			
		||||
                series.BodyPartForEdit = bodyPart;
 | 
			
		||||
 | 
			
		||||
                var seriesId = updateModalityCommand.Id;
 | 
			
		||||
                var series = (await _repository.FirstOrDefaultAsync<DicomSeries>(t => t.Id == seriesId)).IfNullThrowException();
 | 
			
		||||
                series.BodyPartForEdit = updateModalityCommand.BodyPart;
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
            else if (type == 3)
 | 
			
		||||
            else if (updateModalityCommand.Type == 3)
 | 
			
		||||
            {
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // 移动不进去
 | 
			
		||||
            //await _trialRepository.AddListInspectionRecordAsync(datas);
 | 
			
		||||
            await _repository.SaveChangesAsync();
 | 
			
		||||
            return ResponseOutput.Ok();
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue