In this paper, a medical examination algorithm is proposed that can collect users' symptoms and automatically issue a diagnosis. The proposed algorithm makes use of "Symptom2Vec" and the "analysis model of responses on self-diagnosis questions" (AMoRSD) for real-time interviews with users. Symptom2Vec can learn about the relationship between terms related to the symptoms and disease, and establish questioning criteria to be used in patient health checkups, as well as general appropriate followup questions based on patient symptomology. AMoRSD analyzes the patient's emotional expressions and responses to self-diagnostic questions, classifying them into "Sick," "Not Sick," and "Neutral" categories based on patterns. Compared to traditional models, Symptom2Vec earned the highest mean symptom similarity score of 0.983. Furthermore, compared to other models that only learn from patient responses, AMoRSD demonstrates an area under curves (AUC) of 0.99%, indicating that jointly learning the relationship between emotions and patient responses improves the accuracy of user response classification. The combined algorithm of Symptom2Vec and AMoRSD enhances the efficiency and accuracy of user symptom collection and appropriate diagnosis generation. The data were collected from reliable medical sources such as WebMD Dictionary, NHS inform, Snomed Ct, and Cleveland Clinic, encompassing 526 disease names and 2078 symptoms. Additional data were obtained for AMoRSD, focusing on conversations within a hospital context, and effectively trained and evaluated the model using diverse and representative datasets. This research addresses the importance of medical history-taking and contributes to the field by providing a robust framework for real-time symptom-based diagnosis in clinical environments.