api ประวัติการออกคำสั่ง

This commit is contained in:
Kittapath 2024-01-05 09:25:03 +07:00
parent a61bc8fc77
commit 528ebda465
3 changed files with 56 additions and 0 deletions

View file

@ -4698,6 +4698,33 @@ namespace BMA.EHR.Command.Service.Controllers
}
}
/// <summary>
/// แสดงประวัติการออกคำสั่ง
/// </summary>
/// <param name="type">ประเภทระบบคำสั่ง</param>
/// <param name="profileId">Id ผู้ใช้งาน</param>
/// <returns></returns>
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpGet("history/{type}/{profileId}")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<ActionResult<ResponseObject>> GetHistoryCommandByProfileAsync(string type, Guid profileId)
{
try
{
var data = await _repository.GetHistoryCommandByProfileAsync(type, profileId);
return Success(data);
}
catch
{
throw;
}
}
#endregion
}
}