A Pathology Foundation Model For Cancer Diagnosis And Prognostic Prediction