<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Api\PatientapiController;  
use App\Http\Controllers\Api\AshaController;  
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('api')->group(function () {
   Route::post('/vitals', [PatientapiController::class, 'receiveFile']);
   Route::post('/device', [PatientapiController::class, 'devices']); 
   Route::get('/nearlab', [PatientapiController::class, 'nearLabs']);  
    Route::post('/create-patient', [PatientapiController::class, 'patientCreate']); 
     Route::get('/ecg-data', [PatientapiController::class, 'ecgData']);
     Route::post('/patient-login', [PatientapiController::class, 'patientLogin']); 
     
      Route::post('/upload-image', [PatientapiController::class, 'uploadImage']);     
      

     Route::get('/all-vitals', [PatientapiController::class, 'getAllPatientVitals']);

     Route::post('/login', [AshaController::class, 'login']);
     Route::post('/register', [AshaController::class, 'store']);   
     Route::post('/village-store', [AshaController::class, 'villageStore']);   
      

     Route::get('/patients/requestOtp', [AshaController::class, 'requestOtp'])->name('patients.requestOtp'); 
     Route::post('/state-store', [AshaController::class, 'stateStore'])->name('patients.stateStore'); 
     Route::post('/block-store', [AshaController::class, 'blockStore'])->name('patients.blockStore'); 
     Route::post('/distric-store', [AshaController::class, 'districtStore'])->name('patients.districtStore'); 
     Route::get('/all-states', [AshaController::class, 'getAllStates'])->name('patients.getAllStates'); 
     Route::get('/all-districts', [AshaController::class, 'getAllDistricts'])->name('patients.getAllDistricts'); 
     Route::get('/all-blocks', [AshaController::class, 'getAllBlocks'])->name('patients.getAllBlocks'); 
     Route::post('/health-center-typeStore', [AshaController::class, 'healthCenterTypeStore'])->name('patients.healthCenterTypeStore'); 
     Route::post('/health-center-store', [AshaController::class, 'healthCenterStore'])->name('patients.healthCenterStore'); 
     Route::get('/all-Villages', [AshaController::class, 'getAllVillage'])->name('patients.getAllVillage'); 
     Route::get('/all-health-center-type', [AshaController::class, 'getAllHealthCenterType'])->name('patients.getAllHealthCenterType'); 
     Route::post('/asha-worker-store', [AshaController::class, 'ashaWorkerStore'])->name('patients.ashaWorkerStore'); 
     Route::post('/supervisor-store', [AshaController::class, 'supervisorStore'])->name('patients.supervisorStore'); 
     Route::get('/all-health-center', [AshaController::class, 'getAllHealthCenters'])->name('patients.getAllHealthCenters'); 
     Route::get('/all-Users', [AshaController::class, 'getAllUsers'])->name('patients.getAllUsers'); 
     Route::get('/all-supervisors', [AshaController::class, 'getAllSupervisors'])->name('patients.getAllSupervisors'); 
     Route::get('/all-asha-workers', [AshaController::class, 'getAllAshaWorkers'])->name('patients.getAllAshaWorkers'); 

     Route::post('/household-store', [AshaController::class, 'storeHousehold'])->name('patients.storeHousehold');
     Route::get('/all-households', [AshaController::class, 'getAllHouseholds'])->name('patients.getAllHouseholds'); 
     Route::post('/patient-store', [AshaController::class, 'storePatient'])->name('patients.storePatient');
     Route::post('/health-program-store', [AshaController::class, 'storeHealthProgram'])->name('patients.storeHealthProgram');

     Route::get('/all-health-programs', [AshaController::class, 'getAllHealthPrograms'])->name('patients.getAllHealthPrograms'); 

     Route::get('/all-patients', [AshaController::class, 'getAllPatients'])->name('patients.getAllPatients'); 

     Route::post('/program-enrollment-store', [AshaController::class, 'programEnrollmentStore'])->name('patients.programEnrollmentStore');
     Route::post('/task-categories-store', [AshaController::class, 'TaskCategoriesStore'])->name('patients.TaskCategoriesStore');

     Route::get('/all-task-categories', [AshaController::class, 'getAllTaskCategories'])->name('patients.getAllTaskCategories'); 
     Route::post('/home-visit-store', [AshaController::class, 'storeHomeVisit'])->name('patients.storeHomeVisit');
     Route::get('/get-home-visits', [AshaController::class, 'getAllHomeVisits'])->name('patients.getAllHomeVisits');

     Route::get('/get-beneficiaries', [AshaController::class, 'getAllBeneficiaries'])->name('patients.getAllBeneficiaries');

     Route::post('/referral-store', [AshaController::class, 'storeReferral'])->name('patients.storeReferral');
   
     Route::post('/home-visit-store1', [AshaController::class, 'storeHomeVisit1'])->name('patients.storeHomeVisit1');
     
     
    
     
      
});          
     
   
    
  