...
This feature will also need to assign employees by classification / tag / class of #### and/or assign group numbers as Personnel on the episodes as they are created.
The SQL script used for this process in JSP is found at: https://drive.google.com/file/d/1jR841mRDrzm9DYRMBps7v9TS6sA-XWIx/view?usp=sharing
...
Required Fields
To create a duplicate patient record, the user must supply the following:
Patient ID (standard patient search box)
Number of Copies to make
A new starting case number for the new patients and their episodes
The system will need to identify the Episodes that will be copied, and once the patient is created, copy those onto the new patients as well.
...
Auto Assign Personnel (Optional)
The SQL query is currently set to assign students based on their groups (in the JSP Temp tables) but since we will be adding these fields directly to the EMPLOYEE tables, we can now add more options to assign personnel.
Based on a range of the employee IDs generated during the EMPLOYEE import process
Based on Class of 20XX column
Based on the Group Number (same as the query, just coming from the Employee table instead)
Based on a matching Tag (string match to tags in the Employee table)
...
Also Add (Optional)
A single additional user can be added to these episodes, if they want to include supervising faculty or another person who will be tasked with monitoring student progress, and this person was not listed on the episodes that are being copied.
...
Copy In Background
The process begins when the user presses the Duplicate Patients button.
The patient that is copied should contain all the episodes, all the client links, etc. All episodes that are copied should contain identical Personnel, Medical Record Groups, and the Billing objects specified in the original episode. The SQL query linked above should contain the details of everything else that needs to be copied, and the order.
...
Success
Display a success message, with a recap of the Case Numbers that were created based on the user input.
...
Error State
If there is an error at any point in the copy process, display what it is here.
Most likely any such error would be caught on the first attempt, such as missing bill party, etc.
...