def remove_patient(self, identifier): if IRecipient.providedBy(identifier): identifier = identifier.key if identifier in self._patients: self.debug("Stop agent's %s heart monitoring", identifier) patient = self._patients[identifier] self._doctor.on_patient_removed(patient) del self._patients[identifier]
def get_patient(self, identifier): if IRecipient.providedBy(identifier): identifier = identifier.key return self._patients.get(identifier)
def has_patient(self, identifier): if IRecipient.providedBy(identifier): identifier = identifier.key return identifier in self._patients
def render_reference(self, value): if IRecipient.providedBy(value): return reference.Relative('servers', value.key)