During the ReactJS migration some issues around BasicStats tab were discovered:
The basic stats are calculated based on the session's filter status. But as total count all patients are assumed. That leads to confusing results.
Basic stats, which cover just a single data item will have some items in the Rest response, which are coded as a literal NaN (e.g. stddev, see https://docs.python.org/3/library/json.html#infinite-and-nan-number-values. ) That is not allowed in JSON and will cause the client side to crash. This values need to be replaced by something allowed in JSON, e.g. a string "NaN".
The BasicStats service uses internally Pandas, which makes little sense. This dependency should be removed.
During the ReactJS migration some issues around BasicStats tab were discovered: