83 lines
2.8 KiB
C#
83 lines
2.8 KiB
C#
using System;
|
||
|
||
|
||
using IRaCIS.Application;
|
||
using IRaCIS.Application.Interfaces;
|
||
using IRaCIS.Application.ViewModels;
|
||
using IRaCIS.Core.Application.Contracts.RequestAndResponse;
|
||
using Microsoft.AspNetCore.Authorization;
|
||
using Microsoft.AspNetCore.Mvc;
|
||
|
||
namespace IRaCIS.Api.Controllers
|
||
{
|
||
/// <summary>
|
||
/// 医生临床试验经历
|
||
/// </summary>
|
||
[Route("doctor")]
|
||
[ApiController, Authorize, ApiExplorerSettings(GroupName = "Reviewer")]
|
||
public class TrialExperienceController : ControllerBase
|
||
{
|
||
private readonly ITrialExperienceService _doctorTrialExperienceService;
|
||
|
||
public TrialExperienceController(ITrialExperienceService doctorTrialExperienceService)
|
||
{
|
||
_doctorTrialExperienceService = doctorTrialExperienceService;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 根据医生Id,获取临床试验经历 界面所有数据
|
||
/// </summary>
|
||
|
||
[HttpGet, Route("getTrialExperience/{doctorId:guid}")]
|
||
public IResponseOutput<TrialExperienceViewModel> GetClinicalTrialExperience(Guid doctorId)
|
||
{
|
||
return ResponseOutput.Ok(_doctorTrialExperienceService.GetTrialExperience(doctorId)) ;
|
||
|
||
}
|
||
|
||
/// <summary> 添加或更新医生临床经验列表项</summary>
|
||
|
||
[HttpPost, Route("addOrUpdateTrialExperience")]
|
||
public IResponseOutput AddOrUpdateClinicalTrialExperience(TrialExperienceCommand trialExperienceViewModel)
|
||
{
|
||
return _doctorTrialExperienceService.AddOrUpdateTrialExperience(trialExperienceViewModel);
|
||
}
|
||
|
||
|
||
/// <summary>
|
||
/// 更新-GCP和其他临床经验
|
||
/// </summary>
|
||
/// <param name="trialExperienceGcpViewModel"></param>
|
||
/// <returns></returns>
|
||
|
||
[HttpPost, Route("updateGcpExperience")]
|
||
public IResponseOutput UpdateDoctorGcpAndOtherExperience(
|
||
GCPExperienceCommand trialExperienceGcpViewModel)
|
||
{
|
||
return _doctorTrialExperienceService.UpdateGcpExperience(trialExperienceGcpViewModel);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 更新其他技能经验
|
||
/// </summary>
|
||
|
||
[HttpPost, Route("updateOtherExperience")]
|
||
public IResponseOutput UpdateOtherExperience(ClinicalExperienceCommand updateOtherClinicalExperience)
|
||
{
|
||
return _doctorTrialExperienceService.UpdateOtherExperience(updateOtherClinicalExperience.DoctorId, updateOtherClinicalExperience.OtherClinicalExperience);
|
||
|
||
|
||
}
|
||
|
||
/// <summary>
|
||
/// 删除临床经验
|
||
/// </summary>
|
||
|
||
[HttpDelete, Route("deleteTrialExperience/{doctorId:guid}")]
|
||
public IResponseOutput DeleteDoctorTrialExperience(Guid doctorId)
|
||
{
|
||
return _doctorTrialExperienceService.DeleteTrialExperience(doctorId);
|
||
}
|
||
}
|
||
}
|