  Given a deep learning model trained on data from a source site, how to deploy
the model to a target hospital automatically? How to accommodate heterogeneous
medical coding systems across different hospitals? Standard approaches rely on
existing medical code mapping tools, which have significant practical
limitations.
  To tackle this problem, we propose AutoMap to automatically map the medical
codes across different EHR systems in a coarse-to-fine manner: (1)
Ontology-level Alignment: We leverage the ontology structure to learn a coarse
alignment between the source and target medical coding systems; (2) Code-level
Refinement: We refine the alignment at a fine-grained code level for the
downstream tasks using a teacher-student framework.
  We evaluate AutoMap using several deep learning models with two real-world
EHR datasets: eICU and MIMIC-III. Results show that AutoMap achieves relative
improvements up to 3.9% (AUC-ROC) and 8.7% (AUC-PR) for mortality prediction,
and up to 4.7% (AUC-ROC) and 3.7% (F1) for length-of-stay estimation. Further,
we show that AutoMap can provide accurate mapping across coding systems.
Lastly, we demonstrate that AutoMap can adapt to the two challenging scenarios:
(1) mapping between completely different coding systems and (2) between
completely different hospitals.
