Esempio n. 1
0
 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]
Esempio n. 2
0
 def get_patient(self, identifier):
     if IRecipient.providedBy(identifier):
         identifier = identifier.key
     return self._patients.get(identifier)
Esempio n. 3
0
 def has_patient(self, identifier):
     if IRecipient.providedBy(identifier):
         identifier = identifier.key
     return identifier in self._patients
Esempio n. 4
0
File: api.py Progetto: f3at/feat
 def render_reference(self, value):
     if IRecipient.providedBy(value):
         return reference.Relative('servers', value.key)