How do you modernize a legacy EMR system?