diff --git a/iTrust/WebRoot/auth/hcp-uap/activatePatient.jsp b/iTrust/WebRoot/auth/hcp-uap/activatePatient.jsp
index 1dbebbeadf17e93290376b8217dfce885ef42ed7..87a19f5a829ecba4900739114e300a41d839d3de 100644
--- a/iTrust/WebRoot/auth/hcp-uap/activatePatient.jsp
+++ b/iTrust/WebRoot/auth/hcp-uap/activatePatient.jsp
@@ -14,34 +14,34 @@
 <%@include file="/global.jsp"%>
 
 <%
-    pageTitle = "iTrust - Activate a Pre-Registered Patient";
+	pageTitle = "iTrust - Activate a Pre-Registered Patient";
 %>
 
 <%@include file="/header.jsp"%>
 <itrust:patientNav thisTitle="Deactivate" />
 <%
     /* Require a Patient ID first */
-    String pidString = (String) session.getAttribute("pid");
+	String pidString = (String) session.getAttribute("pid");
 
-    if (pidString == null || pidString.equals("") || 1 > pidString.length()) {
-        out.println("pidstring is null");
-        response.sendRedirect("/iTrust/auth/getPatientID.jsp?forward=hcp-uap/deactivatePatient.jsp");
-        return;
+	if (pidString == null || pidString.equals("") || 1 > pidString.length()) {
+		out.println("pidstring is null");
+		response.sendRedirect("/iTrust/auth/getPatientID.jsp?forward=hcp-uap/deactivatePatient.jsp");
+		return;
     }
     
     /* If the patient id doesn't check out, then kick 'em out to the exception handler */
-    EditPatientAction action = new EditPatientAction(prodDAO, loggedInMID.longValue(), pidString);
+	EditPatientAction action = new EditPatientAction(prodDAO, loggedInMID.longValue(), pidString);
 
     /* Now take care of updating information */
-    PatientBean p;
+	PatientBean p;
     
-    if (request.getParameter("formIsFilled") != null && request.getParameter("formIsFilled").equals("true") &&
-            request.getParameter("understand") != null && request.getParameter("understand").equals("I UNDERSTAND")) {
-        try {
-            action.activate();
-            long patientMID = action.getPatient().getMID();
-            loggingAction.logEvent(TransactionType.REREGISTERED_PATIENT_ACTIVATE, loggedInMID.longValue(),
-                    Long.valueOf((String)session.getAttribute("pid")).longValue(), "");
+	if (request.getParameter("formIsFilled") != null && request.getParameter("formIsFilled").equals("true") &&
+		request.getParameter("understand") != null && request.getParameter("understand").equals("I UNDERSTAND")) {
+		try {
+			action.activate();
+			long patientMID = action.getPatient().getMID();
+			loggingAction.logEvent(TransactionType.REREGISTERED_PATIENT_ACTIVATE, loggedInMID.longValue(),
+			Long.valueOf((String)session.getAttribute("pid")).longValue(), "");
 %>
 
 
@@ -68,9 +68,9 @@
 <%
         }
     } else {
-        p = action.getPatient();
+		p = action.getPatient();
 
-        if (request.getParameter("formIsFilled") != null && request.getParameter("formIsFilled").equals("true") &&
+		if (request.getParameter("formIsFilled") != null && request.getParameter("formIsFilled").equals("true") &&
             (request.getParameter("understand") == null || !request.getParameter("understand").equals("I UNDERSTAND"))) {
 %>
     <br />
@@ -101,8 +101,8 @@
             </tr>
             <tr>
                 <td colspan="4">Are you absolutely sure you want to ACTIVATE this
-                patient?  If you are sure, type "I UNDERSTAND" into the box below 
-                and click the button</td>
+				patient?  If you are sure, type "I UNDERSTAND" into the box below
+				and click the button</td>
             </tr>
             <tr>
                 <td colspan="4"><div align="center"><input name="understand" type="text"></div></td>
@@ -114,7 +114,7 @@
 <br />
 <div align=center>
     <input type="submit" name="action"
-        style="font-size: 16pt; font-weight: bold;" value="Activate Patient"><br /><br />
+		style="font-size: 16pt; font-weight: bold;" value="Activate Patient"><br /><br />
 </div>
 </form>
 <% } %>
diff --git a/iTrust/WebRoot/auth/hcp-uap/deactivatePrePatient.jsp b/iTrust/WebRoot/auth/hcp-uap/deactivatePrePatient.jsp
index e6f5650f9b5cf1388469c4def3712ca11d5a32d6..0ee2f1d00d4a067f0da1e3723d4c965e053798aa 100644
--- a/iTrust/WebRoot/auth/hcp-uap/deactivatePrePatient.jsp
+++ b/iTrust/WebRoot/auth/hcp-uap/deactivatePrePatient.jsp
@@ -29,7 +29,7 @@
 
 String patientString = "";
 if (request.getParameter("patient") != null) {
-    patientString = request.getParameter("patient");
+	patientString = request.getParameter("patient");
 }
 
 String pidString;
@@ -38,20 +38,20 @@ long pid = 0;
 
 if (!patientString.equals("")) {
 
-    int patientIndex = Integer.parseInt(patientString);
-    List<PatientBean> patients = (List<PatientBean>) session.getAttribute("patients");  // pass through html
-    pid = patients.get(patientIndex).getMID();
-    pidString = "" + pid;
-    session.removeAttribute("patients");
-    session.setAttribute("pid", pidString);
+	int patientIndex = Integer.parseInt(patientString);
+	List<PatientBean> patients = (List<PatientBean>) session.getAttribute("patients");  // pass through html
+	pid = patients.get(patientIndex).getMID();
+	pidString = "" + pid;
+	session.removeAttribute("patients");
+	session.setAttribute("pid", pidString);
 }
 else {
-    if (session.getAttribute("pid") == null) {
-        pid = 0;
-        pidString = "";
+	if (session.getAttribute("pid") == null) {
+		pid = 0;
+		pidString = "";
     } else {
-        pid = (long) Long.parseLong((String) session.getAttribute("pid"));
-        pidString = ""+pid;
+		pid = (long) Long.parseLong((String) session.getAttribute("pid"));
+		pidString = ""+pid;
     }
 }
 
diff --git a/iTrust/WebRoot/auth/hcp-uap/viewPreRegisteredPatientInfo.jsp b/iTrust/WebRoot/auth/hcp-uap/viewPreRegisteredPatientInfo.jsp
index e3e5cd08fc276e14bf31560a8e745db10997ec3a..bbb260ccbb68a4070225c2f5511b4913bb3100ae 100644
--- a/iTrust/WebRoot/auth/hcp-uap/viewPreRegisteredPatientInfo.jsp
+++ b/iTrust/WebRoot/auth/hcp-uap/viewPreRegisteredPatientInfo.jsp
@@ -37,17 +37,17 @@ DateFormat df = DateFormat.getDateInstance();
 
 String switchString = "";
 if (request.getParameter("switch") != null) {
-    switchString = request.getParameter("switch");
+	switchString = request.getParameter("switch");
 }
 
 String relativeString = "";
 if (request.getParameter("relative") != null) {
-    relativeString = request.getParameter("relative");
+	relativeString = request.getParameter("relative");
 }
 
 String patientString = "";
 if (request.getParameter("patient") != null) {
-    patientString = request.getParameter("patient");
+	patientString = request.getParameter("patient");
 }
 
 String pidString;
@@ -56,36 +56,36 @@ long pid = 0;
 if (switchString.equals("true")) pidString = "";
 else if (!relativeString.equals("")) {
 
-    int relativeIndex = Integer.parseInt(relativeString);
-    List<PatientBean> relatives = (List<PatientBean>) session.getAttribute("relatives");
-    pid = relatives.get(relativeIndex).getMID();
-    pidString = "" + pid;
-    session.removeAttribute("relatives");
-    session.setAttribute("pid", pidString);
+	int relativeIndex = Integer.parseInt(relativeString);
+	List<PatientBean> relatives = (List<PatientBean>) session.getAttribute("relatives");
+	pid = relatives.get(relativeIndex).getMID();
+	pidString = "" + pid;
+	session.removeAttribute("relatives");
+	session.setAttribute("pid", pidString);
 }
 else if (!patientString.equals("")) {
 
-    int patientIndex = Integer.parseInt(patientString);
-    List<PatientBean> patients = (List<PatientBean>) session.getAttribute("patients");
-    pid = patients.get(patientIndex).getMID();
-    pidString = "" + pid;
-    session.removeAttribute("patients");
-    session.setAttribute("pid", pidString);
+	int patientIndex = Integer.parseInt(patientString);
+	List<PatientBean> patients = (List<PatientBean>) session.getAttribute("patients");
+	pid = patients.get(patientIndex).getMID();
+	pidString = "" + pid;
+	session.removeAttribute("patients");
+	session.setAttribute("pid", pidString);
 }
 else {
-    if (session.getAttribute("pid") == null) {
-        pid = 0;
-        pidString = "";
+	if (session.getAttribute("pid") == null) {
+		pid = 0;
+		pidString = "";
     } else {
-        pid = (long) Long.parseLong((String) session.getAttribute("pid"));
-        pidString = ""+pid;
+		pid = (long) Long.parseLong((String) session.getAttribute("pid"));
+		pidString = ""+pid;
     }
 }
 
 if (pidString == null || 1 > pidString.length()) {
-    response.sendRedirect("../getPatientID.jsp?forward=hcp-uap/editPHR.jsp");
+	response.sendRedirect("../getPatientID.jsp?forward=hcp-uap/editPHR.jsp");
     
-       return;
+	return;
 }
 loggingAction.logEvent(TransactionType.PATIENT_HEALTH_INFORMATION_VIEW, loggedInMID.longValue(), pid, "");
 
@@ -95,12 +95,12 @@ pid = action.getPid();
 String confirm = "";
 if(request.getParameter("addA") != null)
 {
-    try{
-        confirm = action.updateAllergies(pid,request.getParameter("description"));
-        loggingAction.logEvent(TransactionType.PATIENT_HEALTH_INFORMATION_EDIT, loggedInMID.longValue(), pid, "");
+	try{
+		confirm = action.updateAllergies(pid,request.getParameter("description"));
+		loggingAction.logEvent(TransactionType.PATIENT_HEALTH_INFORMATION_EDIT, loggedInMID.longValue(), pid, "");
     } catch(Exception e)
     {
-        confirm = e.getMessage();
+		confirm = e.getMessage();
     }
 }
 
@@ -115,9 +115,9 @@ List<FamilyMemberBean> family = action.getFamily();
 <%@page import="edu.ncsu.csc.itrust.exception.NoHealthRecordsException"%>
 
 <script type="text/javascript">
-    function showRisks(){
-        document.getElementById("risks").style.display="inline";
-        document.getElementById("riskButton").style.display="none";
+	function showRisks(){
+		document.getElementById("risks").style.display="inline";
+		document.getElementById("riskButton").style.display="none";
     }
 </script>
 
diff --git a/iTrust/WebRoot/auth/hcp-uap/viewPreRegisteredPatientList.jsp b/iTrust/WebRoot/auth/hcp-uap/viewPreRegisteredPatientList.jsp
index 863d293804108410a6b5b21b193ebd82da28999d..0f2481f358206068cc85c8c8fe5874442f54dc63 100644
--- a/iTrust/WebRoot/auth/hcp-uap/viewPreRegisteredPatientList.jsp
+++ b/iTrust/WebRoot/auth/hcp-uap/viewPreRegisteredPatientList.jsp
@@ -27,16 +27,16 @@ loggingAction.logEvent(TransactionType.PATIENT_LIST_VIEW, loggedInMID, 0, "");
 
 <script src="/iTrust/DataTables/media/js/jquery.dataTables.min.js" type="text/javascript"></script>
     <script type="text/javascript">
-    jQuery.fn.dataTableExt.oSort['lname-asc']  = function(x,y) {
-        var a = x.split(" ");
-        var b = y.split(" ");
-        return ((a[1] < b[1]) ? -1 : ((a[1] > b[1]) ?  1 : 0));
+	jQuery.fn.dataTableExt.oSort['lname-asc']  = function(x,y) {
+		var a = x.split(" ");
+		var b = y.split(" ");
+		return ((a[1] < b[1]) ? -1 : ((a[1] > b[1]) ?  1 : 0));
     };
                 
-    jQuery.fn.dataTableExt.oSort['lname-desc']  = function(x,y) {
-        var a = x.split(" ");
-        var b = y.split(" ");
-        return ((a[1] < b[1]) ? 1 : ((a[1] > b[1]) ?  -1 : 0));
+	jQuery.fn.dataTableExt.oSort['lname-desc']  = function(x,y) {
+		var a = x.split(" ");
+		var b = y.split(" ");
+		return ((a[1] < b[1]) ? 1 : ((a[1] > b[1]) ?  -1 : 0));
     };
 </script>
             
@@ -73,13 +73,13 @@ loggingAction.logEvent(TransactionType.PATIENT_LIST_VIEW, loggedInMID, 0, "");
     </thead>
     <tbody>
     <%
-        List<PatientBean> patientsList = new ArrayList<PatientBean>();
-        int index = 0;
+		List<PatientBean> patientsList = new ArrayList<PatientBean>();
+		int index = 0;
         
-        for (PatientBean bean : PreRegisteredPatientList) {
-            patientsList.add(bean);
-            String idName = "row" + index;
-            String editButtonName = "button" + index;
+		for (PatientBean bean : PreRegisteredPatientList) {
+			patientsList.add(bean);
+			String idName = "row" + index;
+			String editButtonName = "button" + index;
     %>
     
     <tr>
@@ -102,10 +102,10 @@ loggingAction.logEvent(TransactionType.PATIENT_LIST_VIEW, loggedInMID, 0, "");
         </td>
     </tr>
     <%
-            index ++;
+			index ++;
         }
         
-        session.setAttribute("patients", patientsList);
+		session.setAttribute("patients", patientsList);
     %>
     </tbody>
 </table>
diff --git a/iTrust/sql/createTables.sql b/iTrust/sql/createTables.sql
index 7bea2bac04332e8a76c7722720f1d76bea19402e..04af1645945ef6f332be4ca34134eb6ea5c70d72 100644
--- a/iTrust/sql/createTables.sql
+++ b/iTrust/sql/createTables.sql
@@ -236,12 +236,12 @@ CREATE TABLE resetpasswordfailures(
 ) ENGINE=MyISAM;
 
 CREATE TABLE icdcodes (
-  Code decimal(5,2) NOT NULL,
-  Description TEXT NOT NULL,
-  Chronic enum('no','yes') NOT NULL default 'no',
-  Ophthalmology enum('no','yes') NOT NULL default 'no',
-  URL varchar(512) NOT NULL default '',
-  PRIMARY KEY (Code)
+	Code decimal(5,2) NOT NULL,
+	Description TEXT NOT NULL,
+	Chronic enum('no','yes') NOT NULL default 'no',
+	Ophthalmology enum('no','yes') NOT NULL default 'no',
+	URL varchar(512) NOT NULL default '',
+	PRIMARY KEY (Code)
 ) ENGINE=MyISAM;
 
 CREATE TABLE cptcodes(
@@ -398,7 +398,7 @@ CREATE TABLE ovprocedure(
 ) ENGINE=MyISAM;
 
 CREATE TABLE ovmedication (
-    ID INT(10)  auto_increment primary key,
+	ID INT(10)  auto_increment primary key,
 	VisitID INT( 10 ) unsigned NOT NULL COMMENT 'ID of the Office Visit',
 	NDCode VARCHAR( 9 ) NOT NULL COMMENT 'NDCode for the medication',
 	StartDate DATE,
@@ -416,10 +416,10 @@ CREATE TABLE ovreactionoverride (
 ) ENGINE=MyISAM;
 
 CREATE TABLE ovdiagnosis (
-    ID INT(10) auto_increment primary key,
+	ID INT(10) auto_increment primary key,
 	VisitID INT( 10 ) unsigned NOT NULL COMMENT 'ID of the Office Visit',
 	ICDCode DECIMAL( 5, 2 ) NOT NULL COMMENT 'Code for the Diagnosis',
-    URL VARCHAR(512) COMMENT 'URL for information'
+	URL VARCHAR(512) COMMENT 'URL for information'
 ) ENGINE=MyISAM;
 
 CREATE TABLE globalvariables (
@@ -440,13 +440,13 @@ CREATE TABLE fakeemail(
 
 CREATE TABLE reportrequests (
 	ID INT(10) auto_increment primary key,
-    RequesterMID BIGINT unsigned,
-    PatientMID BIGINT unsigned,
-    ApproverMID BIGINT unsigned,
-    RequestedDate datetime,
-    ApprovedDate datetime,
-    ViewedDate datetime,
-    Status varchar(30),
+	RequesterMID BIGINT unsigned,
+	PatientMID BIGINT unsigned,
+	ApproverMID BIGINT unsigned,
+	RequestedDate datetime,
+	ApprovedDate datetime,
+	ViewedDate datetime,
+	Status varchar(30),
 	Comment TEXT
 ) ENGINE=MyISAM;
 
@@ -455,7 +455,7 @@ CREATE TABLE ovsurvey (
 	SurveyDate datetime not null COMMENT 'Date the survey was completed',
 	WaitingRoomMinutes int(3) COMMENT 'How many minutes did you wait in the waiting room?',
 	ExamRoomMinutes int(3) COMMENT 'How many minutes did you wait in the examination room before seeing your physician?',
-    VisitSatisfaction int(1) COMMENT 'How satisfied were you with your office visit?',
+	VisitSatisfaction int(1) COMMENT 'How satisfied were you with your office visit?',
 	TreatmentSatisfaction int(1) COMMENT 'How satisfied were you with the treatment or information you received?'
 ) ENGINE=MyISAM;
 
@@ -576,12 +576,12 @@ CREATE TABLE profilephotos (
 ) ENGINE=MyISAM;
 
 CREATE TABLE patientspecificinstructions (
-    id BIGINT unsigned AUTO_INCREMENT primary key,
-    VisitID BIGINT unsigned,
-    Modified TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-    Name VARCHAR(100),
-    URL VARCHAR(250),
-    Comment VARCHAR(500)
+	id BIGINT unsigned AUTO_INCREMENT primary key,
+	VisitID BIGINT unsigned,
+	Modified TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+	Name VARCHAR(100),
+	URL VARCHAR(250),
+	Comment VARCHAR(500)
 ) ENGINE=MyISAM;
 
 CREATE TABLE referralmessage(
@@ -706,30 +706,30 @@ CREATE TABLE requiredprocedures(
 )ENGINE=innoDB;
     
 CREATE TABLE reviews(
-    mid  BIGINT UNSIGNED NOT NULL,
-    pid  BIGINT UNSIGNED NOT NULL,
-    reviewdate DATETIME NOT NULL,
-    descriptivereview VARCHAR(500),
-    rating INT UNSIGNED NOT NULL,
-    title VARCHAR(200)
+	mid  BIGINT UNSIGNED NOT NULL,
+	pid  BIGINT UNSIGNED NOT NULL,
+	reviewdate DATETIME NOT NULL,
+	descriptivereview VARCHAR(500),
+	rating INT UNSIGNED NOT NULL,
+	title VARCHAR(200)
 )ENGINE=innoDB;
 
 CREATE TABLE IF NOT EXISTS obstetricsconditions (
-  `cid` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
-  `mid` BIGINT NOT NULL,
-  `condition` VARCHAR(64) NOT NULL,
-  PRIMARY KEY (`cid`),
-  UNIQUE INDEX `cid_UNIQUE` (`cid` ASC)
+	`cid` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
+	`mid` BIGINT NOT NULL,
+	`condition` VARCHAR(64) NOT NULL,
+	PRIMARY KEY (`cid`),
+	UNIQUE INDEX `cid_UNIQUE` (`cid` ASC)
 )ENGINE=innoDB;
 
 CREATE TABLE IF NOT EXISTS zipcodes (
-  `zip` varchar(5) NOT NULL default '',
-  `state` char(2) NOT NULL default '',
-  `latitude` varchar(10) NOT NULL default '',
-  `longitude` varchar(10) NOT NULL default '',
-  `city` varchar(50) default NULL,
-  `full_state` varchar(50) default NULL,
-  PRIMARY KEY `zip` (`zip`)
+	`zip` varchar(5) NOT NULL default '',
+	`state` char(2) NOT NULL default '',
+	`latitude` varchar(10) NOT NULL default '',
+	`longitude` varchar(10) NOT NULL default '',
+	`city` varchar(50) default NULL,
+	`full_state` varchar(50) default NULL,
+	PRIMARY KEY `zip` (`zip`)
 ) ENGINE=innoDB;
 
 CREATE TABLE IF NOT EXISTS foodEntry (
@@ -792,8 +792,8 @@ CREATE TABLE IF NOT EXISTS designatedNutritionist(
 ) ENGINE=MyISAM;
 
 CREATE TABLE IF NOT EXISTS opdiagnosis(
-    ID INT(10) auto_increment primary key,
+	ID INT(10) auto_increment primary key,
 	VisitID INT( 10 ) unsigned NOT NULL COMMENT 'ID of the Ophthalmology Visit',
 	ICDCode DECIMAL( 5, 2 ) NOT NULL COMMENT 'Code for the Diagnosis',
-    URL VARCHAR(512) COMMENT 'URL for information'
+	URL VARCHAR(512) COMMENT 'URL for information'
 ) ENGINE=MyISAM;
diff --git a/iTrust/sql/data/patient92.sql b/iTrust/sql/data/patient92.sql
index caa1462f6faf402fa186418e99b6f6975efc9d64..d990cd8fdd35c775543cef003bad7fda71b5cb1d 100644
--- a/iTrust/sql/data/patient92.sql
+++ b/iTrust/sql/data/patient92.sql
@@ -23,8 +23,8 @@ VALUES
 '919-971-0000',
 '2006-10-25',
 'Female')
- ON DUPLICATE KEY UPDATE MID = MID;
+	ON DUPLICATE KEY UPDATE MID = MID;
 
 INSERT INTO users(MID, password, role, sQuestion, sAnswer, isDependent)
 			VALUES (92, '30c952fab122c3f9759f02a6d95c3758b246b4fee239957b2d4fee46e26170c4', 'preRegisteredPatient', 'what is your favorite color?', 'blue', 0)
- ON DUPLICATE KEY UPDATE MID = MID;
+	ON DUPLICATE KEY UPDATE MID = MID;
diff --git a/iTrust/src/edu/ncsu/csc/itrust/action/ViewPreRegisteredPatientListAction.java b/iTrust/src/edu/ncsu/csc/itrust/action/ViewPreRegisteredPatientListAction.java
index 74db4e462f9f6d94d011eb835772b7939ec36a00..53e64eb11dd3a1ff68ccdfe2bc91eb4c09ebc329 100644
--- a/iTrust/src/edu/ncsu/csc/itrust/action/ViewPreRegisteredPatientListAction.java
+++ b/iTrust/src/edu/ncsu/csc/itrust/action/ViewPreRegisteredPatientListAction.java
@@ -16,51 +16,51 @@ import edu.ncsu.csc.itrust.exception.DBException;
 import edu.ncsu.csc.itrust.exception.ITrustException;
 
 /**
- * 
+ *
  * Action class for viewPreRegisteredPatientList.jsp
  *
  */
 public class ViewPreRegisteredPatientListAction {
-    private long loggedInMID;
-    private PatientDAO patientDAO;
-    private PersonnelDAO personnelDAO;
+	private long loggedInMID;
+	private PatientDAO patientDAO;
+	private PersonnelDAO personnelDAO;
+
+	private ArrayList<PatientBean> PreRegisteredPatients;
+
+	/**
+	 * Set up defaults
+	 * @param factory The DAOFactory used to create the DAOs used in this action.
+	 * @param loggedInMID The MID of the person viewing the office visits.
+	 */
+	public ViewPreRegisteredPatientListAction(DAOFactory factory, long loggedInMID) {
+		this.loggedInMID = loggedInMID;
+
+		this.personnelDAO = factory.getPersonnelDAO();
+
+		this.patientDAO = factory.getPatientDAO();
+
+		PreRegisteredPatients = new ArrayList<PatientBean>();
+	}
+
+	/**
+	 * Identify all the PreRegistered Patients from Patients Table using  Users Table Role="PreRegistered", and add them to a list.
+	 *
+	 * @throws ITrustException
+	 */
+	public List<PatientBean> getPreRegisteredPatients() throws ITrustException {
+		try {
+
+			List<PatientBean> plist = patientDAO.getAllPreRegisteredPatients();
 
-    private ArrayList<PatientBean> PreRegisteredPatients;
+			for(PatientBean pb : plist) {
 
-    /**
-     * Set up defaults
-     * @param factory The DAOFactory used to create the DAOs used in this action.
-     * @param loggedInMID The MID of the person viewing the office visits.
-     */
-    public ViewPreRegisteredPatientListAction(DAOFactory factory, long loggedInMID) {
-        this.loggedInMID = loggedInMID;
-        
-        this.personnelDAO = factory.getPersonnelDAO();
-        
-        this.patientDAO = factory.getPatientDAO(); 
-        
-        PreRegisteredPatients = new ArrayList<PatientBean>();
-    }
-    
-    /**
-     * Identify all the PreRegistered Patients from Patients Table using  Users Table Role="PreRegistered", and add them to a list.
-     * 
-     * @throws ITrustException
-     */
-    public List<PatientBean> getPreRegisteredPatients() throws ITrustException {
-        try {
-            
-            List<PatientBean> plist = patientDAO.getAllPreRegisteredPatients();
+				PreRegisteredPatients.add(pb);
+			}
 
-            for(PatientBean pb : plist) {
-                
-                PreRegisteredPatients.add(pb);
-            }
-            
-            return PreRegisteredPatients;
-        }
-        catch (DBException dbe) {
-            throw new ITrustException(dbe.getMessage());
-        }
-    }
+			return PreRegisteredPatients;
+		}
+		catch (DBException dbe) {
+			throw new ITrustException(dbe.getMessage());
+		}
+	}
 }
\ No newline at end of file
diff --git a/iTrust/src/edu/ncsu/csc/itrust/dao/mysql/PatientDAO.java b/iTrust/src/edu/ncsu/csc/itrust/dao/mysql/PatientDAO.java
index c4ae1861a3b0dc1fc7e63b3028e9f1b35aeb6ec9..b966ee357a4fc093bdf00b2bc7754244ca167338 100644
--- a/iTrust/src/edu/ncsu/csc/itrust/dao/mysql/PatientDAO.java
+++ b/iTrust/src/edu/ncsu/csc/itrust/dao/mysql/PatientDAO.java
@@ -225,8 +225,8 @@ public class PatientDAO {
 		}
 	}
 
-    public boolean isEmailInUse(String email) throws DBException {
-        Connection conn = null;
+	public boolean isEmailInUse(String email) throws DBException {
+		Connection conn = null;
 		PreparedStatement ps = null;
 		boolean emailInUse = false;
 		try {
diff --git a/iTrust/src/edu/ncsu/csc/itrust/enums/TransactionType.java b/iTrust/src/edu/ncsu/csc/itrust/enums/TransactionType.java
index eaf010c2041f4932751e309e3f20f5bca969fba9..acc45c450cfbc5aaa8001c2012aedd11555d4199 100644
--- a/iTrust/src/edu/ncsu/csc/itrust/enums/TransactionType.java
+++ b/iTrust/src/edu/ncsu/csc/itrust/enums/TransactionType.java
@@ -147,195 +147,195 @@ public enum TransactionType {
 	/**OFFICE_VISIT_BILLED*/
 	OFFICE_VISIT_BILLED(1160, "Office Visit Billed", "Billed an office visit", false),
 	/**OPERATIONAL_PROFILE_VIEW*/
-    OPERATIONAL_PROFILE_VIEW(1200, "View Operational Profile", "viewed the operational profile", false),
+	OPERATIONAL_PROFILE_VIEW(1200, "View Operational Profile", "viewed the operational profile", false),
     /**HEALTH_REPRESENTATIVE_DECLARE*/
-    HEALTH_REPRESENTATIVE_DECLARE(1300, "Declare personal health representative", "declared a personal health representative", true),
+	HEALTH_REPRESENTATIVE_DECLARE(1300, "Declare personal health representative", "declared a personal health representative", true),
     /**HEALTH_REPRESENTATIVE_UNDECLARE*/
-    HEALTH_REPRESENTATIVE_UNDECLARE(1301, "Undeclare personal health representative", "undeclared a personal health representative", true),
+	HEALTH_REPRESENTATIVE_UNDECLARE(1301, "Undeclare personal health representative", "undeclared a personal health representative", true),
     /**MEDICAL_PROCEDURE_CODE_ADD*/
-    MEDICAL_PROCEDURE_CODE_ADD(1500, "Add Medical procedure code", "added a medical procedure code", false),
+	MEDICAL_PROCEDURE_CODE_ADD(1500, "Add Medical procedure code", "added a medical procedure code", false),
     /**MEDICAL_PROCEDURE_CODE_VIEW*/
-    MEDICAL_PROCEDURE_CODE_VIEW(1501, "View Medical procedure code", "viewed a medical procedure code", false),
+	MEDICAL_PROCEDURE_CODE_VIEW(1501, "View Medical procedure code", "viewed a medical procedure code", false),
     /**MEDICAL_PROCEDURE_CODE_EDIT*/
-    MEDICAL_PROCEDURE_CODE_EDIT(1502, "Edit Medical procedure code", "edited a medical procedure code", false),
+	MEDICAL_PROCEDURE_CODE_EDIT(1502, "Edit Medical procedure code", "edited a medical procedure code", false),
     /**IMMUNIZATION_CODE_ADD*/
-    IMMUNIZATION_CODE_ADD(1510, "Add Immunization code", "added an immunization code", false),
+	IMMUNIZATION_CODE_ADD(1510, "Add Immunization code", "added an immunization code", false),
     /**IMMUNIZATION_CODE_VIEW*/
-    IMMUNIZATION_CODE_VIEW(1511, "View Immunization code", "viewed an immunization code", false),
+	IMMUNIZATION_CODE_VIEW(1511, "View Immunization code", "viewed an immunization code", false),
     /**IMMUNIZATION_CODE_EDIT*/
-    IMMUNIZATION_CODE_EDIT(1512, "Edit Immunization code", "edited an immunization code", false),
+	IMMUNIZATION_CODE_EDIT(1512, "Edit Immunization code", "edited an immunization code", false),
     /**DIAGNOSIS_CODE_ADD*/
-    DIAGNOSIS_CODE_ADD(1520, "Add Diagnosis code", "added a diagnosis code", false),
+	DIAGNOSIS_CODE_ADD(1520, "Add Diagnosis code", "added a diagnosis code", false),
     /**DIAGNOSIS_CODE_VIEW*/
-    DIAGNOSIS_CODE_VIEW(1521, "View Diagnosis code", "viewed a diagnosis code", false),
+	DIAGNOSIS_CODE_VIEW(1521, "View Diagnosis code", "viewed a diagnosis code", false),
     /**DIAGNOSIS_CODE_EDIT*/
-    DIAGNOSIS_CODE_EDIT(1522, "Edit Diagnosis code", "edited a diagnosis code", false),
+	DIAGNOSIS_CODE_EDIT(1522, "Edit Diagnosis code", "edited a diagnosis code", false),
     /**DRUG_CODE_ADD*/
-    DRUG_CODE_ADD(1530, "Add Drug code", "added a drug code", false),
+	DRUG_CODE_ADD(1530, "Add Drug code", "added a drug code", false),
     /**DRUG_CODE_VIEW*/
-    DRUG_CODE_VIEW(1531, "View Drug code", "viewed a drug code", false),
+	DRUG_CODE_VIEW(1531, "View Drug code", "viewed a drug code", false),
     /**DRUG_CODE_EDIT*/
-    DRUG_CODE_EDIT(1532, "Edit Drug code", "edited a drug code", false),
+	DRUG_CODE_EDIT(1532, "Edit Drug code", "edited a drug code", false),
     /**DRUG_CODE_REMOVE*/
-    DRUG_CODE_REMOVE(1533, "Remove Drug code", "removed a drug code", false),
+	DRUG_CODE_REMOVE(1533, "Remove Drug code", "removed a drug code", false),
     /**LOINC_CODE_ADD*/
-    LOINC_CODE_ADD(1540, "Add Physical Services code", "added a physical service code", false),
+	LOINC_CODE_ADD(1540, "Add Physical Services code", "added a physical service code", false),
     /**LOINC_CODE_VIEW*/
-    LOINC_CODE_VIEW(1541, "View Physical Services code", "viewed a physical service code", false),
+	LOINC_CODE_VIEW(1541, "View Physical Services code", "viewed a physical service code", false),
     /**LOINC_CODE_EDIT*/
-    LOINC_CODE_EDIT(1542, "Edit Physical Services code", "edited a physical service code", false),
+	LOINC_CODE_EDIT(1542, "Edit Physical Services code", "edited a physical service code", false),
     /**LOINC_CODE_FILE_ADD*/
-    LOINC_CODE_FILE_ADD(1549, "Upload Physical Services file", "uploaded a LOINC file", false),
+	LOINC_CODE_FILE_ADD(1549, "Upload Physical Services file", "uploaded a LOINC file", false),
     /**RISK_FACTOR_VIEW*/
-    RISK_FACTOR_VIEW(1600, "View risk factors", "viewed your risk factors", true),
+	RISK_FACTOR_VIEW(1600, "View risk factors", "viewed your risk factors", true),
     /**PATIENT_REMINDERS_VIEW*/
-    PATIENT_REMINDERS_VIEW(1700, "Proactively determine necessary patient care", "proactively determined your necessary patient care", true),
+	PATIENT_REMINDERS_VIEW(1700, "Proactively determine necessary patient care", "proactively determined your necessary patient care", true),
     /**HOSPITAL_LISTING_ADD*/
-    HOSPITAL_LISTING_ADD(1800, "Add a hospital listing", "added a hospital listing", false),
+	HOSPITAL_LISTING_ADD(1800, "Add a hospital listing", "added a hospital listing", false),
     /**HOSPITAL_LISTING_VIEW*/
-    HOSPITAL_LISTING_VIEW(1801, "View a hospital listing", "viewed a hospital listing", false),
+	HOSPITAL_LISTING_VIEW(1801, "View a hospital listing", "viewed a hospital listing", false),
     /**HOSPITAL_LISTING_EDIT*/
-    HOSPITAL_LISTING_EDIT(1802, "Edit a hospital listing", "edited a hospital listing", false),
+	HOSPITAL_LISTING_EDIT(1802, "Edit a hospital listing", "edited a hospital listing", false),
     /**PRESCRIPTION_REPORT_VIEW*/
-    PRESCRIPTION_REPORT_VIEW(1900, "View prescription report", "viewed your prescription report", true),
+	PRESCRIPTION_REPORT_VIEW(1900, "View prescription report", "viewed your prescription report", true),
     /**DEATH_TRENDS_VIEW*/
-    DEATH_TRENDS_VIEW(2000, "View Cause of Death Trends", "viewed cause of death trends", false),
+	DEATH_TRENDS_VIEW(2000, "View Cause of Death Trends", "viewed cause of death trends", false),
     /**EMERGENCY_REPORT_CREATE*/
-    EMERGENCY_REPORT_CREATE(2100, "Create emergency report", "created an emergency report for you", true),
+	EMERGENCY_REPORT_CREATE(2100, "Create emergency report", "created an emergency report for you", true),
     /**EMERGENCY_REPORT_VIEW*/
-    EMERGENCY_REPORT_VIEW(2101, "View emergency report", "viewed your emergency report", true),
+	EMERGENCY_REPORT_VIEW(2101, "View emergency report", "viewed your emergency report", true),
     /**APPOINTMENT_TYPE_ADD*/
-    APPOINTMENT_TYPE_ADD(2200, "Add appointment type listing", "added an appointment type", false),
+	APPOINTMENT_TYPE_ADD(2200, "Add appointment type listing", "added an appointment type", false),
     /**APPOINTMENT_TYPE_VIEW*/
-    APPOINTMENT_TYPE_VIEW(2201, "View appointment type listing", "viewed an appointment type", false),
+	APPOINTMENT_TYPE_VIEW(2201, "View appointment type listing", "viewed an appointment type", false),
     /**APPOINTMENT_TYPE_EDIT*/
-    APPOINTMENT_TYPE_EDIT(2202, "Edit appointment type listing", "edited an appointment type", false),
+	APPOINTMENT_TYPE_EDIT(2202, "Edit appointment type listing", "edited an appointment type", false),
     /**APPOINTMENT_ADD*/
-    APPOINTMENT_ADD(2210, "Schedule Appointments", "scheduled an appointment with you", true),
+	APPOINTMENT_ADD(2210, "Schedule Appointments", "scheduled an appointment with you", true),
     /**APPOINTMENT_VIEW*/
-    APPOINTMENT_VIEW(2211, "View Scheduled Appointment", "viewed your scheduled appointment", true),
+	APPOINTMENT_VIEW(2211, "View Scheduled Appointment", "viewed your scheduled appointment", true),
     /**APPOINTMENT_EDIT*/
-    APPOINTMENT_EDIT(2212, "Edit Scheduled Appointment", "edited your scheduled appointment", true),
+	APPOINTMENT_EDIT(2212, "Edit Scheduled Appointment", "edited your scheduled appointment", true),
     /**APPOINTMENT_REMOVE*/
-    APPOINTMENT_REMOVE(2213, "Delete Scheduled Appointment", "canceled your scheduled appointment", true),
+	APPOINTMENT_REMOVE(2213, "Delete Scheduled Appointment", "canceled your scheduled appointment", true),
     /**APPOINTMENT_ALL_VIEW*/
-    APPOINTMENT_ALL_VIEW(2220, "View All Scheduled Appointments", "viewed all scheduled appointments", true),
+	APPOINTMENT_ALL_VIEW(2220, "View All Scheduled Appointments", "viewed all scheduled appointments", true),
     /**APPOINTMENT_CONFLICT_OVERRIDE*/
-    APPOINTMENT_CONFLICT_OVERRIDE(2230, "Schedule conflict override", "overrided a schedule conflict", true),
+	APPOINTMENT_CONFLICT_OVERRIDE(2230, "Schedule conflict override", "overrided a schedule conflict", true),
     /**APPOINTMENT_REQUEST_SUBMITTED*/
-    APPOINTMENT_REQUEST_SUBMITTED(2240, "Appointment request submitted", "requested an appointment", true),
+	APPOINTMENT_REQUEST_SUBMITTED(2240, "Appointment request submitted", "requested an appointment", true),
     /**APPOINTMENT_REQUEST_APPROVED*/
-    APPOINTMENT_REQUEST_APPROVED(2250, "Appointment request approved", "approved an appointment request", true),
+	APPOINTMENT_REQUEST_APPROVED(2250, "Appointment request approved", "approved an appointment request", true),
     /**APPOINTMENT_REQUEST_REJECTED*/
-    APPOINTMENT_REQUEST_REJECTED(2251, "Appointment request rejected", "rejected an appointment request", true),
+	APPOINTMENT_REQUEST_REJECTED(2251, "Appointment request rejected", "rejected an appointment request", true),
     /**APPOINTMENT_REQUEST_VIEW*/
-    APPOINTMENT_REQUEST_VIEW(2260, "View All Appointment Requests", "viewed all appointment requests", true),
+	APPOINTMENT_REQUEST_VIEW(2260, "View All Appointment Requests", "viewed all appointment requests", true),
     /**COMPREHENSIVE_REPORT_VIEW*/
-    COMPREHENSIVE_REPORT_VIEW(2300, "Comprehensive Report", "viewed your comprehensive report", true),
+	COMPREHENSIVE_REPORT_VIEW(2300, "Comprehensive Report", "viewed your comprehensive report", true),
     /**COMPREHENSIVE_REPORT_ADD*/
-    COMPREHENSIVE_REPORT_ADD(2301, "Request Comprehensive Report", "requested a comprehensive report for you", true),
+	COMPREHENSIVE_REPORT_ADD(2301, "Request Comprehensive Report", "requested a comprehensive report for you", true),
     /**SATISFACTION_SURVEY_TAKE*/
-    SATISFACTION_SURVEY_TAKE(2400, "Take Satisfaction Survey", "completed a satisfaction survey", true),
+	SATISFACTION_SURVEY_TAKE(2400, "Take Satisfaction Survey", "completed a satisfaction survey", true),
     /**SATISFACTION_SURVEY_VIEW*/
-    SATISFACTION_SURVEY_VIEW(2500, "View physician satisfaction results", "viewed physician satisfaction survey results", false),
+	SATISFACTION_SURVEY_VIEW(2500, "View physician satisfaction results", "viewed physician satisfaction survey results", false),
     /**LAB_RESULTS_UNASSIGNED*/
-    LAB_RESULTS_UNASSIGNED(2600, "Unassigned lab results log value", "", false),
+	LAB_RESULTS_UNASSIGNED(2600, "Unassigned lab results log value", "", false),
     /**LAB_RESULTS_CREATE*/
-    LAB_RESULTS_CREATE(2601, "Create laboratory procedure", "created your lab procedure", true),
+	LAB_RESULTS_CREATE(2601, "Create laboratory procedure", "created your lab procedure", true),
     /**LAB_RESULTS_VIEW*/
-    LAB_RESULTS_VIEW(2602, "View laboratory procedure results", "viewed your lab procedure results", true),
+	LAB_RESULTS_VIEW(2602, "View laboratory procedure results", "viewed your lab procedure results", true),
     /**LAB_RESULTS_REASSIGN*/
-    LAB_RESULTS_REASSIGN(2603, "Reassign laboratory test to a new lab technician", "assigned your laboratory test to a new lab tech", false),
+	LAB_RESULTS_REASSIGN(2603, "Reassign laboratory test to a new lab technician", "assigned your laboratory test to a new lab tech", false),
     /**LAB_RESULTS_REMOVE*/
-    LAB_RESULTS_REMOVE(2604, "Remove a laboratory procedure", "removed your lab procedure", true),
+	LAB_RESULTS_REMOVE(2604, "Remove a laboratory procedure", "removed your lab procedure", true),
     /**LAB_RESULTS_ADD_COMMENTARY*/
-    LAB_RESULTS_ADD_COMMENTARY(2605, "Add commentary to a laboratory procedure", "marked a lab procedure as completed", true),
+	LAB_RESULTS_ADD_COMMENTARY(2605, "Add commentary to a laboratory procedure", "marked a lab procedure as completed", true),
     /**LAB_RESULTS_VIEW_QUEUE*/
-    LAB_RESULTS_VIEW_QUEUE(2606, "View laboratory procedure queue", "viewed your lab procedure queue", false),
+	LAB_RESULTS_VIEW_QUEUE(2606, "View laboratory procedure queue", "viewed your lab procedure queue", false),
     /**LAB_RESULTS_RECORD*/
-    LAB_RESULTS_RECORD(2607, "Record laboratory test results", "recorded your lab procedure results", false),
+	LAB_RESULTS_RECORD(2607, "Record laboratory test results", "recorded your lab procedure results", false),
     /**LAB_RESULTS_RECEIVED*/
-    LAB_RESULTS_RECEIVED(2608, "Laboratory procedure received by lab technician", "the lab tech received your lab procedure", false),
+	LAB_RESULTS_RECEIVED(2608, "Laboratory procedure received by lab technician", "the lab tech received your lab procedure", false),
     /**EMAIL_SEND*/
-    EMAIL_SEND(2700, "Send an email", "sent an email", false),
+	EMAIL_SEND(2700, "Send an email", "sent an email", false),
     /**EMAIL_HISTORY_VIEW*/
-    EMAIL_HISTORY_VIEW(2710, "View email history", "viewed email history", false),
+	EMAIL_HISTORY_VIEW(2710, "View email history", "viewed email history", false),
     /**PATIENT_LIST_VIEW*/
-    PATIENT_LIST_VIEW(2800, "View patient list", "viewed his/her patient list", false),
+	PATIENT_LIST_VIEW(2800, "View patient list", "viewed his/her patient list", false),
     /**EXPERIENCED_LHCP_FIND*/
-    EXPERIENCED_LHCP_FIND(2900, "Find LHCPs with experience with a diagnosis", "found LHCPs with experience with a diagnosis", false),
+	EXPERIENCED_LHCP_FIND(2900, "Find LHCPs with experience with a diagnosis", "found LHCPs with experience with a diagnosis", false),
     /**MESSAGE_SEND*/
-    MESSAGE_SEND(3000, "Send messages", "sent a message", false),
+	MESSAGE_SEND(3000, "Send messages", "sent a message", false),
     /**MESSAGE_VIEW*/
-    MESSAGE_VIEW(3001, "View messages", "viewed a message", false),
+	MESSAGE_VIEW(3001, "View messages", "viewed a message", false),
     /**INBOX_VIEW*/
-    INBOX_VIEW(3010, "View inbox", "viewed message inbox", false),
+	INBOX_VIEW(3010, "View inbox", "viewed message inbox", false),
     /**OUTBOX_VIEW*/
-    OUTBOX_VIEW(3011, "View outbox", "viewed message outbox", false),
+	OUTBOX_VIEW(3011, "View outbox", "viewed message outbox", false),
     /**PATIENT_FIND_LHCP_FOR_RENEWAL*/
-    PATIENT_FIND_LHCP_FOR_RENEWAL(3100, "Find LHCPs for prescription renewal", "found LHCPs for prescription renewal", true),
+	PATIENT_FIND_LHCP_FOR_RENEWAL(3100, "Find LHCPs for prescription renewal", "found LHCPs for prescription renewal", true),
     /**EXPIRED_PRESCRIPTION_VIEW*/
-    EXPIRED_PRESCRIPTION_VIEW(3110, "View expired prescriptions", "viewed your expired prescriptions", true),
+	EXPIRED_PRESCRIPTION_VIEW(3110, "View expired prescriptions", "viewed your expired prescriptions", true),
     /**PRECONFIRM_PRESCRIPTION_RENEWAL*/
-    PRECONFIRM_PRESCRIPTION_RENEWAL(3200, "Proactively confirm prescription-renewal needs", "proactively confirmed your prescription renewal needs", true),
+	PRECONFIRM_PRESCRIPTION_RENEWAL(3200, "Proactively confirm prescription-renewal needs", "proactively confirmed your prescription renewal needs", true),
     /**DIAGNOSES_LIST_VIEW*/
-    DIAGNOSES_LIST_VIEW(3210, "View list of diagnoses", "viewed a list of diagnosis", false),
+	DIAGNOSES_LIST_VIEW(3210, "View list of diagnoses", "viewed a list of diagnosis", false),
     /**CONSULTATION_REFERRAL_CREATE*/
-    CONSULTATION_REFERRAL_CREATE(3300, "Refer a patient for consultations", "referred you to another HCP", true),
+	CONSULTATION_REFERRAL_CREATE(3300, "Refer a patient for consultations", "referred you to another HCP", true),
     /**CONSULTATION_REFERRAL_VIEW*/
-    CONSULTATION_REFERRAL_VIEW(3310, "View referral for consultation", "viewed your consultation referral", true),
+	CONSULTATION_REFERRAL_VIEW(3310, "View referral for consultation", "viewed your consultation referral", true),
     /**CONSULTATION_REFERRAL_EDIT*/
-    CONSULTATION_REFERRAL_EDIT(3311, "Modify referral for consultation", "modified your consultation referral", true),
+	CONSULTATION_REFERRAL_EDIT(3311, "Modify referral for consultation", "modified your consultation referral", true),
     /**CONSULTATION_REFERRAL_CANCEL*/
-    CONSULTATION_REFERRAL_CANCEL(3312, "Cancel referral for consultation", "canceled your consultation referral", true),
+	CONSULTATION_REFERRAL_CANCEL(3312, "Cancel referral for consultation", "canceled your consultation referral", true),
     /**PATIENT_LIST_ADD*/
-    PATIENT_LIST_ADD(3400, "Patient added to monitoring list", "added you to the telemedicine monitoring list", true),
+	PATIENT_LIST_ADD(3400, "Patient added to monitoring list", "added you to the telemedicine monitoring list", true),
     /**PATIENT_LIST_EDIT*/
-    PATIENT_LIST_EDIT(3401, "Patient telemedicine permissions changed", "changed the data you report for telemedicine monitoring", true),
+	PATIENT_LIST_EDIT(3401, "Patient telemedicine permissions changed", "changed the data you report for telemedicine monitoring", true),
     /**PATIENT_LIST_REMOVE*/
-    PATIENT_LIST_REMOVE(3402, "Patient removed from monitoring list", "removed you from the telemedicine monitoring list", true),
+	PATIENT_LIST_REMOVE(3402, "Patient removed from monitoring list", "removed you from the telemedicine monitoring list", true),
     /**TELEMEDICINE_DATA_REPORT*/
-    TELEMEDICINE_DATA_REPORT(3410, "Remote monitoring levels are reported", "reported your telemedicine data", true),
+	TELEMEDICINE_DATA_REPORT(3410, "Remote monitoring levels are reported", "reported your telemedicine data", true),
     /**TELEMEDICINE_DATA_VIEW*/
-    TELEMEDICINE_DATA_VIEW(3420, "Remote monitoring levels are viewed", "viewed your telemedicine data reports", true),
+	TELEMEDICINE_DATA_VIEW(3420, "Remote monitoring levels are viewed", "viewed your telemedicine data reports", true),
     /**ADVERSE_EVENT_REPORT*/
-    ADVERSE_EVENT_REPORT(3500, "Adverse event reporting", "reported an adverse event", true),
+	ADVERSE_EVENT_REPORT(3500, "Adverse event reporting", "reported an adverse event", true),
     /**ADVERSE_EVENT_VIEW*/
-    ADVERSE_EVENT_VIEW(3600, "Adverse event monitoring", "reviewed an adverse event report", false),
+	ADVERSE_EVENT_VIEW(3600, "Adverse event monitoring", "reviewed an adverse event report", false),
     /**ADVERSE_EVENT_REMOVE*/
-    ADVERSE_EVENT_REMOVE(3601, "Remove adverse event", "removed an adverse event report", false),
+	ADVERSE_EVENT_REMOVE(3601, "Remove adverse event", "removed an adverse event report", false),
     /**ADVERSE_EVENT_REQUEST_MORE*/
-    ADVERSE_EVENT_REQUEST_MORE(3602, "Request More Adverse Event Details", "requested more adverse event details", false),
+	ADVERSE_EVENT_REQUEST_MORE(3602, "Request More Adverse Event Details", "requested more adverse event details", false),
     /**ADVERSE_EVENT_CHART_VIEW*/
-    ADVERSE_EVENT_CHART_VIEW(3603, "View Adverse Event Chart", "viewed adverse event chart", false),
+	ADVERSE_EVENT_CHART_VIEW(3603, "View Adverse Event Chart", "viewed adverse event chart", false),
     /**OVERRIDE_INTERACTION_WARNING*/
-    OVERRIDE_INTERACTION_WARNING(3700, "Override interaction warning", "Overrode an interaction warning", true),
+	OVERRIDE_INTERACTION_WARNING(3700, "Override interaction warning", "Overrode an interaction warning", true),
     /**OVERRIDE_CODE_ADD*/
-    OVERRIDE_CODE_ADD(3710, "Add overriding reason listing", "added a medication override reason", false),
+	OVERRIDE_CODE_ADD(3710, "Add overriding reason listing", "added a medication override reason", false),
     /**OVERRIDE_CODE_EDIT*/
-    OVERRIDE_CODE_EDIT(3711, "Edit overriding reason listing", "edited a medication override reason", false),
+	OVERRIDE_CODE_EDIT(3711, "Edit overriding reason listing", "edited a medication override reason", false),
     /**DRUG_INTERACTION_ADD*/
-    DRUG_INTERACTION_ADD(3800, "Add Drug Interactions Code", "added a drug interaction code", false),
+	DRUG_INTERACTION_ADD(3800, "Add Drug Interactions Code", "added a drug interaction code", false),
     /**DRUG_INTERACTION_EDIT*/
-    DRUG_INTERACTION_EDIT(3801, "Edit Drug Interactions Code", "edited a drug interaction code", false),
+	DRUG_INTERACTION_EDIT(3801, "Edit Drug Interactions Code", "edited a drug interaction code", false),
     /**DRUG_INTERACTION_DELETE*/
-    DRUG_INTERACTION_DELETE(3802, "Delete Drug Interactions Code", "deleted a drug interaction code", false),
+	DRUG_INTERACTION_DELETE(3802, "Delete Drug Interactions Code", "deleted a drug interaction code", false),
     /**CALENDAR_VIEW*/
-    CALENDAR_VIEW(4000, "View calendar", "viewed your calendar", false),
+	CALENDAR_VIEW(4000, "View calendar", "viewed your calendar", false),
     /**UPCOMING_APPOINTMENTS_VIEW*/
-    UPCOMING_APPOINTMENTS_VIEW(4010, "View Upcoming Appointments", "viewed upcoming appointments", false),
+	UPCOMING_APPOINTMENTS_VIEW(4010, "View Upcoming Appointments", "viewed upcoming appointments", false),
     /**NOTIFICATIONS_VIEW*/
-    NOTIFICATIONS_VIEW(4200, "View Notifications", "viewed your notification center", false),
+	NOTIFICATIONS_VIEW(4200, "View Notifications", "viewed your notification center", false),
     /**ACTIVITY_FEED_VIEW*/
-    ACTIVITY_FEED_VIEW(4300, "View activity feed", "viewed your activity feed", false),
+	ACTIVITY_FEED_VIEW(4300, "View activity feed", "viewed your activity feed", false),
     /**PATIENT_INSTRUCTIONS_ADD*/
-    PATIENT_INSTRUCTIONS_ADD(4400, "Add Patient Specific Instructions for Office Visit", "added a patient-specific instruction", true),
+	PATIENT_INSTRUCTIONS_ADD(4400, "Add Patient Specific Instructions for Office Visit", "added a patient-specific instruction", true),
     /**PATIENT_INSTRUCTIONS_EDIT*/
-    PATIENT_INSTRUCTIONS_EDIT(4401, "Edit Patient Specific Instructions for Office Visit", "edited a patient-specific instruction", true),
+	PATIENT_INSTRUCTIONS_EDIT(4401, "Edit Patient Specific Instructions for Office Visit", "edited a patient-specific instruction", true),
     /**PATIENT_INSTRUCTIONS_DELETE*/
-    PATIENT_INSTRUCTIONS_DELETE(4402, "	Delete Patient Specific Instructions for Office Visit", "deleted a patient-specific instruction", true),
+	PATIENT_INSTRUCTIONS_DELETE(4402, "	Delete Patient Specific Instructions for Office Visit", "deleted a patient-specific instruction", true),
     /**PATIENT_INSTRUCTIONS_VIEW*/
-    PATIENT_INSTRUCTIONS_VIEW(4403, "	View Patient Specific Instructions", "viewed your patient-specific instructions", true),
+	PATIENT_INSTRUCTIONS_VIEW(4403, "	View Patient Specific Instructions", "viewed your patient-specific instructions", true),
     /**DIAGNOSIS_TRENDS_VIEW*/
 	DIAGNOSIS_TRENDS_VIEW(4500, "View diagnosis statistics", "viewed your diagnosis count", false),
 	/**DIAGNOSIS_EPIDEMICS_VIEW*/
@@ -367,9 +367,9 @@ public enum TransactionType {
 	/**HCP_VIEW_PERCENTILES_CHART*/
 	HCP_VIEW_PERCENTILES_CHART(5301, "HCP View of Basic Health Metric Percentiles", "viewed your percentile data.", true),
     /**PATIENT_VIEW_PERCENTILES_CHART*/
-    PATIENT_VIEW_PERCENTILES_CHART(5300, "Pateint View of Basic Health Metric Percentiles", "viewed your percentile data.", true),
+	PATIENT_VIEW_PERCENTILES_CHART(5300, "Pateint View of Basic Health Metric Percentiles", "viewed your percentile data.", true),
     /**ADMIN_UPLOAD_CDCMETRICS*/
-    ADMIN_UPLOAD_CDCMETRICS(5302, "Admin upload of CDC Metrics", "Uploaded CDC Metrics Successfully", false),
+	ADMIN_UPLOAD_CDCMETRICS(5302, "Admin upload of CDC Metrics", "Uploaded CDC Metrics Successfully", false),
     /**PASSWORD_CHANGE*/
 	PASSWORD_CHANGE(5700, "User Successful Password Change", " changed password", false),
 	/**PASSWORD_CHANGE_FAILED*/
diff --git a/iTrust/test/edu/ncsu/csc/itrust/selenium/ActivatePatientTest.java b/iTrust/test/edu/ncsu/csc/itrust/selenium/ActivatePatientTest.java
index 8ab5299d1c23c1bddc825f56ef93af3d7b5c7f87..9eb9dcdee4b02f885e74979370b3bd7c31d6cbb8 100644
--- a/iTrust/test/edu/ncsu/csc/itrust/selenium/ActivatePatientTest.java
+++ b/iTrust/test/edu/ncsu/csc/itrust/selenium/ActivatePatientTest.java
@@ -8,61 +8,61 @@ import org.openqa.selenium.*;
 import org.openqa.selenium.htmlunit.HtmlUnitDriver;
 
 public class ActivatePatientTest extends iTrustSeleniumTest {
-    private WebDriver driver;
-    private StringBuffer verificationErrors = new StringBuffer();
+	private WebDriver driver;
+	private StringBuffer verificationErrors = new StringBuffer();
 
-    @Before
-    public void setUp() throws Exception {
-        super.setUp();
-        gen.standardData();
-        gen.patient92();
-        driver = new HtmlUnitDriver();
-        driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
-    }
+	@Before
+	public void setUp() throws Exception {
+		super.setUp();
+		gen.standardData();
+		gen.patient92();
+		driver = new HtmlUnitDriver();
+		driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
+	}
 
-    @Test
-    public void testActivatePreregisteredPatient() throws Exception {
-        HtmlUnitDriver driver = (HtmlUnitDriver)login("9000000000", "pw");
+	@Test
+	public void testActivatePreregisteredPatient() throws Exception {
+		HtmlUnitDriver driver = (HtmlUnitDriver)login("9000000000", "pw");
 
-        // Make sure we were able to log in
-        assertEquals("iTrust - HCP Home", driver.getTitle());
-        driver.findElement(By.cssSelector("h2.panel-title")).click();
-        driver.findElement(By.linkText("View Pre-Registered Patients")).click();
-        String text = driver.findElement(By.cssSelector("table.fTable")).getText();
+		// Make sure we were able to log in
+		assertEquals("iTrust - HCP Home", driver.getTitle());
+		driver.findElement(By.cssSelector("h2.panel-title")).click();
+		driver.findElement(By.linkText("View Pre-Registered Patients")).click();
+		String text = driver.findElement(By.cssSelector("table.fTable")).getText();
 
-        // Make sure the preregistered patients show up in the preregistered patients list
-        assertTrue("Text not found!", text.contains("Brittany Franco"));
-        assertTrue("Text not found!", text.contains("1333 Who Cares Road Suite 102"));
-        assertTrue("Text not found!", text.contains("Raleigh NC"));
-        assertTrue("Text not found!", text.contains("brfranco@gmail.com"));
+		// Make sure the preregistered patients show up in the preregistered patients list
+		assertTrue("Text not found!", text.contains("Brittany Franco"));
+		assertTrue("Text not found!", text.contains("1333 Who Cares Road Suite 102"));
+		assertTrue("Text not found!", text.contains("Raleigh NC"));
+		assertTrue("Text not found!", text.contains("brfranco@gmail.com"));
 
-        // Ensure we can click on the patient and see more details
-        driver.findElement(By.linkText("Brittany Franco")).click();
-        text = driver.findElement(By.cssSelector("table.fTable")).getText();
-        assertTrue("Text not found!", text.contains("Phone:919-971-0000"));
-        assertTrue("Text not found!", text.contains("Email:brfranco@gmail.com"));
-        assertTrue("Text not found!", text.contains("Address: 1333 Who Cares Road"));
+		// Ensure we can click on the patient and see more details
+		driver.findElement(By.linkText("Brittany Franco")).click();
+		text = driver.findElement(By.cssSelector("table.fTable")).getText();
+		assertTrue("Text not found!", text.contains("Phone:919-971-0000"));
+		assertTrue("Text not found!", text.contains("Email:brfranco@gmail.com"));
+		assertTrue("Text not found!", text.contains("Address: 1333 Who Cares Road"));
 
-        // Activate the preregistered patient
-        driver.findElement(By.linkText("Activate")).click();
-        text = driver.findElement(By.cssSelector("table.fTable")).getText();
-        assertTrue("Text not found!", text.contains("type \"I UNDERSTAND\" into the box below and click the button"));
-        driver.findElement(By.name("understand")).sendKeys("I UNDERSTAND");
-        driver.findElement(By.name("action")).click();
-        assertLogged(TransactionType.REREGISTERED_PATIENT_ACTIVATE, 9000000000L, 92L, "");
+		// Activate the preregistered patient
+		driver.findElement(By.linkText("Activate")).click();
+		text = driver.findElement(By.cssSelector("table.fTable")).getText();
+		assertTrue("Text not found!", text.contains("type \"I UNDERSTAND\" into the box below and click the button"));
+		driver.findElement(By.name("understand")).sendKeys("I UNDERSTAND");
+		driver.findElement(By.name("action")).click();
+		assertLogged(TransactionType.REREGISTERED_PATIENT_ACTIVATE, 9000000000L, 92L, "");
 
-        // Ensure the patient gets the fully activated screen
-        text = driver.findElement(By.cssSelector("span.iTrustMessage")).getText();
-        assertTrue("Text not found!", text.contains("Patient Successfully Activated!"));
-    }
+		// Ensure the patient gets the fully activated screen
+		text = driver.findElement(By.cssSelector("span.iTrustMessage")).getText();
+		assertTrue("Text not found!", text.contains("Patient Successfully Activated!"));
+	}
 
-    @After
-    public void tearDown() throws Exception {
-        driver.quit();
-        String verificationErrorString = verificationErrors.toString();
-        if (!"".equals(verificationErrorString)) {
-            fail(verificationErrorString);
-        }
-    }
+	@After
+	public void tearDown() throws Exception {
+		driver.quit();
+		String verificationErrorString = verificationErrors.toString();
+		if (!"".equals(verificationErrorString)) {
+			fail(verificationErrorString);
+		}
+	}
 
 }
diff --git a/iTrust/test/edu/ncsu/csc/itrust/selenium/DeactivatePatientTest.java b/iTrust/test/edu/ncsu/csc/itrust/selenium/DeactivatePatientTest.java
index 386e623d38dd2b5dd354766261059331982db06d..7dd8a4f075a7bfd853a144d92b90fa01958c5375 100644
--- a/iTrust/test/edu/ncsu/csc/itrust/selenium/DeactivatePatientTest.java
+++ b/iTrust/test/edu/ncsu/csc/itrust/selenium/DeactivatePatientTest.java
@@ -9,87 +9,87 @@ import org.openqa.selenium.htmlunit.HtmlUnitDriver;
 import com.gargoylesoftware.htmlunit.WebClient;
 
 public class DeactivatePatientTest extends iTrustSeleniumTest {
-    private WebDriver driver;
-    private StringBuffer verificationErrors = new StringBuffer();
-
-    @Before
-    public void setUp() throws Exception {
-        super.setUp();
-        gen.standardData();
-        gen.patient92();
-        driver = new HtmlUnitDriver();
-        driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
-    }
-
-    @Test
-    public void testDeactivatePatients() throws Exception {
-        HtmlUnitDriver driver = (HtmlUnitDriver)login("9000000000", "pw");
-
-        // Make sure we were able to log in
-        assertEquals("iTrust - HCP Home", driver.getTitle());
-        driver.findElement(By.cssSelector("h2.panel-title")).click();
-        driver.findElement(By.linkText("View Pre-Registered Patients")).click();
-        driver.findElement(By.cssSelector("input.deactivate")).click();
-
-        // Deactivate the specified patient
-        driver.findElement(By.name("understand")).sendKeys("I UNDERSTAND");
-        driver.findElement(By.name("action")).click();
-        assertLogged(TransactionType.PREREGISTERED_PATIENT_DEACTIVATE, 9000000000L, 92L, "");
-
-        driver.findElement(By.cssSelector("h2.panel-title")).click();
-        driver.findElement(By.linkText("View Pre-Registered Patients")).click();
-        String text = driver.findElement(By.cssSelector("table.fTable")).getText();
-
-        // Ensure the deactivated patient is no longer in the preregistered patients list
-        assertFalse("Text found, but shouldn't be!", text.contains("Brittany Franco"));
-        assertFalse("Text found, but shouldn't be!", text.contains("1333 Who Cares Road Suite 102"));
-        assertFalse("Text found, but shouldn't be!", text.contains("Raleigh NC"));
-        assertFalse("Text found, but shouldn't be!", text.contains("brfranco@gmail.com"));
-    }
-
-    @Test
-    public void testLoginAfterPatientDeactivated() throws Exception {
-        HtmlUnitDriver driver = (HtmlUnitDriver)login("9000000000", "pw");
-
-        // Make sure we were able to log in
-        assertEquals("iTrust - HCP Home", driver.getTitle());
-        driver.findElement(By.cssSelector("h2.panel-title")).click();
-        driver.findElement(By.linkText("View Pre-Registered Patients")).click();
-        driver.findElement(By.cssSelector("input.deactivate")).click();
-
-        // Deactivate the specified patient
-        driver.findElement(By.name("understand")).sendKeys("I UNDERSTAND");
-        driver.findElement(By.name("action")).click();
-        assertLogged(TransactionType.PREREGISTERED_PATIENT_DEACTIVATE, 9000000000L, 92L, "");
-
-        driver.findElement(By.cssSelector("h2.panel-title")).click();
-        driver.findElement(By.linkText("View Pre-Registered Patients")).click();
-        String text = driver.findElement(By.cssSelector("table.fTable")).getText();
-
-        // Make sure deactivated patient doesn't show up in preregistered list
-        assertFalse("Text found, but shouldn't be!", text.contains("Brittany Franco"));
-        assertFalse("Text found, but shouldn't be!", text.contains("1333 Who Cares Road Suite 102"));
-        assertFalse("Text found, but shouldn't be!", text.contains("Raleigh NC"));
-        assertFalse("Text found, but shouldn't be!", text.contains("brfranco@gmail.com"));
-
-        // Test if the deactivated patient can log in
-        HtmlUnitDriver patientDriver = (HtmlUnitDriver)login("92", "pw");
-        assertEquals("Server Rebooted", patientDriver.getTitle());
-        text = patientDriver.findElement(By.xpath("//body")).getText();
-        assertTrue("Text not found!", text.contains("Authorization Error!"));
-        assertTrue("Text not found!", text.contains("You are not allowed to access this page"));
-        assertTrue("Text not found!", text.contains("Log back in."));
-
-
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        driver.quit();
-        String verificationErrorString = verificationErrors.toString();
-        if (!"".equals(verificationErrorString)) {
-            fail(verificationErrorString);
-        }
-    }
+	private WebDriver driver;
+	private StringBuffer verificationErrors = new StringBuffer();
+
+	@Before
+	public void setUp() throws Exception {
+		super.setUp();
+		gen.standardData();
+		gen.patient92();
+		driver = new HtmlUnitDriver();
+		driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
+	}
+
+	@Test
+	public void testDeactivatePatients() throws Exception {
+		HtmlUnitDriver driver = (HtmlUnitDriver)login("9000000000", "pw");
+
+		// Make sure we were able to log in
+		assertEquals("iTrust - HCP Home", driver.getTitle());
+		driver.findElement(By.cssSelector("h2.panel-title")).click();
+		driver.findElement(By.linkText("View Pre-Registered Patients")).click();
+		driver.findElement(By.cssSelector("input.deactivate")).click();
+
+		// Deactivate the specified patient
+		driver.findElement(By.name("understand")).sendKeys("I UNDERSTAND");
+		driver.findElement(By.name("action")).click();
+		assertLogged(TransactionType.PREREGISTERED_PATIENT_DEACTIVATE, 9000000000L, 92L, "");
+
+		driver.findElement(By.cssSelector("h2.panel-title")).click();
+		driver.findElement(By.linkText("View Pre-Registered Patients")).click();
+		String text = driver.findElement(By.cssSelector("table.fTable")).getText();
+
+		// Ensure the deactivated patient is no longer in the preregistered patients list
+		assertFalse("Text found, but shouldn't be!", text.contains("Brittany Franco"));
+		assertFalse("Text found, but shouldn't be!", text.contains("1333 Who Cares Road Suite 102"));
+		assertFalse("Text found, but shouldn't be!", text.contains("Raleigh NC"));
+		assertFalse("Text found, but shouldn't be!", text.contains("brfranco@gmail.com"));
+	}
+
+	@Test
+	public void testLoginAfterPatientDeactivated() throws Exception {
+		HtmlUnitDriver driver = (HtmlUnitDriver)login("9000000000", "pw");
+
+		// Make sure we were able to log in
+		assertEquals("iTrust - HCP Home", driver.getTitle());
+		driver.findElement(By.cssSelector("h2.panel-title")).click();
+		driver.findElement(By.linkText("View Pre-Registered Patients")).click();
+		driver.findElement(By.cssSelector("input.deactivate")).click();
+
+		// Deactivate the specified patient
+		driver.findElement(By.name("understand")).sendKeys("I UNDERSTAND");
+		driver.findElement(By.name("action")).click();
+		assertLogged(TransactionType.PREREGISTERED_PATIENT_DEACTIVATE, 9000000000L, 92L, "");
+
+		driver.findElement(By.cssSelector("h2.panel-title")).click();
+		driver.findElement(By.linkText("View Pre-Registered Patients")).click();
+		String text = driver.findElement(By.cssSelector("table.fTable")).getText();
+
+		// Make sure deactivated patient doesn't show up in preregistered list
+		assertFalse("Text found, but shouldn't be!", text.contains("Brittany Franco"));
+		assertFalse("Text found, but shouldn't be!", text.contains("1333 Who Cares Road Suite 102"));
+		assertFalse("Text found, but shouldn't be!", text.contains("Raleigh NC"));
+		assertFalse("Text found, but shouldn't be!", text.contains("brfranco@gmail.com"));
+
+		// Test if the deactivated patient can log in
+		HtmlUnitDriver patientDriver = (HtmlUnitDriver)login("92", "pw");
+		assertEquals("Server Rebooted", patientDriver.getTitle());
+		text = patientDriver.findElement(By.xpath("//body")).getText();
+		assertTrue("Text not found!", text.contains("Authorization Error!"));
+		assertTrue("Text not found!", text.contains("You are not allowed to access this page"));
+		assertTrue("Text not found!", text.contains("Log back in."));
+
+
+	}
+
+	@After
+	public void tearDown() throws Exception {
+		driver.quit();
+		String verificationErrorString = verificationErrors.toString();
+		if (!"".equals(verificationErrorString)) {
+			fail(verificationErrorString);
+		}
+	}
 
 }
diff --git a/iTrust/test/edu/ncsu/csc/itrust/unit/action/ActivatePatientActionTest.java b/iTrust/test/edu/ncsu/csc/itrust/unit/action/ActivatePatientActionTest.java
index 90ae3c7f758eb8b9c30d15ab44b310a9e8e49f35..2e0cc0cf94889365a63458c892839295aeed5e7d 100644
--- a/iTrust/test/edu/ncsu/csc/itrust/unit/action/ActivatePatientActionTest.java
+++ b/iTrust/test/edu/ncsu/csc/itrust/unit/action/ActivatePatientActionTest.java
@@ -8,31 +8,31 @@ import junit.framework.TestCase;
 
 public class ActivatePatientActionTest extends TestCase {
 
-    private TestDataGenerator gen = new TestDataGenerator();
-    private PatientDAO patientDAO = TestDAOFactory.getTestInstance().getPatientDAO();
+	private TestDataGenerator gen = new TestDataGenerator();
+	private PatientDAO patientDAO = TestDAOFactory.getTestInstance().getPatientDAO();
 
-    @Override
-    protected void setUp() throws Exception {
-        gen.clearAllTables();
-        gen.patient92();
-        gen.patient4();
-    }
+	@Override
+	protected void setUp() throws Exception {
+		gen.clearAllTables();
+		gen.patient92();
+		gen.patient4();
+	}
 
-    public void testActivateAlreadyActivated() throws Exception {
-        long pid = 4;
-        assertEquals("patient", patientDAO.getRole(pid));
-        EditPatientAction action = new EditPatientAction(TestDAOFactory.getTestInstance(), pid, Long.toString(pid));
-        action.activate();
-        assertEquals("patient", patientDAO.getRole(pid));
-        assertEquals("", patientDAO.getPatient(pid).getDateOfDeactivationStr());
-    }
+	public void testActivateAlreadyActivated() throws Exception {
+		long pid = 4;
+		assertEquals("patient", patientDAO.getRole(pid));
+		EditPatientAction action = new EditPatientAction(TestDAOFactory.getTestInstance(), pid, Long.toString(pid));
+		action.activate();
+		assertEquals("patient", patientDAO.getRole(pid));
+		assertEquals("", patientDAO.getPatient(pid).getDateOfDeactivationStr());
+	}
 
-    public void testActivatePreregisteredPatient() throws Exception {
-        long pid = 92;
-        assertEquals("preRegisteredPatient", patientDAO.getRole(pid));
-        EditPatientAction action = new EditPatientAction(TestDAOFactory.getTestInstance(), pid, Long.toString(pid));
-        action.activate();
-        assertEquals("patient", patientDAO.getRole(pid));
-        assertEquals("", patientDAO.getPatient(pid).getDateOfDeactivationStr());
-    }
+	public void testActivatePreregisteredPatient() throws Exception {
+		long pid = 92;
+		assertEquals("preRegisteredPatient", patientDAO.getRole(pid));
+		EditPatientAction action = new EditPatientAction(TestDAOFactory.getTestInstance(), pid, Long.toString(pid));
+		action.activate();
+		assertEquals("patient", patientDAO.getRole(pid));
+		assertEquals("", patientDAO.getPatient(pid).getDateOfDeactivationStr());
+	}
 }
diff --git a/iTrust/test/edu/ncsu/csc/itrust/unit/action/DeactivatePatientActionTest.java b/iTrust/test/edu/ncsu/csc/itrust/unit/action/DeactivatePatientActionTest.java
index dd3fcca44e7be8ddca2fe07be745b1a9ad4c2324..3a2538af73cf368806b76168224be3ee8972dcc2 100644
--- a/iTrust/test/edu/ncsu/csc/itrust/unit/action/DeactivatePatientActionTest.java
+++ b/iTrust/test/edu/ncsu/csc/itrust/unit/action/DeactivatePatientActionTest.java
@@ -11,31 +11,31 @@ import java.util.Calendar;
 
 public class DeactivatePatientActionTest extends TestCase {
 
-    private TestDataGenerator gen = new TestDataGenerator();
-    private PatientDAO patientDAO = TestDAOFactory.getTestInstance().getPatientDAO();
+	private TestDataGenerator gen = new TestDataGenerator();
+	private PatientDAO patientDAO = TestDAOFactory.getTestInstance().getPatientDAO();
 
-    @Override
-    protected void setUp() throws Exception {
-        gen.clearAllTables();
-        gen.patient92();
-        gen.patient4();
-    }
+	@Override
+	protected void setUp() throws Exception {
+		gen.clearAllTables();
+		gen.patient92();
+		gen.patient4();
+	}
 
-    public void testDeactivateActivatedPatient() throws Exception {
-        long pid = 4;
-        assertEquals("patient", patientDAO.getRole(pid));
-        EditPatientAction action = new EditPatientAction(TestDAOFactory.getTestInstance(), pid, Long.toString(pid));
-        action.deactivate();
-        assertEquals("deactivatedPatient", patientDAO.getRole(pid));
-        assertEquals(new SimpleDateFormat("MM/dd/yyyy").format(Calendar.getInstance().getTime()), patientDAO.getPatient(pid).getDateOfDeactivationStr());
-    }
+	public void testDeactivateActivatedPatient() throws Exception {
+		long pid = 4;
+		assertEquals("patient", patientDAO.getRole(pid));
+		EditPatientAction action = new EditPatientAction(TestDAOFactory.getTestInstance(), pid, Long.toString(pid));
+		action.deactivate();
+		assertEquals("deactivatedPatient", patientDAO.getRole(pid));
+		assertEquals(new SimpleDateFormat("MM/dd/yyyy").format(Calendar.getInstance().getTime()), patientDAO.getPatient(pid).getDateOfDeactivationStr());
+	}
 
-    public void testDeactivatePreregisteredPatient() throws Exception {
-        long pid = 92;
-        assertEquals("preRegisteredPatient", patientDAO.getRole(pid));
-        EditPatientAction action = new EditPatientAction(TestDAOFactory.getTestInstance(), pid, Long.toString(pid));
-        action.deactivate();
-        assertEquals("deactivatedPatient", patientDAO.getRole(pid));
-        assertEquals(new SimpleDateFormat("MM/dd/yyyy").format(Calendar.getInstance().getTime()), patientDAO.getPatient(pid).getDateOfDeactivationStr());
-    }
+	public void testDeactivatePreregisteredPatient() throws Exception {
+		long pid = 92;
+		assertEquals("preRegisteredPatient", patientDAO.getRole(pid));
+		EditPatientAction action = new EditPatientAction(TestDAOFactory.getTestInstance(), pid, Long.toString(pid));
+		action.deactivate();
+		assertEquals("deactivatedPatient", patientDAO.getRole(pid));
+		assertEquals(new SimpleDateFormat("MM/dd/yyyy").format(Calendar.getInstance().getTime()), patientDAO.getPatient(pid).getDateOfDeactivationStr());
+	}
 }
diff --git a/iTrust/test/edu/ncsu/csc/itrust/unit/action/ViewPreRegisteredPatientListActionTest.java b/iTrust/test/edu/ncsu/csc/itrust/unit/action/ViewPreRegisteredPatientListActionTest.java
index fec6e4229248fd258941d15c74dfb807b434c511..3c96e2f4df25633439162be6cccd3920fdfc1499 100644
--- a/iTrust/test/edu/ncsu/csc/itrust/unit/action/ViewPreRegisteredPatientListActionTest.java
+++ b/iTrust/test/edu/ncsu/csc/itrust/unit/action/ViewPreRegisteredPatientListActionTest.java
@@ -4,7 +4,6 @@ import junit.framework.TestCase;
 import edu.ncsu.csc.itrust.action.ViewPreRegisteredPatientListAction;
 import edu.ncsu.csc.itrust.beans.PatientBean;
 import edu.ncsu.csc.itrust.dao.DAOFactory;
-import edu.ncsu.csc.itrust.exception.ITrustException;
 import edu.ncsu.csc.itrust.unit.datagenerators.TestDataGenerator;
 import edu.ncsu.csc.itrust.unit.testutils.TestDAOFactory;
 
@@ -22,11 +21,11 @@ public class ViewPreRegisteredPatientListActionTest extends TestCase {
 		gen.clearAllTables();
 	}
 
-    public void testViewPatients() throws Exception {
-        long hcpMID = 900000000;
-        action = new ViewPreRegisteredPatientListAction(factory, hcpMID);
-        List<PatientBean> pb = action.getPreRegisteredPatients();
-        assertEquals(0, pb.size());
+	public void testViewPatients() throws Exception {
+		long hcpMID = 900000000;
+		action = new ViewPreRegisteredPatientListAction(factory, hcpMID);
+		List<PatientBean> pb = action.getPreRegisteredPatients();
+		assertEquals(0, pb.size());
 
 		pb = action.getPreRegisteredPatients();
 		assertEquals(0, pb.size());
@@ -34,13 +33,13 @@ public class ViewPreRegisteredPatientListActionTest extends TestCase {
 
 	public void testNoPersonnel() throws Exception {
 
-        long hcpMID = 900000000;
+		long hcpMID = 900000000;
 
 		action = new ViewPreRegisteredPatientListAction(factory, hcpMID);
-        List<PatientBean> pb = action.getPreRegisteredPatients();
-        for (PatientBean p : pb) {
-            if (p.getMID() == 90000000) {
-                fail("This id should not exist in the list");
+		List<PatientBean> pb = action.getPreRegisteredPatients();
+		for (PatientBean p : pb) {
+			if (p.getMID() == 90000000) {
+				fail("This id should not exist in the list");
             }
         }
 
diff --git a/iTrust/test/edu/ncsu/csc/itrust/unit/dao/patient/DeactivatePatientTest.java b/iTrust/test/edu/ncsu/csc/itrust/unit/dao/patient/DeactivatePatientTest.java
index 190d8be201c196fb921ac773cbd77f6d8591d02b..88968669428cf848811a360408b5de697b4102e4 100644
--- a/iTrust/test/edu/ncsu/csc/itrust/unit/dao/patient/DeactivatePatientTest.java
+++ b/iTrust/test/edu/ncsu/csc/itrust/unit/dao/patient/DeactivatePatientTest.java
@@ -1,6 +1,5 @@
 package edu.ncsu.csc.itrust.unit.dao.patient;
 
-import edu.ncsu.csc.itrust.action.EditPatientAction;
 import junit.framework.TestCase;
 import edu.ncsu.csc.itrust.dao.mysql.PatientDAO;
 import edu.ncsu.csc.itrust.unit.datagenerators.TestDataGenerator;
@@ -8,36 +7,36 @@ import edu.ncsu.csc.itrust.unit.testutils.TestDAOFactory;
 
 public class DeactivatePatientTest extends TestCase {
 
-    private TestDataGenerator gen = new TestDataGenerator();
-    private PatientDAO patientDAO = TestDAOFactory.getTestInstance().getPatientDAO();
+	private TestDataGenerator gen = new TestDataGenerator();
+	private PatientDAO patientDAO = TestDAOFactory.getTestInstance().getPatientDAO();
 
-    @Override
-    protected void setUp() throws Exception {
-        gen.clearAllTables();
-        gen.patient92();
-        gen.patient4();
-    }
+	@Override
+	protected void setUp() throws Exception {
+		gen.clearAllTables();
+		gen.patient92();
+		gen.patient4();
+	}
 
-    public void testDeactivateActivatedPatient() throws Exception {
-        long pid = 4;
-        assertEquals("patient", patientDAO.getRole(pid));
-        patientDAO.deactivatePatient(pid);
-        assertEquals("deactivatedPatient", patientDAO.getRole(pid));
-    }
+	public void testDeactivateActivatedPatient() throws Exception {
+		long pid = 4;
+		assertEquals("patient", patientDAO.getRole(pid));
+		patientDAO.deactivatePatient(pid);
+		assertEquals("deactivatedPatient", patientDAO.getRole(pid));
+	}
 
-    public void testDeactivatePreregisteredPatient() throws Exception {
-        long pid = 92;
-        assertEquals("preRegisteredPatient", patientDAO.getRole(pid));
-        patientDAO.deactivatePatient(pid);
-        assertEquals("deactivatedPatient", patientDAO.getRole(pid));
-    }
+	public void testDeactivatePreregisteredPatient() throws Exception {
+		long pid = 92;
+		assertEquals("preRegisteredPatient", patientDAO.getRole(pid));
+		patientDAO.deactivatePatient(pid);
+		assertEquals("deactivatedPatient", patientDAO.getRole(pid));
+	}
 
-    public void testDeactivateThenActivatePatient() throws Exception {
-        long pid = 92;
-        assertEquals("preRegisteredPatient", patientDAO.getRole(pid));
-        patientDAO.ConvertPreRegisteredPatientsToPatient(pid);
-        assertEquals("patient", patientDAO.getRole(pid));
-        patientDAO.deactivatePatient(pid);
-        assertEquals("deactivatedPatient", patientDAO.getRole(pid));
-    }
+	public void testDeactivateThenActivatePatient() throws Exception {
+		long pid = 92;
+		assertEquals("preRegisteredPatient", patientDAO.getRole(pid));
+		patientDAO.ConvertPreRegisteredPatientsToPatient(pid);
+		assertEquals("patient", patientDAO.getRole(pid));
+		patientDAO.deactivatePatient(pid);
+		assertEquals("deactivatedPatient", patientDAO.getRole(pid));
+	}
 }
diff --git a/iTrust/test/edu/ncsu/csc/itrust/unit/datagenerators/TestDataGenerator.java b/iTrust/test/edu/ncsu/csc/itrust/unit/datagenerators/TestDataGenerator.java
index 97ec7eaa2ac279821c7a5ccd0304f49a6ae1dbe8..87079f4f3cf9f937d41377c319834711cd86bbf9 100644
--- a/iTrust/test/edu/ncsu/csc/itrust/unit/datagenerators/TestDataGenerator.java
+++ b/iTrust/test/edu/ncsu/csc/itrust/unit/datagenerators/TestDataGenerator.java
@@ -786,10 +786,10 @@ public class TestDataGenerator {
 			SQLException {
 		new DBBuilder(factory).executeSQLFile(DIR + "/hcp_diagnosis_data.sql");
     }
-    
-    public void hcp_additional_diagnosis_data() throws FileNotFoundException, 
-        IOException, SQLException {
-            new DBBuilder(factory).executeSQLFile(DIR + "/hcp_additional_diagnosis_data.sql");
+
+	public void hcp_additional_diagnosis_data() throws FileNotFoundException,
+		IOException, SQLException {
+			new DBBuilder(factory).executeSQLFile(DIR + "/hcp_additional_diagnosis_data.sql");
         }
 
 	public void immunization_data() throws FileNotFoundException, IOException,
@@ -958,13 +958,13 @@ public class TestDataGenerator {
 			IOException {
 		new DBBuilder(factory).executeSQLFile(DIR + "/malariaEpidemic1.sql");
     }
-    
-    public void malaria_epidemic2() throws SQLException, FileNotFoundException,
+
+	public void malaria_epidemic2() throws SQLException, FileNotFoundException,
 			IOException {
 		new DBBuilder(factory).executeSQLFile(DIR + "/malariaEpidemic2.sql");
     }
     
-    public void malaria_epidemic3() throws SQLException, FileNotFoundException,
+	public void malaria_epidemic3() throws SQLException, FileNotFoundException,
 			IOException {
 		new DBBuilder(factory).executeSQLFile(DIR + "/malariaEpidemic3.sql");
 	}