improvement: lab/clinic commiunication flow completely overhauled. no more shit.

This commit is contained in:
2026-07-13 22:53:23 +03:30
parent 2ad572f4c8
commit 27eae25f61
30 changed files with 1805 additions and 696 deletions

View File

@@ -46,6 +46,27 @@ export class TreatmentsController {
return this.treatmentsService.listLinkedOrganizations(req.user.id, organizationId);
}
@Get('lab-cases/unread')
@ApiOperation({ summary: 'Sent lab cases with unread lab activity for the organization (TAB_TREATMENT_READ)' })
listUnreadLabCases(@Req() req: { user: { id: string; organizationId?: string } }) {
const organizationId = this.treatmentsService.getOrganizationIdFromUser(req.user);
return this.treatmentsService.listUnreadLabCases(organizationId, req.user.id);
}
@Get('patients/:patientId/lab-cases')
@ApiOperation({ summary: 'Sent lab cases for a patient with tracker summaries (TAB_TREATMENT_READ)' })
listPatientLabCases(
@Param('patientId') patientId: string,
@Req() req: { user: { id: string; organizationId?: string } },
) {
const organizationId = this.treatmentsService.getOrganizationIdFromUser(req.user);
return this.treatmentsService.listPatientLabCases(
patientId,
organizationId,
req.user.id,
);
}
@Get('patients/:patientId/history')
@ApiOperation({ summary: 'List treatments for a patient (draft and completed, TAB_TREATMENT_READ)' })
listPatientHistory(