電子期刊
台灣家庭醫學雜誌
蔡崇煌1,2,3 李孟智4 張維亙1 顏啟華5† 詹育儒1*
方法:以目前最新版本的DeepSeek、Microsoft Copilot、Google Gemini及ChatGPT等AI模型,輔助Excel 之Visual Basic For Application (VBA)及JavaScript編碼,前者選取工作表列之任何一個工作表/滑鼠右鍵/檢視程式碼或者Alt+F11開啟VBA編輯器,檔案儲存成.xlsm或.xlsb副檔名,後者存成.html。兩者以BMI 計算、VBA多加邏輯判斷If做舉例說明。使用電腦型號為ASUS筆記型LAPTOP-TSDMU3MP, 配備 Intel Core i7-1165G7 2.80GHz 處理器、運行Windows 11及Microsoft 365軟體。
結果:免費AI有使用次數的限制或問不出結果時,可交替使用。本研究探討AI在醫療領域中,輔助程式編碼應用的可行性,發現AI可作為開發者的得力助手。以BMI計算及成人預防保健為提示詞(prompt)為例,發現給予AI提示,即可自動生成VBA及JavaScript編碼,會有使用步驟、功能說明、程式碼說明、範例運行及注意事項,且會除錯及優化程式碼等。對於沒有程式語言基礎的初學者可輕易上手,再者,透過不同的輸入條件,及於不同AI,可產生不同的結果以資比較,可達到程式語言的自我學習。If使用法之外,詢問AI,發現還可使用Select case及IIF,用法更簡潔。
結論:以AI輔助,可大大降低進入程式編碼的門檻,因為會有註解及程式碼解釋,因此也可達到初學程式語言者極有價值的學習參考。
關鍵詞:人工智慧、助手、JavaScript、Visual Basic應用程式
1澄清醫院中港分院家庭醫學科
2東海大學高齡健康與運動科學學士學位學程
3東海大學共同學科暨通識教育中心
4衛生福利部台中醫院家庭醫學科
5中山醫學大學附設醫院家庭暨社區醫學部
受理日期:114年1月17日 修改日期:114年5月26日 同意刊登:114年10月1日
*通訊作者:詹育儒 通訊地址:台中市西屯區台灣大道四段966號 澄清醫院中港分院家庭醫學科
E-mail:m333834@yahoo.com.tw; jack9701020@gmail.com
†共同通訊作者:顏啟華
AI-Supported Self-learning for Enhancing MedicalProgramming Skills: A Preliminary Study
Chung-Huang Tsai1,2,3, Meng-Chih Lee4, William Wei-Geng Chang1, Chi-Hua Yen5†and Yu-Ju Chan1*
Purpose: Since the groundbreaking release of the powerful ChatGPT-3.5 model in late 2022,various industries have been exploring ways to incorporate AI into their operations. Our study aimedto assess whether AI assistance could effectively support medical professionals in learning andimplementing programming skills for healthcare applications.
Methods: The latest versions of AI models—DeepSeek, Microsoft Copilot, Google Gemini, andChatGPT—were used to assist in coding with Excel's Visual Basic for Applications (VBA) andJavaScript. For VBA, select any worksheet/ right-click / View Code or Alt+F11 to open the VBAeditor. The file was then saved with the extensions .xlsm or .xlsb. For JavaScript, the file was savedas .html. Both examples demonstrated body mass index (BMI) calculation, with the VBA versionincluding an additional logical If statement for illustration. All programs were executed on an ASUSlaptop (LAPTOP-TSDMU3MP) equipped with an Intel Core i7-1165G7 2.80GHz processor,running Windows 11 and Microsoft 365 software.
Results: When an AI tool reached its usage limit or failed to generate satisfactory results, othermodels were used as alternatives. This study demonstrated the feasibility of AI-assistedprogramming applications in the medical field, showing that AI can serve as a valuable assistant fordevelopers. Using "BMI calculation" and "adult preventive healthcare" as example prompts, wefound that providing these instructions to AI-enabled automatic generation of both VBA andJavaScript code, complete with implementation steps, functional descriptions, code explanations,execution examples, and important notes. The AI systems additionally performed debugging andcode optimization. This approach allowed beginners without any programming background to getstarted easily. Moreover, by applying different input conditions across various AI platforms, userscould obtain diverse outputs for comparison, thereby facilitating self-directed learning ofprogramming languages. Beyond the conventional If-Then method, consultation with AI revealedalternative approaches using Select Case and IIF statements, which provided more concise codingsolutions.
Conclusion: AI assistance can significantly lower the barrier to entry for programming. Theinclusion of comments and code explanations offers valuable learning support and referencematerials for programming novices.
(Taiwan J Fam Med 2025; 35: 270-284) DOI: 10.53106/168232812025123504006
Key words: artificial intelligence, Copilot, JavaScript, Visual Basic for Application
1Department of Family Medicine, Chung-Kang Branch, Cheng Ching Hospital, Taichung, Taiwan
2Bachelor of Science in Senior Wellness and Sports Science,
3Center for General Education, Tunghai University, Taichung, Taiwan
4Department of Family Medicine, Taichung Hospital, National Department of Health, Taichung, Taiwan
5Department of Family and Community Medicine, Chung Shan University Hospital, Taichung, Taiwan
Received: January 17, 2025; Revised: May 26, 2025; Accepted: October 1, 2025.
*Corresponding author
†Co-Corresponding author