  Representation learning (RL) plays an important role in extracting proper
representations from complex medical data for various analyzing tasks, such as
patient grouping, clinical endpoint prediction and medication recommendation.
Medical data can be divided into two typical categories, outpatient and
inpatient, that have different data characteristics. However, few of existing
RL methods are specially designed for inpatients data, which have strong
temporal relations and consistent diagnosis. In addition, for unordered medical
activity set, existing medical RL methods utilize a simple pooling strategy,
which would result in indistinguishable contributions among the activities for
learning. In this work, weproposeInpatient2Vec, anovelmodel for learning three
kinds of representations for inpatient, including medical activity, hospital
day and diagnosis. A multi-layer self-attention mechanism with two training
tasks is designed to capture the inpatient data characteristics and process the
unordered set. Using a real-world dataset, we demonstrate that the proposed
approach outperforms the competitive baselines on semantic similarity
measurement and clinical events prediction tasks.
