Patients under the methadone Flexi dispensing (MFlex) program are required to do blood tests like renal profile. To ensure the patient has a kidney failure, a doctor assesses one parameter like creatinine. Unfortunately, the existing system does not have a stable ecosystem towards classification and optimization due to inaccurate measurement methods and lack of justification of significant parameters, which will influence the accuracy of diagnosis. The objective is to apply the Mahalanobis-Taguchi system (MTS) in the MFlex program. The data is collected at Bandar Pekan clinic with 34 parameters. Two types of MTS methods are used, such as RT-Method and T-Method, for classification and optimization. As a result, the RT-Method can classify healthy and unhealthy samples, while the T-Method can evaluate the significant parameters in terms of the degree of contribution. Fifteen unknown samples have been diagnosed with different positive and negative degrees of contribution to achieving lower MD. The best-proposed solution is type 5 of 6 modifications because it shows the highest MD value than others. In conclusion, a pharmacist from Bandar Pekan clinic confirmed that MTS could solve a problem in the classification and optimization of the MFlex program.