Project

General

Profile

« Previous | Next » 

Revision 3e915eb3

Added by Jérôme Schneider over 11 years ago

dossiers: only show patientrecord from the current service

View differences:

calebasse/dossiers/models.py
219 219
            blank=True, null=True)
220 220

  
221 221

  
222
class PatientRecordManager(models.Manager):
223
    def for_service(self, service):
224
        return self.filter(service=service)
225

  
222 226
class PatientRecord(ServiceLinkedAbstractModel, PatientContact):
227
    objects = PatientRecordManager()
228

  
223 229
    class Meta:
224 230
        verbose_name = u'Dossier'
225 231
        verbose_name_plural = u'Dossiers'

Also available in: Unified diff