修改接口参数

Uat_Study
hang 2022-05-07 11:58:38 +08:00
parent cc1d80d40b
commit 2730987acf
6 changed files with 40 additions and 44 deletions

View File

@ -319,16 +319,16 @@ namespace IRaCIS.Core.API.Controllers
} }
/// <summary> ///// <summary>
/// QC修改检查部位和 拍片类型 ///// QC修改检查部位和 拍片类型
/// </summary> ///// </summary>
[HttpPost, Route("Inspection/QCOperation/UpdateModality")] //[HttpPost, Route("Inspection/QCOperation/UpdateModality")]
[UnitOfWork] //[UnitOfWork]
public async Task<IResponseOutput> UpdateModality(DataInspectionDto<UpdateModalityDto> opt) //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); // 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); // return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
} //}
/// <summary> /// <summary>
/// 1、设置为不读片2 设置为读片(取消 先前设置为不读片) 4 设置为删除(数据库记录软删除) 5 恢复为未删除 /// 1、设置为不读片2 设置为读片(取消 先前设置为不读片) 4 设置为删除(数据库记录软删除) 5 恢复为未删除

View File

@ -146,11 +146,6 @@
一致性核查 回退 对话记录不清除 只允许PM回退 一致性核查 回退 对话记录不清除 只允许PM回退
</summary> </summary>
</member> </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})"> <member name="M:IRaCIS.Core.API.Controllers.InspectionController.SetSeriesState(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Service.Inspection.DTO.SetSeriesStateDto})">
<summary> <summary>
1、设置为不读片2 设置为读片(取消 先前设置为不读片) 4 设置为删除(数据库记录软删除) 5 恢复为未删除 1、设置为不读片2 设置为读片(取消 先前设置为不读片) 4 设置为删除(数据库记录软删除) 5 恢复为未删除

View File

@ -1563,15 +1563,10 @@
<param name="state"></param> <param name="state"></param>
<returns></returns> <returns></returns>
</member> </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> <summary>
type 1 :study 2: series 3:非dicom QC修改检查部位和 拍片类型 type 1 :study 2: series 3:非dicom QC修改检查部位和 拍片类型
</summary> </summary>
<param name="id"></param>
<param name="subjectVisitId"></param>
<param name="type"></param>
<param name="modality"></param>
<param name="bodyPart"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.VerifyCanQCPassedOrFailed(System.Guid)"> <member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.VerifyCanQCPassedOrFailed(System.Guid)">

View File

@ -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 public class QCQuestionAnswerCommand
{ {

View File

@ -34,7 +34,7 @@ namespace IRaCIS.Core.Application.Image.QA
Task<IResponseOutput> SetReuploadFinished(CRCReuploadFinishedCommand cRCReuploadFinishedCommand); Task<IResponseOutput> SetReuploadFinished(CRCReuploadFinishedCommand cRCReuploadFinishedCommand);
Task<IResponseOutput> SetSeriesState(Guid subjectVisitId, Guid studyId, Guid seriesId, int state); Task<IResponseOutput> SetSeriesState(Guid subjectVisitId, Guid studyId, Guid seriesId, int state);
Task<IResponseOutput> SetVisitUrgent(Guid trialId, Guid subjectVisitId, bool setOrCancel); 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> UpdateSubjectAndSVInfo(UploadSubjectAndVisitCommand command);
Task<IResponseOutput> UploadVisitCheckExcel(IFormFile file, Guid trialId); Task<IResponseOutput> UploadVisitCheckExcel(IFormFile file, Guid trialId);
Task<IResponseOutput> VerifyCanQCPassedOrFailed(Guid subjectVisitId); Task<IResponseOutput> VerifyCanQCPassedOrFailed(Guid subjectVisitId);

View File

@ -784,46 +784,40 @@ namespace IRaCIS.Core.Application.Image.QA
/// <summary> /// <summary>
///type 1 :study 2: series 3:非dicom QC修改检查部位和 拍片类型 ///type 1 :study 2: series 3:非dicom QC修改检查部位和 拍片类型
/// </summary> /// </summary>
/// <param name="id"></param>
/// <param name="subjectVisitId"></param>
/// <param name="type"></param>
/// <param name="modality"></param>
/// <param name="bodyPart"></param>
/// <returns></returns> /// <returns></returns>
[HttpPut("{trialId:guid}/{subjectVisitId:guid}/{id:guid}/{type:int}")] [HttpPost("{trialId:guid}")]
[TypeFilter(typeof(TrialResourceFilter))] [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); 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; study.BodyPartForEdit = updateModalityCommand.BodyPart;
await _repository.BatchUpdateAsync<DicomSeries>(t => t.StudyId == id, r => new DicomSeries() { BodyPartForEdit = bodyPart, Modality = modality }); 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); var seriesId = updateModalityCommand.Id;
series.BodyPartForEdit = bodyPart; 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(); await _repository.SaveChangesAsync();
return ResponseOutput.Ok(); return ResponseOutput.Ok();
} }