Skip to content
Snippets Groups Projects
Commit 5e04f75c authored by ahmadaldhalaan's avatar ahmadaldhalaan
Browse files

updated deadPatient SQL files and updated...

updated deadPatient SQL files and updated ViewPatientOfficeVisitHistoryActionTest and MedicalReportFilterTest to reflect database changes
parent 57e4959c
No related branches found
No related tags found
2 merge requests!7Uc20,!2UC20 Data Access Object Completed
DELETE FROM users WHERE MID = 81;
DELETE FROM officevisits WHERE PatientID = 81;
DELETE FROM patients WHERE MID = 81; DELETE FROM patients WHERE MID = 81;
INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath) INSERT INTO users(MID, password, role, sQuestion, sAnswer)
VALUES (81,'Male','2019-07-01',84.50); VALUES (81, '30c952fab122c3f9759f02a6d95c3758b246b4fee239957b2d4fee46e26170c4', 'patient', 'what is your favorite color?', 'blue')
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath)
VALUES (81,'Male','2019-07-01',84.50)
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO officevisits(id,HCPID,PatientID) INSERT INTO officevisits(id,visitDate,HCPID,notes,HospitalID,PatientID)
VALUES (201,9000000000,81); VALUES (20771,'2019-07-01',9000000000,'died','1',81)
\ No newline at end of file ON DUPLICATE KEY UPDATE id = id;
\ No newline at end of file
DELETE FROM users WHERE MID = 90;
DELETE FROM officevisits WHERE PatientID = 90;
DELETE FROM patients WHERE MID = 90; DELETE FROM patients WHERE MID = 90;
INSERT INTO users(MID, password, role, sQuestion, sAnswer)
VALUES (90, '30c952fab122c3f9759f02a6d95c3758b246b4fee239957b2d4fee46e26170c4', 'patient', 'what is your favorite color?', 'blue')
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath) INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath)
VALUES (90,'Male','2019-01-01',487.00); VALUES (90,'Male','2019-01-01',487.00)
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO officevisits(id,visitDate,HCPID,notes,HospitalID,PatientID)
INSERT INTO officevisits(id,HCPID,PatientID) VALUES (20780,'2019-01-01',9000000003,'died','1',90)
VALUES (210,9000000001,90); ON DUPLICATE KEY UPDATE id = id;
\ No newline at end of file \ No newline at end of file
DELETE FROM users WHERE MID = 82;
DELETE FROM officevisits WHERE PatientID = 82;
DELETE FROM patients WHERE MID = 82; DELETE FROM patients WHERE MID = 82;
INSERT INTO users(MID, password, role, sQuestion, sAnswer)
VALUES (82, '30c952fab122c3f9759f02a6d95c3758b246b4fee239957b2d4fee46e26170c4', 'patient', 'what is your favorite color?', 'blue')
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath) INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath)
VALUES (82,'Male','2018-07-01',11.40); VALUES (82,'Male','2018-07-01',11.40)
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO officevisits(id,visitDate,HCPID,notes,HospitalID,PatientID)
INSERT INTO officevisits(id,HCPID,PatientID) VALUES (20772,'2018-07-01',9000000000,'died','1',82)
VALUES (202,9000000000,82); ON DUPLICATE KEY UPDATE id = id;
\ No newline at end of file \ No newline at end of file
DELETE FROM users WHERE MID = 83;
DELETE FROM officevisits WHERE PatientID = 83;
DELETE FROM patients WHERE MID = 83; DELETE FROM patients WHERE MID = 83;
INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath) INSERT INTO users(MID, password, role, sQuestion, sAnswer)
VALUES (83,'Female','2018-07-01',11.40); VALUES (83, '30c952fab122c3f9759f02a6d95c3758b246b4fee239957b2d4fee46e26170c4', 'patient', 'what is your favorite color?', 'blue')
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath)
VALUES (83,'Female','2018-07-01',11.40)
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO officevisits(id,HCPID,PatientID) INSERT INTO officevisits(id,visitDate,HCPID,notes,HospitalID,PatientID)
VALUES (203,9000000000,83); VALUES (20773,'2018-07-01',9000000000,'died','1',83)
\ No newline at end of file ON DUPLICATE KEY UPDATE id = id;
\ No newline at end of file
DELETE FROM users WHERE MID = 84;
DELETE FROM officevisits WHERE PatientID = 84;
DELETE FROM patients WHERE MID = 84; DELETE FROM patients WHERE MID = 84;
INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath) INSERT INTO users(MID, password, role, sQuestion, sAnswer)
VALUES (84,'Male','2018-12-01',11.40); VALUES (84, '30c952fab122c3f9759f02a6d95c3758b246b4fee239957b2d4fee46e26170c4', 'patient', 'what is your favorite color?', 'blue')
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath)
VALUES (84,'Male','2018-12-01',11.40)
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO officevisits(id,HCPID,PatientID) INSERT INTO officevisits(id,visitDate,HCPID,notes,HospitalID,PatientID)
VALUES (204,9000000000,84); VALUES (20774,'2018-12-01',9000000000,'died','1',84)
\ No newline at end of file ON DUPLICATE KEY UPDATE id = id;
\ No newline at end of file
DELETE FROM users WHERE MID = 85;
DELETE FROM officevisits WHERE PatientID = 85;
DELETE FROM patients WHERE MID = 85; DELETE FROM patients WHERE MID = 85;
INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath) INSERT INTO users(MID, password, role, sQuestion, sAnswer)
VALUES (85,'Male','2020-01-01',84.50); VALUES (85, '30c952fab122c3f9759f02a6d95c3758b246b4fee239957b2d4fee46e26170c4', 'patient', 'what is your favorite color?', 'blue')
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath)
VALUES (85,'Male','2020-01-01',84.50)
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO officevisits(id,HCPID,PatientID) INSERT INTO officevisits(id,visitDate,HCPID,notes,HospitalID,PatientID)
VALUES (205,9000000000,85); VALUES (20775,'2020-01-01',9000000000,'died','1',85)
\ No newline at end of file ON DUPLICATE KEY UPDATE id = id;
\ No newline at end of file
DELETE FROM users WHERE MID = 86;
DELETE FROM officevisits WHERE PatientID = 86;
DELETE FROM patients WHERE MID = 86; DELETE FROM patients WHERE MID = 86;
INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath) INSERT INTO users(MID, password, role, sQuestion, sAnswer)
VALUES (86,'Male','2018-12-01',487.00); VALUES (86, '30c952fab122c3f9759f02a6d95c3758b246b4fee239957b2d4fee46e26170c4', 'patient', 'what is your favorite color?', 'blue')
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath)
VALUES (86,'Male','2018-12-01',487.00)
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO officevisits(id,HCPID,PatientID) INSERT INTO officevisits(id,visitDate,HCPID,notes,HospitalID,PatientID)
VALUES (206,9000000000,86); VALUES (20776,'2018-12-01',9000000000,'died','1',86)
\ No newline at end of file ON DUPLICATE KEY UPDATE id = id;
\ No newline at end of file
DELETE FROM users WHERE MID = 87;
DELETE FROM officevisits WHERE PatientID = 87;
DELETE FROM patients WHERE MID = 87; DELETE FROM patients WHERE MID = 87;
INSERT INTO users(MID, password, role, sQuestion, sAnswer)
VALUES (87, '30c952fab122c3f9759f02a6d95c3758b246b4fee239957b2d4fee46e26170c4', 'patient', 'what is your favorite color?', 'blue')
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath) INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath)
VALUES (87,'Female','2019-12-01',487.00); VALUES (87,'Female','2019-12-01',487.00)
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO officevisits(id,visitDate,HCPID,notes,HospitalID,PatientID)
VALUES (20777,'2019-12-01',9000000003,'died','1',87)
ON DUPLICATE KEY UPDATE id = id;
INSERT INTO officevisits(id,HCPID,PatientID)
VALUES (207,9000000001,87);
\ No newline at end of file
DELETE FROM users WHERE MID = 88;
DELETE FROM officevisits WHERE PatientID = 88;
DELETE FROM patients WHERE MID = 88; DELETE FROM patients WHERE MID = 88;
INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath) INSERT INTO users(MID, password, role, sQuestion, sAnswer)
VALUES (88,'Female','2020-07-01',487.00); VALUES (88, '30c952fab122c3f9759f02a6d95c3758b246b4fee239957b2d4fee46e26170c4', 'patient', 'what is your favorite color?', 'blue')
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath)
VALUES (88,'Female','2020-07-01',487.00)
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO officevisits(id,HCPID,PatientID) INSERT INTO officevisits(id,visitDate,HCPID,notes,HospitalID,PatientID)
VALUES (208,9000000001,88); VALUES (20778,'2020-07-01',9000000003,'died','1',88)
\ No newline at end of file ON DUPLICATE KEY UPDATE id = id;
\ No newline at end of file
DELETE FROM users WHERE MID = 89;
DELETE FROM officevisits WHERE PatientID = 89;
DELETE FROM patients WHERE MID = 89; DELETE FROM patients WHERE MID = 89;
INSERT INTO users(MID, password, role, sQuestion, sAnswer)
VALUES (89, '30c952fab122c3f9759f02a6d95c3758b246b4fee239957b2d4fee46e26170c4', 'patient', 'what is your favorite color?', 'blue')
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath) INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath)
VALUES (89,'Male','2020-01-01',487.00); VALUES (89,'Male','2020-01-01',487.00)
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO officevisits(id,visitDate,HCPID,notes,HospitalID,PatientID)
INSERT INTO officevisits(id,HCPID,PatientID) VALUES (20779,'2020-01-01',9000000003,'died','1',89)
VALUES (209,9000000001,89); ON DUPLICATE KEY UPDATE id = id;
\ No newline at end of file \ No newline at end of file
...@@ -41,7 +41,7 @@ public class ViewPatientOfficeVisitHistoryActionTest extends TestCase{ ...@@ -41,7 +41,7 @@ public class ViewPatientOfficeVisitHistoryActionTest extends TestCase{
*/ */
public void testGetPatients() throws Exception { public void testGetPatients() throws Exception {
List<PatientVisitBean> list = action.getPatients(); List<PatientVisitBean> list = action.getPatients();
assertEquals(57, list.size()); assertEquals(67, list.size());
assertEquals("31", list.get(21).getLastOVDateD()); assertEquals("31", list.get(21).getLastOVDateD());
assertEquals("03", list.get(21).getLastOVDateM()); assertEquals("03", list.get(21).getLastOVDateM());
} }
......
...@@ -68,7 +68,7 @@ public class MedicalReportFilterTest extends TestCase { ...@@ -68,7 +68,7 @@ public class MedicalReportFilterTest extends TestCase {
public void testFilterByLowerOfficeVisit() throws Exception { public void testFilterByLowerOfficeVisit() throws Exception {
filter = new MedicalReportFilter(MedicalReportFilterType.LOWER_OFFICE_VISIT_DATE, "01/01/2012", factory); filter = new MedicalReportFilter(MedicalReportFilterType.LOWER_OFFICE_VISIT_DATE, "01/01/2012", factory);
List<PatientBean> res = filter.filter(allPatients); List<PatientBean> res = filter.filter(allPatients);
assertEquals(14, res.size()); assertEquals(24, res.size());
assertTrue(res.get(0).getMID() == 100L); assertTrue(res.get(0).getMID() == 100L);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment