/**
  * @author Yuang Returns the person's most recent weight that matches the inputMID param
  * @param inputMID The MID to look up.
  * @return the person's name
  * @throws DBException
  * @throws ITrustException
  */
 public double getPatientWeight(long inputMID) throws ITrustException {
   try {
     long mid = Long.valueOf(inputMID);
     return factory.getHealthRecordsDAO().getPatientsLatestWeight(mid);
   } catch (NumberFormatException e) {
     throw new ITrustException("MID not in correct form");
   }
 }
Example #2
0
 /**
  * Super class validates the patient id
  *
  * @param factory The DAOFactory to be used in creating DAOs for this action.
  * @param loggedInMID The MID of the currently logged in user who is authorizing this action.
  * @param pidString The MID of the patient whose personal health records are being added.
  * @throws ITrustException
  * @throws NoHealthRecordsException
  */
 public EditPHRAction(DAOFactory factory, long loggedInMID, String pidString)
     throws ITrustException {
   super(factory, pidString);
   this.patientDAO = factory.getPatientDAO();
   this.allergyDAO = factory.getAllergyDAO();
   this.familyDAO = factory.getFamilyDAO();
   this.hrDAO = factory.getHealthRecordsDAO();
   this.ovDAO = factory.getOfficeVisitDAO();
   this.icdDAO = factory.getICDCodesDAO();
   this.personnelDAO = factory.getPersonnelDAO();
   this.HCPUAP = personnelDAO.getPersonnel(loggedInMID);
   this.patient = patientDAO.getPatient(pid);
   this.procDAO = factory.getProceduresDAO();
   this.ndcodesDAO = factory.getNDCodesDAO(); // NEW
   this.loggingAction = new EventLoggingAction(factory);
   emailutil = new EmailUtil(factory);
   this.factory = factory;
 }