private void initialize() 
	{
		frame = new JFrame();
		frame.setBounds(100, 100, 1155, 900);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setLayout(null);

		ImageIcon refreshImage = new ImageIcon(getClass().getResource("ref.png"));
		
		JButton btn_Refresh = new JButton("", refreshImage);
		btn_Refresh.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				Refresh();
			}
		});	
		btn_Refresh.setBounds(10, 11, 35, 35);
		this.add(btn_Refresh);
		
		txt_PatientID = new JTextField();
		txt_PatientID.setBounds(510, 72, 219, 20);
		txt_PatientID.setEnabled(false);
		this.add(txt_PatientID);
		

		JLabel lbl_PatientID = new JLabel("Patient Num:");
		lbl_PatientID.setHorizontalAlignment(SwingConstants.RIGHT);
		lbl_PatientID.setBounds(400, 75, 100, 14);
		this.add(lbl_PatientID);

		lbl_SIN = new JLabel("SIN:");
		lbl_SIN.setHorizontalAlignment(SwingConstants.RIGHT);
		lbl_SIN.setBounds(400, 106, 100, 14);
		this.add(lbl_SIN);

		txt_SIN = new JTextField();
		txt_SIN.setColumns(10);
		txt_SIN.setBounds(510, 103, 219, 20);
		this.add(txt_SIN);

		txt_FirstName = new JTextField();
		txt_FirstName.setColumns(10);
		txt_FirstName.setBounds(510, 131, 219, 20);
		this.add(txt_FirstName);

		lbl_FirstName = new JLabel("First Name:");
		lbl_FirstName.setHorizontalAlignment(SwingConstants.RIGHT);
		lbl_FirstName.setBounds(400, 134, 100, 14);
		this.add(lbl_FirstName);

		lbl_LastName = new JLabel("Last Name");
		lbl_LastName.setHorizontalAlignment(SwingConstants.RIGHT);
		lbl_LastName.setBounds(400, 165, 100, 14);
		this.add(lbl_LastName);

		txt_LastName = new JTextField();
		txt_LastName.setColumns(10);
		txt_LastName.setBounds(510, 162, 219, 20);
		this.add(txt_LastName);

		txt_HealthCardNum = new JTextField();
		txt_HealthCardNum.setColumns(10);
		txt_HealthCardNum.setBounds(510, 192, 219, 20);
		this.add(txt_HealthCardNum);

		lbl_HealthCardNumber = new JLabel("Health Card Num:");
		lbl_HealthCardNumber.setHorizontalAlignment(SwingConstants.RIGHT);
		lbl_HealthCardNumber.setBounds(400, 198, 100, 14);
		this.add(lbl_HealthCardNumber);

		lbl_Address = new JLabel("Address:");
		lbl_Address.setHorizontalAlignment(SwingConstants.RIGHT);
		lbl_Address.setBounds(400, 259, 100, 14);
		this.add(lbl_Address);

		txt_Address = new JTextField();
		txt_Address.setColumns(10);
		txt_Address.setBounds(510, 256, 219, 20);
		this.add(txt_Address);

		txt_LastVisitDate = new JTextField();
		txt_LastVisitDate.setColumns(10);
		txt_LastVisitDate.setBounds(510, 284, 219, 20);
		txt_LastVisitDate.setEnabled(false);
		this.add(txt_LastVisitDate);

		lbl_LastVisitDate = new JLabel("Last Visit Date");
		lbl_LastVisitDate.setHorizontalAlignment(SwingConstants.RIGHT);
		lbl_LastVisitDate.setBounds(400, 287, 100, 14);
		this.add(lbl_LastVisitDate);
		
		txt_PhoneNumber = new JTextField();
		txt_PhoneNumber.setColumns(10);
		txt_PhoneNumber.setBounds(510, 224, 219, 20);
		this.add(txt_PhoneNumber);

		lbl_PhoneNumber = new JLabel("Phone Number");
		lbl_PhoneNumber.setHorizontalAlignment(SwingConstants.RIGHT);
		lbl_PhoneNumber.setBounds(400, 229, 100, 14);
		this.add(lbl_PhoneNumber);

		lbl_UpdateMessage = new JLabel("");
		lbl_UpdateMessage.setHorizontalAlignment(SwingConstants.CENTER);
		lbl_UpdateMessage.setBounds(350, 400, 200, 14);
		this.add(lbl_UpdateMessage);
		
		lbl_Doctor = new JLabel("Doctor:");
		lbl_PhoneNumber.setHorizontalAlignment(SwingConstants.RIGHT);
		lbl_Doctor.setBounds(63, 40, 61, 16);
		this.add(lbl_Doctor);
		
		comboBox_Doctor = new JComboBox<CustomComboBoxItem>();
		comboBox_Doctor.addItemListener(new ItemListener() 
		{
			@Override
			public void itemStateChanged(ItemEvent e) {
	            // Prevent this event from firing until the combo box is fully populated (each item added fires this event)
	        	if(e.getStateChange() == ItemEvent.SELECTED
	            		&& isDoctorComboBoxLoaded)
	            {
		        	PopulatePatientTable();
	            }
			}
	    });
		comboBox_Doctor.setBounds(118, 36, 219, 20);
		this.add(comboBox_Doctor);
		
		chckbx_CreateNew = new JCheckBox("Create New");
		chckbx_CreateNew.setBounds(400, 36, 128, 23);
		chckbx_CreateNew.setSelected(true);
		chckbx_CreateNew.setEnabled(false);
		if (pageLoadMode == PatientLoadMode.STAFF) 
		{
			chckbx_CreateNew.addItemListener(new ItemListener() {

				public void itemStateChanged(ItemEvent e) {
					if(e.getStateChange() == ItemEvent.SELECTED)
		            {
						txt_PatientID.setText(null);
						txt_PatientID.setEnabled(false);
						txt_SIN.setText(null);
						txt_FirstName.setText(null);
						txt_LastName.setText(null);
						txt_HealthCardNum.setText(null);
						txt_Address.setText(null);
						txt_PhoneNumber.setText(null);
						txt_LastVisitDate.setText(null);
						
						btnUpdate.setText("Create");
						chckbx_CreateNew.setEnabled(false);
						table_Patients.clearSelection();
		            }
//					else
//					{
//						txt_PatientID.setEnabled(true);
//						dbQuery.Patient_UpdatePatientInformation(
//								txt_PatientID.getText(), txt_SIN.getText(),
//								txt_FirstName.getText(), txt_LastName.getText(),
//								txt_HealthCardNum.getText(), txt_Address.getText(),
//								txt_PhoneNumber.getText());
//
//						//lbl_UpdateMessage.setText("Patient Update Successful.");
//					}
				}
			});
		this.add(chckbx_CreateNew);
		}
		else if (pageLoadMode == PatientLoadMode.DOCTOR)
		{
			chckbx_CreateNew.setVisible(false);
		}
		DefaultTableModel model = new DefaultTableModel(tableColumns, 0);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(10, 75, 375, 275);
		this.add(scrollPane);
		
		table_Patients = new JTable(model) 
		{
			/**
			 * 
			 */
			private static final long serialVersionUID = 1L;

			public boolean isCellEditable(int row, int column) {
				return false;
			}
		};
		table_Patients.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
		table_Patients.getColumnModel().getColumn(0).setPreferredWidth(200);
		table_Patients.removeColumn(table_Patients.getColumnModel().getColumn(TABLE_PATIENT_ID_COLUMN_INDEX));
		
		table_Patients.getSelectionModel().addListSelectionListener(new ListSelectionListener() {

			@Override
			public void valueChanged(ListSelectionEvent e) 
			{
				if(table_Patients.getSelectedRow() != -1)
				{
					btnUpdate.setText("Update");
					chckbx_CreateNew.setEnabled(true);
					chckbx_CreateNew.setSelected(false);
					String PatientID = (table_Patients.getModel().getValueAt(table_Patients.getSelectedRow(), TABLE_PATIENT_ID_COLUMN_INDEX).toString());
					loadPatientInformation(PatientID);
				}
			}
		});
		table_Patients.setBorder(new LineBorder(new Color(0, 0, 0)));
		table_Patients.setBounds(782, 495, -382, -100);
		table_Patients.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
		System.out.println(table_Patients.getModel());
		scrollPane.setViewportView(table_Patients);

		btnUpdate = new JButton();
		btnUpdate.setText("Create");
		btnUpdate.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {

				// TODO: error checking on patient update

				// Update database with new patient information
				if (!chckbx_CreateNew.isSelected()) 
				{
					dbQuery.Patient_UpdatePatientInformation(
							txt_PatientID.getText(), txt_SIN.getText(),
							txt_FirstName.getText(), txt_LastName.getText(),
							txt_HealthCardNum.getText(), txt_Address.getText(),
							txt_PhoneNumber.getText());

					lbl_UpdateMessage.setText("Patient Update Successful.");
				} 
				else 
				{
					dbQuery.Patient_CreateNewPatientInformation(
							txt_SIN.getText(), txt_FirstName.getText(),
							txt_LastName.getText(),
							txt_HealthCardNum.getText(), txt_Address.getText(),
							txt_PhoneNumber.getText());

					lbl_UpdateMessage.setText("Patient Creation Successful.");
				}
			}
		});
		btnUpdate.setBounds(375, 360, 117, 29);
		
		if (pageLoadMode != PatientLoadMode.DOCTOR) 
		{
			this.add(btnUpdate);
		}
	}