Uat_Study
parent
91a8f855d6
commit
b149922cc2
|
@ -8,6 +8,7 @@ using IRaCIS.Application.Interfaces;
|
||||||
using IRaCIS.Core.Application.Contracts;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
using IRaCIS.Core.Application.Image.QA;
|
using IRaCIS.Core.Application.Image.QA;
|
||||||
|
using IRaCIS.Core.Application.Interfaces;
|
||||||
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
||||||
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
|
@ -31,6 +32,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
private readonly IQCListService _qCListService;
|
private readonly IQCListService _qCListService;
|
||||||
private readonly ITrialConfigService _trialConfigService;
|
private readonly ITrialConfigService _trialConfigService;
|
||||||
private readonly ISubjectService _subjectService;
|
private readonly ISubjectService _subjectService;
|
||||||
|
private readonly ISubjectVisitService _subjectVisitService;
|
||||||
private readonly IInspectionService _inspectionService;
|
private readonly IInspectionService _inspectionService;
|
||||||
private readonly IRepository<DataInspection> _dataInspectionRepository;
|
private readonly IRepository<DataInspection> _dataInspectionRepository;
|
||||||
private delegate Task<IResponseOutput> executionFun(dynamic data);
|
private delegate Task<IResponseOutput> executionFun(dynamic data);
|
||||||
|
@ -42,8 +44,10 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
IRepository<DataInspection> dataInspectionRepository,
|
IRepository<DataInspection> dataInspectionRepository,
|
||||||
IQCListService _qCListService,
|
IQCListService _qCListService,
|
||||||
IInspectionService sinspectionService,
|
IInspectionService sinspectionService,
|
||||||
ITrialConfigService _trialConfigService,
|
ITrialConfigService _trialConfigService,
|
||||||
ISubjectService _subjectService)
|
ISubjectService _subjectService,
|
||||||
|
ISubjectVisitService subjectVisitService
|
||||||
|
)
|
||||||
{
|
{
|
||||||
_repository = repository;
|
_repository = repository;
|
||||||
_mapper = mapper;
|
_mapper = mapper;
|
||||||
|
@ -53,6 +57,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
this._qCListService = _qCListService;
|
this._qCListService = _qCListService;
|
||||||
this._trialConfigService = _trialConfigService;
|
this._trialConfigService = _trialConfigService;
|
||||||
this._subjectService = _subjectService;
|
this._subjectService = _subjectService;
|
||||||
|
_subjectVisitService = subjectVisitService;
|
||||||
this._dataInspectionRepository = dataInspectionRepository;
|
this._dataInspectionRepository = dataInspectionRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,19 +71,27 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
return await _inspectionService.GetInspectionData(dto);
|
return await _inspectionService.GetInspectionData(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
///// <summary>
|
|
||||||
///// 用户 签名某个文档 签署文件
|
|
||||||
///// </summary>
|
|
||||||
///// <param name="opt"></param>
|
|
||||||
///// <returns></returns>
|
|
||||||
//[HttpPost, Route("Inspection/trialDocument/userConfirm")]
|
|
||||||
//[UnitOfWork]
|
|
||||||
//public async Task<IResponseOutput> UserConfirm(TrialDocumentConfirmDTO opt)
|
|
||||||
//{
|
|
||||||
// var fun = _trialDocumentService.UserConfirm;
|
|
||||||
// return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
#region 访视
|
||||||
|
|
||||||
|
[HttpPost, Route("Inspection/subjectVisit/addOrUpdateSV")]
|
||||||
|
[UnitOfWork]
|
||||||
|
public async Task<IResponseOutput> AddOrUpdateSV(DataInspectionDto<SubjectVisitCommand> opt)
|
||||||
|
{
|
||||||
|
//opt.AuditInfo.SubjectCode = opt.OptCommand.Code;
|
||||||
|
var fun = await _subjectVisitService.AddOrUpdateSV(opt.OptCommand);
|
||||||
|
opt.AuditInfo.SubjectId = Guid.Parse(fun.Data);
|
||||||
|
var statusdata = new
|
||||||
|
{
|
||||||
|
Status = 1,
|
||||||
|
//OutEnrollmentTime = DateTime.Now.ToString("yyyy-MM-dd"),
|
||||||
|
//VisitOverTime = DateTime.Now.ToString("yyyy-MM-dd"),
|
||||||
|
Reason = string.Empty,
|
||||||
|
};
|
||||||
|
|
||||||
|
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun, statusdata);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region setting
|
#region setting
|
||||||
///// <summary>
|
///// <summary>
|
||||||
|
@ -138,11 +151,8 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
{
|
{
|
||||||
|
|
||||||
opt.AuditInfo.SubjectCode = opt.OptCommand.Code;
|
opt.AuditInfo.SubjectCode = opt.OptCommand.Code;
|
||||||
|
|
||||||
var fun = await _subjectService.AddOrUpdateSubject(opt.OptCommand);
|
var fun = await _subjectService.AddOrUpdateSubject(opt.OptCommand);
|
||||||
|
|
||||||
opt.AuditInfo.SubjectId = Guid.Parse(fun.Data);
|
opt.AuditInfo.SubjectId = Guid.Parse(fun.Data);
|
||||||
|
|
||||||
var statusdata = new {
|
var statusdata = new {
|
||||||
Status = 1,
|
Status = 1,
|
||||||
//OutEnrollmentTime = DateTime.Now.ToString("yyyy-MM-dd"),
|
//OutEnrollmentTime = DateTime.Now.ToString("yyyy-MM-dd"),
|
||||||
|
|
|
@ -123,6 +123,11 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
public class DataInspectionDto<T> : InspectionBase, IInspectionDTO, ISignDTO
|
||||||
|
{
|
||||||
|
public T OptCommand { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
#region 受试者
|
#region 受试者
|
||||||
public class InsSubjectCommand : InspectionBase, IInspectionDTO, ISignDTO
|
public class InsSubjectCommand : InspectionBase, IInspectionDTO, ISignDTO
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@ namespace IRaCIS.Core.Application.Interfaces
|
||||||
{
|
{
|
||||||
public interface ISubjectVisitService
|
public interface ISubjectVisitService
|
||||||
{
|
{
|
||||||
Task<IResponseOutput> AddOrUpdateSV(SubjectVisitCommand svCommand);
|
Task<IResponseOutput<string>> AddOrUpdateSV(SubjectVisitCommand svCommand);
|
||||||
Task<IResponseOutput> DeleteSV(Guid id);
|
Task<IResponseOutput> DeleteSV(Guid id);
|
||||||
Task<List<VisitStudyDTO>> GetVisitStudyList(Guid trialId, Guid sujectVisitId, int isReading);
|
Task<List<VisitStudyDTO>> GetVisitStudyList(Guid trialId, Guid sujectVisitId, int isReading);
|
||||||
Task<IResponseOutput> SetSVExecuted(Guid subjectVisitId);
|
Task<IResponseOutput> SetSVExecuted(Guid subjectVisitId);
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[TypeFilter(typeof(TrialResourceFilter))]
|
[TypeFilter(typeof(TrialResourceFilter))]
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task<IResponseOutput> AddOrUpdateSV(SubjectVisitCommand svCommand)
|
public async Task<IResponseOutput<string>> AddOrUpdateSV(SubjectVisitCommand svCommand)
|
||||||
{
|
{
|
||||||
|
|
||||||
var verifyExp1 = new EntityVerifyExp<SubjectVisit>()
|
var verifyExp1 = new EntityVerifyExp<SubjectVisit>()
|
||||||
|
@ -178,7 +178,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok(needDealEntity.Id.ToString());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue