def __init__(self, id): super(XRay, self).__init__() self.id = id self.busy = False self.patient = None self.time_left = 0 self.allotted_time = 0 self.random_time = 0 self.waiting_patient = [] create_entities('radiografia', self.id)
def __init__(self, id, name, table): super(MedicalBody, self).__init__() self.id = id self.name = name self.busy = False self.patient = None self.time_left = 0 self.allotted_time = 0 self.random_time = 0 self.process = None self.waiting_patient = [] create_entities(table, self.id, self.name)
def new_patient(self, patient): patient.id = len(self.patients)+1 patient.name += ' '+str(patient.id) self.patients.append(patient) self.waiting_room.assign_patient(patient) create_entities('pacientes', patient.id, patient.name)
def __init__(self, id): super(XRayRoom, self).__init__() self.id = id self.xray = XRay(1) self.patients = [] create_entities('sala_radiografia', self.id )
def __init__(self, id): super(WaitingRoom, self).__init__() self.id = id self.patients = [] create_entities('hospital_ingreso', self.id)