Abstract
Scheduling and attendance management present huge challenges for hospitals, and the importance of both has become more critical as resource limitations and overwhelmingly uncertain demand are becoming more evident, especially during COVID-19. Important variables and factors need to be considered. When managers address this problem, they either use a manual approach or invest in expensive commercial tools. We propose a simple and flexible system that requires no extra investment. This system was developed using Ding Talk, Microsoft Excel and Visual C#. Ding Talk was used to collect vacation applications and clock information. A VBA-based Microsoft Excel program was developed to schedule shifts. A Windows Forms Application based on Visual C# was developed to complete the workload and attendance statistics. We focused on the design and implementation of the module of schedule generation and attendance management. Using the practical data of the Ultrasound Department, we compared the time spent on scheduling and attendance before and after the system was established. The results demonstrate that the system is feasible and efficient. Its high flexibility enables managers to quickly modify the schedule and attendance statistics to achieve dynamic management when dealing with inevitable demand changes during COVID-19.
Introduction
Ultrasound examination is an important part of imaging examination due to its advantages of being noninvasive, inexpensive, and real-time. In China, estimations indicate that ultrasound accounts for more than 30% of a hospital’s total imaging examinations. Scheduling is an important part of the management of the ultrasound department. Multiple aspects of the hospital are influenced by scheduling, such as the effective use of human resources, doctors' work enthusiasm, and department performance. Scheduling is important in many organizations, such as factory floors and schools.1–7 There are many studies on operating room scheduling in hospitals, and various hardware, software systems, and algorithms are widely used for scheduling.8–12 Some articles aimed to reduce patient waiting time.13,14 Some researchers have focused on the total time required to complete operations, while others have studied the limitations of resources. 15 Ultrasound doctor scheduling is a complex exercise with multiple contradictory objectives. Sometimes the scheduling process is dynamic because of unpredictable demand changes.16–18 The rampant COVID-19 epidemic has led to increased difficulties regarding the scheduling of ultrasound departments. How to effectively implement dynamic scheduling is a difficult problem.19–21
Attendance management is widely used in schools, companies, and hospitals.22–24 Attendance is another important factor in the management of the ultrasound department, since it is not only the embodiment of the staff's work discipline but also closely related to the staff's performance bonus.25,26 Some hospitals add the attendance management module to the hospital information system (HIS), but this method is not suitable for large general hospitals. Unified hospital attendance management has become difficult to adapt to the varying requirements of different departments. Furthermore, fingerprint punching, face recognition, radio frequency identification (RFID), and other technologies have been widely used in hospitals, and the management ability of attendance has been partially improved, but there are still some problems, such as low flexibility, low accuracy, and high price.27,28 During the COVID-19 pandemic, hospitals implemented a policy of decentralization to reduce human contact and avoid cross-infection. To meet these new demands, we are committed to finding a new method of attendance management. Ding Talk, as one of the most representative network platforms, 29 has been effectively applied in many aspects, such as online teaching, video conferences, expense reimbursement, and laboratory management. Its intelligent personnel module and attendance module can be used for personnel management and attendance data collection. The complexity of the technology and the algorithms involved in data collection and implementation is one of the reasons why some of the original scheduling and attendance systems were so difficult to implement effectively.30–38
The aim of this study was to develop an easy-to-use and efficient system to achieve scheduling and attendance. We tried to develop commonly used software to ensure the ease of use of the system and improve user acceptance. Thus, an Excel VBA developed by Microsoft and a Ding Talk attendance module from Alibaba were used to improve the simplicity and flexibility of the system. We used Ding Talk for data collection and Excel VBA for scheduling data processing. Furthermore, we used a Windows Forms Application, developed by Visual C#, to design a simple and friendly user interface. We not only focused on the functional implementation of the system but also optimized the design of the solution.
Materials and methods
Informed consent
In our study, informed consent was not needed because no individual patient data were involved. The department data used in the study were agreed by the department and the hospital.
Data
The data in this study were sourced from the Ultrasound Department of a hospital, which has more than 200 employees, 6 personnel categories, 12 post types, and 15 post locations, with different post hours and scheduling rules. The Department of Medical Ultrasound has many characteristics, such as a large number of personnel, many types of personnel, scattered post locations, and complex scheduling rules, among others, and its scheduling and attendance requirements are very representative of most hospitals. Manual scheduling was used to schedule every week. Before the COVID-19 pandemic, an average of 20 doctors were unpredictably absent in a given week. For every absent doctor, it usually takes an average of 20 min for the scheduler to reschedule to fill the vacancy. During the COVID-19 pandemic, there is more uncertainty for both doctors and patients, creating uncertainty about scheduling demand. Schedulers must perform manual scheduling every day. An average of 15 doctors took an unpredictable absence in a day. The number of patients rose or fell from a few dozen to a few hundred. It is a dynamic scheduling process, with data even changing in real time; these changes are tied to the prevalence of COVID-19.
System architecture
The efficient scheduling and attendance system includes a data collection layer, network layer, data processing layer, result display layer, and data storage layer. The system architecture is shown in Figure 1. System architecture.
Below is a brief description of each layer: (1) Data collection layer. A mobile terminal with the Ding Talk APP is used to collect data. The personnel management module of Ding Talk is used to collect the vacation application, and the attendance module is used to collect the clock-in information. (2) Network layer. Wireless networks and mobile networks are used in the system to increase flexibility. (3) Data processing layer. The data processing layer is the core of the system, including the scheduling program and attendance program. The scheduling program is used to convert the scheduling needs of medical staff and the parameter setting of the scheduling administrator to the final scheduling results. The attendance program is used to obtain the absent and late results based on scheduling and clocking information. (4) Result display layer. The scheduling results include a word version of the ultrasound examination room and personnel arrangement information and an Excel version of the workload information. Late and absent results include a histogram and its corresponding table data. (5) Data storage layer. The relational database is used in the system. The system is compatible with two databases: SQL SERVER and MySQL.
System module
Schedule generation module
The schedule generation module is an Excel table with a VBA automatically running program, which mainly completes the generation of the original scheduling table. Four worksheets were designed in the table: initialization parameter setting, personnel list, round table, and scheduling table. The composition of the schedule generation module is shown in Figure 2. (1) Initialization parameter setting worksheet. This worksheet is used to fill in the necessary parameter settings of the schedule, such as the number of ultrasound rooms, night duty, weekend duty, etc. The scheduling manager will use all of these parameters to control the scheduling program. (2) Personnel list. This worksheet is used to list the information of the personnel to be scheduled, including name, scheduled workload assigned, actual workload assigned, personnel label, and vacation needs information, among others. (3) Round table. The worksheet contains labels for all positions, a list of teachers participating in each rotation, and a label for the teacher currently scheduled. The position labels come from the Personnel List. When personnel labels are changed, the scheduling procedure first obtains the names of labels from the rows of the personnel list, which are arranged in the first row of the round table, and then checks the names of all doctors of each type of label in the personnel list. (4) Scheduling table: The scheduling table is the core worksheet of the system. The first column is the personnel label, and the second column is the label for the different ultrasound examination rooms. This label is consistent with the label in the personnel list, which determines that the line can only arrange doctors of its corresponding category. The scheduling table takes weeks as a unit and divides every day into three time periods: morning, afternoon, and evening. * is used as a location identifier for those who need to be scheduled. Table 1 presents an example of the scheduling table. Taking Monday as an example, outpatient doctors (daytime) are available in the morning and afternoon but not in the evening. Emergency doctors (all day) are available in the morning, afternoon, and evening. Outpatient doctors (evening) are available only in the evening, and outpatient doctors (weekends) are available only on Saturday and Sunday. All personnel post labels, position labels, and enabling interfaces can be flexibly set according to the actual needs to meet the flexible setting requirements of the examination room during the COVID-19 pandemic. Furthermore, program control buttons are designed on the round table to open the initialization parameter setting worksheet, buttons for updating personnel list, backup scheduling, rotation list, start automatic scheduling, and optimize scheduling position, among others. After clicking the backup button, the schedule generation module will automatically copy a scheduling table or round table. An automatic scheduling button is used to start the scheduling program. The initialization parameters, vacation needs, number of examination rooms, personnel list, and other information are used to generate the final original scheduling list. Schedule generation module. Example of scheduling.

The flow chart of the ultrasound examination room schedule is shown in Figure 3. The relevant descriptions are illustrated in the following steps: Step 1: Collect data. The necessary data to be collected includes the number of ultrasound examination rooms open, doctors to be scheduled, and vacation needs. During COVID-19, the number of open ultrasound rooms is determined by daily ultrasound demand to minimize turnover and reduce the risk of infection. The ultrasound doctor submits the vacation applications through the personnel management module of Ding Talk. Step 2: Parameter setting. The collected data should be imported into the schedule generation module. The doctor's name and vacation application should be imported into the personnel list. The number of ultrasound rooms should be imported into the initialization parameter setting worksheet. All scheduling positions should be set to * in the scheduling table. Step 3: Start automatic scheduling. When automatic scheduling is started, * is found first in the scheduling table by the scheduling program. The rows and columns of * should be obtained. The room label and personnel label can be obtained by the rows, while the data can be obtained by the columns. Then, the scheduling program obtains the doctor round under the personnel label from the round table. Once the location of the * and the name of the first priority doctor are known, verification of whether doctors can be scheduled in the location, information on vacations, workloads, and schedule conflicts should be taken into consideration. The vacation is first verified. If the scheduling program finds the doctor is on vacation from the personnel list during that time, then this means that the doctor cannot be scheduled here, and the scheduling program will look for the next doctor of the round and verify his vacation until a doctor who is not on vacation on that date is found. Then, the workload will be verified. If the scheduling program finds that the workload of the doctor is full for the given week, the doctor will not be scheduled. The scheduling program will then look for the next doctor of the round and verify his vacation as well as workload status until finding a doctor who is not on vacation and whose workload is not full. Finally, the conflicts will be verified. The scheduling program does not allow doctors to be scheduled in two locations at once. The scheduling program will look for the next doctor of the round and verify his vacation, workload, and conflicts until finding a doctor who is not on vacation, whose workload is not full and who has not been scheduled to another position during that time. At this time, the scheduling of this position is completed, and the next position is scheduled until all position schedules are completed. Flow chart of ultrasound examination room schedule.

After the above scheduling procedures, it is still possible that some posts are not assigned to doctors when the workload of doctors is not full. This is because the scheduling program has not been optimized. We designed the position optimizer to meet the requirements of optimal scheduling and dynamic scheduling. The main process is shown in Figure 4: Step 1: Find the * in the scheduling table. The position of * is to be scheduled. We call it Position A. Step 2: The room label and personnel label are obtained from the scheduling table, and the doctor list whose workload is not full is obtained under the personnel label. These doctors are ranked in order of remaining workload. The first doctor is named Doctor A. Step 3: Find another scheduled position under the same personnel label. This position has been filled by the scheduling program. We call it Position B. We call the doctor, who was scheduled to Position B, Doctor B. Step 4: Verify whether doctor A can be scheduled to Position B. As before, we should verify the vacation and conflict. However, we do not need to verify the workload of Doctor A because we have determined in Step 2 that the workload of the doctor is not full. If the scheduling program finds that Doctor A is on vacation or in conflict with another position, the scheduling program will look for the next position until Doctor A can be scheduled to Position B. Step 5: Verify whether Doctor B can be scheduled to Position A; we only need to verify the vacation and conflict, because the optimizer will only change Doctor B’s position. His workload will not be changed. If the scheduling program finds that Doctor B is on vacation or in conflict with another position, the scheduling program will look for the next position until Doctor A can be scheduled to Position B and Doctor B can be scheduled to Position A. Step 6: Complete optimization. Once Step 5 is completed, put Doctor A to Position B and put Doctor B to Position A. Finally, the scheduling table is optimized. Optimization of the scheduling table.

Attendance management module
The attendance management module based on the Ding Talk is used to realize the setting of the attendance parameter and the collection of the original attendance records from multiple attendance locations. Through the attendance management module, the manager can complete the personnel management, schedule management, attendance setting, and result statistics and generate the attendance statistics report. The functional structure of the module is shown in Figure 5. The functional structure of the attendance module.
The flow of attendance statistics is shown in Figure 6. Flow of attendance statistics.
The main process is as follows: Step 1: Attendance parameter setting. The parameters include the name, personnel ID, classification, attendance time, and attendance location of the doctor who participated in the attendance. Step 2: Load data. The data include scheduling data and attendance data. Scheduling data included doctors and other medical assistants. In the scheduling table, all position information and corresponding scheduling personnel are listed, which are used by the module to check for attendance. The attendance manager can export the original attendance records from Ding Talk within the set period, which will be used to check the attendance time. Step 3: Select the date of attendance. To improve the flexibility of the attendance module according to the actual needs of attendance, a day is categorized into three periods: morning, afternoon, and evening. The attendance manager checks the corresponding attendance date and period according to the actual needs. Step 4: Check the schedule to obtain the position information and the doctor's name. The attendance statistics module checks the schedules according to the selected attendance date and period to obtain the information of the corresponding positions and doctor’s name. Step 5: Check the label of the Doctor. The attendance statistics module checks the personnel list according to the doctor’s name from Step 4 to obtain the classification of the personnel and the attendance time of the corresponding position. Step 6: Check the attendance records of the doctor. According to the doctor’s name and attendance time in Step 5, the attendance statistics module checks the original attendance record sheet. If the doctor in the original attendance record sheet does not clock in the attendance time, they are regarded as absent. The doctor’s name and absence period shall be indicated, and the data shall be stored in the result chart of absence. Step 7: If the doctor in Step 6 has clocked in during the attendance time, the clock in time on the record shall be compared with the attendance time from Step 5. If the clock in time on the record is later than the attendance time, it is regarded as late. The doctor’s name and time of late shall be indicated, and the data shall be stored in the result chart of late. Step 8: Attendance results. The absent and late result charts obtained from Step 6 and Step 7 are displayed on the system interface in the form of tables and bar charts, and the corresponding scheduling information, attendance records, and result information are stored in the background MySQL database.
Results
In this section, a practical weekly dataset of the Ultrasound Department a hospital is used to demonstrate the effectiveness of our system. There are time conflicts between different work positions. Scheduling managers need to consider several aspects to avoid the same person being assigned to different work positions at the same time. Additionally, during COVID-19, ultrasound rooms should be opened or closed depending on the number of patients and hospital management staff on site. Manual scheduling is time-consuming, and the results are usually not the best. Regarding attendance management, schedule, attendance time and clock time information should be considered.
The time used for manual scheduling and attendance.
The time used for scheduling and the attendance system.
To test the practical use of the system, we counted the absence of doctors in a week during the COVID-19 pandemic, and approximately 15 doctors were absent per day. For each absent doctor, we had to find another doctor to replace him. This is not easy because we needed to consider multiple factors: whether the teacher was on vacation, whether he met the needs of the epidemic, whether there were conflicts with other positions, and whether he had any remaining responsibilities. Before the scheduling system was set up, we performed practical tests, and it took approximately 10 min to find another doctor, for a total of 3 h a day to fill the doctor's absence. A sudden increase in the number of patients would require the temporary opening of an examination room, as well as the temporary finding of a doctor, which is about as long as it takes to fill a doctor's absence. The optimizer we designed in the scheduling system can solve the problems caused by these uncertain demands, including the unpredictable absence of doctors and the increase in examination rooms caused by the increase in patients. All information related to scheduling is stored in the scheduling system, which automatically finds the most reasonable doctor to fill the vacancy. The detailed process is shown in Figure 4. In practical tests, the scheduling optimizer takes approximately 2 min to fill the absence of 15 doctors. The scheduling efficiency is improved several times.
Discussion
Ease of use and efficiency are two important criteria for evaluating a system. The ease of use of the system will directly affect the user's acceptance of it. The scheduling and attendance software on the market is difficult to successfully apply in hospitals. This difficulty is mainly because they are too complex for medical staff to accept. These software programs must consider as many factors as possible to extend their application range, and as a result, they lose their ease of use. However, the scheduling and attendance demand of hospitals are always changing. These software programs either cannot meet these new demands or require more complex steps to use. Therefore, in the past, manual scheduling and attendance were usually used. The Ultrasound Department arranged a senior doctor to manually complete the weekly department schedule and manually checked the schedule data and the attendance machine data to complete the attendance management. From Table 2, we can see that all these processes can be time-consuming. During the COVID-19 epidemic, uncertainties commonly arise, making scheduling and attendance a challenge for ultrasound department managers. This system was designed based on Microsoft Excel and combined with Visual C# to create a friendly and simple user interface and improve the system's ease of use.
The efficiency of the system. We compared the time spent on scheduling and attendance before and after the system was established. Before the system was established, as shown in Table 2, there was no tool for scheduling managers to collect data but a notebook. Scheduling data included information on personnel lists, vacation needs, and number of examination rooms to be opened, among others. Not all vacation needs could be satisfied, so we needed to prioritize according to the application time. A skilled scheduling manager may take 480 min to collect these data. Several aspects should be considered when scheduling managers generate scheduling, such as job rotations, workload, and vacations. The scheduling form was designed in a word document, and the scheduling administrator manually fills the doctor in the form. This process takes approximately 300 min, and fairness between personnel is often not achieved. In some cases, the scheduling manager needs to modify the schedule temporarily. For example, when a doctor already on schedule is temporarily transferred, another doctor needs to be temporarily found to fill the vacancy. What is more common during COVID-19 is the temporary addition of ultrasound rooms due to the increase in the number of patients. The scheduling manager must manually find a doctor who is available on the specific date to fill the vacancy, and this takes approximately 20 min. After the schedule is completed, the workload of each doctor should be counted. The scheduling manager uses the search function of Word to statistically determine the workload. This process takes approximately 60 min. Before the system was established, the attendance manager used fingerprint attendance machines to collect attendance data. This method has the potential for cross-contamination. The data are stored in a database. With this method, the attendance manager must know the attendance time of each position and each type of personnel and then check the schedule data and attendance data. The attendance manager has to check the corresponding working doctors of each post every day and check whether the doctor is absent or late. This process is inefficient and takes approximately 120 min. Finally, the attendance manager must take approximately 30 min to manually complete the statistics of absent and late.
After the system was established, as shown in Table 3, Ding Talk was used to collect vacation applications from doctors. Ding Talk is an application software installed on mobile phones. Thus, doctors can submit applications anytime, anywhere. Scheduling managers can export these applications directly. The personnel information and the number of ultrasound rooms can be written into the schedule module. Moreover, other necessary parameters can be set, such as the maximum workload and doctor category. After all parameters are set, the scheduling manager can start the automatic scheduling program. As described in the “Schedule generation module”, the program automatically completes the schedule. All complex processes involved in manual scheduling, such as job rotations, workload, and vacation, no longer need to be overseen by the scheduling manager. When we encounter the need to modify the schedule temporarily, we simply start the scheduling optimizer to automatically find available personnel to fill the vacancy. Finally, the scheduling module is used to complete the workload statistics. All these scheduling processes take only approximately 20 min. Ding Talk is also used to collect attendance data. Ding Talk adopts location information to punch in, which makes attendance more efficient and flexible. This innovative method has also helped to avoid unnecessary human contact during COVID-19. Attendance managers can export the raw attendance data from the Ding Talk management background. The attendance program, as described in the “Attendance management module”, is used to complete the automatic check of scheduling data and attendance data. Finally, the report of absence and lateness can be generated directly. All these attendance processes take only approximately 4 min.
The paper argues that the new scheduling and attendance system significantly improves the efficiency of medical staff scheduling and attendance. The system integrates all information needed for scheduling and attendance and designs optimization modules with high flexibility so that they can remain efficient under demand uncertainty during the COVID-19 epidemic. However, unpredicted doctor absence can occur in both the COVID-19 and non-COVID-19 eras. Therefore, there is a high demand for flexibility in the system design. In the non-COVID-19 era, the scheduling and attendance demand is relatively fixed, and there are fewer unpredictable absences, which will further improve the operation efficiency of the system. Since the system was developed, the scheduling and attendance system is still in use, which fully proves the practicability of the system. Moreover, the system has high ease of use, and the requirements for operators are further reduced. Even common nonmedical staff can complete the work of scheduling and attendance.
Conclusion
This research developed a dynamic scheduling and attendance system for hospitals. As the most representative department, the ultrasound department became our research object. The focus was on the ease of use, flexibility, and efficiency of the system with multiple characteristics of the ultrasound department, especially the probability of temporary scheduling changes during COVID-19.
A VBA-based Excel, Ding Talk Application and a Windows Forms Application developed by Visual C# were integrated into the system. The system maximized flexibility and practicality. We developed a scheduling generation module and attendance management module. The automatic scheduling, position optimization, workload statistics, and attendance statistics programs were designed in these modules. Practical data were used to compare the time spent on scheduling and attendance before and after the system was established. The results demonstrate that the scheduling and attendance system is feasible during both COVID-19 and non-COVID-19 periods and is particularly helpful for dealing with uncertain demand during COVID-19. Department managers and doctors easily accept the system because it facilitates scheduling and attendance without requiring them to learn new software knowledge or skills. This new system may also be beneficial to hospitals or other institutions under COVID-19.
Footnotes
Declaration of conflicting interests
The author(s) declare no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
