forked from HakamShakir/patient-records-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PatientRecord.java
171 lines (164 loc) · 4.82 KB
/
PatientRecord.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
package SystemForPatients;
import java.time.LocalDate;
import java.util.Date;
import java.util.Objects;
import java.util.Scanner;
public class PatientRecord {
private String name, surName,chiefComplaint, history, vitals, investigation, treatement, recommendation,duration;
private Gender gender;
private LocalDate DOB, DateOfSubmission;
private int patientId, drId;
/**
* @param name
* @param surName
* @param chiefComplaint
* @param history
* @param vitals
* @param investigation
* @param treatement
* @param recommendation
* @param gender
* @param dOB
* @param DateOfSubmission
* @param patientId
* @param drId
*/
public PatientRecord(String name, String surName, String chiefComplaint, String history, String vitals,
String investigation, String treatement, String recommendation, Gender gender, LocalDate dOB, LocalDate DateOfSubmission,
int patientId, int drId, String duration) {
super();
this.name = name;
this.surName = surName;
this.chiefComplaint = chiefComplaint;
this.history = history;
this.vitals = vitals;
this.investigation = investigation;
this.treatement = treatement;
this.recommendation = recommendation;
this.gender = gender;
DOB = dOB;
this.DateOfSubmission = DateOfSubmission;
this.patientId = patientId;
this.drId = drId;
this.duration = duration;
}
public String getDuration() {
return duration;
}
public void setDuration(String duration) {
this.duration = duration;
}
public Gender getGender() {
return gender;
}
public void setGender(Gender gender) {
this.gender = gender;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSurName() {
return surName;
}
public void setSurName(String surName) {
this.surName = surName;
}
public String getChiefComplaint() {
return chiefComplaint;
}
public void setChiefComplaint(String chiefComplaint) {
this.chiefComplaint = chiefComplaint;
}
public String getHistory() {
return history;
}
public void setHistory(String history) {
this.history = history;
}
public String getVitals() {
return vitals;
}
public void setVitals(String vitals) {
this.vitals = vitals;
}
public String getInvestigation() {
return investigation;
}
public void setInvestigation(String investigation) {
this.investigation = investigation;
}
public String getTreatement() {
return treatement;
}
public void setTreatement(String treatement) {
this.treatement = treatement;
}
public String getRecommendation() {
return recommendation;
}
public void setRecommendation(String recommendation) {
this.recommendation = recommendation;
}
public Gender getgender() {
return gender;
}
public void setgender(Gender gender) {
this.gender = gender;
}
public LocalDate getDOB() {
return DOB;
}
public void setDOB(LocalDate dOB) {
DOB = dOB;
}
public LocalDate getDateOfSubmission() {
return DateOfSubmission;
}
public void setDateOfSubmission(LocalDate DateOfSubmission) {
this.DateOfSubmission = DateOfSubmission;
}
public int getPatientId() {
return patientId;
}
public void setPatientId(int patientId) {
this.patientId = patientId;
}
public int getDrId() {
return drId;
}
public void setDrId(int drId) {
this.drId = drId;
}
@Override
public String toString() {
return "PatientRecord [name=" + name + ", surName=" + surName + ", chiefComplaint=" + chiefComplaint
+ ", history=" + history + ", vitals=" + vitals + ", investigation=" + investigation + ", treatement="
+ treatement + ", recommendation=" + recommendation + ", gender=" + gender + ", DOB=" + DOB
+ ", DateOfSubmission=" + DateOfSubmission + ", patientId=" + patientId + ", drId=" + drId + "]";
}
@Override
public int hashCode() {
return Objects.hash(DOB, DateOfSubmission, chiefComplaint, drId, history, investigation, name, patientId,
recommendation, gender, surName, treatement, vitals);
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
PatientRecord other = (PatientRecord) obj;
return Objects.equals(DOB, other.DOB) && Objects.equals(DateOfSubmission, other.DateOfSubmission)
&& Objects.equals(chiefComplaint, other.chiefComplaint) && drId == other.drId
&& Objects.equals(history, other.history) && Objects.equals(investigation, other.investigation)
&& Objects.equals(name, other.name) && patientId == other.patientId
&& Objects.equals(recommendation, other.recommendation) && gender == other.gender
&& Objects.equals(surName, other.surName) && Objects.equals(treatement, other.treatement)
&& Objects.equals(vitals, other.vitals);
}
}