Revolutionizing Ehr Data Analysis And Clinical Trials: A Novel Statistical Methodology And Simulation Design