-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
564 lines (467 loc) · 25.9 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
"""
Title: Triage
Author: Charles Bostwick
Website: www.CharlesCBostwick.com
GitHub: https://github.com/AwaywithCharles
License: MIT
Note: This is still a work in progress!!!
Goals: Add functions to add disabilitys and integrate with the 38 CFR to calculate estimated ratings
"""
import tkinter as tk
from tkinter import ttk
from tkinter import Label, Entry, Radiobutton, Checkbutton, Button, Toplevel, StringVar, BooleanVar, messagebox, simpledialog
from tkcalendar import DateEntry
import os
import json
import pandas
import matplotlib
# Main Application Class.
# Setting up the main window and functionalities.
class MainApplication(tk.Tk):
def __init__(self):
super().__init__()
self.user_data = {"dod_id": "", "preferences": {}, "data": {}}
self.configure_application()
self.create_menus()
self.initialize_ui()
self.user_info_frame = None
# Configure main application window properties such as title, background, and size.
def configure_application(self):
self.title("Triage - a VA Disability Claim assistant")
self.configure(bg="black")
self.geometry("800x600") # Width x Height
# Create the application menu bar and items, adding functionality for user interaction.
def create_menus(self):
self.menu_bar = tk.Menu(self, bg="black", fg="gold")
# File menu
file_menu = tk.Menu(self.menu_bar, tearoff=0, bg="black", fg="gold")
file_menu.add_command(label="New Person", command=self.create_new_user_dialog)
file_menu.add_command(label="Load Person", command=self.load_user_dialog) # Add Load Person
file_menu.add_separator()
file_menu.add_command(label="Exit", command=self.on_exit)
self.menu_bar.add_cascade(label="File", menu=file_menu)
# User Profile (If you have other options to add, keep this section)
profile_menu = tk.Menu(self.menu_bar, tearoff=0, bg="black", fg="gold")
profile_menu.add_command(label="Edit Profile", command=self.edit_profile)
self.menu_bar.add_cascade(label="Profile", menu=profile_menu)
# Resources (If you have other options to add, keep this section)
resources_menu = tk.Menu(self.menu_bar, tearoff=0, bg="black", fg="gold")
resources_menu.add_command(label="38 CFR Regulations", command=self.open_regulations)
self.menu_bar.add_cascade(label="Resources", menu=resources_menu)
self.config(menu=self.menu_bar)
# Helper function to add individual menu items to the menu bar.
def add_menu_item(self, menu_title, commands):
menu = tk.Menu(self.menu_bar, tearoff=0, bg="black", fg="gold")
for label, command in commands:
menu.add_command(label=label, command=command)
self.menu_bar.add_cascade(label=menu_title, menu=menu)
# Initialize the main UI frame and call the widget creation function.
def initialize_ui(self):
self.main_frame = tk.Frame(self, bg="black")
self.main_frame.pack(fill="both", expand=True)
self.create_widgets()
# Create the initial widgets displayed in the main frame.
def create_widgets(self):
welcome_label = tk.Label(self.main_frame, text="Welcome to Triage!", bg="black", fg="gold")
welcome_label.pack(pady=10)
# Function to handle the application exit command.
def on_exit(self):
if messagebox.askokcancel("Exit", "Do you really wish to exit?", icon='warning'):
self.destroy()
# Load user profile dialog: Asks for dod_id and attempts to load the corresponding profile.
def ask_user_action(self):
action = messagebox.askquestion("User Action", "Load existing user?")
if action == 'yes':
self.load_user_dialog()
else:
self.new_user_dialog()
# Load an existing user profile from a JSON file, if it exists.
def load_user_dialog(self):
dod_id = simpledialog.askstring("Load User", "Enter DoD ID # to load:")
if dod_id:
self.load_user(dod_id)
# Create a new user profile, initializing with default data and saving to a JSON file.
def create_new_user_dialog(self):
self.new_user_window = tk.Toplevel(self)
self.new_user_window.title("New User")
self.new_user_window.geometry("400x600")
# Define StringVars for user input
self.dod_id_var = tk.StringVar()
self.name_var = tk.StringVar()
self.date_of_birth_var = tk.StringVar()
self.spouse_name_var = tk.StringVar()
# Define BooleanVars for yes/no choices
self.has_spouse = tk.BooleanVar(value=False)
self.has_children = tk.BooleanVar(value=False)
# User input fields
tk.Label(self.new_user_window, text="DoD ID:").grid(row=0, column=0, sticky='w')
tk.Entry(self.new_user_window, textvariable=self.dod_id_var).grid(row=0, column=1)
tk.Label(self.new_user_window, text="Name:").grid(row=1, column=0, sticky='w')
tk.Entry(self.new_user_window, textvariable=self.name_var).grid(row=1, column=1)
tk.Label(self.new_user_window, text="Date of Birth:").grid(row=2, column=0, sticky='w')
DateEntry(self.new_user_window, textvariable=self.date_of_birth_var, date_pattern='y-mm-dd').grid(row=2, column=1)
# Marital Status
Label(self.new_user_window, text="Marital Status:").grid(row=3, column=0, sticky='w')
Radiobutton(self.new_user_window, text="Spouse", variable=self.has_spouse, value=True, command=self.toggle_spouse_field).grid(row=3, column=1)
Radiobutton(self.new_user_window, text="No Spouse", variable=self.has_spouse, value=False, command=self.toggle_spouse_field).grid(row=4, column=1)
# Dynamic Spouse Name Field Placeholder (invisible at start)
self.spouse_name_label = Label(self.new_user_window, text="Spouse Name:")
self.spouse_name_entry = Entry(self.new_user_window, textvariable=self.spouse_name_var)
# add to the grid in create_new_user_dialog
tk.Label(self.new_user_window, text="Children:").grid(row=6, column=0, sticky='w')
tk.Radiobutton(self.new_user_window, text="Children", variable=self.has_children, value=True, command=self.toggle_children_fields).grid(row=6, column=1)
tk.Radiobutton(self.new_user_window, text="No Children", variable=self.has_children, value=False, command=self.toggle_children_fields).grid(row=6, column=2)
# frame to dynamically add child entries
self.children_entries_frame = tk.Frame(self.new_user_window)
self.children_entries_frame.grid(row=7, column=0, columnspan=2, sticky='ew', pady=(5,0))
# List to keep track of child entries
self.child_entries = []
# Save Profile Button
tk.Button(self.new_user_window, text="Save Profile", command=self.save_new_user_data).grid(row=100, column=0, columnspan=2, pady=20)
def toggle_spouse_field(self):
if self.has_spouse.get():
# Show Spouse Name fields
self.spouse_name_label.grid(row=5, column=0, sticky='w', pady=(10,0))
self.spouse_name_entry.grid(row=5, column=1, sticky="ew")
self.regrid_children_section(starting_row=6) # Adjust starting row for children section
else:
# Hide Spouse Name fields
self.spouse_name_label.grid_remove()
self.spouse_name_entry.grid_remove()
self.regrid_children_section(starting_row=5) # Adjust starting row for children section back
def toggle_children_fields(self):
if self.has_children.get():
# Show "Add Child" button if not already visible
if not hasattr(self, 'add_child_button'): # Add button if it doesn't exist
self.add_child_button = tk.Button(self.children_entries_frame, text="+ Add Child", command=self.add_child_entry)
self.add_child_button.grid(row=0, column=0, sticky='w', pady=2)
else:
# Make sure it's visible
self.add_child_button.grid()
else:
# Hide "Add Child" button and remove all child entries
if hasattr(self, 'add_child_button'):
self.add_child_button.grid_remove()
for child_entry, var, remove_button in self.child_entries:
child_entry.grid_remove()
remove_button.grid_remove()
self.child_entries.clear()
def add_child_entry(self):
row = 7 + len(self.child_entries) # Assuming row 7 is where children entries start
child_var = tk.StringVar()
child_entry = tk.Entry(self.children_entries_frame, textvariable=child_var)
child_entry.grid(row=row, column=0, padx=5, pady=2)
remove_button = tk.Button(self.children_entries_frame, text="Remove", command=lambda var=child_var: self.remove_child_entry(child_entry, var))
remove_button.grid(row=row, column=1, padx=5, pady=2)
# append entry, variable, and button to the list
self.child_entries.append((child_entry, child_var, remove_button))
def remove_child_entry(self, entry, var):
# remove specified entry widget and its remove button
entry.destroy()
# find associated remove button and destroy it
associated_button = next((button for e, v, button in self.child_entries if v == var), None)
if associated_button:
associated_button.destroy()
# update list to remove the tuple associated with the removed entry
self.child_entries = [(e, v, b) for e, v, b in self.child_entries if v != var]
# this method saves the new user data from the dialog/form.
def save_new_user_data(self):
if not self.validate_profile_data():
return # Stop saving if validation fails
# Gather input values once
dod_id = self.dod_id_var.get().strip()
name = self.name_var.get().strip()
date_of_birth = self.date_of_birth_var.get().strip()
spouse_name = self.spouse_name_var.get().strip() if self.has_spouse.get() else ""
dependents = [var.get() for _, var, _ in self.child_entries] if self.has_children.get() else []
# Prepare user profile data
user_profile = {
"dod_id": dod_id,
"name": name,
"date_of_birth": date_of_birth,
"marital_status": "Married" if self.has_spouse.get() else "Single",
"spouse_name": spouse_name,
"dependents": dependents,
}
# Attempt to save the user profile to a file
try:
filepath = os.path.join(os.getcwd(), f"{dod_id}.json")
with open(filepath, 'w') as file:
json.dump(user_profile, file) # Directly save the dictionary
messagebox.showinfo("Success", "Profile saved successfully.")
self.new_user_window.destroy()
except Exception as e:
messagebox.showerror("Error", f"Failed to save profile: {e}")
def validate_profile_data(self):
# Basic validation checks
if not self.dod_id_var.get().isdigit() or len(self.dod_id_var.get()) != 10:
messagebox.showerror("Error", "DoD ID must be exactly 10 digits long.")
return False
if not self.name_var.get().strip():
messagebox.showerror("Error", "Name cannot be empty.")
return False
return True
# Load an existing user profile from a JSON file, if it exists.
def load_user(self, dod_id):
file_path = os.path.join(os.getcwd(), f"{dod_id}.json")
if os.path.exists(file_path):
with open(file_path, 'r') as file:
data = json.load(file)
user_profile = UserProfile(**data)
self.show_user_info_frame(user_profile)
else:
tk.messagebox.showerror("Error", f"No such user: {dod_id}")
return None
def show_user_info_frame(self, user_profile):
if self.user_info_frame is not None:
self.user_info_frame.destroy()
self.user_info_frame = UserInfoFrame(self, user_profile) # Correctly initializes the UserInfoFrame with the user profile
self.user_info_frame.pack(fill="both", expand=True)
# Placeholder functions for editing profiles. To be implemented.
def edit_profile(self):
messagebox.showinfo("Edit Profile", "Profile editing functionality not implemented yet.")
def edit_personal_data(self, user_profile):
edit_window = tk.Toplevel(self)
edit_window.title("Edit Personal Data")
edit_window.geometry("400x500") # Adjust size as necessary
# Create and layout the edit fields
fields = ['Name', 'Date of Birth', 'Marital Status', 'DoD ID']
entries = {}
for idx, field in enumerate(fields, start=1):
# Use the correct attribute from user_profile for the initial value
initial_value = getattr(user_profile, field.lower().replace(" ", "_"), "") if field != 'DoD ID' else user_profile.dod_id
tk.Label(edit_window, text=f"{field}:").grid(row=idx, column=0, sticky="e", padx=10, pady=5)
entry_var = tk.StringVar(value=initial_value)
entry = tk.Entry(edit_window, textvariable=entry_var)
entry.grid(row=idx, column=1, padx=10, pady=5)
entries[field] = entry_var
# Special handling for dependents (simplified for now)
tk.Label(edit_window, text="Dependents:").grid(row=len(fields)+1, column=0, sticky="e", padx=10, pady=5)
dependents_var = tk.StringVar(value=','.join(user_profile.dependents))
dependents_entry = tk.Entry(edit_window, textvariable=dependents_var)
dependents_entry.grid(row=len(fields)+1, column=1, padx=10, pady=5)
entries['Dependents'] = dependents_var
# Correctly refer to the user_profile.dod_id in the print statement if needed
print("Editing profile for DoD ID:", user_profile.dod_id)
# Adjust save button command to correctly pass user_profile and entry data
save_button = tk.Button(edit_window, text="Save", command=lambda: self.save_user_data(user_profile, entries))
save_button.grid(row=len(fields)+2, column=0, columnspan=2, pady=10)
def save_user_data(self, user_profile, entries):
# Example: Update the user profile with new data
user_profile.name = entries['Name'].get()
user_profile.date_of_birth = entries['Date of Birth'].get()
user_profile.marital_status = entries['Marital Status'].get()
user_profile.dod_id = entries['DoD ID'].get()
user_profile.dependents = entries['Dependents'].get().split(',')
messagebox.showinfo("Success", "Profile updated successfully.")
# Placeholder functions for opening regulations. To be implemented.
def open_regulations(self):
messagebox.showinfo("38 CFR Regulations", "Regulations viewing functionality not implemented yet.")
#
def load_user(self, dod_id):
file_path = os.path.join(os.getcwd(), f"{dod_id}.json")
if os.path.exists(file_path):
with open(file_path, 'r') as file:
data = json.load(file)
user_profile = UserProfile(**data)
self.show_user_info_frame(user_profile)
else:
tk.messagebox.showerror("Error", f"No such user: {dod_id}")
return None
# UserProfile class: Represents a user/veteran profile, including personal and disability-related information.
class UserProfile:
# Ensure there's only one dod_id parameter in the method signature.
def __init__(self, dod_id, name="", disability_rating=0, spouse=None, children=None,
spouse_aid_attendance=False, date_of_birth="",
marital_status="", dependents=[]):
self.dod_id = dod_id
self.name = name
self.disability_rating = disability_rating
self.spouse = spouse
self.children = children if children is not None else []
self.spouse_aid_attendance = spouse_aid_attendance
self.date_of_birth = date_of_birth
self.marital_status = marital_status
self.dependents = dependents
# Method to calculate benefits based on the user's profile. Utilizes a placeholder class `CalculateBenefits`.
def calculate_benefits(self):
"""
Calculate the benefits using the CalculateBenefits class.
:return: The monthly payment based on the veteran's profile.
Need to get correct math from 38CFR Audit doc?
"""
benefits_calculator = CalculateBenefits(
disability_rating=self.disability_rating,
spouse=bool(self.spouse),
children=self.children,
spouse_a_and_a=self.spouse_aid_attendance
)
return benefits_calculator.get_monthly_payment()
# UserInfoFrame class: A frame to display and edit information about the user profile. Includes functionality to add dependents.
# update to modify the first instead of replacing it
class UserInfoFrame(tk.Frame):
def __init__(self, parent, user_profile, *args, **kwargs):
super().__init__(parent, *args, **kwargs)
self.user_profile = user_profile
self.init_ui()
def init_ui(self):
tk.Label(self, text="Disability Rating:").grid(row=6, column=0, sticky="w")
self.disability_rating_var = tk.StringVar()
disability_options = ["0", "10", "20", "30", "40", "50", "60", "70", "80", "90", "100"]
self.disability_rating_dropdown = ttk.Combobox(self, textvariable=self.disability_rating_var, values=disability_options, state="readonly")
self.disability_rating_dropdown.grid(row=6, column=1, sticky="w")
self.disability_rating_dropdown.set("0") # Default to 0%
tk.Button(self, text="Calculate Benefits", command=self.calculate_benefits).grid(row=7, column=0, columnspan=2)
# CalculateBenefits class: Calculates the estimated monthly benefits based on disability rating, marital status, and dependents.
def calculate_benefits(self):
children_info = []
for entry in self.children_entries:
child_name = entry.get()
if child_name: # Assuming additional child info could be managed here
children_info.append({'name': child_name, 'age': 18, 'in_school': False}) # Example structure
# Initialize CalculateBenefits with current user info
benefits_calculator = CalculateBenefits(
disability_rating=int(self.disability_rating_var.get()),
spouse=bool(self.spouse_name_var.get()),
children=children_info,
spouse_a_and_a=self.user_profile.spouse_aid_attendance
)
monthly_payment = benefits_calculator.get_monthly_payment()
# Display the calculated benefits
messagebox.showinfo("Benefits Calculation", f"Estimated Monthly Payment: ${monthly_payment}")
class UserInfoFrame(tk.Frame):
def __init__(self, parent, user_profile, *args, **kwargs):
super().__init__(parent, *args, **kwargs)
self.user_profile = user_profile
self.children_entries = [] # To keep track of children/dependents entries
self.init_ui()
def init_ui(self):
tk.Label(self, text=f"Profile: {self.user_profile.dod_id}").grid(row=0, columnspan=3, pady=(10, 10))
# Checkbox for spouse
self.has_spouse_var = tk.BooleanVar(value=bool(self.user_profile.spouse))
tk.Checkbutton(self, text="Has Spouse?", variable=self.has_spouse_var, command=self.toggle_spouse_fields).grid(row=1, column=0, sticky="w")
self.spouse_name_var = tk.StringVar(value=self.user_profile.spouse)
self.spouse_name_entry = tk.Entry(self, textvariable=self.spouse_name_var)
self.spouse_name_entry.grid(row=1, column=1, sticky="ew")
tk.Button(self, text="Remove", command=self.remove_spouse).grid(row=1, column=2)
# Checkbox for children
self.has_children_var = tk.BooleanVar(value=bool(self.user_profile.children))
tk.Checkbutton(self, text="Has Children/Dependents?", variable=self.has_children_var, command=self.toggle_children_fields).grid(row=2, column=0, sticky="w")
self.add_child_button = tk.Button(self, text="+ Add Child/Dependent", command=self.add_child_entry)
self.add_child_button.grid(row=3, column=0, sticky="ew", pady=5)
self.save_button = tk.Button(self, text="Save Profile", command=self.save_profile)
self.save_button.grid(row=100, column=0, columnspan=3, pady=10)
# Initial toggle to match profile state
self.toggle_spouse_fields()
self.toggle_children_fields()
def toggle_spouse_fields(self):
if self.has_spouse_var.get():
self.spouse_name_entry.grid()
else:
self.spouse_name_entry.grid_remove()
def remove_spouse(self):
self.has_spouse_var.set(False)
self.toggle_spouse_fields()
def toggle_children_fields(self):
if not self.has_children_var.get():
for entry, delete_button in self.children_entries:
entry.grid_remove()
delete_button.grid_remove()
self.children_entries = []
self.add_child_button.grid_remove()
else:
self.add_child_button.grid()
def add_child_entry(self):
row = 4 + len(self.children_entries)
child_name_var = tk.StringVar()
child_entry = tk.Entry(self, textvariable=child_name_var)
child_entry.grid(row=row, column=1, sticky="ew")
delete_button = tk.Button(self, text="Remove", command=lambda: self.remove_child_entry(child_entry, delete_button))
delete_button.grid(row=row, column=2)
self.children_entries.append((child_entry, delete_button))
def remove_child_entry(self, child_entry, delete_button):
child_entry.destroy()
delete_button.destroy()
self.children_entries = [(e, b) for e, b in self.children_entries if e != child_entry]
self.reposition_child_entries()
def reposition_child_entries(self):
for index, (entry, button) in enumerate(self.children_entries, start=4):
entry.grid(row=index, column=1, sticky="ew")
button.grid(row=index, column=2)
def save_profile(self):
self.user_profile.spouse = self.spouse_name_var.get() if self.has_spouse_var.get() else None
self.user_profile.children = [entry.get() for entry, _ in self.children_entries]
messagebox.showinfo("Success", "Profile updated successfully.")
class DisabilitySelectionFrame(tk.Frame):
def __init__(self, parent, *args, **kwargs):
super().__init__(parent, *args, **kwargs)
self.init_ui()
def init_ui(self):
self.lbl = tk.Label(self, text="Select Disability Category:")
self.lbl.pack(pady=10)
# Example categories, replace with dynamic API call results
self.categories = ["Category 1", "Category 2", "Category 3"]
self.category_var = tk.StringVar()
self.category_dropdown = ttk.Combobox(self, textvariable=self.category_var, values=self.categories)
self.category_dropdown.pack()
self.category_dropdown.bind("<<ComboboxSelected>>", self.on_category_selected)
# Placeholder for the next level of dropdowns, e.g., specific disabilities
self.specific_var = tk.StringVar()
self.specific_dropdown = ttk.Combobox(self, textvariable=self.specific_var)
self.specific_dropdown.pack()
def on_category_selected(self, event):
# Dynamically fetch and update the next dropdown based on the selection
# Placeholder values, replace with dynamic API call results based on the selected category
specifics = ["Specific 1", "Specific 2", "Specific 3"]
self.specific_dropdown['values'] = specifics
class CalculateBenefits:
def __init__(self, disability_rating, spouse=False, children=[], spouse_a_and_a=False):
self.disability_rating = disability_rating
self.spouse = spouse
self.children = children
self.spouse_a_and_a = spouse_a_and_a
def get_monthly_payment(self):
# Base rates for disability
base_rates = {
10: 171.23,
20: 338.49,
30: 524.31,
40: 755.28,
50: 1075.16,
60: 1361.88,
70: 1716.28,
80: 1995.01,
90: 2241.91,
100: 3737.85,
}
# Ensure disability rating is within the expected range
if self.disability_rating not in base_rates:
return 0
base_payment = base_rates[self.disability_rating]
# For disability ratings less than 30%
if self.disability_rating < 30:
return base_payment
# Adjustments for spouse and children
if self.disability_rating >= 30:
spouse_payment = 0
child_payment = 0
if self.spouse:
spouse_payment += 150.25 # Example rate, adjust based on tables
if self.spouse_a_and_a:
spouse_payment += 134.00 # Spouse Aid and Attendance
for child in self.children:
if child['age'] < 18:
child_payment += 72.00
elif child['in_school']:
child_payment += 234.00
return base_payment + spouse_payment + child_payment
return base_payment
class Disability:
def __init__(self, name, diagnostic_code, rating, notes=None):
self.name = name
self.diagnostic_code = diagnostic_code
self.rating = rating
self.notes = notes
if __name__ == "__main__":
app = MainApplication()
app.mainloop()