糖尿病是患者體內的血糖水平異常高,台灣在亞洲地區18歲以上成人糖尿病盛行率11.1%為最高的國家,使用口服藥物的病患人數占糖尿病用藥人數的80%以上。透過醫院所提供的疾病代碼和用藥代碼來分析疾病與藥物的因果關係,在大數據的資料中透過卡方檢定、勝算比和格蘭傑因果關係這些統計分析來判斷使用不同的治療藥物是否會讓疾病得病風險增加或是下降。分析後文獻報導使用糖尿病藥物得腎功能不良所致疾患風險下降,使用胰島素藥物得充血性心臟衰竭風險下降,使用非胰島素藥物得肝炎風險下降,使用雙胍類得混合性高脂血症風險下降。其中我們找到文獻中沒發現的關係,使用糖尿病藥物得腎絞痛風險下降,使用胰島素藥物得支氣管性肺炎風險下降,使用非胰島素藥物得其他慢性過敏性結膜炎風險下降,使用雙胍類得散光風險下降。從結果來看分析的流程不只可以驗證已知結果,並且發現未知的藥物與疾病關係,未來可以加入更多資料讓分析更精準,透過其他外部監測裝置的輔助,能夠告知病人接下來可能得病的風險並提早做預防。;Diabetes is characterized by high blood sugar levels. Taiwan has the highest prevalence of diabetes in Asia, with a rate of 11.1% among adults over 18 years old. The majority of diabetes patients, over 80%, use oral medications for treatment. By analyzing disease and medication codes using statistical methods like chi-square tests, odds ratios, and Granger causality in big data, we can determine the causal relationship between diseases and drugs and assess whether different treatment drugs increase or decrease the risk of disease. Based on the literature analysis, it has been reported that diabetes drugs reduce the risk of diseases related to poor renal function, insulin drugs reduce the risk of congestive heart failure, non-insulin drugs reduce the risk of hepatitis, and biguanides reduce the risk of mixed hyperlipidemia. Among the findings, we discovered relationships that were not previously documented in the literature. The use of diabetes drugs was associated with a reduced risk of renal colic, insulin drugs were associated with a reduced risk of bronchopneumonia, non-insulin drugs were associated with a reduced risk of other chronic allergic conjunctivitis, and biguanides were associated with a reduced risk of astigmatism. These findings indicate that the analysis process has the potential to verify known results and uncover previously unknown relationships between drugs and diseases. Increasing the amount of data in future analyses can further enhance the accuracy of the findings. With the aid of additional external monitoring devices, patients can be alerted to potential disease risks in advance and take proactive precautions.