Based on the pharmacogenomics theory, this study developed a software system for interpretation of drug gene loci and guidance on clinical safe medication with the purpose of providing clinical guidance on the safety and effectiveness of drug use through accurate and efficient detection and interpretation of drug gene loci. The system infrastructure was built on a service-oriented architecture (SOA) design and Docker container virtualization approach to achieve a rapid and automatic interpretation of genetic results and best available drugs. The front end was established on HTML5 and JavaScript to realize visualization of analysis results and user interaction. The system was tested and validated to show robust performance which is reliable in clinical use. It will show high impact on the development of pharmacogenomics and clinical practice of patients with personalized medicine.