-
Notifications
You must be signed in to change notification settings - Fork 0
/
Doctor.java
144 lines (119 loc) · 4.63 KB
/
Doctor.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
import java.util.ArrayList;
import java.util.List;
public class Doctor extends User {
private String medicalLicenseNumber;
private String specialization;
private int yearsOfExperience;
private String hospitalAffiliation;
private String availableHours;
private String degree;
private String medicalSchool;
private List<String> boardCertifications = new ArrayList<>();
private List<String> researchInterests = new ArrayList<>();
private List<String> publications = new ArrayList<>();
// Full constructor
public Doctor(int id, String first_name, String last_name, String email, String password,
boolean is_doctor, String medicalLicenseNumber, String specialization, int yearsOfExperience,
String hospitalAffiliation, String availableHours, String degree, String medicalSchool,
List<String> boardCertifications, List<String> researchInterests,
List<String> publications, Object object, Object object2) {
super(id, first_name, last_name, email, password, is_doctor);
this.medicalLicenseNumber = medicalLicenseNumber;
this.specialization = specialization;
this.yearsOfExperience = yearsOfExperience;
this.hospitalAffiliation = hospitalAffiliation;
this.availableHours = availableHours;
this.degree = degree;
this.medicalSchool = medicalSchool;
this.boardCertifications = boardCertifications;
this.researchInterests = researchInterests;
this.publications = publications;
}
// Getters and Setters
public String getMedicalLicenseNumber() {
return medicalLicenseNumber;
}
public void setMedicalLicenseNumber(String medicalLicenseNumber) {
this.medicalLicenseNumber = medicalLicenseNumber;
}
public String getSpecialization() {
return specialization;
}
public void setSpecialization(String specialization) {
this.specialization = specialization;
}
public int getYearsOfExperience() {
return yearsOfExperience;
}
public void setYearsOfExperience(int yearsOfExperience) {
this.yearsOfExperience = yearsOfExperience;
}
public String getHospitalAffiliation() {
return hospitalAffiliation;
}
public void setHospitalAffiliation(String hospitalAffiliation) {
this.hospitalAffiliation = hospitalAffiliation;
}
public String getAvailableHours() {
return availableHours;
}
public void setAvailableHours(String availableHours) {
this.availableHours = availableHours;
}
public String getDegree() {
return degree;
}
public void setDegree(String degree) {
this.degree = degree;
}
public String getMedicalSchool() {
return medicalSchool;
}
public void setMedicalSchool(String medicalSchool) {
this.medicalSchool = medicalSchool;
}
public List<String> getBoardCertifications() {
return boardCertifications;
}
public void setBoardCertifications(List<String> boardCertifications) {
this.boardCertifications = boardCertifications;
}
public List<String> getResearchInterests() {
return researchInterests;
}
public void setResearchInterests(List<String> researchInterests) {
this.researchInterests = researchInterests;
}
public List<String> getPublications() {
return publications;
}
public void setPublications(List<String> publications) {
this.publications = publications;
}
// Example Methods
public void addPublication(String publication) {
this.publications.add(publication);
}
public boolean isSpecializedIn(String field) {
return this.specialization.equalsIgnoreCase(field);
}
@Override
public String toString() {
return "Doctor{" +
"id=" + getId() +
", first_name='" + getFirstName() + '\'' +
", last_name='" + getLastName() + '\'' +
", email='" + getEmail() + '\'' +
", medicalLicenseNumber='" + medicalLicenseNumber + '\'' +
", specialization='" + specialization + '\'' +
", yearsOfExperience=" + yearsOfExperience +
", hospitalAffiliation='" + hospitalAffiliation + '\'' +
", availableHours='" + availableHours + '\'' +
", degree='" + degree + '\'' +
", medicalSchool='" + medicalSchool + '\'' +
", boardCertifications=" + boardCertifications +
", researchInterests=" + researchInterests +
", publications=" + publications +
'}';
}
}