Exemple #1
0
 /**
  * Checks to see if a particular family member smokes
  *
  * @param member the family member to check
  * @return true if the family member smokes. False if there are no records or the family member
  *     does not
  * @throws ITrustException
  */
 public boolean isFamilyMemberSmoker(FamilyMemberBean member) throws ITrustException {
   List<HealthRecord> records = hrDAO.getAllHealthRecords(member.getMid());
   if (records.size() == 0) return false;
   for (HealthRecord record : records) {
     if (record.isSmoker()) return true;
   }
   return false;
 }
Exemple #2
0
 /**
  * Checks to see if a particular family member has high blood pressure
  *
  * @param member the family member to check
  * @return true if the family member has high blood pressure. False if there are no records or the
  *     family member does not have high blood pressure
  * @throws ITrustException
  */
 public boolean doesFamilyMemberHaveHighBP(FamilyMemberBean member) throws ITrustException {
   List<HealthRecord> records = hrDAO.getAllHealthRecords(member.getMid());
   if (records.size() == 0) return false;
   for (HealthRecord record : records) {
     if (record.getBloodPressureSystolic() > 240 || record.getBloodPressureDiastolic() > 120)
       return true;
   }
   return false;
 }
Exemple #3
0
 /**
  * Checks to see if a particular family member has high cholesterol
  *
  * @param member the family member to check
  * @return true if the family member has high cholesterol. False if there are no records or the
  *     family member does not
  * @throws ITrustException
  */
 public boolean doesFamilyMemberHaveHighCholesterol(FamilyMemberBean member)
     throws ITrustException {
   List<HealthRecord> records = hrDAO.getAllHealthRecords(member.getMid());
   if (records.size() == 0) return false;
   for (HealthRecord record : records) {
     if (record.getCholesterolHDL() < 35 || record.getCholesterolLDL() > 250) return true;
   }
   return false;
 }
Exemple #4
0
 /**
  * Returns a list of HealthRecords for the patient
  *
  * @return allHealthRecords
  * @throws ITrustException
  */
 public List<HealthRecord> getAllHealthRecords() throws ITrustException {
   List<HealthRecord> allHealthRecords = hrDAO.getAllHealthRecords(pid);
   return allHealthRecords;
 }