|
1 | | -# Medics: A Medical Information and Appointment System |
2 | 1 |
|
3 | | -**Medics** is a comprehensive medical software built in Python that helps patients input diagnoses, retrieve medical information, and schedule appointments with doctors. The system also provides a doctor portal to view patient details and manage appointments. All data is stored in an Excel-based database for easy integration and portability. |
4 | | - |
5 | | ---- |
| 2 | +# Medics Software |
6 | 3 |
|
7 | 4 | ## Table of Contents |
8 | | - |
9 | | -1. [Introduction](#introduction) |
10 | | -2. [Features](#features) |
11 | | -3. [Technology Stack](#technology-stack) |
12 | | -4. [System Requirements](#system-requirements) |
13 | | -5. [Installation Guide](#installation-guide) |
14 | | - 1. [Clone the Repository](#clone-the-repository) |
15 | | - 2. [Install Dependencies](#install-dependencies) |
16 | | - 3. [Database Setup](#database-setup) |
17 | | -6. [Usage](#usage) |
18 | | - 1. [Running the Application](#running-the-application) |
19 | | - 2. [Patient Login](#patient-login) |
20 | | - 3. [Doctor Login](#doctor-login) |
21 | | - 4. [Diagnosis Submission](#diagnosis-submission) |
22 | | - 5. [Appointment Scheduling](#appointment-scheduling) |
23 | | -7. [Excel Database Structure](#excel-database-structure) |
24 | | - 1. [Patient Sheet](#patient-sheet) |
25 | | - 2. [Doctor Sheet](#doctor-sheet) |
26 | | -8. [Code Breakdown](#code-breakdown) |
27 | | - 1. [Patient Class](#patient-class) |
28 | | - 2. [Doctor Class](#doctor-class) |
29 | | - 3. [Appointment Management](#appointment-management) |
30 | | -9. [Error Handling and Debugging](#error-handling-and-debugging) |
31 | | -10. [Development Guidelines](#development-guidelines) |
32 | | -11. [Unit Testing](#unit-testing) |
33 | | -12. [Continuous Integration (CI)](#continuous-integration-ci) |
34 | | -13. [Known Issues](#known-issues) |
35 | | -14. [Contribution Guide](#contribution-guide) |
36 | | -15. [FAQs](#faqs) |
37 | | -16. [License](#license) |
38 | | - |
39 | | ---- |
| 5 | +1. [Introduction](#1-introduction) |
| 6 | +2. [Features](#2-features) |
| 7 | +3. [System Requirements](#3-system-requirements) |
| 8 | +4. [Installation Guide](#4-installation-guide) |
| 9 | +5. [Usage Instructions](#5-usage-instructions) |
| 10 | +6. [Screenshots](#6-screenshots) |
| 11 | +7. [API Reference](#7-api-reference) |
| 12 | +8. [Troubleshooting](#8-troubleshooting) |
| 13 | +9. [Testing](#9-testing) |
| 14 | +10. [Deployment](#10-deployment) |
| 15 | +11. [Roadmap](#11-roadmap) |
| 16 | +12. [License](#12-license) |
| 17 | +13. [Contact](#13-contact) |
| 18 | +14. [Contribution Guide](#14-contribution-guide) |
| 19 | +15. [FAQs](#15-faqs) |
40 | 20 |
|
41 | 21 | ## 1. Introduction |
42 | | - |
43 | | -Welcome to the **Medics** repository. This software is designed for medical professionals and patients, making it easier to diagnose conditions, view medical records, and schedule appointments. The system is built using Python, with data stored in Excel files for portability and ease of use. Whether you're a patient seeking medical information or a doctor managing appointments, **Medics** is here to simplify the process. |
44 | | - |
45 | | -### Use Cases: |
46 | | -- Patients can log in, enter diagnoses, view medical information, and book appointments. |
47 | | -- Doctors can view their patients' details and manage appointments efficiently. |
48 | | -- Hospitals can use this system as a lightweight alternative for managing patient records. |
49 | | - |
50 | | ---- |
| 22 | +The Medics software is a medical management system designed to help patients and doctors manage medical information effectively. It allows patients to enter their diagnoses, schedule appointments, and provides doctors with an overview of their patients. |
51 | 23 |
|
52 | 24 | ## 2. Features |
53 | | - |
54 | | -- **Patient Login and Registration**: Secure login system for patients to access their dashboard. |
55 | | -- **Doctor Login**: Doctors have their portal to view assigned patients and manage schedules. |
56 | | -- **Diagnosis Management**: Patients can enter symptoms and receive feedback on their condition. |
57 | | -- **Appointment Booking**: Patients can book appointments with available doctors. |
58 | | -- **Doctor Dashboard**: Doctors can view patient records, including their diagnoses and appointment details. |
59 | | -- **Excel Integration**: All data is stored in local Excel files for easy data management. |
60 | | -- **Error Handling**: The system includes comprehensive error handling for smoother user experience. |
61 | | -- **User-friendly UI**: Simple UI that caters to both patients and doctors. |
62 | | - |
63 | | ---- |
64 | | - |
65 | | -## 3. Technology Stack |
66 | | - |
67 | | -- **Programming Language**: Python 3.x |
68 | | -- **Database**: Excel (via pandas and openpyxl libraries) |
69 | | -- **Libraries**: |
70 | | - - `pandas`: For data manipulation and Excel file interaction. |
71 | | - - `openpyxl`: For Excel file handling. |
72 | | - - `tkinter`: For user interface design. |
73 | | -- **IDE**: Compatible with all major Python IDEs (PyCharm, VSCode, etc.) |
74 | | - |
75 | | ---- |
76 | | - |
77 | | -## 4. System Requirements |
78 | | - |
79 | | -- **Python**: Version 3.7 or above. |
80 | | -- **Pandas Library**: Version 1.3.0 or above. |
81 | | -- **openpyxl**: Version 3.0.7 or above. |
82 | | -- **Operating System**: Compatible with Windows, macOS, and Linux. |
83 | | -- **Memory**: Minimum 512MB RAM for light usage, 1GB or more recommended. |
84 | | - |
85 | | ---- |
86 | | - |
87 | | -## 5. Installation Guide |
88 | | - |
| 25 | +- Patient login and registration |
| 26 | +- Doctor login and management |
| 27 | +- Diagnosis submission |
| 28 | +- Appointment scheduling |
| 29 | +- Data stored in Excel format |
| 30 | +- User-friendly interface |
| 31 | + |
| 32 | +## 3. System Requirements |
| 33 | +- Python 3.7 or higher |
| 34 | +- pandas library |
| 35 | +- openpyxl library |
| 36 | +- Excel installed (for viewing Excel files) |
| 37 | + |
| 38 | +## 4. Installation Guide |
89 | 39 | Follow these steps to install and run the Medics software on your local machine. |
90 | 40 |
|
91 | | -### 5.1 Clone the Repository |
92 | | - |
| 41 | +### 4.1 Clone the Repository |
93 | 42 | First, clone the repository to your local machine using the following command: |
94 | | - |
95 | 43 | ```bash |
96 | 44 | git clone https://github.com/username/medics.git |
97 | | -5.2 Install Dependencies |
98 | | -Navigate into the project directory and install the required Python packages: |
| 45 | +``` |
99 | 46 |
|
100 | | -bash |
101 | | -Copy code |
| 47 | +### 4.2 Install Dependencies |
| 48 | +Navigate into the project directory and install the required Python packages: |
| 49 | +```bash |
102 | 50 | cd medics |
103 | 51 | pip install -r requirements.txt |
| 52 | +``` |
104 | 53 | Alternatively, you can manually install dependencies: |
105 | | - |
106 | | -bash |
107 | | -Copy code |
| 54 | +```bash |
108 | 55 | pip install pandas openpyxl |
109 | | -5.3 Database Setup |
110 | | -Ensure that you have the necessary Excel files (patients.xlsx and doctors.xlsx) in the root directory. If not, create them manually or run the following script to generate template files: |
| 56 | +``` |
111 | 57 |
|
112 | | -bash |
113 | | -Copy code |
| 58 | +### 4.3 Database Setup |
| 59 | +Ensure that you have the necessary Excel files (patients.xlsx and doctors.xlsx) in the root directory. If not, create them manually or run the following script to generate template files: |
| 60 | +```bash |
114 | 61 | python setup_database.py |
115 | | -6. Usage |
116 | | -6.1 Running the Application |
117 | | -Once you have installed all dependencies, run the following command to start the application: |
118 | | - |
119 | | -bash |
120 | | -Copy code |
121 | | -python medics.py |
122 | | -6.2 Patient Login |
123 | | -Upon running the program, the user will be prompted to enter their username and password. |
124 | | -Once authenticated, patients can access their medical dashboard. |
125 | | -6.3 Doctor Login |
126 | | -Doctors use a separate login page to access their dashboard, where they can manage patients and appointments. |
127 | | -6.4 Diagnosis Submission |
128 | | -Patients can input their symptoms or diagnoses in the input fields. |
129 | | -After submission, the system will retrieve related medical information from the database. |
130 | | -6.5 Appointment Scheduling |
131 | | -Patients can view available doctors and schedule appointments directly from their dashboard. |
132 | | -Appointments are stored in the Excel database for both patients and doctors. |
133 | | -7. Excel Database Structure |
134 | | -The Excel files are critical to how Medics stores and manages data. Below is the structure for both files: |
135 | | - |
136 | | -7.1 Patient Sheet |
137 | | -Column Name Data Type Description |
138 | | -Patient Name String The full name of the patient. |
139 | | -Username String The patient's username for login. |
140 | | -Password String The patient's password (encrypted). |
141 | | -Diagnosis String The diagnosis or symptoms entered by the patient. |
142 | | -Appointment Date DateTime The date and time of the scheduled appointment. |
143 | | -Doctor Assigned String The doctor assigned to the patient. |
144 | | -7.2 Doctor Sheet |
145 | | -Column Name Data Type Description |
146 | | -Doctor Name String The full name of the doctor. |
147 | | -Username String The doctor's username for login. |
148 | | -Password String The doctor's password (encrypted). |
149 | | -Assigned Patients List A list of patients assigned to the doctor. |
150 | | -8. Code Breakdown |
151 | | -Here is an overview of the important code components in the Medics system. |
152 | | - |
153 | | -8.1 Patient Class |
154 | | -python |
155 | | -Copy code |
156 | | -class Patient: |
157 | | - def __init__(self, username, password): |
158 | | - self.username = username |
159 | | - self.password = password |
160 | | - # Fetch patient details from Excel file. |
161 | | - self.patient_data = self.load_patient_data() |
162 | | - |
163 | | - def load_patient_data(self): |
164 | | - # Logic to load patient data from patients.xlsx |
165 | | - pass |
166 | | - |
167 | | - def submit_diagnosis(self, diagnosis): |
168 | | - # Logic to update diagnosis in the Excel file. |
169 | | - pass |
170 | | - |
171 | | - def schedule_appointment(self, doctor, date): |
172 | | - # Logic to schedule an appointment in the Excel file. |
173 | | - pass |
174 | | -8.2 Doctor Class |
175 | | -python |
176 | | -Copy code |
177 | | -class Doctor: |
178 | | - def __init__(self, username, password): |
179 | | - self.username = username |
180 | | - self.password = password |
181 | | - # Fetch doctor details from Excel file. |
182 | | - self.doctor_data = self.load_doctor_data() |
183 | | - |
184 | | - def load_doctor_data(self): |
185 | | - # Logic to load doctor data from doctors.xlsx |
186 | | - pass |
187 | | - |
188 | | - def view_patients(self): |
189 | | - # Logic to view all assigned patients. |
190 | | - pass |
191 | | -8.3 Appointment Management |
192 | | -python |
193 | | -Copy code |
194 | | -def assign_patient_to_doctor(patient, doctor): |
195 | | - # Logic to assign a patient to a specific doctor in the Excel sheet. |
196 | | - pass |
197 | | -9. Error Handling and Debugging |
198 | | -To ensure smooth operation, the following error handling mechanisms are implemented: |
199 | | - |
200 | | -Invalid Login: If a patient or doctor enters incorrect login credentials, the system will prompt an error message. |
201 | | -Empty Diagnosis: The system will not allow a patient to submit an empty diagnosis field. |
202 | | -Excel File Access: If the Excel files are inaccessible or corrupted, the system will prompt the user to restore the files. |
203 | | -10. Development Guidelines |
204 | | -Follow Python best practices for writing clean, maintainable code. Avoid hardcoding paths or credentials. |
205 | | - |
206 | | -11. Unit Testing |
207 | | -Use pytest or another testing framework to write unit tests for the critical functionality, such as login validation, diagnosis submission, and appointment scheduling. |
208 | | - |
209 | | -12. Continuous Integration (CI) |
210 | | -Integrate this repository with GitHub Actions or any other CI/CD tool to automate testing upon new commits. |
211 | | - |
212 | | -13. Known Issues |
213 | | -Excel File Corruption: In rare cases, Excel files may become corrupted due to improper shutdowns. |
214 | | -Login Timeout: Occasional delays in login due to file access speed. |
215 | | -14. Contribution Guide |
216 | | -We welcome contributions to the Medics project! If you’d like to contribute, please follow these steps: |
217 | | - |
218 | | -Fork the Repository: Click on the "Fork" button on the top right of the repository page. |
219 | | -Clone Your Fork: Use the following command to clone your forked repository to your local machine: |
220 | | -bash |
221 | | -Copy code |
222 | | -git clone https://github.com/your-username/medics.git |
223 | | -Create a Branch: Create a new branch for your feature or bug fix: |
224 | | -bash |
225 | | -Copy code |
226 | | -git checkout -b feature-branch-name |
227 | | -Make Changes: Implement your feature or bug fix. |
228 | | -Commit Changes: Commit your changes with a descriptive message: |
229 | | -bash |
230 | | -Copy code |
231 | | -git commit -m "Add feature/bug fix description" |
232 | | -Push Changes: Push your changes to your forked repository: |
233 | | -bash |
234 | | -Copy code |
235 | | -git push origin feature-branch-name |
236 | | -Create a Pull Request: Go to the original repository and create a pull request. |
237 | | -15. FAQs |
238 | | -Q1: How do I reset my password? |
| 62 | +``` |
| 63 | + |
| 64 | +## 5. Usage Instructions |
| 65 | +To start the application, run the following command in your terminal: |
| 66 | +```bash |
| 67 | +python main.py |
| 68 | +``` |
| 69 | + |
| 70 | +Follow the prompts to log in or register as a patient or doctor. Patients can submit their diagnoses and schedule appointments, while doctors can view patient information. |
| 71 | + |
| 72 | +## 6. Screenshots |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | +## 7. API Reference |
| 78 | +### Authentication API |
| 79 | +- **Endpoint:** `/api/auth` |
| 80 | +- **Methods:** `POST` |
| 81 | +- **Request Body:** `{ "username": "user", "password": "pass" }` |
| 82 | + |
| 83 | +### Diagnosis Submission API |
| 84 | +- **Endpoint:** `/api/diagnosis` |
| 85 | +- **Methods:** `POST` |
| 86 | +- **Request Body:** `{ "diagnosis": "diagnosis details", "patient_id": "id" }` |
| 87 | + |
| 88 | +## 8. Troubleshooting |
| 89 | +If you encounter issues, try the following steps: |
| 90 | +- Ensure all dependencies are installed correctly. |
| 91 | +- Check the Excel file paths in the configuration. |
| 92 | +- Review the logs for error messages. |
| 93 | + |
| 94 | +## 9. Testing |
| 95 | +To run the tests for the Medics software, use the following command: |
| 96 | +```bash |
| 97 | +pytest |
| 98 | +``` |
| 99 | + |
| 100 | +Ensure that you have pytest installed: |
| 101 | +```bash |
| 102 | +pip install pytest |
| 103 | +``` |
| 104 | + |
| 105 | +## 10. Deployment |
| 106 | +To deploy the Medics software, ensure the necessary dependencies are installed and follow the setup instructions for your environment. |
| 107 | + |
| 108 | +## 11. Roadmap |
| 109 | +- [ ] Add mobile compatibility |
| 110 | +- [ ] Improve user interface |
| 111 | +- [ ] Implement cloud storage for data |
| 112 | + |
| 113 | +## 12. License |
| 114 | +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details. |
| 115 | + |
| 116 | +## 13. Contact |
| 117 | +For any inquiries, please contact: |
| 118 | +- Email: your_email@example.com |
| 119 | + |
| 120 | +## 14. Contribution Guide |
| 121 | +We welcome contributions to the **Medics** project! If you’d like to contribute, please follow these steps: |
| 122 | + |
| 123 | +1. **Fork the Repository**: Click on the "Fork" button on the top right of the repository page. |
| 124 | +2. **Clone Your Fork**: Use the following command to clone your forked repository to your local machine: |
| 125 | + ```bash |
| 126 | + git clone https://github.com/your-username/medics.git |
| 127 | + ``` |
| 128 | +3. **Create a Branch**: Create a new branch for your feature or bug fix: |
| 129 | + ```bash |
| 130 | + git checkout -b feature-branch-name |
| 131 | + ``` |
| 132 | +4. **Make Changes**: Implement your feature or bug fix. |
| 133 | +5. **Commit Changes**: Commit your changes with a descriptive message: |
| 134 | + ```bash |
| 135 | + git commit -m "Add feature/bug fix description" |
| 136 | + ``` |
| 137 | +6. **Push Changes**: Push your changes to your forked repository: |
| 138 | + ```bash |
| 139 | + git push origin feature-branch-name |
| 140 | + ``` |
| 141 | +7. **Create a Pull Request**: Go to the original repository and create a pull request. |
| 142 | + |
| 143 | +## 15. FAQs |
| 144 | +**Q1: How do I reset my password?** |
239 | 145 | A1: Currently, the system does not support password recovery. Please contact your doctor or system administrator to reset your password. |
240 | 146 |
|
241 | | -Q2: Can I run this software on any operating system? |
| 147 | +**Q2: Can I run this software on any operating system?** |
242 | 148 | A2: Yes, the Medics software is compatible with Windows, macOS, and Linux. |
243 | 149 |
|
244 | | -Q3: How is my data stored? |
| 150 | +**Q3: How is my data stored?** |
245 | 151 | A3: All patient and doctor data are stored in Excel files. Ensure these files are backed up regularly to prevent data loss. |
246 | 152 |
|
247 | | -Q4: Is there a mobile version of the application? |
| 153 | +**Q4: Is there a mobile version of the application?** |
248 | 154 | A4: Currently, the Medics software is desktop-based. Future updates may include mobile compatibility. |
249 | | - |
250 | | -16. License |
251 | | -This project is licensed under the MIT License. See the LICENSE file for more details. |
0 commit comments