improvement: appointments history component added to patients feature.

This commit is contained in:
2026-07-12 18:56:01 +03:30
parent 3b47aa9605
commit 1cdf853d32
12 changed files with 374 additions and 28 deletions

View File

@@ -37,6 +37,16 @@ export class PatientsController {
return this.patientsService.findAll(query);
}
@Get(':id/appointments')
@ApiOperation({
summary:
'List this patient\'s appointments for the current clinic (requires TAB_PATIENTS_READ; not gated by appointments permission)',
})
listAppointments(@Param('id') id: string, @Req() req: { user: { id: string; organizationId?: string } }) {
const organizationId = this.patientsService.getOrganizationIdFromUser(req.user);
return this.patientsService.listAppointments(id, organizationId, req.user.id);
}
@Get(':id')
@ApiOperation({ summary: 'Get one patient by id' })
findOne(@Param('id') id: string) {