예제 #1
0
파일: council.py 프로젝트: fragaria/BorIS
    def _get_services_time(self):
        services = [service for service in service_list()
                    if service.service.include_in_reports]
        filtering = self.__default_service_filtering()

        total_time_spent = 0
        for service in services:
            enc_ids = service.objects.filter(**filtering).values_list('encounter__id', flat=True)
            total_time_spent += TimeDotation.time_spent_on_encounters(enc_ids, service)
        return total_time_spent
예제 #2
0
 def test_include_in_reports(self):
     classes = [s for s in service_list() if s.service.include_in_reports]
     stat_classes = [s[0] for s in ServiceReport()._get_service_stats()]
     self.assertEqual(classes, stat_classes)
예제 #3
0
 def test_include_in_reports(self):
     classes = [s for s in service_list() if s.service.include_in_reports]
     stat_classes = [s[0] for s in ServiceReport()._get_service_stats()]
     self.assertEqual(classes, stat_classes)
예제 #4
0
 def _get_service_stats(self):
     return [
         service.get_stats(self.filtering)
         for service in service_list(self.person)
         if service.service.include_in_reports
     ]
예제 #5
0
파일: services.py 프로젝트: fragaria/BorIS
 def _get_services(self):
     services = [service for service in service_list(self.person, diseases_last=True)
                 if service.service.include_in_reports]
     return services
예제 #6
0
파일: services.py 프로젝트: jinkt/BorIS
 def _get_service_stats(self):
     return [
         service.get_stats(self.filtering) for service in service_list(self.person) if service.service.include_in_reports
     ]