Table of Contents

Class PatientsController

Namespace
API.CliniCore.Controllers
Assembly
API.CliniCore.dll
[ApiController]
[Route("api/patients")]
public class PatientsController : ControllerBase
Inheritance
PatientsController
Inherited Members

Constructors

PatientsController(ProfileService)

public PatientsController(ProfileService profileService)

Parameters

profileService ProfileService

Methods

Create(CreatePatientRequest)

Create a new patient

[HttpPost]
public ActionResult<PatientDto> Create(CreatePatientRequest request)

Parameters

request CreatePatientRequest

Returns

ActionResult<PatientDto>

Delete(Guid)

Delete a patient

[HttpDelete("{id}")]
public IActionResult Delete(Guid id)

Parameters

id Guid

Returns

IActionResult

GetAll()

Get all patients

[HttpGet]
public ActionResult<IEnumerable<PatientDto>> GetAll()

Returns

ActionResult<IEnumerable<PatientDto>>

GetById(Guid)

Get a patient by ID

[HttpGet("{id}")]
public ActionResult<PatientDto> GetById(Guid id)

Parameters

id Guid

Returns

ActionResult<PatientDto>

GetByPhysician(Guid)

Get patients assigned to a specific physician

[HttpGet("physician/{physicianId}")]
public ActionResult<IEnumerable<PatientDto>> GetByPhysician(Guid physicianId)

Parameters

physicianId Guid

Returns

ActionResult<IEnumerable<PatientDto>>

Search(string)

Search patients by name

[HttpGet("search")]
public ActionResult<IEnumerable<PatientDto>> Search(string q)

Parameters

q string

Returns

ActionResult<IEnumerable<PatientDto>>

Update(Guid, UpdatePatientRequest)

Update an existing patient

[HttpPut("{id}")]
public ActionResult<PatientDto> Update(Guid id, UpdatePatientRequest request)

Parameters

id Guid
request UpdatePatientRequest

Returns

ActionResult<PatientDto>