{"id":26096483,"url":"https://github.com/vwkyc/kbes-dsm-5","last_synced_at":"2026-07-09T18:31:31.718Z","repository":{"id":280712904,"uuid":"942879239","full_name":"vwkyc/kbes-dsm-5","owner":"vwkyc","description":"Knowledge-Based Expert System for the Classification of Mental Disorders using Python. POC may be inaccurate.","archived":false,"fork":false,"pushed_at":"2025-03-04T22:10:23.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-24T14:42:12.900Z","etag":null,"topics":["dsm-5","dsm-5-tr","expert-system","kbes","knowledge-management","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vwkyc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-04T20:31:24.000Z","updated_at":"2025-08-19T12:53:54.000Z","dependencies_parsed_at":"2025-03-04T23:20:55.321Z","dependency_job_id":"ad9b7d51-9894-40de-b371-33256c1897bc","html_url":"https://github.com/vwkyc/kbes-dsm-5","commit_stats":null,"previous_names":["vwkyc/kbes-dsm-5"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vwkyc/kbes-dsm-5","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vwkyc%2Fkbes-dsm-5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vwkyc%2Fkbes-dsm-5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vwkyc%2Fkbes-dsm-5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vwkyc%2Fkbes-dsm-5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vwkyc","download_url":"https://codeload.github.com/vwkyc/kbes-dsm-5/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vwkyc%2Fkbes-dsm-5/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35309827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-09T02:00:07.329Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dsm-5","dsm-5-tr","expert-system","kbes","knowledge-management","python"],"created_at":"2025-03-09T14:56:09.160Z","updated_at":"2026-07-09T18:31:31.693Z","avatar_url":"https://github.com/vwkyc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview\nA web-based expert system that uses Python-based rules and DSM-5-TR criteria to provide preliminary mental health disorder screening. The system walks users through diagnostic questions and provides weighted assessments based on responses.\n\n## Warning\nThis is a prototype system for educational and research purposes only.\nNot intended for clinical use or actual diagnosis.\nAll diagnoses should be made by qualified mental health professionals.\n\n## Installation\n1. Clone this repository\n2. Create a Python virtual environment:\n```sh\npython -m venv myenv\nsource myenv/bin/activate  # Linux/Mac\nmyenv\\Scripts\\activate     # Windows\n```\n3. Install dependencies:\n```sh\npip install -r requirements.txt\npip install waitress #if on windows\n```\n\n## Usage\n1. Start the Flask web application:\n```sh\nexport FLASK_SECRET_KEY=\"your_very_secret_key\"\ngunicorn -w 4 --bind 0.0.0.0:5000 --log-level info app:app\nwaitress-serve --port=5000 app:app #if on windows\n```\n2. Open your web browser to `http://localhost:5000`\n3. Complete the interactive diagnostic assessment\n4. Review the analysis results\n\n## Details\n\n### Diagnostic Assessment\nThe system evaluates 7 major DSM-5-TR categories:\n- Major Depressive Disorder (296.2x)\n- Bipolar Disorder (296.4x)\n- Generalized Anxiety Disorder (300.02) \n- ADHD (314.0x)\n- Schizophrenia (295.90)\n- OCD (300.3)\n- PTSD (309.81)\n\n#### Question Distribution\nTotal questions per DSM code:\n- **296.2x:** 9 questions  \n- **296.4x:** 7 questions  \n- **300.02:** 7 questions  \n- **314.0x:** 6 questions  \n- **295.90:** 5 questions  \n- **300.3:**  5 questions  \n- **309.81:** 5 questions\n\nStand-alone questions (single DSM code) per category:\n- **296.2x:** 3 questions\n- **296.4x:** 3 questions\n- **300.02:** 3 questions\n- **314.0x:** 3 questions\n- **295.90:** 4 questions  \n- **300.3:**  5 questions  \n- **309.81:** 5 questions  \n\n### Methodology\n- **Dynamic Question Weights**: Questions are weighted based on specificity and severity.\n- **Severity Scaling**: Responses scaled as None/Mild/Moderate/Severe.\n- **Rule-Based Logic**: Python rules process responses based on DSM-5-TR criteria.\n- **Dependency Handling**: Questions can be conditionally shown based on previous responses.\n\n### Calculations\nQuestion weights are calculated using:\n- Base weight: 0.9\n- Reduction for multiple DSM codes: -0.2 per additional code\n- Severity adjustments:\n  - Severe: 100% of weight\n  - Moderate: 75% of weight  \n  - Mild: 50% of weight\n\n### Symptom Threshold\nFor a diagnosis to be considered, the system requires that at least 70% of the relevant symptoms for each disorder are present. Only when 70% or more of the symptom questions for a given DSM-5-TR category are answered affirmatively does the disorder qualify for diagnosis.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvwkyc%2Fkbes-dsm-5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvwkyc%2Fkbes-dsm-5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvwkyc%2Fkbes-dsm-5/lists"}