Generative Foundation Model for Structured and Unstructured Electronic Health Records