MCPcopy Create free account

hub / github.com/aliviahossain/Disease-prediction / functions

Functions597 in github.com/aliviahossain/Disease-prediction

Functionexport_history_csv
Export the current user's full prediction history as a CSV file.
backend/routes/history_routes.py:202
Methodexport_metadata
Export version metadata for audit trail.
backend/services/model_version_manager.py:70
Functionexport_to_json
(user_id)
backend/services/history_export.py:5
Methodformat
Format log record as JSON. Args: record: Log record Returns: JSON string
backend/middleware/logger.py:221
Functiongemini_recommendations
()
backend/routes/disease_routes.py:196
Functiongenerate_patient
Generate single synthetic patient for testing.
backend/routes/synthetic_routes.py:15
Functiongenerate_population
Generate population of synthetic patients.
backend/routes/synthetic_routes.py:39
Functionget_all_symptoms
Get all unique symptoms across all diseases
backend/routes/ml_routes.py:601
Functionget_correlations
Get P(symptom|disease) correlation matrix for heatmap. Returns JSON with structure: { "diseases": ["diabetes", "fever", ...],
backend/routes/heatmap_routes.py:13
Functionget_dashboard_data
API endpoint to fetch doctor dashboard data from database.
backend/routes/doctor_routes.py:290
Functionget_disease_symptoms
Get symptoms for a specific disease
backend/routes/ml_routes.py:579
Functionget_diseases
Get list of available diseases
backend/routes/ml_routes.py:565
Functionget_encryption_service
()
backend/services/encryption_service.py:33
Functionget_history_entry
(entry_id: int)
backend/routes/history_routes.py:138
Functionget_patient_data
API endpoint to fetch patient dashboard data for the logged-in user.
backend/routes/doctor_routes.py:216
Functionget_patient_temporal_trends
API endpoint to fetch sequential patient prediction history and vitals trends.
backend/routes/doctor_routes.py:254
Functionget_risk_distribution
()
backend/utils/history_manager.py:70
Methodget_stats
(self)
backend/middleware/security.py:80
Methodget_stats
(self)
backend/middleware/security.py:146
Methodget_stats
(self)
backend/middleware/security.py:255
Methodget_stats
Get rate limiter statistics. Returns: Dictionary with statistics
backend/middleware/security.py:362
Functionget_symptom_importance
Get symptom importance/weights for a disease
backend/routes/ml_routes.py:613
Functionget_total_predictions
()
backend/utils/history_manager.py:60
Functionget_uncertainty_config
Return the active uncertainty thresholds. Useful for admin dashboards and documentation.
backend/routes/ml_routes.py:638
Functionget_version_manager
Get or create version manager singleton.
backend/services/model_version_manager.py:81
FunctionhandleCheck
()
backend/static/script.js:765
Methodhandle_400
Handle 400 Bad Request errors.
backend/middleware/error_handler.py:198
Methodhandle_401
Handle 401 Unauthorized errors.
backend/middleware/error_handler.py:211
Methodhandle_404
Handle 404 Not Found errors.
backend/middleware/error_handler.py:224
Methodhandle_405
Handle 405 Method Not Allowed errors.
backend/middleware/error_handler.py:241
Methodhandle_500
Handle 500 Internal Server Error.
backend/middleware/error_handler.py:256
Methodhandle_app_error
Handle application-specific errors. Args: error: AppError instance Returns: JSON response or render
backend/middleware/error_handler.py:174
Functionhandle_errors
Decorator to handle errors in route functions. Converts exceptions to appropriate HTTP responses. Example: @app.route('/api/pred
backend/middleware/error_handler.py:346
Methodhandle_generic_error
Handle generic uncaught exceptions. Args: error: Exception instance Returns: JSON response or HTML
backend/middleware/error_handler.py:274
Functionhealth_check
()
backend/routes/general_routes.py:37
Functionhelp_page
()
backend/routes/general_routes.py:12
Functionhistory_page
()
backend/routes/history_routes.py:98
Functionhome
()
backend/routes/disease_routes.py:63
FunctioninitDiseaseSelect
()
backend/static/script.js:589
Functioninject_current_year
()
backend/__init__.py:262
Methodinvalidate_cache
Clear the cached analysis.
backend/analysis/bias_analysis.py:62
Functionlist_history
()
backend/routes/history_routes.py:106
Functionload_data
Load hospital data from CSV and calculate posterior probabilities.
backend/utils/calculator.py:33
Functionload_user
(user_id)
backend/__init__.py:30
Functionlog_prediction_request
Decorator to log prediction requests. Example: @app.route('/api/predict') @log_prediction_request def predict():
backend/middleware/logger.py:361
Functionlog_request
Decorator to log API requests. Example: @app.route('/api/predict') @log_request def predict(): pass
backend/middleware/security.py:692
Functionlog_request
Decorator to log API requests. Example: @app.route('/api/predict') @log_request def predict(): pass
backend/middleware/logger.py:295
Functionlog_security_event
Log security event. Args: event_type: Type of security event message: Event message severity: Event severity
backend/middleware/logger.py:406
Methodlog_training
Log training event.
backend/services/model_version_manager.py:61
Functionlogin
()
backend/routes/auth_routes.py:161
Functionlogout
()
backend/routes/auth_routes.py:422
Functionmake_user_cache_key
Build a cache key that is unique per (path, request body, user). Prevents personalised prediction results from leaking across user sessi
backend/utils/cache_utils.py:41
Functionml_prediction_page
Render the ML prediction page
backend/routes/ml_routes.py:22
Functionmock_external_services
()
tests/conftest.py:7
Functionmodel_explorer_page
Render the model explorer page with heatmap visualization.
backend/routes/heatmap_routes.py:8
FunctionopenTab
(event, tabId)
backend/static/profile.js:32
Functionpage_not_found
(error)
backend/__init__.py:270
Functionpatient_dashboard
Render the patient dashboard page for authenticated users
backend/routes/doctor_routes.py:139
Functionpredict
()
backend/routes/predict_disease_type_routes.py:181
Functionpredict_disease
API endpoint for ML disease prediction. Expected JSON payload: { "disease": "diabetes", "symptoms": ["fever", "cough", "
backend/routes/ml_routes.py:45
Functionpredict_disease
(model, img_path, target_size=(224, 224))
backend/models/prediction.py:19
Functionpredict_multiple_diseases
API endpoint for differential diagnosis (predict multiple diseases). Expected JSON payload: { "symptoms": ["fever", "cough", "fa
backend/routes/ml_routes.py:317
Functionpredict_with_gradcam
Unified inference + explainability wrapper for both model types. Automatically detects whether ``model`` is a Keras Model or a TFLite In
backend/utils/gradcam.py:576
Functionpreset
()
backend/routes/disease_routes.py:76
Functionprivacy
()
backend/routes/general_routes.py:17
Functionprofile
()
backend/routes/auth_routes.py:292
Functionraise_readonly_error
()
backend/tests/test_profile_validation.py:163
Functionrare_combinations
Generate rare symptom combinations.
backend/routes/synthetic_routes.py:62
Functionrate_limit
Decorator for rate limiting endpoints. Args: endpoint_type: Type of endpoint for rate limiting Example: @app.route('/ap
backend/middleware/security.py:517
Methodregister_version
Register a new model version.
backend/services/model_version_manager.py:39
FunctionrenderCard
(entry)
backend/static/js/history.js:104
FunctionrenderChart
(prior, posterior)
backend/static/script.js:418
Functionrequire_fields
Decorator to require specific fields in JSON request. Args: *required_fields: Field names that must be present Example:
backend/middleware/error_handler.py:416
FunctionresetCalculator
()
backend/static/script.js:946
Functionsample_predictions
Create sample predictions in the database.
backend/tests/test_doctor_dashboard.py:77
Methodsanitize_string
Sanitize string input. Args: text: Input text Returns: Sanitized text
backend/middleware/security.py:429
Functionscalability
()
backend/routes/scalability_routes.py:7
Functionsearch_symptoms
Fuzzy search for symptoms with ranking.
backend/routes/autocomplete_routes.py:8
Functionservice_worker
()
backend/routes/general_routes.py:32
Methodset_symptoms_list
(self, symptoms_list)
backend/models/prediction.py:139
Methodsetup_method
(self)
backend/tests/test_uncertainty_handler.py:55
Methodsetup_method
(self)
backend/tests/test_uncertainty_handler.py:95
Methodsetup_method
(self)
backend/tests/test_uncertainty_handler.py:126
Functionsignup
()
backend/routes/auth_routes.py:222
Functionstratify_risk
Stratify patient risk and provide personalized recommendations. Returns {risk_level, score, factors, recommendations}
backend/services/risk_stratification_service.py:10
Functionsuccess_response
Create a standardized success response. Args: data: Response data message: Success message status_code: HTTP status
backend/middleware/error_handler.py:454
Functionterms
()
backend/routes/general_routes.py:22
Functiontest_add_history_invalid_prediction_type_unauthenticated
(client)
tests/test_history_routes.py:29
Functiontest_add_history_unauthenticated
(client)
tests/test_history_routes.py:20
Functiontest_alias_matches_main
()
backend/tests/test_validation.py:48
Methodtest_bad_request_returns_json
Test that 400 errors return JSON
backend/tests/test_fetch_endpoints.py:196
Functiontest_bayesian_survival_basic
()
tests/test_calculator.py:7
Functiontest_bayesian_survival_boundary_full_prevalence
()
tests/test_calculator.py:27
Functiontest_bayesian_survival_boundary_zero_prevalence
()
tests/test_calculator.py:22
Functiontest_bayesian_survival_high_prevalence
()
tests/test_calculator.py:12
Functiontest_bayesian_survival_invalid_false_positive
()
tests/test_calculator.py:42
Functiontest_bayesian_survival_invalid_prevalence
()
tests/test_calculator.py:32
Functiontest_bayesian_survival_invalid_sensitivity
()
tests/test_calculator.py:37
Functiontest_bayesian_survival_low_prevalence
()
tests/test_calculator.py:17
Functiontest_bayesian_survival_non_numeric
()
tests/test_calculator.py:47
← previousnext →301–400 of 597, ranked by callers