  A comprehensive pharmaceutical recommendation system was designed based on
the patients and drugs features extracted from Drugs.com and Druglib.com.
First, data from these databases were combined, and a dataset of patients and
drug information was built. Secondly, the patients and drugs were clustered,
and then the recommendation was performed using different ratings provided by
patients, and importantly by the knowledge obtained from patients and drug
specifications, and considering drug interactions. To the best of our
knowledge, we are the first group to consider patients conditions and history
in the proposed approach for selecting a specific medicine appropriate for that
particular user. Our approach applies artificial intelligence (AI) models for
the implementation. Sentiment analysis using natural language processing
approaches is employed in pre-processing along with neural network-based
methods and recommender system algorithms for modeling the system. In our work,
patients conditions and drugs features are used for making two models based on
matrix factorization. Then we used drug interaction to filter drugs with severe
or mild interactions with other drugs. We developed a deep learning model for
recommending drugs by using data from 2304 patients as a training set, and then
we used data from 660 patients as our validation set. After that, we used
knowledge from critical information about drugs and combined the outcome of the
model into a knowledge-based system with the rules obtained from constraints on
taking medicine.
