Abstract
Purpose There has been much recent interest on the use of large language models such as ChatGPT in ophthalmology. While several studies have investigated ChatGPT's applications in ophthalmology, its potential as a Python developer for complex tasks like resident scheduling remains unexplored. This paper explores the use of ChatGPT- 4 as a Python developer to create a resident call schedule for five Yale PGY-2 ophthalmology residents. Design/Methods ChatGPT-4 and Python programming were used to develop a complex resident scheduling system. The objective was to distribute the call schedule evenly between 5 residents while adhering to specific constraints. The scheduling task involved multiple constraints, such as ensuring that only one resident is assigned per day, allocating specific weekdays for certain residents, avoiding consecutive calls, and accounting for unavailable dates and holidays. We designed a separate Python script to validate the generated schedule which was also manually validated by the chief resident. In order to upload the schedule to the Google Calendar, we generated a separate Python script. Results Through an iterative process with ChatGPT-4 and Python programming, we successfully developed a working model that fulfilled all requirements. The schedule was validated by the validation code and manually reviewed by the chief resident. Additionally, the schedule was uploaded successfully to Google Calendar using a Python script generated by ChatGPT-4. Conclusion This study demonstrates the potential of AI language models like ChatGPT-4, in addressing complex administrative tasks in healthcare with an aim of improving efficiency and reducing administrative burden. This type of programming could shift towards more natural language-based interactions, making coding accessible to a broader range of individuals and reducing technical barriers.
Received Date
2 Jul 2023
Accepted Date
3 Feb 2025
Recommended Citation
Singer, Maxwell B.; Theotoka, Despoina; and Teng, Christopher C.
(2025)
"Using ChatGPT-4 As a Python Developer to Solve Complex Resident Scheduling,"
Journal of Academic Ophthalmology: Vol. 17:
Iss.
1, Article 15.
Available at:
https://www.aupojournal.org/jao/vol17/iss1/15