Table of Contents

Class PrescriptionsController

Namespace
KadicErp.WebApi.Controllers.HealthCare
Assembly
KadicErp.WebApi.dll
[Route("api/healthcare/prescriptions")]
[Authorize]
[ApiController]
public class PrescriptionsController : ControllerBase
Inheritance
object
ControllerBase
PrescriptionsController

Constructors

PrescriptionsController(ISender, ICurrentUser, ITenantIdContext, IStringLocalizer<GeneralMessages>)

public PrescriptionsController(ISender sender, ICurrentUser currentUser, ITenantIdContext tenantContext, IStringLocalizer<GeneralMessages> localizer)

Parameters

sender ISender
currentUser ICurrentUser
tenantContext ITenantIdContext
localizer IStringLocalizer<GeneralMessages>

Methods

Create(CreatePrescriptionCommand)

[HttpPost]
[Authorize(Policy = "HEALTHCARE_PRESCRIPTIONS_CREATE")]
public Task<IActionResult> Create(CreatePrescriptionCommand command)

Parameters

command CreatePrescriptionCommand

Returns

Task<IActionResult>

GetById(Guid)

[HttpGet("{id:guid}")]
[Authorize(Policy = "HEALTHCARE_PRESCRIPTIONS_VIEW")]
[ProducesResponseType(200)]
[ProducesResponseType(404)]
public Task<IActionResult> GetById(Guid id)

Parameters

id Guid

Returns

Task<IActionResult>

GetList(int, int, Guid?, DateTime?, DateTime?)

[HttpGet]
[Authorize(Policy = "HEALTHCARE_PRESCRIPTIONS_VIEW")]
public Task<IActionResult> GetList(int pageNumber = 1, int pageSize = 20, Guid? patientId = null, DateTime? from = null, DateTime? to = null)

Parameters

pageNumber int
pageSize int
patientId Guid?
from DateTime?
to DateTime?

Returns

Task<IActionResult>

Sign(Guid, SignPrescriptionCommand)

[HttpPost("{id:guid}/sign")]
[Authorize(Policy = "HEALTHCARE_PRESCRIPTIONS_SIGN")]
public Task<IActionResult> Sign(Guid id, SignPrescriptionCommand command)

Parameters

id Guid
command SignPrescriptionCommand

Returns

Task<IActionResult>

Update(Guid, UpdatePrescriptionCommand)

[HttpPut("{id:guid}")]
[Authorize(Policy = "HEALTHCARE_PRESCRIPTIONS_UPDATE")]
public Task<IActionResult> Update(Guid id, UpdatePrescriptionCommand command)

Parameters

id Guid
command UpdatePrescriptionCommand

Returns

Task<IActionResult>