improvement: lab/clinic commiunication flow completely overhauled. no more shit.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { apiClient } from '@/lib/api/client';
|
||||
import type { LabCaseActivityItem } from '@/types/lab-case-activity';
|
||||
import type { LabCaseTabReadTarget, TabBadgeCounts } from '@/lib/tabBadgeUtils';
|
||||
|
||||
export const notificationsApi = {
|
||||
@@ -7,6 +8,16 @@ export const notificationsApi = {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
listLabCaseActivities: async (
|
||||
labCaseId: string,
|
||||
limit = 50,
|
||||
): Promise<{ success: boolean; data: LabCaseActivityItem[] }> => {
|
||||
const response = await apiClient.get(`/notifications/lab-cases/${labCaseId}/activities`, {
|
||||
params: { limit },
|
||||
});
|
||||
return response.data;
|
||||
},
|
||||
|
||||
markTabRead: async (tab: LabCaseTabReadTarget): Promise<{ success: boolean }> => {
|
||||
const response = await apiClient.post('/notifications/mark-tab-read', { tab });
|
||||
return response.data;
|
||||
|
||||
@@ -24,6 +24,21 @@ export const treatmentsApi = {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
listPatientLabCases: async (
|
||||
patientId: string,
|
||||
): Promise<{ success: boolean; data: import('@/types/lab-case-activity').PatientLabCaseSummary[] }> => {
|
||||
const response = await apiClient.get(`/treatments/patients/${patientId}/lab-cases`);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
listUnreadLabCases: async (): Promise<{
|
||||
success: boolean;
|
||||
data: import('@/types/lab-case-activity').PatientLabCaseSummary[];
|
||||
}> => {
|
||||
const response = await apiClient.get('/treatments/lab-cases/unread');
|
||||
return response.data;
|
||||
},
|
||||
|
||||
getDraft: async (
|
||||
appointmentId: string,
|
||||
): Promise<{ success: boolean; data: PastTreatment | null }> => {
|
||||
|
||||
Reference in New Issue
Block a user