The invention provides a 
system and methods for the determination of the pharmacogenomic 
phenotype of any individual or group of individuals, ideally classified to a discrete, specific and defined pharmacogenomic 
population(s) using 
machine learning and 
population structure. Specifically, the invention provides a 
system that integrates several subsystems, including (1) a 
system to classify an individual as to pharmacogenomic cohort status using properties of underlying structural elements of the human 
population based on differences in the variations of specific genes that 
encode proteins and enzymes involved in the absorption, distribution, 
metabolism and 
excretion (ADME) of drugs and xenobiotics, (2) the use of a pre-trained 
learning machine for classification of a set of electronic health records (EHRs) as to pharmacogenomic 
phenotype in lieu of 
genotype data contained in the set of EHRs, (3) a system for prediction of pharmacological risk within an inpatient setting using the system of the invention, (4) a method of 
drug discovery and development using pattern-matching of previous drugs based on pharmacogenomic 
phenotype population clusters, and (5) a method to build an optimal 
pharmacogenomics knowledge base through derivatives of private databases contained in pharmaceutical companies, 
biotechnology companies and academic research centers without the risk of exposing 
raw data contained in such databases. Embodiments include pharmacogenomic decision support for an individual patient in an inpatient setting, and optimization of clinical cohorts based on pharmacogenomic phenotype for clinical trials in 
drug development.