-
Notifications
You must be signed in to change notification settings - Fork 0
/
Doctors.java
72 lines (57 loc) · 1.57 KB
/
Doctors.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package bbtrial.nl.logicgate.ace;
import java.util.List;
import java.util.Map;
/**
* Gets information about the doctors
* @author skmedlock
*
*/
public class Doctors {
private DoctorsI localDoctors;
private List<Doctor> doctors;
public Doctors(DoctorsI localDoctors){
this.localDoctors = localDoctors;
doctors = localDoctors.fillDoctors();
}
public boolean hasDoctor(String doctorID) {
if(getDoctorByID(doctorID)!=null){
return true;
} else {
return false;
}
}
public Doctor getDoctorByID(String doctorID) {
for(Doctor doctor : doctors){
if(doctorID.equals(doctor.getDoctorID())){
return doctor;
}
}
return null;
}
public List<Doctor> getDoctors() {
return doctors;
}
public void close() {
localDoctors.close();
}
/**
* Returns a list of additional information about the doctors
* to use in finding letters which are theirs. Since the type
* and number of data elements needed to make this classification
* will vary from place to place, it just returns the query result.
* @return letterInfo (a list of Map objects consisting of the column
* name and value)
*/
public List<Map<String, Object>> getLetterInfo() {
return localDoctors.getLetterInfo();
}
public void lastReminders(List<Doctor> todaysDoctors) {
localDoctors.lastReminders(todaysDoctors);
}
public boolean haveChanges() {
return localDoctors.haveChanges();
}
public List<Patient> changeDoctors(List<Patient> newPatients) {
return localDoctors.changeDoctors(newPatients);
}
}