  In this paper, we introduce machine learning approaches that are used to
prioritize outpatients (OP) according to their current health state, resulting
in self-optimizing heterogeneous networks (HetNet) that intelligently adapt
according to users' needs. We use a na\"ive Bayesian classifier to analyze data
acquired from OPs' medical records, alongside data from medical Internet of
Things (IoT) sensors that provide the current state of the OP. We use this
machine learning algorithm to calculate the likelihood of a life-threatening
medical condition, in this case an imminent stroke. An OP is assigned
high-powered resource blocks (RBs) according to the seriousness of their
current health state, enabling them to remain connected and send their critical
data to the designated medical facility with minimal delay. Using a mixed
integer linear programming formulation (MILP), we present two approaches to
optimizing the uplink side of a HetNet in terms of user-RB assignment: a
Weighted Sum Rate Maximization (WSRMax) approach and a Proportional Fairness
(PF) approach. Using these approaches, we illustrate the utility of the
proposed system in terms of providing reliable connectivity to medical IoT
sensors, enabling the OPs to maintain the quality and speed of their
connection. Moreover, we demonstrate how system response can change according
to alterations in the OPs' medical conditions.
