Abstract In the era of big clinical data, the availability of rich real-world clinical data sources (RWcD) enables the development of predictive models for different clinical events, bringing the potential to improve efficiency and lower the cost of health care. However, the currently in-use models in practice are mostly trained on local data, introducing issues of bias and lack of generalizability. We will develop comprehensive methods to efficiently train high-quality clinical foundation model (CFM) that learn informative representations from patients' structured clinical data either in the form of EHR or claims. Specifically, how to train CFM that can maximize the performance boost for any downstream prediction tasks regardless of the predictive model architecture and the size of the available training data. In this application we propose to 1) Develop a flexible framework to intake the temporal structured clinical data elements from heterogenous sources and enrich it with existing knowledge, 2) Optimize the foundation model architecture and pre-training strategy, 3) Develop prompting strategies for zero/few shot learning, and 4) Evaluating CFM on multiple clinical downstream tasks.