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()
Exemple #2
0
 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))