Last change
on this file since 507 was 507, checked in by George Lilly, 15 years ago |
NHIN gateway and adaptor for use on linux with VistA EHR and RPMS
|
File size:
1.6 KB
|
Line | |
---|
1 | package gov.hhs.fha.nhinc.subscription.repository.data;
|
---|
2 |
|
---|
3 | import java.io.Serializable;
|
---|
4 |
|
---|
5 | /**
|
---|
6 | * Data class for a patient
|
---|
7 | *
|
---|
8 | * @author Neil Webb
|
---|
9 | */
|
---|
10 | public class Patient implements Serializable
|
---|
11 | {
|
---|
12 | private static final long serialVersionUID = -4817108979630447814L;
|
---|
13 | private String patientId;
|
---|
14 | private Community assigningAuthority;
|
---|
15 |
|
---|
16 | public String getPatientId()
|
---|
17 | {
|
---|
18 | return patientId;
|
---|
19 | }
|
---|
20 |
|
---|
21 | public void setPatientId(String patientId)
|
---|
22 | {
|
---|
23 | this.patientId = patientId;
|
---|
24 | }
|
---|
25 |
|
---|
26 | public Community getAssigningAuthority()
|
---|
27 | {
|
---|
28 | return assigningAuthority;
|
---|
29 | }
|
---|
30 |
|
---|
31 | public void setAssigningAuthority(Community assigningAuthority)
|
---|
32 | {
|
---|
33 | this.assigningAuthority = assigningAuthority;
|
---|
34 | }
|
---|
35 |
|
---|
36 | @Override
|
---|
37 | public boolean equals(Object obj)
|
---|
38 | {
|
---|
39 | if (obj == null)
|
---|
40 | {
|
---|
41 | return false;
|
---|
42 | }
|
---|
43 | if (getClass() != obj.getClass())
|
---|
44 | {
|
---|
45 | return false;
|
---|
46 | }
|
---|
47 | final Patient other = (Patient) obj;
|
---|
48 | if (this.patientId != other.patientId && (this.patientId == null || !this.patientId.equals(other.patientId)))
|
---|
49 | {
|
---|
50 | return false;
|
---|
51 | }
|
---|
52 | if (this.assigningAuthority != other.assigningAuthority && (this.assigningAuthority == null || !this.assigningAuthority.equals(other.assigningAuthority)))
|
---|
53 | {
|
---|
54 | return false;
|
---|
55 | }
|
---|
56 | return true;
|
---|
57 | }
|
---|
58 |
|
---|
59 | @Override
|
---|
60 | public int hashCode()
|
---|
61 | {
|
---|
62 | int hash = 7;
|
---|
63 | hash = 89 * hash + (this.patientId != null ? this.patientId.hashCode() : 0);
|
---|
64 | hash = 89 * hash + (this.assigningAuthority != null ? this.assigningAuthority.hashCode() : 0);
|
---|
65 | return hash;
|
---|
66 | }
|
---|
67 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.