public static void displayPrescription(PatientProfilePage profileP){
		profileP.getPrescriptionList().setText("Unpaid Prescription List: \n");
		BigDecimal tax = new BigDecimal(.07);
		totalPrescriptionCost=BigDecimal.ZERO;
		clearTable(profileP);
		Patient p = Gui.getCurrentPatient();
		BigDecimal coPay=p.getCoPay().divide(new BigDecimal(100));
		
		int pid=p.getPid();
		ArrayList<Integer> prescID=new ArrayList<Integer>();
		currentActive="";
		prescID=DatabaseProcess.getPrescription(pid);
		ArrayList<Integer> paid=new ArrayList<Integer>();
		ArrayList<Integer> expired=new ArrayList<Integer>();
		int j=0;
		boolean flag=true;
		for(int i=0;i<prescID.size();i++){
			Prescription bean =new Prescription();
			bean.setPrescriptionID(prescID.get(i));
			bean=(Prescription)DatabaseProcess.getRow(bean);
			
			Drug active=new Drug();
			active.setDrugId(bean.getDid());
			active=(Drug)DatabaseProcess.getRow(active);
			if(Gui.getCurrentPatient().getPid()==bean.getPid()&&bean.getDid()==active.getDrugId())
				currentActive+=active.getDrugName()+" ";
		
			if(!bean.getPayStatus()){
				profileP.getPrescriptionHistory().setValueAt(prescID.get(i),j,0);
				profileP.getPrescriptionHistory().setValueAt(bean.getQuantity(),j,2);
				profileP.getPrescriptionHistory().setValueAt(bean.getDose(),j,3);
				profileP.getPrescriptionHistory().setValueAt(bean.getThisDay().toString(),j,4);
				profileP.getPrescriptionHistory().setValueAt(bean.getRefill(),j,6);
				Drug d=new Drug();
				d.setDrugId(bean.getDid());
				d=(Drug)DatabaseProcess.getRow(d);
				profileP.getPrescriptionHistory().setValueAt(d.getDrugName(),j,1);
				profileP.getPrescriptionHistory().setValueAt(bean.getStartDate().toString(), j, 5);
				profileP.getPrescriptionHistory().setValueAt(bean.getPayStatus(),j,7);j++;
				
				BigDecimal x = HelperMethods.multiplyCost(bean.getQuantity(),d.getPrice());
				if(flag){
					totalPrescriptionCost=BigDecimal.ZERO;
					flag=false;
				}
				if(totalPrescriptionCost!=null)
					totalPrescriptionCost = HelperMethods.totalCost(x, totalPrescriptionCost);
				
				String s = bean.getPrescriptionID()+": "+d.getDrugName()+" quantity: "+bean.getQuantity()
						+" $"+x+"\n";
				String a="";
				a+=s;
				profileP.getPrescriptionList().append(a);
				
			}		
			else if(bean.getRefill()!=0)
				paid.add(bean.getPrescriptionID());
			else 
				expired.add(bean.getPrescriptionID());
		}
		profileP.getCoPayAmt().setText("%"+coPay);
		totalPrescriptionCost=HelperMethods.patientCost(coPay,totalPrescriptionCost);
		profileP.getSubAmt().setText("$"+HelperMethods.currencyFormat(totalPrescriptionCost));
		profileP.getTaxAmt().setText("%7.00");
		totalPrescriptionCost=HelperMethods.patientCost(HelperMethods.addOne(tax), totalPrescriptionCost);
		profileP.getTotalAmt().setText(HelperMethods.currencyFormat(totalPrescriptionCost));
		for(int i=0;i<paid.size();i++){
			Prescription paidBean =new Prescription();
			paidBean.setPrescriptionID(paid.get(i));
			paidBean=(Prescription)DatabaseProcess.getRow(paidBean);
			profileP.getPrescriptionHistory().setValueAt(paid.get(i),j,0);
			profileP.getPrescriptionHistory().setValueAt(paidBean.getQuantity(),j,2);
			profileP.getPrescriptionHistory().setValueAt(paidBean.getDose(),j,3);
			profileP.getPrescriptionHistory().setValueAt(paidBean.getThisDay().toString(),j,4);
			profileP.getPrescriptionHistory().setValueAt(paidBean.getRefill(),j,6);
			Drug d=new Drug();
			d.setDrugId(paidBean.getDid());
			d=(Drug)DatabaseProcess.getRow(d);
			profileP.getPrescriptionHistory().setValueAt(d.getDrugName(),j,1);
			profileP.getPrescriptionHistory().setValueAt(paidBean.getStartDate().toString(), j, 5);
			profileP.getPrescriptionHistory().setValueAt(paidBean.getPayStatus(),j,7);j++;}
		for(int i=0;i<expired.size();i++){
			Prescription expiredBean =new Prescription();
			expiredBean.setPrescriptionID(expired.get(i));
			expiredBean=(Prescription)DatabaseProcess.getRow(expiredBean);
			profileP.getPrescriptionHistory().setValueAt(expired.get(i),j,0);
			profileP.getPrescriptionHistory().setValueAt(expiredBean.getQuantity(),j,2);
			profileP.getPrescriptionHistory().setValueAt(expiredBean.getDose(),j,3);
			profileP.getPrescriptionHistory().setValueAt(expiredBean.getThisDay().toString(),j,4);
			profileP.getPrescriptionHistory().setValueAt(expiredBean.getRefill(),j,6);
			Drug d=new Drug();
			d.setDrugId(expiredBean.getDid());
			d=(Drug)DatabaseProcess.getRow(d);
			profileP.getPrescriptionHistory().setValueAt(d.getDrugName(),j,1);
			profileP.getPrescriptionHistory().setValueAt(expiredBean.getStartDate().toString(), j, 5);
			profileP.getPrescriptionHistory().setValueAt(expiredBean.getPayStatus(),j,7);j++;}
		profileP.getPrescriptionHistory().repaint();
	}