{"id":28524395,"url":"https://github.com/msaakaash/hospital-data-warehouse","last_synced_at":"2025-07-06T08:31:23.275Z","repository":{"id":293372746,"uuid":"981144612","full_name":"msaakaash/hospital-data-warehouse","owner":"msaakaash","description":"A data warehouse project designed to demonstrate SQL and data modeling skills.","archived":false,"fork":false,"pushed_at":"2025-06-03T16:52:57.000Z","size":1092,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T02:14:09.487Z","etag":null,"topics":["etl-pipeline","python","sql"],"latest_commit_sha":null,"homepage":"","language":"SQL","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/msaakaash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-10T12:47:43.000Z","updated_at":"2025-06-03T16:52:58.000Z","dependencies_parsed_at":"2025-06-03T17:55:59.443Z","dependency_job_id":"109c1a89-8942-435c-b4ac-cd19e21d7776","html_url":"https://github.com/msaakaash/hospital-data-warehouse","commit_stats":null,"previous_names":["msaakaash/hospital-data-warehouse"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/msaakaash/hospital-data-warehouse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msaakaash%2Fhospital-data-warehouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msaakaash%2Fhospital-data-warehouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msaakaash%2Fhospital-data-warehouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msaakaash%2Fhospital-data-warehouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msaakaash","download_url":"https://codeload.github.com/msaakaash/hospital-data-warehouse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msaakaash%2Fhospital-data-warehouse/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263870149,"owners_count":23522629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["etl-pipeline","python","sql"],"created_at":"2025-06-09T10:43:34.671Z","updated_at":"2025-07-06T08:31:23.268Z","avatar_url":"https://github.com/msaakaash.png","language":"SQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hospita Data Warehouse\n\nA data warehouse project designed to demonstrate SQL and data modeling skills. It follows a star schema structure to track and analyze hospital visit records, patient data, diagnoses, and readmission trends.\n\n\n## Project Objectives\n\n- Design a dimensional model for healthcare data.\n- Simulate hospital visit data using a **star schema**.\n- Build a foundational warehouse for advanced analytics.\n- Write SQL queries to derive insights on patient behavior, doctor performance, and readmission rates.\n\n## Diagram\n\n![Star Schema](./diagrams/star_schema.png)\n\n\n## Phases\n\n- Phase 1 – Schema Design \u0026 Setup\n- Phase 2 – Sample Data Ingestion  \n- Phase 3 – Query Building \u0026 Insights  \n- Phase 4 – BI Dashboard \u0026 Deployment \n- Phase 5 – ETL pipeline\n- Phase 6 - Analysis\n\n\n\n## Star Schema Design\n\n### Fact Table: `fact_visits`\nCaptures core metrics related to patient hospital visits.\n\n| Column          | Type         | Description                     |\n|-----------------|--------------|---------------------------------|\n| visit_id        | SERIAL (PK)  | Unique visit identifier         |\n| patient_id      | INT (FK)     | Reference to the patient        |\n| doctor_id       | INT (FK)     | Reference to the doctor         |\n| department_id   | INT (FK)     | Department involved             |\n| admit_date      | DATE         | Date of admission               |\n| discharge_date  | DATE         | Date of discharge               |\n| diagnosis_code  | VARCHAR(50)  | Code of diagnosis               |\n| cost            | DECIMAL      | Total cost of treatment         |\n| readmitted      | BOOLEAN      | Readmission flag                |\n\n### Dimension Tables\n\n#### `dim_patients`\nStores patient demographic information.\n\n#### `dim_doctors`\nStores doctor details and specialization.\n\n#### `dim_departments`\nStores department-level metadata.\n\n#### `dim_diagnosis`\nStores diagnosis code, description, and category.\n\n\n## Sample Use Cases\n\n- Track average length of stay by department.\n- Analyze readmission rates by diagnosis.\n- Rank doctors by total cost billed.\n\n\n## Tools Used\n\n- PostgreSQL (or MySQL)\n- SQL\n- ER Diagram Tools (dbdiagram.io / DrawSQL)\n- CSV (for loading sample data)\n\n\n## Contributing\nContributions are welcome! Please see [CONTRIBUTING.md](docs/CONTRIBUTING.md) for guidelines.\n\n## Code of Conduct\nPlease read our [Code of Conduct](docs/CODE_OF_CONDUCT.md) before contributing to this project.\n\n## Security\nIf you discover a vulnerability, please refer to our [Security Policy](docs/SECURITY.md) for instructions on how to report it responsibly.\n\n\n## License  \nThis project is licensed under the [MIT License](LICENSE).  \n\n\n\n## Author\n\n[**Aakaash M S**](https://github.com/msaakaash)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsaakaash%2Fhospital-data-warehouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsaakaash%2Fhospital-data-warehouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsaakaash%2Fhospital-data-warehouse/lists"}