Work schedule generation device, work schedule generation method, and program
The roster generation device efficiently optimizes nurse schedules by using weighted values and random numbers to address existing challenges in obtaining optimal solutions in real-time nurse scheduling technologies, accommodating irregular work patterns and optimizing schedules by checking all possible combinations.
Patent Information
- Application Number
- JP2025129882
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2025-08-04
- Publication Date
- 2026-01-05
- Estimated Expiration
- 2045-08-04
AI Technical Summary
Existing nurse scheduling technologies face challenges in obtaining optimal schedules within a reasonable time frame and do not accommodate irregular work patterns, limiting flexibility in scheduling.
A roster generation device and method that uses weighted values and random numbers to rank combinations of nurse assignments, allowing for irregular work patterns and optimizing schedules by checking all possible combinations efficiently.
The solution enables the rapid identification of optimal nurse schedules by ranking combinations based on work status and random numbers, accommodating irregular work patterns and reducing calculation time.
Smart Images

Figure 0007793846000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a roster generation device, a roster generation method, and a program used to generate a roster of nurses. [Background technology]
[0002] Generating nurse rosters in hospitals and other medical facilities is known as the "nurse scheduling problem," and has become a subject of academic research because it requires determining optimal schedules while satisfying complex constraints.
[0003] Patent Document 1 discloses technology related to software capable of generating nurse rostering. This software is configured to randomly generate multiple parent individuals (rostering schedules) based on settings for each staff member and prohibited work constraints, perform crossover operations between each parent individual, and apply mutations and heuristics to the child individuals (rostering schedules) generated by the crossover operation to generate rostering candidates to present to the user. This software is also configured to allow manual corrections to the generated candidates. When manual corrections are made, the corrected rostering schedule is used as the parent individual and the above generation process is executed again. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Application Laid-Open No. 2004-151790 Summary of the Invention [Problem to be solved by the invention]
[0005] However, when generating a work schedule using heuristics, as in the technology described in Patent Document 1, it is possible that the optimal solution may not be obtained in principle. On the other hand, if an optimal solution is obtained by checking all possible combinations in a brute-force manner, the calculation takes too much time. Therefore, there has been a need for a technology that can obtain an optimal solution in a short time, even if all possible combinations are checked in a brute-force manner.
[0006] Therefore, one object of the present invention is to provide a roster generation device, a roster generation method, and a program that can obtain an optimal solution in a short time even if all possible combinations are checked in a brute force manner.
[0007] Furthermore, the technology described in Patent Document 1 limits the work styles that can be entered to four: "day shift," "semi-night shift," "night shift," and "day off." This does not allow for occasions such as when an irregular work style needs to be temporarily entered, and therefore improvement is required.
[0008] Therefore, another object of the present invention is to provide a roster generation device, a roster generation method, and a program that allow for the input of irregular work patterns. [Means for solving the problem]
[0009] A roster generation device according to a first aspect of the present invention executes an allocation process for allocating one or more nurses to work in one or more work styles for each of a plurality of work days included in a nurse roster, the nurse roster including a work style entry field for each of the plurality of work days, the allocation process including a first determination step for determining a plurality of nurses who can work in a particular work style on a particular work day, a second determination step for determining a weight value based on work status and a random number for each of the plurality of nurses determined in the first determination step, and a second determination step for determining a weight value based on work status and a random number for each of the plurality of nurses determined in the first determination step, the second determination step determining a weight value based on work status and a random number for each of the plurality of nurses who need to work in the particular work style on the particular work day, the second determination step determining a weight value based on work status and a random number for each of the plurality of nurses determined in the first determination step ... This roster generation device includes a calculation step of calculating the sum of the weight values of the nurses that make up the combination, a sorting step of ordering the multiple combinations based on the sum of the weight values calculated in the calculation step, and a judgment step of determining whether the combinations that are relatively ranked higher in the sorting step meet the requirements necessary for working in the target work style, and the allocation process is a process in which, if there is a combination that is determined in the judgment step to meet the requirements necessary for working in the target work style, a group of nurses that make up the combination are determined to be the nurses who will work in the target work style on the target work day, and the processing moves on to the next work day or next work style without performing the judgment step for the other combinations.
[0010] A second aspect of the present invention is a roster generation device in which, in the first aspect of the present invention, the first determination step determines that a nurse who has an arbitrary character string entered in the work style entry field on a target work day will perform the work indicated by the character string.
[0011] A roster generation method according to a first aspect of the present invention is a roster generation method executed by a computer, the method including a step in which the computer executes an allocation process for allocating one or more nurses to work in one or more work styles for each of a plurality of work days included in a nurse roster, the nurse roster including a work style entry field for each of the plurality of work days, the allocation process including a first determination step in which the computer determines a plurality of nurses who can work in a particular work style on a particular work day, a second determination step in which the computer determines a weight value based on work status and a random number for each of the plurality of nurses determined in the first determination step, and the computer extracts from the plurality of nurses determined in the first determination step the number of nurses required to work in the particular work style on the particular work day. a calculation step in which the computer calculates the sum of the weight values of the nurses who make up each of a plurality of combinations based on the sum of the weight values calculated in the calculation step; a sorting step in which the computer ranks the plurality of combinations based on the sum of the weight values calculated in the calculation step; and a determination step in which the computer determines, in order from the combination that is relatively ranked higher in the sorting step, whether or not the combination satisfies the requirements necessary for working in the noted work style.The allocation process is a process in which, if a combination is determined in the determination step to satisfy the requirements necessary for working in the noted work style, a group of nurses who make up the combination are determined to be the nurses who will work in the noted work style on the noted work day, and the process moves on to the next work day or next work style without performing the determination step for the other combinations.
[0012] A second aspect of the present invention is a roster generation method in which, in the first aspect of the present invention, the first determination step determines that a nurse who has an arbitrary character string entered in the work style entry field on a target work day will perform the work indicated by the character string.
[0013] A program according to a first aspect of the present invention is a program for causing a computer to execute an allocation process for allocating one or more nurses to work in one or more work styles for each of a plurality of work days included in a nurse roster including a work style entry field for each nurse for each of the plurality of work days, the allocation process including a first determination step of determining a plurality of nurses who can work in a particular work style on a particular work day, a second determination step of determining a weight value based on work status and a random number for each of the plurality of nurses determined in the first determination step, and a second determination step of determining a weight value based on work status and a random number for each of the plurality of nurses determined in the first determination step. the program includes a calculation step of calculating the sum of the weight values of the nurses who make up the combination; a sorting step of ordering the multiple combinations based on the sum of the weight values calculated in the calculation step; and a determination step of determining whether the combinations that are relatively ranked higher in the sorting step meet the requirements necessary for working in the target work style, and the allocation process, if any, is determined in the determination step to meet the requirements necessary for working in the target work style, by determining a group of nurses who make up the combination as the nurses who will work in the target work style on the target work day, and by moving on to the next work day or next work style without performing the determination step for the other combinations.
[0014] A program according to a second aspect of the present invention is a program according to the first aspect of the present invention, in which the first determination step makes the determination by assuming that a nurse who has an arbitrary string entered in the work style entry field for the target work day will perform the work indicated by the string. [Effects of the Invention]
[0015] According to the first aspect of the present invention, multiple combinations are ranked using weighted values based on work status and random numbers, and a determination is made, starting with the most highly ranked combination, as to whether or not they meet the requirements necessary for working in the work style of interest. If a combination is determined to meet the requirements necessary for working in the work style of interest, the group of nurses that make up that combination are determined to be the nurses who will work in the work style of interest on the work day of interest, and processing moves on to the next work day or next work style without making any determinations for other combinations.As a result, even though all possible combinations are checked in a brute force manner, it is possible to obtain an optimal solution in a shorter time than if no ranking were performed.
[0016] According to the second aspect of the present invention, if a nurse wishes to assign an irregular work schedule to a certain work day, that nurse can enter any character string in the corresponding work schedule entry field before executing the assignment process, and the irregular work schedule can be excluded from the assignment of the target work schedule. Therefore, it can be said that it is possible to enter irregular work schedules in the roster. [Brief explanation of the drawings]
[0017] [Figure 1] 1 is a diagram showing a roster generation device 1 according to the present embodiment. [Figure 2] 2 is a diagram illustrating an example of the hardware configuration of each of one or more computers that constitute the roster generation device 1. FIG. [Figure 3] FIG. 10 is a diagram showing a sheet "nurse roster" of a roster generation file according to the first example. [Figure 4] FIG. 10 is a diagram showing a sheet "nurse roster" of a roster generation file according to the first example. [Figure 5] FIG. 5 is a diagram showing a child drawing displayed by the roster generation device 1 in response to pressing the "target number setting" button shown in FIG. 4. [Figure 6] FIG. 10 is a diagram showing the "profile" sheet of the roster generation file according to the first example. [Figure 7] FIG. 10 is a diagram showing the "profile" sheet of the roster generation file according to the first example. [Figure 8] FIG. 5 is a diagram showing a child drawing displayed by the roster generation device 1 in response to pressing the "Next roster" button shown in FIGS. 3 and 4. [Figure 9] FIG. 10 is a diagram showing a sheet "nurse roster" of a roster generation file according to the second example. [Figure 10] FIG. 10 is a diagram showing a sheet "nurse roster" of a roster generation file according to the second example. [Figure 11] FIG. 10 is a diagram showing the "Background" sheet of a roster generation file according to a second example. [Figure 12] FIG. 10 is a diagram showing the "Background" sheet of a roster generation file according to a second example. [Figure 13] FIG. 10 is a diagram showing the sheet "Profile" of the roster generation file according to the second example. [Figure 14] FIG. 10 is a diagram showing the sheet "Profile" of the roster generation file according to the second example. [Figure 15] FIG. 11 is a diagram showing the sheet "Nurse Schedule" of the Schedule Creation File according to the third example. [Figure 16] FIG. 11 is a diagram showing the sheet "Nurse Schedule" of the Schedule Creation File according to the third example. [Figure 17] FIG. 10 is a diagram showing the "Background" sheet of a roster generation file according to the third example. [Figure 18] FIG. 10 is a diagram showing the "Background" sheet of a roster generation file according to the third example. [Figure 19] FIG. 10 is a diagram showing the "profile" sheet of a roster generation file according to the third example. [Figure 20] FIG. 10 is a diagram showing the "profile" sheet of a roster generation file according to the third example. [Figure 21] FIG. 10 is a diagram showing a processing flow of allocation processing that the roster generation device 1 starts to execute. [Figure 22] FIG. 22 is a diagram showing details of the reflection process executed in step S1 of FIG. 21. [Figure 23]FIG. 22 is a diagram showing details of the reflection process executed in step S1 of FIG. 21. [Figure 24] 31. FIG. 31 is a diagram showing details of the update processing executed in step S10 in FIG. 21, step S77 in FIG. 26, step S107 in FIG. 29, and step S133 in FIG. [Figure 25] FIG. 22 is a diagram showing details of the head nurse level allocation process executed in step S3 of FIG. 21. [Figure 26] FIG. 22 is a diagram showing details of the head nurse level allocation process executed in step S3 of FIG. 21. [Figure 27] FIG. 22 is a diagram showing details of the night shift allocation process executed in step S4 of FIG. 21. [Figure 28] FIG. 22 is a diagram showing details of the night shift allocation process executed in step S4 of FIG. 21. [Figure 29] FIG. 22 is a diagram showing details of the night shift allocation process executed in step S4 of FIG. 21. [Figure 30] FIG. 22 is a diagram showing details of the day shift allocation process executed in step S5 of FIG. 21. [Figure 31] FIG. 22 is a diagram showing details of the day shift allocation process executed in step S5 of FIG. 21. [Figure 32] FIG. 10 is a diagram showing the sheet "nurse roster" of the roster generation file according to the fourth example. [Figure 33] FIG. 10 is a diagram showing the sheet "nurse roster" of the roster generation file according to the fourth example. [Figure 34] FIG. 10 is a diagram showing the sheet "Background" of the roster generation file according to the fourth example. [Figure 35] FIG. 10 is a diagram showing the sheet "Background" of the roster generation file according to the fourth example. [Figure 36] FIG. 10 is a diagram showing the "profile" sheet of a roster generation file according to the fourth example. [Figure 37] FIG. 10 is a diagram showing the "profile" sheet of a roster generation file according to the fourth example. DETAILED DESCRIPTION OF THE INVENTION
[0018] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
[0019] 1 is a diagram showing a roster generation device 1 according to this embodiment. A typical example of the roster generation device 1 is a personal computer that can operate independently, such as a laptop computer or desktop computer, and is configured to operate under an operating system such as Windows (registered trademark), MacOS (registered trademark), or Linux (registered trademark).
[0020] 1, the roster generation device 1 can be connected to a printer 3 via a network 2, which can be, for example, an intranet or the Internet. However, the roster generation device 1 and the printer 3 can also be directly connected using a USB cable, wireless LAN, etc. The printer 3 can be used to print the generated nurse roster.
[0021] When the roster generation device 1 is configured using only one personal computer, all of the processes described below are executed within this personal computer. However, it is also possible to configure the roster generation device 1 using multiple computers interconnected via a network 2, in which case the processes described below are executed in a distributed manner by these multiple computers. Each of the multiple computers that make up the roster generation device 1 may be a personal computer or a server computer.
[0022] 2 is a diagram showing an example of the hardware configuration of one or more computers that make up the roster generation device 1. The roster generation device 1 can be configured by one or more computers 100, each having the configuration shown in the figure.
[0023] As shown in FIG. 2, the computer 100 has a configuration in which a CPU (Central Processing Unit) 101, a storage device 102, an input device 103, an output device 104, and a communication device 105 are interconnected via a bus 106.
[0024] The CPU 101 is a device that controls each part of the computer 100 and also reads and executes various programs stored in the storage device 102. The storage device 102 includes a main storage device such as a dynamic random access memory (DRAM) and an auxiliary storage device such as a hard disk drive or a solid state drive, and serves to store the various programs that make up the operating system and various applications of the computer 100, as well as data used by these programs.
[0025] The roster generation device 1 according to this embodiment is configured to generate a nurse roster by having the CPU 101 execute a program (hereinafter referred to as the "roster generation program") contained in a spreadsheet software file (hereinafter referred to as the "roster generation file") stored in the storage device 102. This spreadsheet software is typically Microsoft Excel (registered trademark), but other spreadsheet software may also be used. In the following description, the roster generation file will be assumed to be an Excel (registered trademark) file. If the roster generation file is an Excel (registered trademark) file, the roster generation program will be a program written using Excel (registered trademark) macros.
[0026] The input device 103 is a device that receives input from outside and supplies it to the CPU 101, and is configured to include, for example, a keyboard, a mouse, and a touch panel. The output device 104 is a device that outputs the processing results of the CPU 101 to the outside, and is configured to include, for example, a display and a speaker. The communication device 105 is a device for communicating with external devices including other computers 100 and the printer 3, and sends and receives data according to instructions from the CPU 101.
[0027] 3 to 20 and 32 to 37 are examples of screens displayed on the output device 104 when the CPU 101 of the roster generation device 1 executes the roster generation program. Of these, all but Fig. 5 and Fig. 8 show sheets included in the roster generation file. Furthermore, Fig. 21 is a diagram showing the processing flow of the allocation process that the roster generation device 1 begins to execute when the user presses the "Allocate" button on the "Nurse Roster" sheet, and Figs. 22 to 31 are diagrams showing details of the subroutines executed within this allocation process (reflection processing, update processing, head nurse level allocation processing, night shift allocation processing, and day shift allocation processing). Below, with reference to these figures, the generation of a nurse roster by the roster generation device 1 will be described in detail.
[0028] The roster generation file is configured with at least the "Nurse Roster," "Profile," and "Background" sheets. Of Figures 3 to 20 and 32 to 37, Figures 3, 4, 9, 10, 15, 16, 32, and 33 show examples of the "Nurse Roster" sheet, Figures 6, 7, 13, 14, 19, 20, 36, and 37 show examples of the "Profile" sheet, and Figures 11, 12, 17, 18, 34, and 35 show examples of the "Background" sheet. Note that the "Nurse Roster," "Profile," and "Background" sheets are too large to fit on a single drawing, so they are shown in two separate drawings. Specifically, Figures 3 and 4, 9 and 10, 15 and 16, and 32 and 33 show the left and right sides of a single "Nurse Roster" sheet, respectively. Similarly, Figures 6 and 7, 13 and 14, 19 and 20, and 36 and 37 show the left and right sides of one sheet, "Profile," respectively, and Figures 11 and 12, 17 and 18, and 34 and 35 show the left and right sides of one sheet, "Background," respectively. However, the sheet, "Profile," is partially omitted in the illustration. Figures 5 and 8 are subscreens of the sheet, "Nurse Schedule," that are displayed when the "Set Target Number" button and the "Next Schedule" button included in the sheet, "Nurse Schedule," are pressed, respectively.
[0029] 3 and 4, the "Nurse Roster" sheet shown in these figures is a four-week nurse rosters. As shown in these figures, the "Nurse Roster" sheet is composed of a main table with each nurse's identification information (23 nurses in this case, HN1 and NS1 to NS22) on the front side and each work day at the top of the table, a first sub-table located below the main table, a second sub-table located to the right of the main table, and buttons for "Reflect leave request," "Reset leave request," "Assign," "Next rosters," "Set target number," "Head nurse," "Day shift," "Night shift," "Reset head nurse," "Reset day shift," "Reset night shift," and "Full reset."
[0030] Each cell in the main table of the "Nurse Shift Schedule" sheet serves as a work schedule entry field. The strings entered in the work schedule entry field indicate day shifts, night shifts, night shifts, the day after a night shift, and days off. Leaves include requested days off, mandatory weekly days off allocated the day after two consecutive night shifts, and recommended days off after a dawn shift after all night shifts have been assigned. A blank work schedule entry field indicates that no work is assigned for that day. The first subtable's top row contains rows for "Target Day Shift," "Minimum Number of Persons A (for Target Day Shift)," "Minimum Number of Persons B (for Target Day Shift)," "Target Night Shift," "Minimum Number of Persons A (for Target Night Shift)," "Minimum Number of Persons B (for Target Night Shift)," "Day Shift," "Night Shift," and "Night Shift." The top row of the second subtable contains columns for "Day Shift," "Night Shift," "Night Shift," and "Days Worked."
[0031] 6 and 7, the "Profile" sheet ("Nurse List") contains a list of information about each nurse. It contains the following columns for each nurse: "Name," "Team," "Clinical Ladder," "Day Shift Leader," "Night Shift Leader," "Nurse Acting Management Duties," "Same as Nurse Acting Management Duties," "Day Shift Upper Limit," "Night Shift Upper Limit," "Night Shift Training (Newcomer)," "Night Shift Training Instructor," "Weekend / Holiday Shift Upper Limit," "Leave Lower Limit," "Day Shift Flag," "Night Shift Flag," "Day Shift Sort," "Night Shift Sort," "Work Status Before and After Day Shift," "Work Status Before and After Night Shift," "Night Shift Adjustment Days," "Actual Number of Day Shifts," "Actual Number of Weekend / Holiday Shifts," "Actual Number of Night Shifts," "This Month," and "Difference from Previous Month." While details of the behavior of the roster generation device 1 upon pressing the "Add / Delete Reflect" button are omitted, pressing this "Add / Delete Reflect" button allows the user (usually the nurse acting as a head nurse) to add or delete information about the nurse from the "Profile" sheet.
[0032] Each column from "Name" to "Minimum Absence Limit" indicates the attributes of the corresponding nurse. The "Name" column contains the identification information of each nurse. The "Team" column contains the team to which the nurses belong, if they are divided into multiple teams (in this embodiment, two teams, A and B). The "Clinical Ladder" column contains an index indicating the nurse's skills on a five-point scale from 1 to 5 (5 indicating the highest skill). In each column of "Day Shift Leader," "Night Shift Leader," "Nurse Acting Management Duties," and "Duties Equivalent to Nurse Acting Management Duties," either "y (positive)" or "n (negative)" is entered to indicate whether the nurse can perform the corresponding task. The "Day Shift Limit" column contains the maximum number of day shifts, if there is a special limit. Similarly, the "Night Shift Limit" column contains the maximum number of night shifts. In the "Night shift training (newcomer)" field, enter either "y (affirmative)" or "n (negative)" to indicate whether the nurse is a new nurse who cannot work night shifts without a "Night shift training instructor," and in the "Night shift training instructor" field, enter either "y (affirmative)" or "n (negative)" to indicate whether the nurse can serve as an instructor for the "Night shift training (newcomer)." In the "Weekend / holiday shift limit" field, if there is a special limit on the number of day shifts on weekends and holidays, enter that limit, and in the "Leave minimum" field, enter the minimum number of days of vacation that should be taken during the four-week period listed on the "Nurse Shift Schedule" sheet.
[0033] The columns from "Day Shift Flag" to "Difference from Previous Month" are temporarily used during the allocation process described below, and are updated as appropriate depending on the work allocation situation up to that point. Of these, the "Day Shift Flag" is a column that, during the day shift allocation process (described below) for a certain work day, is filled with "-1" if a day shift has already been allocated to that work day, "0" if the day shift is excluded from allocation based on the work situation before, after, or on the day itself, and "1" in all other cases. Similarly, the "Night Shift Flag" is a column that, during the night shift allocation process (described below) for a certain work day, is filled with "-1" if a night shift has already been allocated to that work day, "0" if the day shift is excluded from allocation based on the work situation before, after, or on the day itself, and "1" in all other cases.
[0034] "Day Shift Sort" is a column into which a weight value, daySortProfile, based on work status and a random number is entered during the day shift allocation process (described below) for a certain work day. As will be described in detail later, the weight value, daySortProfile, is calculated by adding a random number to the sum of the values entered in the "This Month" column and the "Work Status Before and After Day Shift" column (described below). Similarly, "Night Shift Sort" is a column into which a weight value, nightSortProfile, based on work status and a random number is entered during the night shift allocation process (described below) for a certain work day. As will be described in detail later, the weight value, nightSortProfile, is calculated by adding a random number to the sum of the values entered in the "Number of Night Shift Adjustment Days" column and the "Work Status Before and After Night Shift" column (described below). The weight values, daySortProfile and nightSortProfile, are each used to sort the array, Combs(indx,y), described below.
[0035] "Work status before and after day shift" is a field where a value is entered according to the work status before and after a certain work day during the day shift allocation process (described later) for that work day. Specifically, if a day shift is included in that work day, the number of consecutive days of work will exceed five, if the day or the day after that work day is either work (including day shifts and night shifts) or a holiday, or if the two days before that work day was a night shift, the value is "99" (no work), if the three days before that work day was a night shift, the value is "5" (day shifts are strongly recommended to be avoided), if the two days before and the day before that work day were work (including day shifts and night shifts) and a holiday, respectively, or if the two days after and the day after that work day were work (including day shifts), respectively. If the day after the workday was a night shift, if the day before and two days before the workday were both holidays, if the day after the workday and two days after the workday were both holidays, or if the day before and the day after the workday were both holidays, then "-3" (day shifts are strongly recommended) is entered; if the day before and the day after the workday were both work days (including day and night shifts), then "-2" (day shifts are recommended); otherwise, "0" (neutral) is entered. Note that these values are examples, and the actual values to be used will be reviewed as appropriate, taking into account the results of actual operations and the hospital's operational rules. The same applies to "work status before and after night shifts," which will be described later.
[0036] "Work status before and after night shift" is a field where a value is entered according to the work status before and after a certain work day during the execution of the night shift allocation process (described later) for that work day. Specifically, if a night shift is included on that work day, the number of consecutive days of work will exceed five, if the day of that work day or the day after is either work (including day shift and night shift) or a holiday, or if two days after that work day there is work (including day shift and night shift), the value is "99" (no work), if two days before or two days after that work day there is a night shift, or if the day before that work day is a holiday, the value is "5" (night shifts are strongly recommended to be avoided), and if three days before that work day there is a night shift, or If there is work (including day and night shifts) three days after the work day, the answer is "3" (night shifts are recommended to be avoided), if there are holidays both three and four days after the work day, the answer is "1" (night shifts are weakly recommended to be avoided), if there are day shifts for three consecutive days before the work day, if there are holidays two days after the work day, or if there are holidays and work (including day and night shifts) three and four days after the work day, the answer is "-3" (night shifts are strongly recommended), and in all other cases the answer is "0" (neutral).
[0037] The "Night Shift Adjustment Days" field is filled with a value corresponding to the current entry in the nurse roster when the "OK" button in Figure 8 (described later) is pressed. Specifically, the value obtained by subtracting the smallest "Night Shift Adjustment Days" value among nurses whose "Night Shift Adjustment Days" value is 3 or greater from each nurse's "Night Shift Adjustment Days" value is filled in. Furthermore, when the information recorded in the "Nurse roster" is reflected in the "Background" by the reflection process (described later), a value corresponding to the value entered in the "Actual Number of Night Shifts" (described later) is entered in the "Night Shift Adjustment Days" field. Specifically, for nurses who work exclusively on the night shift (nurses whose "Day Shift Upper Limit" is 0), a value obtained by subtracting 1 from 1 / 2 of the value entered in the "Actual Number of Night Shifts" field is entered. For nurses who do not work exclusively on the night shift, the value entered in the "Actual Number of Night Shifts" field is entered. Furthermore, during the night shift allocation process described below, if a new night shift is entered for a nurse who is not exclusively working the night shift, 1 will be added to the "number of night shift adjustment days," and if a new night shift is entered for a nurse who is exclusively working the night shift, 0.5 will be added to the "number of night shift adjustment days."
[0038] "Actual number of day shifts" is a column where the number of day shifts for the current month is entered during the reflection process, head nurse assignment process, and day shift assignment process described below. Similarly, "Actual number of weekend and holiday shifts" is a column where the number of day shifts for the current month on days that fall on weekends and holidays is entered during the reflection process, head nurse assignment process, and day shift assignment process described below. Also, "Actual number of night shifts" is a column where the number of night shifts for the current month is entered during the reflection process and night shift assignment process described below.
[0039] "This month" is a column where an initial value is entered taking into account the previous month's work information through the reflection process described below, and then the number of shifts for the current month is added up during the head nurse assignment process, day shift assignment process, and night shift assignment process. "Previous month difference" is a column where a value is entered according to the current entry in the nurse roster when the "OK" button in Figure 8 described below is pressed. Specifically, a value is entered by subtracting the smallest "this month" value among nurses whose "this month" value is 5 or greater at the time the "OK" button in Figure 8 is pressed from each nurse's "this month" value.
[0040] Figures 3 and 4 show work schedules for four weeks from April 29th to May 26th, 2025. Using Nurse NS3 as an example, she works day shifts for 10 days (April 29th, May 5th, 9th, 14th, 15th, 19th, and 23rd-26th), night shifts for four days (May 1st, 10th, 16th, and 20th), and night shifts for four days (May 2nd, 11th, 17th, and 21st). The remaining days are days off. The "day shift," "night shift," and "night shift dawn" columns in the second subtable reflect the total number of day shifts, night shifts, and night shifts for the corresponding nurse. The "number of working days" in the second subtable also reflects the total number of "day shifts," "night shifts," and "night shift dawn" columns in the first subtable.
[0041] Fig. 5 is a diagram showing a sub-diagram displayed by the roster generation device 1 in response to pressing the "Set target number" button shown in Fig. 4. As shown in Fig. 5, this sub-screen is configured to allow selection of the number of nurses to be assigned to day shifts and the lower limit of the number of nurses belonging to each of Team A and Team B, and the number of nurses to be assigned to night shifts and the lower limit of the number of nurses belonging to each of Team A and Team B, for each day of the week and holiday. When the "OK" button shown in Fig. 5 is pressed, the selections are set to "Target day shift," "Lower limit A number of nurses (for target day shift)," "Lower limit B number of nurses (for target day shift)," "Target night shift," "Lower limit A number of nurses (for target night shift)," and "Lower limit B number of nurses (for target night shift)" in the first sub-table shown in Figs. 3 and 4.
[0042] Figures 6 and 7 reflect the work allocations shown in Figures 3 and 4. Using Nurse NS3 as an example again, the "actual number of day shifts" of 10 corresponds to 10 days of day shifts. The "weekend and holiday shifts" of 4 corresponds to 4 days of work that are weekend and holiday shifts out of the total 10 days of day shifts. The "actual number of night shifts" of 4 corresponds to 4 days of night shifts.
[0043] The "Allocate" button shown in Figure 3 is a button for instructing the start of the process of allocating work to each nurse. When the "Allocate" button is pressed, the roster generation device 1 starts the allocation process shown in Figure 21, which will be described later. The "Next Roster" button is a button for setting a new work day in the roster. The "Head Nurse," "Day Shift," and "Night Shift" buttons are buttons for causing the roster generation device 1 to perform allocation processing only for the corresponding work style. The "Reset Head Nurse," "Reset Day Shift," and "Reset Night Shift" buttons are buttons for resetting work allocation only for the corresponding work style. The "Full Reset" button is a button for resetting all allocated work.
[0044] Figure 8 is a diagram showing a child drawing that the roster generation device 1 displays in response to pressing the "Next Roster" button shown in Figures 3 and 4. As shown in the figure, this child screen is a screen that allows the user to specify the start date of the roster. When the "OK" button is pressed on this child screen, the roster generation device 1 resets the "Nurse Roster" sheet and sets the dates for four weeks from the input start date in the "Nurse Roster" sheet.
[0045] 9 and 10 show the sheet "Nurse Roster" generated by the roster generation device 1 when the user presses the "Next Roster" button, sets the start date to May 27, 2024, and presses the "OK" button in FIG. 8 when the sheet "Nurse Roster" is in the state shown in FIGS. 3 and 4. Also, FIGS. 11 and 12 show the sheet "Background" generated by the roster generation device 1 at the same time as this sheet "Nurse Roster," and FIGS. 13 and 14 show the sheet "Profile" generated by the roster generation device 1 at the same time as this sheet "Nurse Roster." The roster generation device 1 is configured to generate a new sheet "Background" based on the work assignment status before the start date, and to generate a new sheet "Nurse Roster" and sheet "Profile" based on the generated sheet "Background."
[0046] The structure of the "Background" sheet will be explained with reference to Figures 11 and 12. The "Background" sheet is composed of a table with each work day on the front side and the work type at the top of the table. Negative numbers included in the work days on the front side represent dates before the start date. Each cell that makes up the front body of the "Background" sheet, except for the cells that fall under the "Name" box described below, is an identification information entry field where the nurse's identification information is entered.
[0047] As can be seen from the description at the top of the "Background" sheet, the work patterns used in this embodiment include "head nurse," "day shift A," "day shift B," "night shift leader," "night shift A," "night shift B," "night shift Dawn," "vacation," "guan night," "guan Dawn," and "other." There is one box for "head nurse." "Day shift A" is a column for entering identification information for nurses working the "day shift" who belong to Team A, and seven boxes are provided, "Day A1" to "Day A7." Similarly, "day shift B" is a column for entering identification information for nurses working the "day shift" who belong to Team B, and seven boxes are provided, "Day B1" to "Day B7."
[0048] "Night shift leader" is a column for entering the leader of the nurses working the "night shift," and has one slot. "Night shift A" is a column for entering the identification information of nurses working the "night shift" who belong to team A, and has four slots, "Night A1" to "Night A4." Similarly, "Night shift B" is a column for entering the identification information of nurses working the "night shift" who belong to team B, and has four slots, "Night B1" to "Night B4." "Dawn" is a column for entering the identification information of nurses finishing the night shift, and has nine slots, "Dawn 1" to "Dawn 9."
[0049] "Vacation" is a column for entering the identification information of nurses taking vacation, and 20 slots are provided, labeled "Vacation 1" through "Vacation 20." "Vacation" can include weekly leave, paid vacation, summer vacation, special leave for celebrations or condolences, and sick leave. "Vacation" is automatically assigned through the allocation process described below, but can also be set arbitrarily according to the wishes of each nurse. Specifically, the user (usually the head nurse) creates a file (not shown) in advance that summarizes each nurse's vacation wishes, selects it from the "Reference" button shown in Figure 3, and presses the "Reflect Vacation Requests" button shown in Figure 3, thereby setting each nurse's vacation wishes in the "Nurse Work Schedule" sheet.
[0050] "Kan-Yo" refers to work as a manager during the night shift, and "Kan-Ming" refers to the following day. In the allocation process described below, "Kan-Yo" and "Kan-Ming" are not automatically allocated. As will be described in more detail below, the roster generation device 1 is configured to generate the "Nurse Roster" sheet by reflecting the contents of the "Nurse Roster" sheet in the "Background" sheet, then using the "Background" to execute the nurse allocation process, and updating the "Nurse Roster" sheet with the contents of the "Background" sheet generated as a result. When executing the process of reflecting the contents of the "Nurse Roster" sheet in the "Background" sheet, if "Kan-Yo" or "Kan-Ming" is entered in the work type entry field of the "Nurse Roster" sheet, the roster generation device 1 is configured to enter the identification information of the corresponding nurse in the identification information entry field for "Kan-Yo" or "Kan-Ming" on the corresponding work day.
[0051] "Other" is a column for saving any character string that a user (usually a head nurse) manually enters in the work format entry field of the main table of the "Nurse Work Schedule" sheet. Although the right edge of the table is cut off in FIG. 12, the "Nurse Work Schedule" sheet has ten "Other" columns labeled "Other 1" through "Other 10," and ten "Name" columns corresponding to each of these. When executing a process to reflect the contents of the "Nurse Work Schedule" sheet in the "Background" sheet, if a character string other than a specified character string (such as "Day," "Night," "Day," "Guide Night," "Guide Day," or "Day Off") is entered in the work format entry field, the rosters generation device 1 is configured to write the identification information of the corresponding nurse in the identification information entry field for the "Other" column for the corresponding work day and write the entered character string in the corresponding "Name" cell.
[0052] The "Background" sheet shown in FIGS. 11 and 12 reflects the work assignment status from five days before May 27th to one day before. This was entered by the roster generation device 1 based on the "Nurse Roster" sheet shown in FIGS. 3 and 4. According to this "Background" sheet, nurses NS4, NS19, and NS13 worked the "night shift" on May 26th, and therefore May 27th is the "end of the night shift." This is reflected in the "Nurse Roster" sheet as shown in FIG. 9. Although this is not reflected in the "Background" sheet shown in FIGS. 11 and 12, it will be reflected in the reflection process executed in step S1 of FIG. 21, which will be described later. Note that in the "Nurse Roster" sheet in FIG. 9, "Off" is entered in the work type entry column for nurses NS1, NS9, and NS12 on May 27th. This is because the work type of nurses NS1, NS9, and NS12 on May 26th was "end of the night shift."
[0053] The work allocation status from five days before May 27th to one day before is also reflected in the "Profile" sheet shown in Figures 13 and 14. This was also entered by the roster generation device 1 based on the "Nurse Roster" sheet in Figures 3 and 4. When entering this information, the roster generation device 1 calculates the "number of night shift adjustment days" and the "difference from the previous month" as described above, and enters them in the corresponding columns in the "Profile" sheet. This makes it possible to allocate work while taking into account the work allocation status of the previous month in the allocation process described below.
[0054] 15 and 16 show the sheet "Nurse Rota" that is generated by the rota generation device 1 in response to the user pressing the "Allocate" button when the sheet "Nurse Rota" is in the state shown in FIGS. 9 and 10. Also, FIGS. 17 and 18 show the sheet "Background" that the rota generation device 1 generates simultaneously with the sheet "Nurse Rota", and FIGS. 19 and 20 show the sheet "Profile" that the rota generation device 1 generates simultaneously with the sheet "Nurse Rota". As shown in these figures, when the user presses the "Allocate" button, the sheet "Nurse Rota" is generated by the rota generation device 1. The specific processing for this will be described in detail below with reference to the flow charts shown in FIGS. 21 to 31.
[0055] First, referring to Figure 21, when the allocation process is started, the roster generation device 1 first executes a reflection process to reflect the contents of the "Nurse roster" sheet at the time the "Allocate" button is pressed in the "Background" and "Profile" sheets (step S1).
[0056] Figures 22 and 23 are diagrams showing details of the reflection process executed in step S1 of Figure 21. As shown in the figures, after starting the reflection process, the roster generation device 1 clears the contents of the sheet "Background" (step S20), and then performs the processes of steps S22 to S32 for each nurse in the sheet "Profile" in order (step S21).
[0057] More specifically, the roster generation device 1 first assigns the number of working days for the noted nurse that are entered as "day" to the variable countD (step S22), assigns the number of working days for which "day" is entered that fall on Saturdays, Sundays, or holidays to the variable countDHoliday (step S23), assigns the number of working days for which "night" or "night shift" is entered to the variable countN (step S24), and assigns the number of working days for which "day shift" or "day shift" is entered to the variable countEndN (step S25). Next, the roster generation device 1 determines whether the noted nurse is a new employee by referring to "Night shift training (new employee)" on the "Profile" sheet (step S26), and assigns 1 to the variables countN and countEndN only if it is determined that the noted nurse is a new employee (step S27).
[0058] Next, the roster generation device 1 enters the acquired variables countD, countDHoliday, and countN in the "actual number of day shifts," "actual number of weekend and holiday shifts," and "actual number of night shifts" of the noted nurse, respectively (step S28), and enters countD+countN+countEndN in "this month" of the noted nurse (step S29). After that, the roster generation device 1 determines whether the noted nurse is a night shift worker by referring to the "day shift upper limit" on the "profile" sheet (step S30), and if it determines that the noted nurse is a night shift worker, it enters countN / 2-1 in "night shift adjustment days" on the "profile" sheet (step S31), while if it determines that the noted nurse is not a night shift worker, it enters countN in "night shift adjustment days" on the "profile" sheet (step S32).
[0059] After completing the repeated processing of step S21, the roster generation device 1 performs the processing of steps S34 to S43 for each work day (each column) of the sheet "Nurse roster" in order (step S33), as shown in Fig. 23. To explain in more detail, the roster generation device 1 first determines whether a nurse with "y" in the "Nurse Supervisor Management Duties Acting" column in the sheet "Profile" is included in the day shift for the work day of interest, and if it determines that the nurse is included, enters the identification information of that nurse in the "Nurse Supervisor" column for the work day of interest in the sheet "Background" (step S34).
[0060] Next, the roster generation device 1 determines whether a nurse whose "head nurse" column is blank for the target workday and whose "equivalent to head nurse substitute management duties" column is "y" is included in the day shift for the target workday in the sheet "background," and if a positive determination is made, enters the nurse's identification information in the "head nurse" column for the target workday in the sheet "background" (step S35).The roster generation device 1 also determines whether a nurse whose "night shift leader" column is "y" is included in the night shift for the target workday, and if a positive determination is made, enters the nurse's identification information in the "night shift leader" column for the target workday in the sheet "background" (step S36).
[0061] Next, the work schedule generation device 1 enters the identification information of the nurse assigned to "day" on the target work day in the "day shift" column of the corresponding team (step S37), the identification information of the nurse assigned to "night" in the "night shift" column of the corresponding team (step S38), the identification information of the nurse assigned to "day" in the "night / morning" column (step S39), the identification information of the nurse assigned to "day off" in the "vacation" column (step S40), the identification information of the nurse assigned to "night shift" in the "night shift" column (step S41), and the identification information of the nurse assigned to "day shift" in the "day shift" column (step S42). The work schedule generation device 1 further enters the identification information of nurses who are assigned "Other" on the target work day (i.e., nurses who have any string other than "Sun," "Night," "Day," "Off," "Guan Night," or "Guan Light" entered in the corresponding work style entry field) in the "Other" field, and the string entered in the corresponding work style entry field in the corresponding "Name" field (step S43).
[0062] Finally, the roster generation device 1 adds the numerical value entered in the "Difference from Previous Month" column for each nurse on the "Profile" sheet to the numerical value entered in "This Month" (step S44), and ends the reflection process.
[0063] Returning to Figure 21, after completing the reflection process, the roster generation device 1 saves the state of each sheet (step S2) and sequentially executes the head nurse level allocation process (step S3), the night shift allocation process (step S4), and the day shift allocation process (step S5). Details of these processes will be described later, but the head nurse level allocation process is a process for determining the nurse who will act as the head nurse on each work day, the night shift allocation process is a process for determining the nurse who will work the night shift on each work day, and the day shift allocation process is a process for determining the nurse who will work the day shift on each work day.
[0064] After all the processes in steps S3 to S5 are completed, the roster generation device 1 determines whether "incomplete" has been returned in any of the head nurse level allocation process (step S3), the night shift allocation process (step S4), and the day shift allocation process (step S5) (step S6). If the roster generation device 1 determines that "incomplete" has been returned, it determines whether the number of attempts in steps S3 to S5 has exceeded a predetermined value (step S7). If it determines that the number has not exceeded a predetermined value, it returns to step S3 and starts the process over again. On the other hand, if the roster generation device 1 determines that the number has exceeded a predetermined value in step S7, it presents a predetermined selection screen to the user (usually the head nurse) to select "ignore," "cancel," or "retry" (step S8). If "retry" is selected, the roster generation device 1 returns to step S3 and starts the process over again. In this case, it is preferable that the roster generation device 1 resets the number of attempts, which is the subject of determination in step S7, to 0. On the other hand, if "Cancel" is selected, the roster generation device 1 resets the state of each sheet, i.e., returns it to the state saved in step S2 (step S9), and then ends the processing. If "Ignore" is selected, the roster generation device 1 ends the processing without resetting the state of each sheet.
[0065] If the roster generation device 1 determines in step S6 that "incomplete" has not been returned (i.e., "normal completion" has been returned), it executes an update process to update the "nurse roster" sheet based on the contents of the "background" sheet (step S10).
[0066] FIG. 24 shows details of the update process executed in step S10 of FIG. 21. As shown in the figure, the roster generation device 1, which has started the update process, first clears the contents of the "Nurse Roster" sheet (step S50), and then performs steps S52 and S53 for each identification information entry field in the "Background" sheet (step S51). Specifically, the roster generation device 1 determines whether the target identification information entry field is blank (step S52). If it determines that the target identification information entry field is not blank, it enters a character string indicating the work style corresponding to the column of the target identification information entry field in the work style entry field located at the intersection of the row of the "Nurse Roster" sheet corresponding to the identification information entered in the target identification information entry field and the column (work day) of the "Nurse Roster" sheet corresponding to the row of the target identification information entry field (step S53). If it determines in step S52 that the target identification information entry field is blank, the roster generation device 1 does not perform the process of step S53 and moves on to the next identification information entry field. The roster generation device 1 ends the update process when the process of step S51 is completed for all identification information entry fields.
[0067] Returning to Figure 21, after completing the update process in step S10, the roster generation device 1 completes the allocation process. With the processing up to this point, the sheet "Nurse Roster" is completed. Below, the details of the head nurse level allocation process, night shift allocation process, and day shift allocation process executed in steps S3 to S5 of Figure 21 will be explained in order.
[0068] 25 and 26 are diagrams showing details of the head nurse level allocation process executed in step S3 of FIG. 21. The roster generation device 1 first saves the state of each sheet (step S60) and determines whether the number of attempts in steps S64 to S65, described later, has exceeded a predetermined value (step S61). If it is determined that the number has exceeded a predetermined value, a predetermined selection screen is presented to the user (usually the head nurse) to select either "Ignore," "Cancel," or "Retry" (step S62). If "Retry" is selected, the roster generation device 1 returns to step S61 and starts the process over. In this case, it is preferable that the roster generation device 1 resets the number of attempts, which is the determination target of step S61, to 0. On the other hand, if "Cancel" is selected, the roster generation device 1 resets the state of each sheet, i.e., returns it to the state saved in step S60 (step S63), and then terminates the head nurse level allocation process and returns "Incomplete." If "Ignore" is selected, the roster generation device 1 ends the head nurse level allocation process without resetting the status of each sheet, and returns "Incomplete."
[0069] If the roster generation device 1 determines in step S6 that the number of attempts does not exceed the predetermined value, it first resets the state of each sheet (step S64) and then executes steps S66 to S76 for each workday in the "Background" sheet in order (step S65). Note that the reset in step S64 is a process that returns the state of each sheet to the state saved in step S60, and is a process that is required for the second and subsequent attempts. It may be skipped in the first attempt.
[0070] To explain the processing of steps S66 to S76 in more detail, the roster generation device 1 first determines whether a head nurse has not been assigned on the target work day (step S66). If the nurse's identification information has been entered in the "head nurse" column in steps S34 and S35 of Figure 23 by manual input into the "Nurse Roster" sheet before the assignment process begins, the determination in step S66 will be negative. If the roster generation device 1 obtains a negative determination result in step S66, it moves on to the next work day (see Figure 26).
[0071] On the other hand, if the determination result in step S66 is affirmative, the roster generation device 1 counts the work status before and after each nurse and enters it in the "Work status before and after day shift" column of the "Profile" sheet (step S67). The details of the method for determining the value to be entered in the "Work status before and after day shift" column are as described above.
[0072] 26, the roster generation device 1 then determines whether the target workday is a Saturday, Sunday, or holiday (step S68). If the roster generation device 1 determines that the target workday is a Saturday, Sunday, or holiday, it determines the nurses to be excluded from allocation and enters "0" in the "Day Shift Flag" column of the determined excluded nurses in the sheet "Profile" and "1" in the "Day Shift Flag" column of the other nurses (step S69). In this case, the excluded nurses are nurses who cannot perform either "Substitute Nurse Manager Management Duties" or "Duties Equivalent to Substitute Nurse Manager Management Duties" (i.e., nurses who do not have "y" entered in these columns), nurses whose "Work Status Before and After Day Shift" is "99," and nurses whose "Actual Number of Day Shifts" plus twice the "Actual Number of Night Shifts" is equal to or greater than the value obtained by subtracting the "Lower Limit of Days Off" from 28 (the total number of workdays included in the sheet "Nurse Roster"). The roster generation device 1 then determines whether there are any nurses who have not been excluded (step S70), and if it determines that there are no nurses who have not been excluded, it returns to step S61 and starts the process over again.On the other hand, if the roster generation device 1 determines that there are any nurses who have not been excluded, it selects, as a top priority, one nurse who can perform "tasks equivalent to those of acting head nurse management" from among one or more nurses whose "day shift flag" is set to "1" (step S71).
[0073] Here, when step S70 is reached for the first time after the loop of step S65 (loop on workdays) is started, it is preferable for the roster generation device 1 to skip step S70 without executing it. This is because at the time of the first step S70, the state of the roster has not changed compared to before the loop of step S65 was started, so the result will not change no matter how many times it is repeated. This also applies to step S73, which will be described later, step S90 in Figure 27, and step S120 in Figure 30.
[0074] If the roster generation device 1 determines in step S68 that the target work day is neither a Saturday, Sunday, nor a holiday, it determines nurses to be excluded from allocation and enters "0" in the "Day Shift Flag" column of the determined excluded nurses and "1" in the "Day Shift Flag" column of the other nurses in the "Profile" sheet (step S72). This process differs from the process in step S69 in that all nurses who cannot perform "Substitute Nurse Manager Management Duties" (i.e., nurses for whom "y" is not entered in the "Substitute Nurse Manager Management Duties" column) are excluded from allocation, but is otherwise the same as step S69. The roster generation device 1 then determines whether any nurses have not been excluded (step S73). If it determines that no nurses have not been excluded, it returns to step S61 and starts the process over again. On the other hand, if it determines that there are nurses to be excluded, it gives top priority to selecting a nurse who does not belong to a team, i.e., a nurse manager, from among one or more nurses whose "Day Shift Flag" is set to "1" (step S74).
[0075] After selecting one nurse in either step S71 or S74, the roster generation device 1 enters the identification information of the selected nurse in the "head nurse" column for the target work day on the "Background" sheet (step S75).Then, the roster generation device 1 updates the "actual number of day shifts," "this month," and, if the target work day is a public holiday, the "actual number of weekend and holiday shifts" for the selected nurse on the "Profile" sheet by adding 1 to each of these (step S76), and then proceeds to the next work day.
[0076] After completing the processing of steps S66 to S76 for all work days set in the "Background" sheet, the roster generation device 1 executes the update processing described with reference to Figure 24 (step S77), then terminates the head nurse level allocation processing and returns "normal termination."
[0077] 27 to 29 are diagrams showing details of the night shift allocation process executed in step S4 of FIG. 21. The roster generation device 1, which has started the night shift allocation process, first saves the state of each sheet (step S80) and determines whether the number of attempts in steps S84 to S85, described later, has exceeded a predetermined value (step S81). If it determines that the number of attempts has exceeded a predetermined value, a predetermined selection screen is presented to the user (usually the head nurse) to select either "Ignore," "Cancel," or "Retry" (step S82). If "Retry" is selected, the roster generation device 1 returns to step S81 and starts the process over. In this case, it is preferable that the roster generation device 1 resets the number of attempts, which is the determination target of step S81, to 0. On the other hand, if "Cancel" is selected, the roster generation device 1 resets the state of each sheet, i.e., returns it to the state saved in step S80 (step S83), and then terminates the night shift allocation process and returns "Incomplete." If "Ignore" is selected, the roster generation device 1 ends the night shift allocation process without resetting the status of each sheet, and returns "Incomplete."
[0078] If the roster generation device 1 determines in step S81 that the number of attempts does not exceed the predetermined value, it first resets the state of each sheet (step S84) and then executes the processes of steps S86 to S106 for each workday in the "Background" sheet in order (step S85). Note that the reset in step S84 is a process that returns the state of each sheet to the state saved in step S80, and is a process that is required for the second and subsequent attempts. As with step S24 in Figure 25, this may be skipped in the first attempt.
[0079] To explain the processing of steps S86 to S106 in more detail, the roster generation device 1 first performs processing to determine multiple nurses who can work the target work pattern (night shift in this case) on the target work day in steps S86 to S88. Specifically, if there is a nurse who has already been assigned the night shift on the target work day, the roster generation device 1 first enters "-1" in the "Night Shift Flag" of the sheet "Profile" for that nurse (step S86). The roster generation device 1 also counts the work status before and after each nurse and enters it in the "Work Status Before and After Night Shift" column of the sheet "Profile" (step S87). Details of the method for determining the value to be entered in the "Work Status Before and After Night Shift" column are as described above.
[0080] Next, the roster generation device 1 determines who will be excluded from allocation and, in the sheet "Profile," enters "0" in the "Night Shift Flag" of the determined excluded nurse, and enters "1" in the "Night Shift Flag" of nurses whose "Night Shift Flag" has not yet been entered at this point (Step S88). In this case, the excluded nurses are nurses whose "Work Status Before and After Night Shift" is "99," nurses whose "Actual Number of Day Shifts" plus twice the "Actual Number of Night Shifts" is equal to or greater than the value obtained by subtracting the "Lower Limit" from 28 (the total number of work days included in the sheet "Nurse Roster"), and nurses whose "Actual Number of Night Shifts" is equal to or greater than the "Upper Limit." Nurses whose "Night Shift Flag" has been entered as "-1" or "1" through the processing up to this point are nurses who can work the target work style (in this case, a night shift) on the target work day.
[0081] Next, the roster generation device 1 calculates, for each team (including those not belonging to a team), the number of nurses whose "night shift flag" is "-1" (number of nurses already assigned) and the number of nurses whose "night shift flag" is "1" (number of nurses who can be assigned) (step S89), and uses the results to determine whether there are enough nurses to be assigned the night shift on the target work day (step S90). Below, the number of nurses already assigned to Team A will be referred to as nACon, the number of nurses already assigned to Team B will be referred to as nBCon, and the number of nurses already assigned to no team will be referred to as nNCon. Furthermore, the number of nurses already assigned to Team A will be referred to as nACan, the number of nurses already assigned to Team B will be referred to as nBCan, and the number of nurses already assigned to no team will be referred to as nNCan.
[0082] To explain the processing of step S90 in more detail, the roster generation device 1 first calculates the total number of people who have already been assigned and the total number of candidates for each team (including those who do not belong to a team) using each value (such as nACon) calculated in step S89. The roster generation device 1 also obtains from the sheet "Nurse roster" the "Target night shift," "Lower limit A number of people (for target night shift)," and "Lower limit B number of people (for target night shift)" for the target work day listed in the first sub-table. The work schedule generation device 1 determines that there are enough people to be assigned to the night shift on the target work day if the total value nACon+nACan of Team A is equal to or greater than the "lower limit A number of people (for the target night shift)", the total value nBCon+nBCan is equal to or greater than the "lower limit B number of people (for the target night shift)", and the overall total value nACon+nBCon+nNCon+nACan+nBCan+nNCan is equal to or greater than the "target night shift", and otherwise determines that there are not enough people to be assigned to the night shift on the target work day.
[0083] If the roster generation device 1 determines in step S90 that there are not enough staff, it returns to step S81 and starts the process over again. On the other hand, if the roster generation device 1 determines in step S90 that there are enough staff, it calculates the target value targetNo for the number of night shift staff that needs to be decided in this process, as shown in Fig. 28 (step S91). Specifically, the target value targetNo can be determined by subtracting the total number of staff assigned to each team that was calculated in step S89 (nACon+nBCon+nNCon) from the "target night shift" for the target work day listed in the first sub-table of the "nurse roster" sheet.
[0084] If the target value targetNo calculated in step S91 is 0 or less, the roster generation device 1 ends processing for the target work day and moves on to the next work day. This is because a target value targetNo of 0 or less means that a sufficient number of nurses have already been assigned. On the other hand, if the target value targetNo is not 0 or less, the roster generation device 1 calculates the weight value nightSortProfile = "number of night shift adjustment days" + "work status before and after night shift" + random number for each nurse, and enters the obtained weight value nightSortProfile in the "Night shift sort" column of the "Profile" sheet (step S93). Note that the random number is used to obtain different results for each trial, and it is preferable to set it to a value between 0 and 1.
[0085] Next, the roster generation device 1 obtains the array Combs(indx, y) by extracting the targetNo number of nurses from the multiple nurses whose night shift flag is 1 without any duplicates (step S94). The values of the array Combs(indx, y) are the identification information of the nurses, the first variable indx is the serial number of the combination (0 to total number of combinations - 1), and the second variable y is the serial number of the nurse included in the indx-th combination (1 to targetNo). Because the total number of nurses whose night shift flag is 1 is nACan + nBCan + nNCan, the total number of combinations is a value expressed by the binomial coefficient shown in the following equation (1).
[0086]
number
[0087] Next, the roster generation device 1 stores in the array Combs(indx,0) the sum of the weight values nightSortProfile (entered in the "Night Shift Sort" column in step S93) of each nurse making up the corresponding combination (step S95). Then, the roster generation device 1 orders the array Combs(indx,y) based on the array Combs(indx,0) (step S96). Specifically, this ordering may be an ascending sort of the array Combs(indx,0). As a result, the more desirable the combination to allocate (i.e., the smaller the "night shift adjustment days" and the more the "work status before and after night shift" recommends a night shift), the higher the combination will be (i.e., the smaller the indx) in the array Combs(indx,y).
[0088] Thereafter, the roster generation device 1 repeatedly executes the processing of steps S98 to S106 (step S97), while increasing the value of indx by one in ascending order (i.e., processing the array Combs(indx, y) one by one, starting from the combination that was ranked relatively higher by the ordering in step S96).
[0089] The processing up to step S102 among steps S98 to S106 is processing to determine whether the combination of nurses indicated by the target array Combs(indx,y) satisfies the requirements necessary for working in the target work pattern (night shift in this case). Specifically, the roster generation device 1 determines whether the combination indicated by the target array Combs(indx,y) satisfies the minimum number of nurses for each team ("Lower limit A number of nurses (for the target night shift)" and "Lower limit B number of nurses (for the target night shift)" for the target work date listed in the first sub-table of the sheet "Nurse roster") (step S98), whether each team includes someone who can serve as a leader (a nurse whose "Night shift leader" is "y" in the sheet "Profile") (step S99), and whether there is a new recruit (a nurse whose "Night shift leader" is "y" in the sheet "Profile") It is determined in order whether a team that has a nurse with "night shift training (new recruit)" marked "y" in the "Profile" sheet) has a night shift training instructor (a nurse with "night shift training instructor" marked "y" in the "Profile" sheet) (Step S100), whether the average skill of each team (the average of the values entered in the "Clinical Ladder" in the "Profile" sheet) is within a specified range (Step S101), and whether there are cases where there are three consecutive night shifts (i.e., cases where it is "night shift - end of night shift - night shift - end of night shift - night shift - end of night shift") (Step S102).
[0090] If any of steps S98 to S101 result in a negative judgment, and if step S102 results in a positive judgment, the roster generation device 1 moves on to processing the next indx. On the other hand, if all of steps S98 to S101 result in a positive judgment and step S102 results in a negative judgment, the roster generation device 1 determines the group of nurses who make up the combination indicated by the target array Combs(indx, y) as the nurses working the night shift on the target work day, and enters the identification information of each nurse in the night shift column and the end of the night shift column for the next day in the sheet "Background" as shown in Figure 29 (step S103).
[0091] After executing step S103, if there is a nurse who will be working consecutive night shifts in the sequence "night shift - end of night shift - night shift - end of night shift," the roster generation device 1 enters the nurse's identification information in the off column for the day after and the day after that after the second night shift (step S104). The roster generation device 1 also updates the "actual number of night shifts" and "this month" of each nurse who makes up the combination indicated by the target array Combs(indx,y) in the sheet "profile" by adding "1" to these fields (step S105), and also adds "0.5" to the "number of night shift adjustment days" for night shift workers exclusively and "1" to the "number of night shift adjustment days" for non-night shift workers exclusively (step S106). After that, the roster generation device 1 exits the loop of step S97 and proceeds to the next working day.
[0092] In the loop of step S97, if the processing for all indx is completed without performing the processing of steps S103 to S106, the roster generation device 1 returns to step S81 in FIG. 27 and starts the night shift allocation processing again.
[0093] After completing the processing of steps S86 to S106 for all working days set in the "Background" sheet, the roster generation device 1 executes the update processing described with reference to Figure 24 (step S107), then terminates the night shift allocation processing and returns "normal termination".
[0094] Figures 30 and 31 are diagrams showing details of the day shift allocation process executed in step S5 of Figure 21. Note that the day shift allocation process includes many processes similar to the night shift allocation process, so below we will explain the day shift allocation process in detail while omitting explanations that overlap with the night shift allocation process as appropriate.
[0095] The processing of steps S110 to S114 shown in Figure 30 is the same as the processing of steps S80 to S84 described with reference to Figure 27. After executing or skipping the processing of step S114, the roster generation device 1 executes the processing of steps S116 to S132 for each work day in the sheet "background" in order (step S115).
[0096] To explain the processing of steps S116 to S132 in more detail, the roster generation device 1 first performs processing in steps S116 to S118 to determine multiple nurses who can work the target work style (day shift in this case) on the target work day. More specifically, if there is a nurse who has already been assigned day shift on the target work day, the roster generation device 1 first enters "-1" in the "day shift flag" of the "profile" sheet for that nurse (step S116). The roster generation device 1 also counts the work status before and after each nurse and enters this in the "work status before and after night shift" column of the "profile" sheet (step S117). Details of how to determine the value to be entered in the "work status before and after day shift" column are as described above.
[0097] Next, the roster generation device 1 determines nurses to be excluded from allocation, and in the sheet "Profile," it enters "0" in the "Day Shift Flag" of the determined excluded nurses, and enters "1" in the "Night Shift Flag" of nurses whose "Day Shift Flag" has not yet been entered at this point (Step S118). In this case, the excluded nurses are nurses whose "Work Status Before and After Day Shift" is "99," nurses whose "Actual Number of Day Shifts" plus twice the "Actual Number of Night Shifts" is equal to or greater than 28 (the total number of work days included in the sheet "Nurse Roster") minus the "Lower Limit," nurses for whom a "Day Shift Upper Limit" is entered and the "Actual Number of Day Shifts" is equal to or greater than the "Day Shift Upper Limit," and, if the target work day is a Saturday, Sunday, or holiday, nurses for whom a "Weekend / Holiday Shift Upper Limit" is entered and the "Actual Number of Weekend / Holiday Shifts" is equal to or greater than the "Weekend / Holiday Shift Upper Limit." Nurses who have entered "-1" or "1" in the "day shift flag" through the processing up to this point are nurses who can work the target work format (day shift in this case) on the target work day.
[0098] Next, the roster generation device 1 calculates, for each team (including those not belonging to a team), the number of nurses whose "day shift flag" is "-1" (the number of nurses who have already been assigned) and the number of nurses whose "day shift flag" is "1" (the number of nurses who can be assigned) (step S119), and uses the results to determine whether there are enough nurses to be assigned the day shift on the target work day (step S120). Below, the number of nurses whose already been assigned to Team A will be referred to as dACon, the number of nurses whose already been assigned to Team B will be referred to as dBCon, and the number of nurses whose already been assigned to no team will be referred to as dNCon. Also, the number of nurses who can be assigned to Team A will be referred to as dACan, the number of nurses who can be assigned to Team B will be referred to as dBCan, and the number of nurses who can be assigned to no team will be referred to as dNCan.
[0099] The details of the processing in step S120 are the same as in step S90 in Fig. 27. However, here, instead of the "target night shift," "(target night shift) lower limit A number of people," and "(target night shift) lower limit B number of people," for the target workday, the "target day shift," "(target day shift) lower limit A number of people," and "(target day shift) lower limit B number of people" are used.
[0100] If the roster generation device 1 determines in step S120 that there are not enough staff, it returns to step S111 and starts the process over again. On the other hand, if the roster generation device 1 determines in step S120 that there are enough staff, it calculates the target value targetNo for the number of night shift staff that needs to be decided in this process (step S121). Specifically, the target value targetNo can be determined by subtracting the total number of staff assigned to each team that was calculated in step S119 (dACon+dBCon+dNCon) from the "target day shift" for the target work day listed in the first sub-table of the "nurse roster" sheet.
[0101] If the target value targetNo calculated in step S121 is 0 or less, the roster generation device 1 ends processing of the target work day and moves on to the next work day, as in step S92 of Fig. 28. On the other hand, if the target value targetNo is not 0 or less, the roster generation device 1 calculates the weight value daySortProfile = "this month" + "work status before and after day shift" + random number for each nurse, and enters the obtained weight value daySortProfile in the "day shift sort" column of the "profile" sheet (step S123). Note that the random number is preferably a value greater than or equal to 0 and less than 1, as in step S93 of Fig. 28.
[0102] Next, the roster generation device 1 extracts the targetNo number of nurses without overlapping from the multiple nurses whose day shift flag is 1, and obtains the array Combs(indx, y) (step S124), similar to step S94 in Fig. 28. The total number of combinations in this case is a value expressed by the binomial coefficient shown in the following equation (2).
[0103]
number
[0104] Next, the roster generation device 1 stores in the array Combs(indx, 0) the sum of the weight values daySortProfile (entered in the "Day Shift Sort" column in step S123) of each nurse making up the corresponding combination (step S125). The roster generation device 1 then orders the array Combs(indx, y) based on the array Combs(indx, 0) (step S126). This ordering may be an ascending sort of the array Combs(indx, 0), as in step S96 of FIG. 28. As a result, as in step S96 of FIG. 28, the more desirable the combination to allocate (i.e., the smaller the "This Month" and the more the "Work Status Before and After Day Shift" recommends a night shift), the higher the combination will be (i.e., the smaller the indx) in the array Combs(indx, y).
[0105] Thereafter, the roster generation device 1 repeatedly executes the processing of steps S128 to S132 (step S127), while increasing the value of indx by one in ascending order (i.e., processing the array Combs(indx, y) one by one, starting from the combination that is relatively higher in the ordering of step S126).
[0106] The processing up to step S130 among steps S128 to S132 is processing to determine whether the combination of nurses indicated by the target array Combs(indx,y) satisfies the requirements necessary for working in the target work pattern (day shift in this case). Specifically, with respect to the combination indicated by the target array Combs(indx,y), the roster generation device 1 sequentially determines whether the combination indicated by the target array Combs(indx,y) satisfies the minimum number of people for each team (the "Lower limit A number of people (for target day shift)" and the "Lower limit B number of people (for target day shift)" for the target work date listed in the first sub-table of the sheet "Nurse Roster") (step S128), whether each team includes someone who can serve as a leader (a nurse whose "Day shift leader" is "y" in the sheet "Profile") (step S129), and whether the average skill of each team (the average of the values entered in the "Clinical Ladder" of the sheet "Profile") is within a predetermined range (step S130).
[0107] If any of steps S128 to S130 result in a negative judgment, the roster generation device 1 moves on to the next indx. On the other hand, if all of steps S128 to S130 result in a positive judgment, the roster generation device 1 determines the group of nurses who make up the combination indicated by the target array Combs(indx,y) as nurses who will work the day shift on the target work day, and enters the identification information of each nurse in the day shift column of the sheet "Background" (step S131). After executing step S131, the roster generation device 1 further updates the "actual number of day shifts" and "this month" of each nurse who makes up the combination indicated by the target array Combs(indx,y) in the sheet "Profile" by adding "1" to these (step S132). If the target work day is a Saturday, Sunday, or holiday, the roster generation device 1 also updates the "actual number of weekend and holiday shifts" by adding "1" to them (step S132). After that, the roster generation device 1 exits the loop of step S127 and moves on to the next work day.
[0108] In the loop of step S127, if the processing for all indx is completed without performing the processing of steps S131 to S132, the roster generation device 1 returns to step S111 in FIG. 30 and starts the day shift allocation processing again.
[0109] After completing the processing of steps S116 to S132 for all work days set in the "Background" sheet, the roster generation device 1 executes the update processing described with reference to Figure 24 (step S133), then terminates the day shift allocation processing and returns "normal termination."
[0110] 32 and 33 show the "Nurse Roster" sheet generated by the roster generation device 1 when the user enters "Training" in the work style entry field for nurse NS15 for June 6th to 8th and then presses the "Allocate" button when the "Nurse Roster" sheet is in the state shown in FIGS. 9 and 10. Also, FIGS. 34 and 35 show the "Background" sheet generated by the roster generation device 1 simultaneously with this "Nurse Roster" sheet, and FIGS. 36 and 37 show the "Profile" sheet generated by the roster generation device 1 simultaneously with this "Nurse Roster" sheet. As shown in FIG. 35, the character string "Training" entered by the user in the work style entry field of the "Nurse Roster" sheet is entered in the "Other" box for the corresponding work day along with the identification information of the corresponding nurse. This entry is performed by the roster generation device 1 in step S43 of FIG. 23. Furthermore, when determining who will be excluded from allocation for a given work day in steps S69 and S72 of Figure 26, step S88 of Figure 27, and step S118 of Figure 30, a nurse whose identification information is entered in the "Other" box for that work day will be treated as a person who has already been scheduled to work another shift and will be excluded from allocation.
[0111] As explained above, according to the work schedule generation device 1 of this embodiment, multiple combinations are ranked according to weight values based on work status and random numbers, and it is determined whether or not the combinations ranked highest meet the requirements for working in the work style of interest. If a combination is determined to meet the requirements for working in the work style of interest, the group of nurses that make up that combination are determined to be the nurses who will work in the work style of interest on the work day of interest, and processing moves on to the next work day or next work style without making any judgments on the other combinations.As a result, even though all possible combinations are checked in a brute force manner, it is possible to obtain an optimal solution in a shorter time than if ordering were not performed.
[0112] Furthermore, according to the work schedule generation device 1 of this embodiment, the weight value reflects the number of shifts of the nurse in question and the work conditions before and after, so that the nurse with fewer shifts is more likely to be assigned by ordering the combinations, which has the effect of allowing for differences in the number of working days between nurses while achieving a certain degree of equalization, thereby realizing a connection with the shifts before and after that that is closer to the ideal form.
[0113] Furthermore, according to the work schedule generation device 1 of this embodiment, requirement judgment is realized from two perspectives: requirement judgment from an individual perspective to determine who will be excluded from allocation (steps S88, S118), and requirement judgment from a group perspective to determine whether the combination of nurses meets the requirements (steps S98 to S102, S128 to S130), making it possible to respond to more complex requirements.
[0114] Furthermore, with the roster generation device 1 according to this embodiment, nurses who are assigned irregular work schedules on specific days can be excluded from being assigned regular work schedules by entering any character string in the corresponding work schedule entry field in the nurse roster before executing the assignment process. Therefore, with the roster generation device 1 according to this embodiment, it can be said that it is possible to input irregular work schedules into the nurse roster.
[0115] Although the preferred embodiments of the present invention have been described above, the present invention is not limited to these embodiments, and it goes without saying that the present invention can be embodied in various forms without departing from the spirit of the present invention.
[0116] For example, in the above embodiment, the roster generation device 1 that generates a nurse roster was described, but the present invention can be applied to any situation where it is necessary to assign various duties to a large number of people. For example, the present invention can be applied to a wide range of situations, such as the assignment of duties to staff other than nurses working in a hospital, the assignment of duties to staff working at accommodation facilities such as hotels, and the assignment of duties to staff in charge of various tasks at events. [Explanation of symbols]
[0117] 1 Work list generator 2 Network 3. Printer 100 computers 101 CPU 102 Storage device 103 Input Device 104 Output Device 105 Communication equipment Bus 106
Claims
1. Execute an allocation process to allocate one or more nurses to work in one or more work styles for each of a plurality of work days included in a nurse work schedule that includes a work style entry field for each nurse for each of a plurality of work days; The allocation process includes: A first determination step of determining a plurality of nurses who can work in the target work format on the target work date; a second determination step of determining a weight value based on a work status and a random number for each of the plurality of nurses determined in the first determination step; a calculation step of calculating the sum of the weight values of the nurses constituting each combination obtained by extracting the number of nurses who need to work in the target work style on the target work day from the plurality of nurses determined in the first determination step; a sorting step of ordering the plurality of combinations based on the sum of the weight values calculated in the calculation step; a determination step of determining whether or not the combinations ranked relatively higher by the ordering in the sorting step satisfy the requirements necessary for working in the noted work style, In the allocation process, if there is a combination that is determined in the determination step to meet the requirements necessary for working in the target work style, the group of nurses that make up that combination are determined to be the nurses who will work in the target work style on the target work day, and the process moves to the next work day or the next work style without executing the determination step for the other combinations. Work list generator.
2. In the first determination step, the determination is made by regarding a nurse who has an arbitrary character string entered in the work style entry field for the target work day as performing the work indicated by the character string. The roster generation device according to claim 1 .
3. The one or more work styles include working as a head nurse, night shifts, and day shifts; The roster generation device according to claim 1 .
4. The requirements for working in the noted work arrangement include the average skill of a group of nurses constituting the corresponding combination being within a predetermined range. The roster generation device according to claim 1 .
5. 1. A computer-implemented method for generating a roster, comprising: The computer includes a step of executing an allocation process for allocating one or more nurses to work in one or more work styles for each of a plurality of work days included in a nurse roster that includes a work style entry field for each nurse for each of a plurality of work days, The allocation process includes: A first determination step in which the computer determines a plurality of nurses who can work in the target work pattern on the target work date; a second determination step in which the computer determines a weight value based on a work status and a random number for each of the plurality of nurses determined in the first determination step; a calculation step in which the computer calculates the sum of the weight values of the nurses constituting each combination obtained by extracting the number of nurses who are required to work in the target work style on the target work day from the plurality of nurses determined in the first determination step; a sorting step in which the computer orders the plurality of combinations based on the sum of the weight values calculated in the calculation step; a determination step in which the computer determines whether the combinations ranked relatively higher in the ordering of the sorting step satisfy the requirements necessary for working in the noted work style, In the allocation process, if there is a combination that is determined in the determination step to meet the requirements necessary for working in the target work style, the group of nurses that make up that combination are determined to be the nurses who will work in the target work style on the target work day, and the process moves to the next work day or the next work style without executing the determination step for the other combinations. How to generate a work list.
6. In the first determination step, the determination is made by regarding a nurse who has an arbitrary character string entered in the work style entry field for the target work day as performing the work indicated by the character string. The roster generation method according to claim 5 .
7. A program for causing a computer to execute an allocation process for allocating one or more nurses to work in one or more work styles for each of a plurality of work days included in a nurse work schedule that includes a work style entry field for each nurse for each of the plurality of work days, The allocation process includes: A first determination step of determining a plurality of nurses who can work in the target work format on the target work date; a second determination step of determining a weight value based on a work status and a random number for each of the plurality of nurses determined in the first determination step; a calculation step of calculating the sum of the weight values of the nurses constituting each combination obtained by extracting the number of nurses who need to work in the target work style on the target work day from the plurality of nurses determined in the first determination step; a sorting step of ordering the plurality of combinations based on the sum of the weight values calculated in the calculation step; a determination step of determining whether or not the combinations ranked relatively higher by the ordering in the sorting step satisfy the requirements necessary for working in the noted work style, In the allocation process, if there is a combination that is determined in the determination step to meet the requirements necessary for working in the target work style, the group of nurses that make up that combination are determined to be the nurses who will work in the target work style on the target work day, and the process moves to the next work day or the next work style without executing the determination step for the other combinations. program.
8. In the first determination step, the determination is made by regarding a nurse who has an arbitrary character string entered in the work style entry field for the target work day as performing the work indicated by the character string. The program according to claim 7.
Citation Information
Patent Citations
Rearranging device and rearranging program
JP2009244917A
Attendance table creation device, attendance table creation method and program
JP2023124835A
Nurse wopk schedule preparation support software or the like
JP2004151790A