diff --git a/IRaCIS.Core.API/Controllers/InspectionController.cs b/IRaCIS.Core.API/Controllers/InspectionController.cs index e9b53ceaa..8861c2360 100644 --- a/IRaCIS.Core.API/Controllers/InspectionController.cs +++ b/IRaCIS.Core.API/Controllers/InspectionController.cs @@ -10,6 +10,7 @@ using IRaCIS.Core.Application.Interfaces; using IRaCIS.Core.Application.Service.Inspection.DTO; using IRaCIS.Core.Application.Service.Inspection.Interface; using IRaCIS.Core.Application.Service.Reading.Dto; +using IRaCIS.Core.Application.ViewModel; using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Infra.EFCore; @@ -42,7 +43,7 @@ namespace IRaCIS.Core.API.Controllers private readonly IVisitPlanService _visitPlanService; private readonly IInspectionService _inspectionService; - + private readonly IReadingMedicineQuestionService _readingMedicineQuestionService; private readonly IRepository _dataInspectionRepository; private delegate Task executionFun(dynamic data); @@ -55,6 +56,7 @@ namespace IRaCIS.Core.API.Controllers IReadingImageTaskService _iReadingImageTaskService, IHttpContextAccessor httpContext, IInspectionService sinspectionService, + IReadingMedicineQuestionService readingMedicineQuestionService, ITrialConfigService _trialConfigService, INoneDicomStudyService noneDicomStudyService, ISubjectService _subjectService, @@ -69,6 +71,7 @@ namespace IRaCIS.Core.API.Controllers this._mapper = mapper; this._userInfo = userInfo; this._inspectionService = sinspectionService; + this._readingMedicineQuestionService = readingMedicineQuestionService; this._trialDocumentService = trialDocumentService; this._qCListService = _qCListService; this._iReadingImageTaskService = _iReadingImageTaskService; @@ -100,6 +103,23 @@ namespace IRaCIS.Core.API.Controllers #endregion + + /// + /// 确认项目医学审核问题 + /// + /// + /// + [HttpPost, Route("Inspection/ReadingMedicineQuestion/ConfirmReadingMedicineQuestion")] + [UnitOfWork] + public async Task ConfirmReadingMedicineQuestion(DataInspectionDto opt) + { + var singid = await _inspectionService.RecordSing(opt.SignInfo); + var result = await _readingMedicineQuestionService.ConfirmReadingMedicineQuestion(opt.Data); + await _inspectionService.CompletedSign(singid, result); + return result; + } + + /// /// 提交阅片问题 /// diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs new file mode 100644 index 000000000..1a4aa283d --- /dev/null +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs @@ -0,0 +1,18 @@ +using IRaCIS.Core.Application.Contracts; +using IRaCIS.Core.Domain.Share; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IRaCIS.Core.Application.Service.Reading.Dto +{ + + public class GetMedicalReviewReadingTaskInDto + { + + } + +} diff --git a/IRaCIS.Core.Application/Service/Reading/Interface/IReadingMedicineQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/Interface/IReadingMedicineQuestionService.cs new file mode 100644 index 000000000..5015eae36 --- /dev/null +++ b/IRaCIS.Core.Application/Service/Reading/Interface/IReadingMedicineQuestionService.cs @@ -0,0 +1,17 @@ +//-------------------------------------------------------------------- +// 此代码由T4模板自动生成 byzhouhang 20210918 +// 生成时间 2021-12-23 13:20:59 +// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 +//-------------------------------------------------------------------- + + +using IRaCIS.Core.Application.ViewModel; +using IRaCIS.Core.Domain.Share; + +namespace IRaCIS.Core.Application.Contracts +{ + public interface IReadingMedicineQuestionService + { + Task ConfirmReadingMedicineQuestion(ConfirmReadingMedicineQuestionInDto inDto); + } +} \ No newline at end of file diff --git a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs index 1b5bd4abe..594434864 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs @@ -153,7 +153,7 @@ namespace IRaCIS.Application.Services { #region MyRegion - dto.SortField = dto.SortField.IsNullOrEmpty() ? "TrialSiteCode" : dto.SortField; + dto.SortField = dto.SortField.IsNullOrEmpty() ? nameof(ReadModuleView.TrialSiteCode) : dto.SortField; dto.SortField = dto.Asc ? dto.SortField : dto.SortField + " desc"; var subjectQuery = _readModuleViewRepository.WhereIf(dto.TrialId != null, x => x.TrialId == dto.TrialId) .WhereIf(dto.SubjectId != null, x => x.SubjectId == dto.SubjectId) @@ -165,9 +165,6 @@ namespace IRaCIS.Application.Services var subjectIds = await subjectQuery.OrderBy(dto.SortField).Select(x => x.SubjectId).Distinct().Skip((dto.PageIndex - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync(); - - - List ReadModuleViewList = await subjectQuery.Where(x => subjectIds.Contains(x.SubjectId)).OrderBy(dto.SortField).ToListAsync(); List getReadList = ReadModuleViewList.GroupBy(x => new { x.SubjectId, x.SiteId, x.TrialSiteCode, x.SubjectCode }) .Select(x => new GetReadModuleDtoOut() diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs index 8657a0c30..2476fd74d 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs @@ -6,6 +6,7 @@ using IRaCIS.Core.Application.ViewModel; using IRaCIS.Core.Infra.EFCore.Common; using MassTransit; using IRaCIS.Core.Infrastructure; +using IRaCIS.Core.Application.Service.Reading.Dto; namespace IRaCIS.Core.Application.Service { @@ -31,9 +32,17 @@ namespace IRaCIS.Core.Application.Service this._readingMedicineSystemQuestionRepository = readingMedicineSystemQuestionRepository; } - - + /// + /// 获取 + /// + /// + /// + public async Task GetMedicalReviewReadingTask(GetMedicalReviewReadingTaskInDto inDto) + { + + } - } + + } } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingMedicineQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingMedicineQuestionService.cs index 783cf1696..da56ecc2e 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingMedicineQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingMedicineQuestionService.cs @@ -6,6 +6,7 @@ using IRaCIS.Core.Application.ViewModel; using IRaCIS.Core.Infra.EFCore.Common; using MassTransit; using IRaCIS.Core.Infrastructure; +using IRaCIS.Core.Application.Contracts; namespace IRaCIS.Core.Application.Service { @@ -13,8 +14,8 @@ namespace IRaCIS.Core.Application.Service /// 医学审核问题 /// [ ApiExplorerSettings(GroupName = "Reading")] - public class ReadingMedicineQuestionService: BaseService - { + public class ReadingMedicineQuestionService: BaseService, IReadingMedicineQuestionService + { private readonly IRepository _readingMedicineTrialQuestionRepository; private readonly IRepository _trialRepository; diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs index 9ff0d96f2..1231abd3f 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs @@ -755,4 +755,4 @@ namespace IRaCIS.Application.Services } } -} +} \ No newline at end of file