---
# System prepended metadata

title: Untitled

---

``
<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/


Auth::routes();


Route::group(['middleware' => ['auth','entity_check','user_status','XSS','zawtouni']],function() {

    Route::get('SuperAdminEdit','HomeController@superEdit');
    Route::patch('SuperAdminEdit','HomeController@superEditStore');

    Route::get('/', 'HomeController@index')->name('home');
    Route::post('change_clinic_type', 'HomeController@change_clinic_type');
    /*Route::get('/',function (){

        \Nexmo\Laravel\Facade\Nexmo::message()->send([
            'to'   => '+6596859324',
            'from' => 'huzaifa',
            'text' => 'hello huzaifa here kerian.'
        ]);
    });*/

    Route::get('set_fullscreen_session', 'HomeController@set_fullscreen_session');
    Route::get('unset_fullscreen_session', 'HomeController@unset_fullscreen_session');

    Route::Resource('admins','AdminController');
    Route::get('admins/{id}/delete','AdminController@delete');
    Route::get('admin-remote-login/{id}','AdminController@remote_login');
    Route::post('adminsactivate/{id}','AdminController@activated')->name('adminsactivate.activate');
    Route::Resource('admins_profile','AdminProfileController');
    Route::Resource('clinics','ClinicController');
    Route::Resource('doctors','DoctorController');
    Route::post('doctoractive/{id}','DoctorController@activated')->name('doctoractive.activate');
    Route::Resource('employee','EmployeeController');
    Route::post('employeeactivate/{id}','EmployeeController@activated')->name('employeeactivate.activate');
    Route::get('admin/lab_templates','LabTemplateController@adminLabTemplates');

    Route::Resource('patients','PatientController');
    Route::get('get_states','PatientController@get_state');
    Route::get('get_cities','PatientController@get_cities');
    Route::get('get_townships','PatientController@get_townships');
    Route::get('getPatientMedRecByPrescriptionID','PatientController@getPatientMedRecByPrescriptionID');

    Route::get('getMedicalTemplateByTemplateID','MedicalTemplateController@getMedicalTemplateByTemplateID');
    Route::post('updatePrintTemplateByID','MedicalTemplateController@updatePrintTemplateByID');

    Route::get('get_patient_info','PatientController@get_patient_info');
    Route::get('get_patient_search','PatientController@get_patient_search');
    Route::get('all_patient_search','PatientController@all_patient_search');
    Route::get('report_patient_info','PatientController@report_patient_info');
    Route::get('queue_ajax','PatientController@queue_ajax');
    Route::post('patient_medical_store','PatientController@patient_medical_store')->name('patients.medical_store');
    Route::get('patient_preview','PatientController@patient_preview');

    Route::Resource('services','ClinicServiceController');
    Route::Resource('service_categories','ServiceCategoryController');
    Route::get('get_datatable_drug','MedicineController@datatable')->name('get_datatable_drug.data');

    Route::post('updateStock','MedicineController@updateStock')->name('drugs.updateStock');
    Route::Resource('schedule','ScheduleController');
    Route::get('doc_schedule_chk','ScheduleController@schedule_chk');
    Route::post('schedule_inactive/{id}','ScheduleController@schedule_inactive')->name('schedule_inactive.deactivate');
    Route::post('schedule_active/{id}','ScheduleController@schedule_active')->name('schedule_active.activate');

    Route::Resource('leaves','LeaveController');
    Route::get('leaves_approved','LeaveController@approved')->name('leaves_approved.leaves_approved');
    Route::post('leaves_approved/{id}','LeaveController@approval');
    Route::post('leaves_rejected/{id}','LeaveController@reject');

    Route::get('drugCategory','MedicineController@drugCategory')->name('drugCategory.category');
    Route::post('drugCategory','MedicineController@drugCategoryStore')->name('drugCategory.drugCategoryStore');
    Route::delete('drugCategory/{id}','MedicineController@drugCategoryDestroy')->name('drugCategory.drugCategoryDestroy');

    Route::get('drugStock','MedicineController@drugStock')->name('drugStock.category');
    Route::post('drugStock','MedicineController@drugStockStore')->name('drugStock.drugStockStore');
    Route::delete('drugStock/{id}','MedicineController@drugStockDestroy')->name('drugStock.drugStockDestroy');

    Route::Resource('medical_records','MedicalRecordController');
    Route::get('deleted_medical_records','MedicalRecordController@deleted_record')->name('deleted_medical_records.deleted_record');
    Route::post('medical_edit','MedicalRecordController@medical_edit');
    Route::get('medical_records/{pat_id}/{doc_id}','MedicalRecordController@edit_2')->name('medical_records.edit_2');


    Route::get('temp_change','MedicalRecordController@temp_change');
    Route::Resource('drawing_templates','DrawingTemplateController');
    Route::Resource('diagnoses','DiagnoseController');
    Route::Resource('medical_templates','MedicalTemplateController');
    Route::Resource('lab_templates','LabTemplateController');
    Route::get('check_lab_template','LabTemplateController@template');
    Route::get('record_ajax','MedicalRecordController@template');


    Route::Resource('queues','QueueController');
    Route::post('queues_doc','QueueController@queue_doc');
    Route::post('queues_note','QueueController@queue_note');
    Route::get('settled_queues','QueueController@settled_queues')->name('settled_queues.settled_queues');
    Route::get('deleted_queues','QueueController@deleted_queues')->name('deleted_queues.deleted_queues');
    Route::post('add_to_check','QueueController@add_to_check');
    Route::get('add_to_check_noti/{id}','QueueController@add_to_check_noti');
    Route::get('queue/ajax_index','QueueController@ajax_index');


    Route::Resource('invoices','InvoiceController');
    Route::post('invoice_add','InvoiceController@add_invoice');
    Route::get('invoice_add/{patient}/{doctor}','InvoiceController@create_invoice')->name('invoice_add.create_invoice');
    Route::get('get_datatable_invoice','InvoiceController@datatable')->name('get_datatable_invoice.data');
    Route::get('invoices_unpaid','InvoiceController@unpaid')->name('unpaid');
    Route::get('invoice_autocomplete','InvoiceController@invoice_autocomplete');
    Route::get('check_fullpayment','InvoiceController@check_fullpayment');
    Route::get('invoice_detail_modal','InvoiceController@invoice_detail_modal');


    Route::Resource('payments','PaymentController');
    Route::get('payments_print/{id}','PaymentController@payments_print')->name('payments_print.payments_print');
    Route::get('get_datatable_payment','PaymentController@datatable')->name('get_datatable_payment.data');

    Route::get('/drugs_press','InvoiceController@drug_press');
    Route::get('/drugs_press_type','InvoiceController@drug_press_type');
    Route::get('/services_press','InvoiceController@service_press');
    Route::get('/services_price','InvoiceController@service_price');

    Route::Resource('prescriptions','PrescriptionController');
    Route::get('drugs_autocomplete','PrescriptionController@drugs_autocomplete');
    Route::get('drugs_detail_autocomplete','PrescriptionController@drugs_detail_autocomplete');
    Route::get('drug_qnt_check','PrescriptionController@drug_qnt_check');
    Route::get('drug_type_check','PrescriptionController@drug_type_check');
    Route::get('drugs_name_type','PrescriptionController@drugs_name_type');
    Route::post('prescriptions/vital_signs/{id}','PrescriptionController@vital_signs');
    Route::post('prescriptions/labs/{id}','PrescriptionController@labs');


    Route::get('permissions_klenic_abc','PermissionController@index')->name('permissions_klenic_abc.index');
    Route::get('role_chk','PermissionController@role_chk');
    Route::get('ajaxupdatepermissions','PermissionController@updatePermissions');

    Route::Resource('appointments','AppointmentController');
    Route::get('appointment_save','AppointmentController@appointment_save');
    Route::get('appointment_edit','AppointmentController@appointment_edit');
    Route::get('appointment_delete','AppointmentController@appointment_delete');
    Route::get('queue_appointment_delete','AppointmentController@queue_appointment_delete');
    Route::post('appointment_types','AppointmentController@app_type_store');
    Route::post('appointment_types/{id}','AppointmentController@app_type_update');
    Route::post('appointment_types_delete/{id}','AppointmentController@app_type_delete');
    Route::get('appointments_json','AppointmentController@appointments_json');
    Route::get('appointments_calendar_json','AppointmentController@appointments_calendar_json');
    Route::get('get_appointment','AppointmentController@get_appointment');


    Route::get('get_schedule','AppointmentController@get_schedule');
    Route::get('get_token_chek','AppointmentController@get_token_chek');
    Route::get('get_token_time_chek','AppointmentController@get_token_time_chek');
    Route::get('get_datatable_app','AppointmentController@datatable')->name('get_datatable_app.data');

    Route::get('clinicDetails','HomeController@clinic_detail')->name('clinicDetails.details');
    Route::post('invoice_comment','HomeController@invoice_comment');

    /*for notifications*/
    Route::get('getUnread/{id}','NotificationController@getUnread');
    Route::get('getAllUnread','NotificationController@getAllUnread');
    Route::get('getUnreads','NotificationController@getUnreadNotification');

    Route::Resource('coupons','CouponController');
    Route::get('updateCouponStatus', 'CouponController@updateCouponStatus');
    Route::get('CheckCoupon', 'CouponController@CheckCoupon');

    Route::Resource('drugs','DrugManageController');
    Route::get('add_drug_type', 'DrugManageController@add_drug_type');
    Route::get('add_strength', 'DrugManageController@add_strength');
    Route::get('add_location', 'DrugManageController@add_location');
    Route::get('edit_drug_type', 'DrugManageController@edit_drug_type');
    Route::get('edit_strength', 'DrugManageController@edit_strength');
    Route::get('edit_location', 'DrugManageController@edit_location');
    Route::get('type_delete', 'DrugManageController@type_delete');
    Route::get('strength_delete', 'DrugManageController@strength_delete');
    Route::get('location_delete', 'DrugManageController@location_delete');
    Route::post('updateStock', 'DrugManageController@updateStock')->name('drugs.updateStock');
    Route::post('expiryAlertDrugs','DrugManageController@expiryAlertDrugs')->name('drugs.expiryAlertDrugs');
    Route::get('edit_batch_quanlity', 'DrugManageController@edit_batch_quanlity');

    Route::get('reports/patients', 'ReportController@patient_report')->name('report_patient');
    Route::get('reports/patients/genderChart', 'ReportController@genderChart');
    Route::get('reports/patients/ageChart', 'ReportController@ageChart');
    Route::get('reports/patients/patientChart', 'ReportController@patientChart');
    Route::get('/reports/patients/filterDiv', 'ReportController@filterDiv');
    Route::get('/reports/patients/filterLabel', 'ReportController@filterLabelPateints');    
    Route::get('/reports/incomes/filterDivIncome', 'ReportController@filterDivIncome');

    Route::get('reports/income', 'ReportController@income_report')->name('report_income');
    Route::get('reports/income/datatable/{start_date}/{end_date}/{type}', 'ReportController@income_report_datatable');

    Route::get('reports/doctor', 'ReportController@doctor_report')->name('report_doctor');
    Route::get('reports/doctor/genderChart', 'ReportController@DoctorgenderChart');
    Route::get('reports/doctor/ageChart', 'ReportController@DoctorageChart');
    Route::get('reports/doctor/doctorChart', 'ReportController@DoctorChart');

    Route::get('reports/service', 'ReportController@service_report')->name('report_service');
    Route::get('reports/service/serviceGenderChart', 'ReportController@serviceGenderChart');
    Route::get('reports/service/serviceAgeChart', 'ReportController@serviceAgeChart');

    Route::get('reports/year', 'ReportController@year');
    Route::get('reports/month', 'ReportController@month');
    Route::get('reports/weekly', 'ReportController@weekly');
    Route::get('reports/age', 'ReportController@age');
    Route::get('reports/doctor/gender', 'ReportController@doctor_by_sort_gender');
    Route::get('reports/doctor/age', 'ReportController@doctor_by_sort_age');
    Route::get('reports/doctor/year', 'ReportController@doctor_by_sort_year');
    Route::get('reports/doctor/month', 'ReportController@doctor_by_sort_month');
    Route::get('reports/doctor/weekly', 'ReportController@doctor_by_sort_weekly');
    Route::get('reports/doctor/today', 'ReportController@doctor_by_sort_today');
    Route::get('doctor_by_sort_month', 'ReportController@doctor_by_sort_month');
    Route::get('sort_month', 'ReportController@sort_month');
    Route::get('patient_report_detail/{id}', 'ReportController@patient_report_detail');

    Route::get('reports/week_dashboard', 'ReportController@week_dashboard');

    Route::get('income_report_json', 'ReportController@income_report_json');
    Route::get('sort_month_income', 'ReportController@sort_month_income');

    Route::get('/doctor_notification', 'AlertController@doctor');
    Route::get('/staff_notification', 'AlertController@staff');
    Route::get('/check_in', 'AlertController@check_in');
    Route::get('/doctor/notification_read', 'AlertController@doctor_notification_read');
    Route::get('/staff/notification_read', 'AlertController@staff_notification_read');

    Route::post('/stockExcel', 'ExcelController@stockExcel')->name('stockExcel');
    Route::post('/serviceExcel', 'ExcelController@serviceExcel')->name('serviceExcel');
    Route::post('/employeeExcel', 'ExcelController@employeeExcel')->name('employeeExcel');

    Route::get('/delete_service', 'ClinicServiceController@delete_service');
    Route::get('/delete_doctor', 'DoctorController@delete_doctor');
    Route::get('/delete_employee', 'EmployeeController@delete_employee');
    Route::get('/delete_inventory', 'DrugManageController@delete_inventory');
    Route::get('/get_inventory_detail', 'DrugManageController@get_inventory_detail');


    Route::get('helpers', 'AdminController@helpers_create');
    Route::post('helpers', 'AdminController@helpers_store');

    Route::get('instruction_store','EntityInstructionController@store');
    Route::get('instruction_delete','EntityInstructionController@delete');
    Route::get('instruction_update','EntityInstructionController@update');

    //Supports Routes
    Route::get('support_categories','SupportsController@categories');
    Route::post('add_support_cat','SupportsController@add_support_cat');
    Route::post('edit_support_cat','SupportsController@edit_support_cat');
    Route::post('delete_support_cat','SupportsController@delete_support_cat');

    Route::get('support_subcategories','SupportsController@subcategories');
    Route::post('add_support_sub_cat','SupportsController@add_support_sub_cat');
    Route::post('edit_support_subcat','SupportsController@edit_support_subcat');
    Route::post('delete_support_subcat','SupportsController@delete_support_subcat');

    Route::get('supports','SupportsController@supports');
    Route::post('add_support','SupportsController@add_support');
    Route::get('get_subcategories','SupportsController@get_subcategories');
    Route::post('edit_support','SupportsController@edit_support');
    Route::post('delete_support','SupportsController@delete_support');

    Route::get('supportfront','SupportsController@index');
    Route::get('support_display/{id}/{name}','SupportsController@support_display');
    Route::get('support_detail/{id}/{title}','SupportsController@support_detail');
    Route::get('searchajax','SupportsController@autoComplete');

    Route::get('blogs','BlogController@index');
    Route::get('blog_create','BlogController@blog_create');
    Route::get('add_new_blog','BlogController@add_new_blog');
    Route::get('add_new_created','BlogController@add_new_created');
    Route::post('add_blog_categories','BlogController@add_categories');
    Route::get('add_version','BlogController@add_new_version');
    Route::post('add_store_version','BlogController@store_version');
    Route::post('blog_store','BlogController@blog_store');
    Route::get('get_blog_info','BlogController@get_blog_info');

    Route::get('activity_logs', 'ActivityLogController@index');
    Route::get('edit_blog_category/{id}','BlogController@edit_category');
    Route::post('update_blog_category/{id}','BlogController@update_category');
    Route::get('delete_blog_category/{id}','BlogController@delete_category');
    Route::get('edit_blog_version/{id}','BlogController@edit_version');
    Route::post('update_blog_version/{id}','BlogController@update_version');
    Route::get('delete_blog_version/{id}','BlogController@delete_version');

    Route::Resource('packages','PackageController');
    Route::get('get_package/{id}','InvoiceController@get_package');
    Route::get('updatePackageStatus', 'PackageController@updatePackageStatus');

    Route::get('referrals','PrescriptionController@referralList')->name('referrals.index');

    Route::get('vital_sign','PermissionController@vital_sign');
    Route::get('vs_toggle','PermissionController@vs_toggle');

    Route::get('pre_prescription','PrescriptionController@pre_prescription');

    Route::get('refer_doctor','PrescriptionController@refer_doctor');
    Route::get('refer_clinic','PrescriptionController@refer_clinic');
    Route::get('refer_save','PrescriptionController@refer');
    Route::get('refer_close','PrescriptionController@refer_close');
    Route::get('refer_open','PrescriptionController@refer_open');

    Route::get('datatables/invoices/{start_date?}/{end_date?}','DataTableController@invoice');
    Route::get('datatables/patient_report/{type?}/{start_date?}/{end_date?}','DataTableController@patient_report');
    Route::get('datatables/doctor_report/{type?}/{start_date?}/{end_date?}','DataTableController@consultation_fess');
    Route::get('datatables/total_fess/doctor_report/{type?}/{start_date?}/{end_date?}','DataTableController@total_fess');

    Route::Resource('partners','ClinicPartnerController');
    Route::get('updatePartnerStatus','ClinicPartnerController@updatePartnerStatus');

    Route::get('labQueue','LabQueueController@index');

    Route::get('sailor/{id}','QueueController@sailor');

    Route::post('sailor/{id}','QueueController@store_sailor');

    Route::get('search_queue_print','QueueController@search_queue_print');

    // EXPRESS - Lab Result Express : Viktor :
    Route::post('submit_lab_result_express','PatientController@submit_lab_result_express')->name('patients.submit_lab_result_express');

    Route::post('session_data/{id}/{status}','SessionDataController@store')->name('session_data');

    Route::get('print/{id}/lab_form','SessionDataController@lab_form');

    Route::view('/test', 'pages.SSB.test');

    Route::get('lab-result','LabResultController@index');

    Route::post('lab-result/{status}/{id}','LabResultController@store');

    Route::get('search_lab_print','LabResultController@search_lab_print');

    Route::get('detail_queue_print','QueueController@detail_queue_print');

    Route::get('updateQueuePrint','QueueController@updateQueuePrint');

    Route::get('updateQueuePrintSerial','QueueController@updateQueuePrintSerial');

    Route::Resource('expense','ExpenseController');

    Route::Resource('expense-category','ExpenseCategoryController');

    Route::get('reports/income-expense-refer-summary', 'ReportController@income_expense');

    Route::get('reports/getIncomeCategory', 'ReportController@getIncomeCategory');

    Route::get('reports/getExpenseCategory', 'ReportController@getExpenseCategory');

    Route::get('reports/getReferDoctor', 'ReportController@getReferDoctor');

    Route::get('reports/getIncomeList', 'ReportController@getIncomeList');

    Route::get('reports/income-expense-by-date', 'ReportController@income_expense_by_date');

    Route::post('add_to_check_for_lab','LabController@add_to_check_for_lab');

    Route::get('lab-check-patient/{id}','LabController@labcheckPatient');

    Route::get('get_lab_template','LabController@get_lab_template');

    Route::post('lab-check-patient/{id}','LabController@store_labcheck')->name('labcheck.store');

    Route::get('reports/partner','ClinicPartnerController@report_partner');

    Route::get('lab_template_management','LabTemplateController@view_lab_management');

    Route::group(['middleware' => ['SSB','zawtouni']],function() {
        Route::get('ssb/patient','SSB\PatientController@index');
        Route::post('ssb/patient','SSB\PatientController@store');
        Route::get('ssb_patient_preview','SSB\PatientController@ssb_patient_preview');
        Route::get('ssb_patient_info','SSB\PatientController@ssb_patient_info');
        Route::delete('ssb/patient/{id}', 'SSB\PatientController@destory');
        Route::get('ssb/get_ssb_patient', 'SSB\PatientController@get_ssb_patient');
        Route::post('ssb/patient/edit', 'SSB\PatientController@update');
        Route::get('enterprise_autocomplete','SSB\PatientController@enterprise_autocomplete');
        Route::get('ssb/get_patient_search','SSB\PatientController@get_patient_search');
        Route::get('ssb/patient_search','SSB\PatientController@patient_search');

        Route::get('ssb/queue','SSB\QueueController@index');
        Route::post('ssb/queue/store','SSB\QueueController@store')->name('ssb.queues.store');
        Route::post('ssb/queues_doc','SSB\QueueController@queues_doc');
        Route::post('ssb/delete_queue','SSB\QueueController@delete_queue');
        Route::get('ssb/queue_ajax','SSB\QueueController@queue_ajax');

        Route::get('ssb/lab_result','SSB\LabResultController@index');
        Route::post('ssb/lab_result/{status}/{id}','SSB\LabResultController@store');

        Route::get('ssb/lab_record','SSB\LabResultController@lab_record');
        Route::get('ssb/lab_print','SSB\LabResultController@lab_record_print');

        Route::get('ssb/report','SSB\ReportController@index');
        Route::get('ssb/report_detail','SSB\ReportController@report_detail');

        Route::get('ssb/getGender', 'SSB\ReportController@getGender');
        Route::get('ssb/getAge', 'SSB\ReportController@getAge');
        Route::get('ssb/getCost', 'SSB\ReportController@getCost');
        Route::get('ssb/getDrugLab', 'SSB\ReportController@getDrugLab');
        Route::get('ssb/getLabCategory', 'SSB\ReportController@getLabCategory');
        Route::get('ssb/getEnterprise', 'SSB\ReportController@getEnterprise');

        Route::get('ssb/report_table','SSB\ReportController@index');
        Route::get('ssb/data_report_table/{date}/{enterprise}/{patient}/{lab}','DataTableController@data_report_table')->name('datatables.reportLive');

        Route::get('ssb/{id}/checkpatient','SSB\PrescriptionController@checkpatient');
        Route::post('ssb/checkpatient','SSB\PrescriptionController@store')->name('ssb.prescriptions.store');

        Route::get('ssb/invoice','SSB\InvoiceController@index');
        Route::get('ssb/invoice/{id}/show','SSB\InvoiceController@show');
        Route::get('ssb/invoice_detail_modal','SSB\InvoiceController@invoice_detail_modal');

        Route::get('ssb/getSSBAllDetailsByInvoiceID','SSB\InvoiceController@getSSBAllDetailsByInvoiceID');
        Route::get('ssb/deleteInvoiceAndDetailsByInvoiceID','SSB\InvoiceController@deleteInvoiceAndDetailsByInvoiceID');
        // Route::post('ssb/updateEditInvoice','SSB\InvoiceController@updateEditInvoice')->name('ssb.invoice.updateEditInvoice');
        Route::get('ssb/updateEditInvoice','SSB\InvoiceController@updateEditInvoice');

        Route::get('ssb/datatable','DataTableController@ssb_invoice');

        Route::get('recycle','SSB\RecycleController@index');
        Route::get('recycle/{id}/{status}','SSB\RecycleController@store');

        Route::get('ssb/getSSBLabResults', 'SSB\LabResultController@getSSBLabResults');
    });

});

`````