-
Notifications
You must be signed in to change notification settings - Fork 2
/
Doctor.py
104 lines (74 loc) · 2.91 KB
/
Doctor.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
class Doctor:
CSV_HEADER = ['Doctor Name', 'Specialization', 'Experiences', 'Telephone', 'City', 'State', 'Address', 'Image link']
def __init__(self, name, image_link, specialization, experiences, city, state, address, telephone):
self._name = name
self._image_link = image_link
self._specialization = specialization
self._experience = experiences
self._city = city
self._state = state
self._address = address
self._telephone = telephone
def get_name(self):
return self._name
def set_name(self, name):
if name is not None:
name = ""
self._name = name.strip()
name = property(get_name, set_name)
def get_image_link(self):
return self._image_link
def set_image_link(self, image_link):
if image_link is not None:
image_link = ""
self._image_link = image_link.strip()
image_link = property(get_image_link, set_image_link)
def get_specialization(self):
return self._specialization
def set_specialization(self, specialization):
if specialization is not None:
specialization = ""
self._specialization = specialization.strip()
specialization = property(get_specialization, set_specialization)
def get_experience(self):
return self._experience
def set_experience(self, experience):
if experience is not None:
experience = ""
self._experience = experience.strip()
experience = property(get_experience, set_experience)
def get_city(self):
return self._city
def set_city(self, city):
if city is not None:
city = ""
self._city = city.strip()
city = property(get_city, set_city)
def get_state(self):
return self._state
def set_state(self, state):
if state is not None:
state = ""
self._state = state.strip()
state = property(get_state, set_state)
def get_address(self):
return self._address
def set_address(self, address):
if address is not None:
address = ""
self._address = address.strip()
address = property(get_address, set_address)
def get_telephone(self):
return self._telephone
def set_telephone(self, telephone):
if telephone is not None:
telephone = ""
self._telephone = telephone.strip()
telephone = property(get_telephone, set_telephone)
def to_csv(self):
return [self.name, self.specialization, self.experience, self.telephone, self.city, self.state, self.address,
self.image_link]
def __str__(self):
return "Doctor: [{0}], Especializations: [{1}], Experience: [{2}], Telephone: [{3}], Address: [{4}][{5}][{6}]"\
.format(self.name, self.specialization, self.experience, self.telephone, self.address, self.city,
self.state)