public void testIsSurveyCompleted() throws iTrustException {
    List<OfficeVisitBean> ovbList = action.getAllOfficeVisits();

    OfficeVisitBean ovBean = ovbList.get(0);

    assertFalse(action.isSurveyCompleted(ovBean.getID()));
  }
Esempio n. 2
0
 private void setValues(PreparedStatement ps, OfficeVisitBean ov) throws SQLException {
   ps.setDate(1, new java.sql.Date(ov.getVisitDate().getTime()));
   ps.setString(2, ov.getNotes());
   ps.setLong(3, ov.getHcpID());
   ps.setLong(4, ov.getPatientID());
   ps.setString(5, ov.getHospitalID());
 }
  @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());
  }
Esempio n. 4
0
  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;
  }
  /**
   * 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());
  }
  /**
   * 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(0, ovb.getDiagnoses().size());*/
    assertEquals("1", ovb.getHospitalID());

    assertEquals(0, action.prescriptions().getPrescriptions().size());
  }
Esempio n. 7
0
 /**
  * Updates the information in a particular office visit.
  *
  * @param ov The Office Visit bean representing the changes.
  * @throws DBException
  */
 public void update(OfficeVisitBean ov) throws DBException {
   Connection conn = null;
   PreparedStatement ps = null;
   try {
     conn = factory.getConnection();
     ps =
         conn.prepareStatement(
             "UPDATE OfficeVisits SET VisitDate=?, Notes=?, HCPID=?, "
                 + "PatientID=?, HospitalID=? WHERE ID=?");
     setValues(ps, ov);
     ps.setLong(6, ov.getID());
     ps.executeUpdate();
   } catch (SQLException e) {
     e.printStackTrace();
     throw new DBException(e);
   } finally {
     DBUtil.closeConnection(conn, ps);
   }
 }
Esempio n. 8
0
 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();
   }
 }