-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path04.18.2019_patientClass.py
111 lines (81 loc) · 2.56 KB
/
04.18.2019_patientClass.py
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
#ToniP
#INF103
#patientClass
class Patient:
#Constructor
def __init__(self, fName, mName, lName, street, city, state, zCode, pNum, eName, eNum):
self.__fName = fName
self.__mName = mName
self.__lName = lName
self.__street = street
self.__city = city
self.__state = state
self.__zCode = zCode
self.__pNum = pNum
self.__eName = eName
self.__eNum = eNum
##MUTATOR METHODS##
#setFname -- set first name
def setfName(self,fName):
self.__fName = fName
#setmName -- set middle name
def setmName(self,mName):
self.__mName = mName
#setlName -- set last name
def setmName(self,lName):
self.__lName = lName
#setStreet -- set street address
def setStreet(self,street):
self.__street = street
#setCity -- set city name
def setCity(self,city):
self.__city = city
#setState -- set state
def setState(self,state):
self.__state = state
#setzCode -- set zip code
def setzCode(self,zCode):
self.__zCode = zCode
#setpNum -- set phone number
def setpNum(self,pNum):
self.__pNum = pNum
#seteName -- set emergency name
def seteName(self,eName):
self.__eName = eName
#seteNum -- set emergency phone number
def seteNum(self,eNum):
self.__eNum = eNum
##ACCESSOR METHOD##
#getfName -- update name
def getfName(self):
return self.__fName
#getmName -- update middle name
def getmName(self):
return self.__mName
#getlName -- update last name
def getlName(self):
return self.__lName
#getStreet -- update street address
def getStreet(self):
return self.__street
#getCity -- update city
def getCity(self):
return self.__city
#getzCode -- update zip code
def getzCode(self):
return self.__zCode
#getpNum -- update phone number
def getpNum(self):
return self.__pNum
#geteName -- update emergenct name
def geteName(self):
return self.__eName
#geteNum -- update emergency phone number
def geteNum(self):
return self.__eName
def __str__(self):
result = 'Name: ' +self.__fName + ' ' +self.__nName+ ' ' +self.__lName + '\n' + \
'Address: ' + self.__street + ' ' + self.__city + ' ' + self.__state + '\n' +\
'Phone Number: ' + self.__pNum + '\n' +\
'Emergency Contact' + self.__eName + ' ' + self.__eNum + '\n'
return result