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
profileServiceProfileService
Methods
Create(CreatePatientRequest)
Create a new patient
[HttpPost]
public ActionResult<PatientDto> Create(CreatePatientRequest request)
Parameters
requestCreatePatientRequest
Returns
Delete(Guid)
Delete a patient
[HttpDelete("{id}")]
public IActionResult Delete(Guid id)
Parameters
idGuid
Returns
GetAll()
Get all patients
[HttpGet]
public ActionResult<IEnumerable<PatientDto>> GetAll()
Returns
GetById(Guid)
Get a patient by ID
[HttpGet("{id}")]
public ActionResult<PatientDto> GetById(Guid id)
Parameters
idGuid
Returns
GetByPhysician(Guid)
Get patients assigned to a specific physician
[HttpGet("physician/{physicianId}")]
public ActionResult<IEnumerable<PatientDto>> GetByPhysician(Guid physicianId)
Parameters
physicianIdGuid
Returns
Search(string)
Search patients by name
[HttpGet("search")]
public ActionResult<IEnumerable<PatientDto>> Search(string q)
Parameters
qstring
Returns
Update(Guid, UpdatePatientRequest)
Update an existing patient
[HttpPut("{id}")]
public ActionResult<PatientDto> Update(Guid id, UpdatePatientRequest request)
Parameters
idGuidrequestUpdatePatientRequest