Ejemplo n.º 1
0
 def get(self):
     """환자와 관련된 통계를 제공합니다"""
     args = parser.parse_args()
     stat_type = 'sum'
     by = args['by'] if args['by'] else 'none'
     response = {
         'table': Person.get_name(),
         'stat_type': stat_type,
         'by': by
     }
     if stat_type == 'sum':
         response['data'] = pack_data(PersonStats.calculate_sum[by]())
     return response