stats_model

This module implements the model for doing some descriptive statistics.

class egegrouper.stats_model.StatsModel(data_provider=None)[source]

The model class providing some descriptive statistics of groups.

age_stats(group_id=None, exams=None)[source]

Return the average age of patients in the group.

number_by_meta(key, exams=None)[source]

Group examinations by the meta data key and return the number of examinations in each group.

set_age_groups(bounds)[source]

Set bounds of age groups.

stats(key, group_id)[source]

Return statistics for group by gender, diagnosis or age group.

stats_controller

Controller for connection of user, StatsModel and views.

class egegrouper.stats_controller.StatsController[source]

Controller.

gender_balance(group_id)[source]

Calculate and show the gender balance of group.

Parameters:group_id (str) – Group ID.
stats(key, group_id)[source]

Calculate and show number of examinations grouped by key in group with group_id.

Parameters:
  • key (str) – Keyword, name of field.
  • group_id (str) – Group ID.