@Before public void setUp() throws Exception { gen.clearAllTables(); b1 = new BillingBean(); b1.setAmt(40); b1.setInsAddress1("123 else drive"); b1.setInsAddress2(" "); b1.setInsCity("Durham"); b1.setInsHolderName("dad"); b1.setInsID("1234"); b1.setInsPhone("333-333-3333"); b1.setInsProviderName("Cigna"); b1.setInsState("NC"); b1.setInsZip("27607"); b1.setPatient(PATIENT_MID); b1.setStatus(BillingBean.PENDING); b1.setSubTime(new Timestamp(new Date().getTime())); ov = new OfficeVisitBean(); ov.setAppointmentType("Mammogram"); ov.setBilled(true); ov.setHcpID(DOCTOR_MID); ov.setPatientID(PATIENT_MID); int ovID = (int) init2.add(ov); b1.setApptID(ovID); b1.setBillID((int) init.addBill(b1)); init.editBill(b1); subject = new VerifyClaimAction(factory, b1.getBillID()); }
private OfficeVisitBean loadFullOfficeVist(ResultSet rs, long visitID) throws SQLException, DBException { OfficeVisitBean ov = new OfficeVisitBean(visitID); ov.setVisitDateStr( new SimpleDateFormat("MM/dd/yyyy").format(new Date(rs.getDate("VisitDate").getTime()))); ov.setHcpID(rs.getLong("HCPID")); ov.setNotes(rs.getString("notes")); ov.setPatientID(rs.getLong("PatientID")); ov.setHospitalID(rs.getString("HospitalID")); ov.setDiagnoses(getDiagnoses(visitID)); ov.setPrescriptions(getPrescriptions(visitID)); ov.setProcedures(getProcedures(visitID)); return ov; }
public void testUpdateNewOfficeVisit() { try { OfficeVisitBean ov = new OfficeVisitBean(); long newOVID = ovDAO.add(ov); ov = new OfficeVisitBean(newOVID); ov.setNotes("some notes"); ov.setVisitDateStr("07/07/2007"); ov.setPatientID(65); ov.setHcpID(5); ov.setHospitalID("9191919191"); ovDAO.update(ov); ov = ovDAO.getOfficeVisit(newOVID); assertEquals("some notes", ov.getNotes()); assertEquals("07/07/2007", new SimpleDateFormat("MM/dd/yyyy").format(ov.getVisitDate())); assertEquals(65, ov.getPatientID()); assertEquals(5, ov.getHcpID()); assertEquals("9191919191", ov.getHospitalID()); } catch (Exception e) { e.printStackTrace(); } }