private void p_bookingPage(){
		p_bookingPane = new JPanel();
		p_bookingPane.setBackground(SystemColor.activeCaption);
		p_bookingPane.setLayout(null);

		if (patient!=null){
			db.showBookingPat(PBT_model,patient.getHKID());
		}
		PBL_choose_model.removeAllElements();
		PBT_date.setValue(null);
		
		JLabel lbl_Booking = new JLabel("Booking");
		lbl_Booking.setFont(new Font("Arial", Font.BOLD, 30));
		lbl_Booking.setBounds(428, 20, 127, 47);
		p_bookingPane.add(lbl_Booking);
		
		JLabel lbl_date = new JLabel("Date:");
		lbl_date.setHorizontalAlignment(SwingConstants.RIGHT);
		lbl_date.setFont(new Font("Arial", Font.PLAIN, 20));
		lbl_date.setBounds(185, 119, 57, 24);
		p_bookingPane.add(lbl_date);
		
		JLabel lblDdmmyyyy = new JLabel("dd/mm/yyyy");
		lblDdmmyyyy.setHorizontalAlignment(SwingConstants.RIGHT);
		lblDdmmyyyy.setFont(new Font("Arial", Font.PLAIN, 20));
		lblDdmmyyyy.setBounds(124, 141, 116, 24);
		p_bookingPane.add(lblDdmmyyyy);
		
		JLabel lbl_doctor = new JLabel("Doctor:");
		lbl_doctor.setHorizontalAlignment(SwingConstants.RIGHT);
		lbl_doctor.setFont(new Font("Arial", Font.PLAIN, 20));
		lbl_doctor.setBounds(92, 198, 71, 24);
		p_bookingPane.add(lbl_doctor);

		JButton PBB_update = new JButton("update");
		PBB_update.addActionListener(new ActionListener(){
			@Override
			public void actionPerformed(ActionEvent arg0) {
				PBupdate();
			}});
		PBB_update.setFont(new Font("Arial", Font.PLAIN, 20));
		PBB_update.setBounds(278, 274, 101, 47);
		p_bookingPane.add(PBB_update);

		//set Doctor list
		PBCB_doctor.removeAllItems();
		Doctor.addCombo(logAc, PBCB_doctor);


		JButton PBB_book = new JButton("Book");
		PBB_book.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				try{
					if (PBL_choose.getSelectedIndex()==-1)
						throw new NullFieldException(3);
					int day, month, year;
					day = Integer.parseInt(((String)PBT_date.getValue()).substring(0,2));
					month = Integer.parseInt(((String)PBT_date.getValue()).substring(3,5))-1;
					year = Integer.parseInt(((String)PBT_date.getValue()).substring(6,10));

					GregorianCalendar date = new GregorianCalendar();
					
					date.set(year, month, day,Integer.parseInt(PBL_choose_model.getElementAt(PBL_choose.getSelectedIndex()).substring(0, 2)),0);
					int index = PBCB_doctor.getSelectedIndex();
					String doctorID = logAc.getDoctor(index).getUserName();
					if (!db.is30Day(patient.getHKID(),date))
						throw new NullFieldException(4);
					if (!db.isWithin30(date))
						throw new NullFieldException(5);
					db.createbooking(patient.getHKID(), doctorID, date);
					if (elderly){
						GregorianCalendar date2 = new GregorianCalendar();
						date2.set(year, month, day,Integer.parseInt(PBL_choose_model.getElementAt(PBL_choose.getSelectedIndex()).substring(0, 2))+1,0);
						db.createbooking(patient.getHKID(), doctorID, date2);
					}
				} catch (NullFieldException e){
					e.error();
				}
				PBupdate();
				db.showBookingPat(PBT_model,patient.getHKID());
			}
		});
		PBB_book.setFont(new Font("Arial", Font.PLAIN, 20));
		PBB_book.setBounds(843, 300, 109, 47);
		p_bookingPane.add(PBB_book);
		
		JButton btnBackToPatient = new JButton("Patient");
		btnBackToPatient.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				cardLayout.show(contentPane, "Patient");
			}
		});
		btnBackToPatient.setFont(new Font("Arial", Font.PLAIN, 20));
		btnBackToPatient.setBounds(827, 585, 116, 47);
		p_bookingPane.add(btnBackToPatient);
		
		
	}