Repository navigation
Expand file tree
/
Copy pathHospitalService.py
More file actions
72 lines (58 loc) · 1.64 KB
/
Copy pathHospitalService.py
File metadata and controls
72 lines (58 loc) · 1.64 KB
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
from DateConverter import DateConverter
'''
Data class containing
'''
class HospitalService:
def __init__(self):
self.pcode = ""
self.pdate = ""
self.phospital = ""
self.pid_hospital = ""
self.punit = ""
self.pid_unit = ""
@property
def code(self):
return self.pcode
@code.setter
def code(self, code):
self.pcode = code
@property
def date(self):
return self.pdate
@date.setter
def date(self, date):
self.pdate = date
@property
def hospital(self):
return self.phospital
@hospital.setter
def hospital(self, hospital):
self.phospital = hospital
@property
def id_hospital(self):
return self.pid_hospital
@id_hospital.setter
def id_hospital(self, id_hospital):
self.pid_hospital = id_hospital
@property
def unit(self):
return self.punit
@unit.setter
def unit(self, unit):
self.punit = unit
@property
def id_unit(self):
return self.pid_unit
@id_unit.setter
def id_unit(self, id_unit):
self.pid_unit = id_unit
def __str__(self):
out = "---Hospital Service---" + "\n"
out += "code:\t\t" + self.code + "\n"
out += "hospital:\t" + self.hospital + "\n"
out += "date:\t\t" + DateConverter.fromDateToPrint(self.date) + "\n"
out += "id_hospital:\t" + str(self.id_hospital) + "\n"
out += "unit:\t\t" + self.unit + "\n"
out += "id_unit:\t" + str(self.id_unit) + "\n"
out += "----------------------"
return out