  Electronic medical record (EMR) data contains historical sequences of visits
of patients, and each visit contains rich information, such as patient
demographics, hospital utilisation and medical codes, including diagnosis,
procedure and medication codes. Most existing EMR embedding methods capture
visit-code associations by constructing input visit representations as binary
vectors with a static vocabulary of medical codes. With this limited
representation, they fail in encapsulating rich attribute information of visits
(demographics and utilisation information) and/or codes (e.g., medical code
descriptions). Furthermore, current work considers visits of the same patient
as discrete-time events and ignores time gaps between them. However, the time
gaps between visits depict dynamics of the patient's medical history inducing
varying influences on future visits. To address these limitations, we present
$\mathtt{MedGraph}$, a supervised EMR embedding method that captures two types
of information: (1) the visit-code associations in an attributed bipartite
graph, and (2) the temporal sequencing of visits through a point process.
$\mathtt{MedGraph}$ produces Gaussian embeddings for visits and codes to model
the uncertainty. We evaluate the performance of $\mathtt{MedGraph}$ through an
extensive experimental study and show that $\mathtt{MedGraph}$ outperforms
state-of-the-art EMR embedding methods in several medical risk prediction
tasks.
