  Detecting sets of relevant patterns from a given dataset is an important
challenge in data mining. The relevance of a pattern, also called utility in
the literature, is a subjective measure and can be actually assessed from very
different points of view. Rule-based languages like Answer Set Programming
(ASP) seem well suited for specifying user-provided criteria to assess pattern
utility in a form of constraints; moreover, declarativity of ASP allows for a
very easy switch between several criteria in order to analyze the dataset from
different points of view. In this paper, we make steps toward extending the
notion of High Utility Pattern Mining (HUPM); in particular we introduce a new
framework that allows for new classes of utility criteria not considered in the
previous literature. We also show how recent extensions of ASP with external
functions can support a fast and effective encoding and testing of the new
framework. To demonstrate the potential of the proposed framework, we exploit
it as a building block for the definition of an innovative method for
predicting ICU admission for COVID-19 patients. Finally, an extensive
experimental activity demonstrates both from a quantitative and a qualitative
point of view the effectiveness of the proposed approach. Under consideration
in Theory and Practice of Logic Programming (TPLP)
