  A primary goal of computational phenotype research is to conduct medical
diagnosis. In hospital, physicians rely on massive clinical data to make
diagnosis decisions, among which laboratory tests are one of the most important
resources. However, the longitudinal and incomplete nature of laboratory test
data casts a significant challenge on its interpretation and usage, which may
result in harmful decisions by both human physicians and automatic diagnosis
systems. In this work, we take advantage of deep generative models to deal with
the complex laboratory tests. Specifically, we propose an end-to-end
architecture that involves a deep generative variational recurrent neural
networks (VRNN) to learn robust and generalizable features, and a
discriminative neural network (NN) model to learn diagnosis decision making,
and the two models are trained jointly. Our experiments are conducted on a
dataset involving 46,252 patients, and the 50 most frequent tests are used to
predict the 50 most common diagnoses. The results show that our model, VRNN+NN,
significantly (p<0.001) outperforms other baseline models. Moreover, we
demonstrate that the representations learned by the joint training are more
informative than those learned by pure generative models. Finally, we find that
our model offers a surprisingly good imputation for missing values.
