/** * testUpdateInformationNewOfficeVisit * * @throws Exception */ public void testUpdateInformationNewOfficeVisit() throws Exception { action = new EditOfficeVisitAction(factory, 9000000001L, "1"); assertEquals(true, action.isUnsaved()); assertEquals(-1, action.getOvID()); EditOfficeVisitForm frm = new EditOfficeVisitForm(); frm.setHcpID("9000000001"); frm.setPatientID("1"); frm.setVisitDate("05/02/2001"); frm.setIsBilled("false"); // UC60 frm.setApptType("Test type"); frm.setNotes("That was a doctor's visit"); try { action.updateInformation(frm, false); } catch (FormValidationException e) { fail(e.getMessage()); } assertEquals(false, action.isUnsaved()); assertFalse(-1 == action.getOvID()); }
/** * Test patient office visit * * @throws ITrustException */ public void testGetOfficeVisit() throws ITrustException { OfficeVisitBean ovb = action.getOfficeVisit(); assertEquals(1L, action.getOvID()); assertEquals("Generated for Death for Patient: 1", ovb.getNotes()); assertEquals(9000000000L, ovb.getHcpID()); assertEquals(1L, ovb.getID()); assertEquals(1, ovb.getVisitID()); assertEquals("1", ovb.getHospitalID()); assertEquals(0, action.prescriptions().getPrescriptions().size()); // UC60 OfficeVisitBean ovb60 = actionUC60.getOfficeVisit(); assertEquals("Sean needs to lower his sodium intake.", ovb60.getNotes()); }