{"id":20556137,"url":"https://github.com/naufalbasara/hfms-backend","last_synced_at":"2026-02-09T13:02:54.385Z","repository":{"id":218100640,"uuid":"737836343","full_name":"naufalbasara/hfms-backend","owner":"naufalbasara","description":"Lifestyle Recommendation for Heart Failure Patients","archived":false,"fork":false,"pushed_at":"2024-10-04T06:22:04.000Z","size":7025,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-09T02:40:27.882Z","etag":null,"topics":["genetic-algorithm","lstm","machine-learning","optimization-algorithms","recommender-system","rnn-tensorflow","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/naufalbasara.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-01-01T17:16:09.000Z","updated_at":"2024-10-06T09:04:49.000Z","dependencies_parsed_at":"2024-01-28T13:20:59.649Z","dependency_job_id":"a1630b11-1910-4daa-be65-97455e8120db","html_url":"https://github.com/naufalbasara/hfms-backend","commit_stats":null,"previous_names":["naufalbasara/hfms-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/naufalbasara/hfms-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naufalbasara%2Fhfms-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naufalbasara%2Fhfms-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naufalbasara%2Fhfms-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naufalbasara%2Fhfms-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naufalbasara","download_url":"https://codeload.github.com/naufalbasara/hfms-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naufalbasara%2Fhfms-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29266099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T12:53:16.161Z","status":"ssl_error","status_checked_at":"2026-02-09T12:52:30.244Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["genetic-algorithm","lstm","machine-learning","optimization-algorithms","recommender-system","rnn-tensorflow","tensorflow"],"created_at":"2024-11-16T03:25:15.244Z","updated_at":"2026-02-09T13:02:54.355Z","avatar_url":"https://github.com/naufalbasara.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lifestyle Recommendation System for Heart Failure Patient\n\nLifestyle recommendation system that generate optimal lifestyle for personalized heart failure patients using given characteristics data (e.g. age, body metrics, blood pressure, etc.) and existing lifestyle (e.g. sleep duration, diet, and physical activities) to reduce the severity of the disease. This project reference based on proof-of-concept by [Chi et al., 2012](https://www.sciencedirect.com/science/article/pii/S1532046412001086)\n\n[Presentation slides](https://docs.google.com/presentation/d/1Samwo7hot0BWb9RJjPe1JK6DsWZUrgUKu5OCgd-6-os/edit?usp=sharing) (in Bahasa Indonesia)\n\n## Why\n\nCardiovascular disease is a group of disorders of the heart and blood vessels. One of the most common heart diseases is coronary heart disease. From the long and expensive medical procedures for patients, at least 50% of heart disease patients require readmission or re-hospitalization. The readmission rate is influenced by several factors, one of which is lifestyle. The focus of this project aims to develop a system that can predict the risk of heart disease and provide optimal lifestyle recommendations to minimize the severity of heart disease. The algorithm used in this study is long short-term memory (LSTM) as a model to predict the risk of heart disease. In addition, genetic algorithms are used as optimization models to determine the recommended lifestyle. These lifestyle recommendations are evaluated based on the results of heart disease risk predictions and take the lifestyle with the lowest risk using an optimization model.\n\n![Representasi Kromosom (2)](https://github.com/user-attachments/assets/6c4eaa13-154f-4636-ab7c-cf4eb4da07b2)\nRecommendation system overview, 2024\n\n## Quick Start\n\nStarting the project either with python or docker.\n\n### Starting with Python\n\nWhen starting with Python, you have to ensure the local libraries required in this project already installed. Required libraries are listed in `requirements.txt` file.\n\n1. Python development server\n```bash\nflask --app webserver run\n```\n\n2. Python production server\n```bash\ngunicorn -b :8080 --timeout 360 --chdir /flaskr webserver:app\n```\n\n### Starting with Docker\n\nPull the latest build project's image on docker hub. See the full list of deployment in [docker hub](https://hub.docker.com/repository/docker/naufalbasara/hfms-backend/general).\n\n```bash\n# pull the image with specified tag name\ndocker pull naufalbasara/hfms-backend:deployment-appv4\n\n# run the pulled image in port 8080\ndocker run -it -d naufalbasara/hfms-backend:deployment-appv4 -p :8080\n```\n\n## Usage\n\n1. Once the server is running, the project will be accessible at http://localhost:8080 or http://0.0.0.0:8080.\n2. Getting the prediction of heart failure risk from particular individual's by requesting the HTTP POST Request to http://localhost:8080/v3/predictions/\n\n   Request Payload Example:\n   ```json\n   {\n   \"Column1\": 110, \"Column2\": 9, \"Column3\": 1402, \"Column4\": 92, \"ColumnN\": 42\n   }\n   ```\n   \n   Response Payload Example:\n   ```json\n   {\n      \"probability\": \"25.857403874397278\",\n      \"result\": {\n        \"label\": \"0\",\n        \"text\": \"Not having heart failure.\"\n      },\n      \"status\": 200,\n      \"timeGenerated\": \"2024-10-04\",\n      \"timeTaken\": \"0.42859506607055664 s\"\n   }\n   ```\n\n4. Getting the lifestyle recommendation of heart failure risk from particular individual's by requesting the HTTP POST Request to http://localhost:8080/v3/recommendations/\n\n   Request Payload Example:\n   ```json\n   {\n   \"Column1\": 110, \"Column2\": 9, \"Column3\": 1402, \"Column4\": 92, \"ColumnN\": 42\n   }\n   ```\n   \n   Response Payload Example:\n   ```json\n   \"lifestyle\" : {\n       \"Column1\": {\n            \"changeStatus\": \"False\",\n            \"codeValue\": \"3\",\n            \"comparison\": \"Tidak ada perubahan\",\n            \"currentValue\": \"(1094.0, 6495.0]\",\n            \"description\": \"Calcium (Mg)\",\n            \"recommendedValueInterval\": \"Tidak ada perubahan (1094.0, 6495.0]\",\n            \"variable\": \"Dieta1_DR1TCALC\"\n          },\n       \"ColumnN\": {\n            \"changeStatus\": \"Status of change compared with existing user lifestyle (True/False)\",\n            \"codeValue\": \"Possible encoded value for each of the lifestyle variable\",\n            \"comparison\": \"Changes compared to current value\",\n            \"currentValue\": \"Current lifestyle interval value\",\n            \"description\": \"Lifestyle description\",\n            \"recommendedValueInterval\": \"(pd.Interval]\"\n           }\n   },\n   \"currentRisk\": 99.98880624771118,\n   \"riskAfterRecommendation\": 0.022367404017132,\n   \"riskReduction\": 99.96643884369405,\n   \"timeGenerated\": \"2024-05-17\",\n   \"timeTaken\": \"14.709s\"\n   \"status\": 200,\n   \"statusMessage\": \"Success retrieving recommendation data\"\n   ```\n\n## Contributing\n\nContributions are welcome (refactoring, adding feature, fixing bugs). No contributions guideline as long as its useful and not violating the main project.\n\n## Notes\n\nThis project is not medically tested, proof-of-concept based to combined deep learning and heuristic algorithm. The target user for testing is random and mainly college students.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaufalbasara%2Fhfms-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaufalbasara%2Fhfms-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaufalbasara%2Fhfms-backend/lists"}