Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aliviahossain/Disease-prediction
/ functions
Functions
597 in github.com/aliviahossain/Disease-prediction
⨍
Functions
597
◇
Types & classes
52
↳
Endpoints
60
Function
export_history_csv
Export the current user's full prediction history as a CSV file.
backend/routes/history_routes.py:202
Method
export_metadata
Export version metadata for audit trail.
backend/services/model_version_manager.py:70
Function
export_to_json
(user_id)
backend/services/history_export.py:5
Method
format
Format log record as JSON. Args: record: Log record Returns: JSON string
backend/middleware/logger.py:221
Function
gemini_recommendations
()
backend/routes/disease_routes.py:196
Function
generate_patient
Generate single synthetic patient for testing.
backend/routes/synthetic_routes.py:15
Function
generate_population
Generate population of synthetic patients.
backend/routes/synthetic_routes.py:39
Function
get_all_symptoms
Get all unique symptoms across all diseases
backend/routes/ml_routes.py:601
Function
get_correlations
Get P(symptom|disease) correlation matrix for heatmap. Returns JSON with structure: { "diseases": ["diabetes", "fever", ...],
backend/routes/heatmap_routes.py:13
Function
get_dashboard_data
API endpoint to fetch doctor dashboard data from database.
backend/routes/doctor_routes.py:290
Function
get_disease_symptoms
Get symptoms for a specific disease
backend/routes/ml_routes.py:579
Function
get_diseases
Get list of available diseases
backend/routes/ml_routes.py:565
Function
get_encryption_service
()
backend/services/encryption_service.py:33
Function
get_history_entry
(entry_id: int)
backend/routes/history_routes.py:138
Function
get_patient_data
API endpoint to fetch patient dashboard data for the logged-in user.
backend/routes/doctor_routes.py:216
Function
get_patient_temporal_trends
API endpoint to fetch sequential patient prediction history and vitals trends.
backend/routes/doctor_routes.py:254
Function
get_risk_distribution
()
backend/utils/history_manager.py:70
Method
get_stats
(self)
backend/middleware/security.py:80
Method
get_stats
(self)
backend/middleware/security.py:146
Method
get_stats
(self)
backend/middleware/security.py:255
Method
get_stats
Get rate limiter statistics. Returns: Dictionary with statistics
backend/middleware/security.py:362
Function
get_symptom_importance
Get symptom importance/weights for a disease
backend/routes/ml_routes.py:613
Function
get_total_predictions
()
backend/utils/history_manager.py:60
Function
get_uncertainty_config
Return the active uncertainty thresholds. Useful for admin dashboards and documentation.
backend/routes/ml_routes.py:638
Function
get_version_manager
Get or create version manager singleton.
backend/services/model_version_manager.py:81
Function
handleCheck
()
backend/static/script.js:765
Method
handle_400
Handle 400 Bad Request errors.
backend/middleware/error_handler.py:198
Method
handle_401
Handle 401 Unauthorized errors.
backend/middleware/error_handler.py:211
Method
handle_404
Handle 404 Not Found errors.
backend/middleware/error_handler.py:224
Method
handle_405
Handle 405 Method Not Allowed errors.
backend/middleware/error_handler.py:241
Method
handle_500
Handle 500 Internal Server Error.
backend/middleware/error_handler.py:256
Method
handle_app_error
Handle application-specific errors. Args: error: AppError instance Returns: JSON response or render
backend/middleware/error_handler.py:174
Function
handle_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
Method
handle_generic_error
Handle generic uncaught exceptions. Args: error: Exception instance Returns: JSON response or HTML
backend/middleware/error_handler.py:274
Function
health_check
()
backend/routes/general_routes.py:37
Function
help_page
()
backend/routes/general_routes.py:12
Function
history_page
()
backend/routes/history_routes.py:98
Function
home
()
backend/routes/disease_routes.py:63
Function
initDiseaseSelect
()
backend/static/script.js:589
Function
inject_current_year
()
backend/__init__.py:262
Method
invalidate_cache
Clear the cached analysis.
backend/analysis/bias_analysis.py:62
Function
list_history
()
backend/routes/history_routes.py:106
Function
load_data
Load hospital data from CSV and calculate posterior probabilities.
backend/utils/calculator.py:33
Function
load_user
(user_id)
backend/__init__.py:30
Function
log_prediction_request
Decorator to log prediction requests. Example: @app.route('/api/predict') @log_prediction_request def predict():
backend/middleware/logger.py:361
Function
log_request
Decorator to log API requests. Example: @app.route('/api/predict') @log_request def predict(): pass
backend/middleware/security.py:692
Function
log_request
Decorator to log API requests. Example: @app.route('/api/predict') @log_request def predict(): pass
backend/middleware/logger.py:295
Function
log_security_event
Log security event. Args: event_type: Type of security event message: Event message severity: Event severity
backend/middleware/logger.py:406
Method
log_training
Log training event.
backend/services/model_version_manager.py:61
Function
login
()
backend/routes/auth_routes.py:161
Function
logout
()
backend/routes/auth_routes.py:422
Function
make_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
Function
ml_prediction_page
Render the ML prediction page
backend/routes/ml_routes.py:22
Function
mock_external_services
()
tests/conftest.py:7
Function
model_explorer_page
Render the model explorer page with heatmap visualization.
backend/routes/heatmap_routes.py:8
Function
openTab
(event, tabId)
backend/static/profile.js:32
Function
page_not_found
(error)
backend/__init__.py:270
Function
patient_dashboard
Render the patient dashboard page for authenticated users
backend/routes/doctor_routes.py:139
Function
predict
()
backend/routes/predict_disease_type_routes.py:181
Function
predict_disease
API endpoint for ML disease prediction. Expected JSON payload: { "disease": "diabetes", "symptoms": ["fever", "cough", "
backend/routes/ml_routes.py:45
Function
predict_disease
(model, img_path, target_size=(224, 224))
backend/models/prediction.py:19
Function
predict_multiple_diseases
API endpoint for differential diagnosis (predict multiple diseases). Expected JSON payload: { "symptoms": ["fever", "cough", "fa
backend/routes/ml_routes.py:317
Function
predict_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
Function
preset
()
backend/routes/disease_routes.py:76
Function
privacy
()
backend/routes/general_routes.py:17
Function
profile
()
backend/routes/auth_routes.py:292
Function
raise_readonly_error
()
backend/tests/test_profile_validation.py:163
Function
rare_combinations
Generate rare symptom combinations.
backend/routes/synthetic_routes.py:62
Function
rate_limit
Decorator for rate limiting endpoints. Args: endpoint_type: Type of endpoint for rate limiting Example: @app.route('/ap
backend/middleware/security.py:517
Method
register_version
Register a new model version.
backend/services/model_version_manager.py:39
Function
renderCard
(entry)
backend/static/js/history.js:104
Function
renderChart
(prior, posterior)
backend/static/script.js:418
Function
require_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
Function
resetCalculator
()
backend/static/script.js:946
Function
sample_predictions
Create sample predictions in the database.
backend/tests/test_doctor_dashboard.py:77
Method
sanitize_string
Sanitize string input. Args: text: Input text Returns: Sanitized text
backend/middleware/security.py:429
Function
scalability
()
backend/routes/scalability_routes.py:7
Function
search_symptoms
Fuzzy search for symptoms with ranking.
backend/routes/autocomplete_routes.py:8
Function
service_worker
()
backend/routes/general_routes.py:32
Method
set_symptoms_list
(self, symptoms_list)
backend/models/prediction.py:139
Method
setup_method
(self)
backend/tests/test_uncertainty_handler.py:55
Method
setup_method
(self)
backend/tests/test_uncertainty_handler.py:95
Method
setup_method
(self)
backend/tests/test_uncertainty_handler.py:126
Function
signup
()
backend/routes/auth_routes.py:222
Function
stratify_risk
Stratify patient risk and provide personalized recommendations. Returns {risk_level, score, factors, recommendations}
backend/services/risk_stratification_service.py:10
Function
success_response
Create a standardized success response. Args: data: Response data message: Success message status_code: HTTP status
backend/middleware/error_handler.py:454
Function
terms
()
backend/routes/general_routes.py:22
Function
test_add_history_invalid_prediction_type_unauthenticated
(client)
tests/test_history_routes.py:29
Function
test_add_history_unauthenticated
(client)
tests/test_history_routes.py:20
Function
test_alias_matches_main
()
backend/tests/test_validation.py:48
Method
test_bad_request_returns_json
Test that 400 errors return JSON
backend/tests/test_fetch_endpoints.py:196
Function
test_bayesian_survival_basic
()
tests/test_calculator.py:7
Function
test_bayesian_survival_boundary_full_prevalence
()
tests/test_calculator.py:27
Function
test_bayesian_survival_boundary_zero_prevalence
()
tests/test_calculator.py:22
Function
test_bayesian_survival_high_prevalence
()
tests/test_calculator.py:12
Function
test_bayesian_survival_invalid_false_positive
()
tests/test_calculator.py:42
Function
test_bayesian_survival_invalid_prevalence
()
tests/test_calculator.py:32
Function
test_bayesian_survival_invalid_sensitivity
()
tests/test_calculator.py:37
Function
test_bayesian_survival_low_prevalence
()
tests/test_calculator.py:17
Function
test_bayesian_survival_non_numeric
()
tests/test_calculator.py:47
← previous
next →
301–400 of 597, ranked by callers