-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappointment.py
71 lines (52 loc) · 1.38 KB
/
appointment.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
from datetime import datetime, timedelta
class Appointment(object):
def __init__(self, provider, patient, date, time, reason):
self._provider = provider
self._patient = patient
self._date = date
self._time = time
self._reason = reason
self._notes = None
self._prescribedMedicine = None
self._accessed = False
@property
def provider(self):
return self._provider
@property
def patient(self):
return self._patient
@property
def date(self):
return self._date
@property
def time(self):
return self._time
@property
def reason(self):
return self._reason
@property
def notes(self):
return self._notes
@notes.setter
def notes(self, notes):
self._notes = notes
@notes.setter
def addNotes(self, notes):
self._notes = self._notes + "\n" + notes
@property
def prescribedMedicine(self):
return self._prescribedMedicine
@prescribedMedicine.setter
def prescribedMedicine(self, prescribedMedicine):
self._prescribedMedicine = prescribedMedicine
@prescribedMedicine.setter
def addMedicine(self, medicine):
self._prescribedMedicine = self._prescribedMedicine + "\n" + medicine
@property
def accessed(self):
return self._accessed
@accessed.setter
def accessed(self, boolean):
self._accessed = boolean
def getDateTime(self):
return datetime.strptime(self._date, "%m/%d/%Y")