/**
  * Get the patient name associated with the given referral.
  *
  * @param bean
  * @return The patient's name as a String.
  * @throws iTrustException
  */
 public String getPatientName(ReferralBean bean) throws iTrustException {
   return patientDAO.getName(bean.getPatientID());
 }
 /**
  * Get the name of the receiving HCP associated with the given referral.
  *
  * @param bean
  * @return The HCP's name as a String.
  * @throws iTrustException
  */
 public String getReceivingHCPName(ReferralBean bean) throws iTrustException {
   return personnelDAO.getName(bean.getReceiverID());
 }
Beispiel #3
0
  public void testBean() {
    ReferralBean r = new ReferralBean();
    r.setId(1L);
    r.setSenderID(2L);
    r.setReceiverID(3L);
    r.setPatientID(4L);
    r.setReferralDetails("Five");
    r.setOvid(6L);
    r.setViewedByHCP(true);
    r.setViewedByPatient(true);

    assertEquals(1, r.getId());
    assertEquals(2, r.getSenderID());
    assertEquals(3, r.getReceiverID());
    assertEquals(4, r.getPatientID());
    assertEquals("Five", r.getReferralDetails());
    assertEquals(6, r.getOvid());
    assertTrue(r.isViewedByHCP());
    assertTrue(r.isViewedByPatient());
  }