def edit(self): patient_details = self.get_input() if len(patient_details) == 2: top = tk.Toplevel() edit_info = outter_scroll_frame.ScrolledFrame( top) #open window that can scroll get_info = user_info.Info_form( edit_info.inner, user_type=patient_details[0], user_id=patient_details[1], mode='edit') #add entry widgets for details in the list above if patient_details[0] == 'Patient': top.title("Edit Patient information") edit_info.pack(side="top", fill="both", expand=True) width = 1100 height = 700 screen_width = self.master.winfo_screenwidth() screen_height = self.master.winfo_screenheight() x = (screen_width / 2) - (width / 2) y = (screen_height / 2) - (height / 2) top.geometry("%dx%d+%d+%d" % (width, height, x, y)) cursor.close() conn.close()
def apppointment_search_result(self, titles, rows): top = tk.Toplevel() appoint_win = outter_scroll_frame.ScrolledFrame(top) #open window that can scroll info = search_results_window.Search_results(appoint_win.inner, titles, rows) top.title("Your Appointments") appoint_win.pack(side="top", fill="both", expand=True) width = 1100 height = 400 screen_width = self.master.winfo_screenwidth() screen_height = self.master.winfo_screenheight() x = (screen_width/2) - (width/2) y = (screen_height/2) - (height/2) top.geometry("%dx%d+%d+%d" % (width, height, x, y))
def add_availability(self, date_range): top = tk.Toplevel() add_times = outter_scroll_frame.ScrolledFrame( top) #open window that can scroll available = add_availability.Add_time(add_times.inner, date_range) top.title("Add available times for appointments") add_times.pack(side="top", fill="both", expand=True) width = 1100 height = 400 screen_width = self.master.winfo_screenwidth() screen_height = self.master.winfo_screenheight() x = (screen_width / 2) - (width / 2) y = (screen_height / 2) - (height / 2) top.geometry("%dx%d+%d+%d" % (width, height, x, y))
def view_medical(self, patient_id_num): top = tk.Toplevel() view_medical = outter_scroll_frame.ScrolledFrame( top) #open window that can scroll get_info = view_records.Patient_records( view_medical.inner, patient_id=patient_id_num ) #add entry widgets for details in the list above top.title("Patient Medical History") view_medical.pack(side="top", fill="both", expand=True) width = 1100 height = 700 screen_width = self.master.winfo_screenwidth() screen_height = self.master.winfo_screenheight() x = (screen_width / 2) - (width / 2) y = (screen_height / 2) - (height / 2) top.geometry("%dx%d+%d+%d" % (width, height, x, y))
def add_gp_info(self): top = tk.Toplevel() gp_info = outter_scroll_frame.ScrolledFrame( top) #open window that can scroll gp = user_info.Info_form( gp_info.inner, user_type='GP') #add entry widgets for details in the list above top.title("Add a new GP to the eHealth system") gp_info.pack(side="top", fill="both", expand=True) width = 800 height = 700 screen_width = self.master.winfo_screenwidth() screen_height = self.master.winfo_screenheight() x = (screen_width / 2) - (width / 2) y = (screen_height / 2) - (height / 2) top.geometry("%dx%d+%d+%d" % (width, height, x, y))
def view_info(self, patient_details): top = tk.Toplevel() view_info = outter_scroll_frame.ScrolledFrame( top) #open window that can scroll get_info = user_info.Info_form( view_info.inner, user_type=patient_details[0], user_id=patient_details[1], mode='view') #add entry widgets for details in the list above if patient_details[0] == 'Patient': top.title("View Patient information") view_info.pack(side="top", fill="both", expand=True) width = 1100 height = 700 screen_width = self.master.winfo_screenwidth() screen_height = self.master.winfo_screenheight() x = (screen_width / 2) - (width / 2) y = (screen_height / 2) - (height / 2) top.geometry("%dx%d+%d+%d" % (width, height, x, y))