yougandar commited on
Commit
bf80fcc
1 Parent(s): 6b7d34d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -4,6 +4,7 @@ import os
4
  # Add the current directory to the Python path
5
  sys.path.append(os.path.dirname(os.path.abspath(__file__)))
6
 
 
7
  from models.user_model import User
8
  from models.appointment_model import Appointment
9
  from models.prescription_model import Prescription
@@ -14,11 +15,11 @@ from models.medical_history_model import MedicalHistory
14
  DATA_DIR = 'data'
15
 
16
  # Define paths to each CSV file
17
- USER_CSV = f'{DATA_DIR}/users.csv'
18
- APPOINTMENT_CSV = f'{DATA_DIR}/appointments.csv'
19
- PRESCRIPTION_CSV = f'{DATA_DIR}/prescriptions.csv'
20
- REPORT_CSV = f'{DATA_DIR}/reports.csv'
21
- MEDICAL_HISTORY_CSV = f'{DATA_DIR}/medical_history.csv'
22
 
23
  def load_all_data():
24
  # Load data from each model's CSV file
 
4
  # Add the current directory to the Python path
5
  sys.path.append(os.path.dirname(os.path.abspath(__file__)))
6
 
7
+ # Import models
8
  from models.user_model import User
9
  from models.appointment_model import Appointment
10
  from models.prescription_model import Prescription
 
15
  DATA_DIR = 'data'
16
 
17
  # Define paths to each CSV file
18
+ USER_CSV = os.path.join(DATA_DIR, 'users.csv')
19
+ APPOINTMENT_CSV = os.path.join(DATA_DIR, 'appointments.csv')
20
+ PRESCRIPTION_CSV = os.path.join(DATA_DIR, 'prescriptions.csv')
21
+ REPORT_CSV = os.path.join(DATA_DIR, 'reports.csv')
22
+ MEDICAL_HISTORY_CSV = os.path.join(DATA_DIR, 'medical_history.csv')
23
 
24
  def load_all_data():
25
  # Load data from each model's CSV file