NeoScan_Physician/app/modules/Dashboard/services/predictionsAPI.ts
2025-08-22 00:24:24 +05:30

44 lines
1.1 KiB
TypeScript

/*
* File: predictionsAPI.ts
* Description: API service for fetching AI prediction data and patient information
* Design & Developed by Tech4Biz Solutions
* Copyright (c) Spurrin Innovations. All rights reserved.
*/
import { create } from 'apisauce';
import { API_CONFIG, buildHeaders } from '../../../shared/utils';
const api = create({
baseURL: API_CONFIG.BASE_URL
});
/**
* PredictionsAPI Service
*
* Purpose: Handle API calls related to AI predictions and patient data
*
* Features:
* - Fetch all predictions from single endpoint
* - Frontend filtering for feedback status
* - Simple API calls without complex parameters
*/
export const predictionsAPI = {
/**
* Fetch All Predictions
*
* Purpose: Fetch all processed patient predictions
*
* @param token - Authentication token
* @returns Promise with all predictions response
*/
fetchAllPredictions: (token: string) => {
return api.get('/api/ai-cases/feedbacks/processed-patients', {}, buildHeaders({ token }));
}
};
/*
* End of File: predictionsAPI.ts
* Design & Developed by Tech4Biz Solutions
* Copyright (c) Spurrin Innovations. All rights reserved.
*/