LevelThought
MIS
Currently, have 2 tables as depicted below.
Ideally, I would like to "automatically" assign accounts for review by employee staff. Upon automatically assigning encounters for review, the date assigned field is populated with today's date and the status field is populated with "open."
MainTable
AcctID--AcctNo--Bal----DtLastPymt---#ofDaysSinceLastPymt--
Z22-----80670---1000---5/5/2006-------5
Z23-----80677---2000---2/2/2006------71
Z23-----80678---5000---12/1/2005----116
Z24-----80680----751---12/2/2005----115
EmpAssignTable
EmpName--AcctID----CurrentOpenProjects--ReviewRank---BalThreshold--DaysSinceLastPymt
Jill---Z22---4-----1-------1000------50
Jill---Z30---4-----2--------500------50
Jill---Z31---2-----3-------1000------60
Joan---Z23---3-----1-------1000-----150
Joan---Z24---4-----2--------750-----100
John---Z44---5-----1--------250-----200
John---Z46---3-----2-------2000-----300
The automatic assigning of encounters to staff for review should be weekly. In other words, at the beginning of the week, the number of projects assigned to a employee and open should not be less than 10. Currently, I assign manually-one account at a time using a form.
In the example above, Jill has 10 open projects and would not be assigned any new projects.
However, Joan only has 7 projects and therefore, need 3 additional projects assigned to her. So, the logic would be that according to the column titled "Review rank," accounts with an account id of "Z23" would be assigned first, then accounts with a account id of "Z24" would be assigned to Joan. Further, due to Joan's balance threshold (as displayed above in EmpAssignTable), she
should only review accounts on account id "Z23" that have a balance greater than or equal to $1000 and where there has not been a payment received within 150 days (See
DaysSinceLastPymtThreshold "150").
I think I can perform the assigment of accounts using an update query similar to "update MainTable, set AssignedTo equal to "Joan" where Sum(CurrentOpenProjects) is less than 10" and balance is greater than or equal to "1000." But, I want to automate the process because there
are over 50,000 accounts and each day, over 1000 accounts are appended to the Main Table.
My initial thought is that this would have to be a update query combined with several if statements within a CASE statement or maybe ADO coding with a counter?? Is this even feasible?
If so, any suggestions as to how I can accomplish? Thanks in advance!
Ideally, I would like to "automatically" assign accounts for review by employee staff. Upon automatically assigning encounters for review, the date assigned field is populated with today's date and the status field is populated with "open."
MainTable
AcctID--AcctNo--Bal----DtLastPymt---#ofDaysSinceLastPymt--
Z22-----80670---1000---5/5/2006-------5
Z23-----80677---2000---2/2/2006------71
Z23-----80678---5000---12/1/2005----116
Z24-----80680----751---12/2/2005----115
EmpAssignTable
EmpName--AcctID----CurrentOpenProjects--ReviewRank---BalThreshold--DaysSinceLastPymt
Jill---Z22---4-----1-------1000------50
Jill---Z30---4-----2--------500------50
Jill---Z31---2-----3-------1000------60
Joan---Z23---3-----1-------1000-----150
Joan---Z24---4-----2--------750-----100
John---Z44---5-----1--------250-----200
John---Z46---3-----2-------2000-----300
The automatic assigning of encounters to staff for review should be weekly. In other words, at the beginning of the week, the number of projects assigned to a employee and open should not be less than 10. Currently, I assign manually-one account at a time using a form.
In the example above, Jill has 10 open projects and would not be assigned any new projects.
However, Joan only has 7 projects and therefore, need 3 additional projects assigned to her. So, the logic would be that according to the column titled "Review rank," accounts with an account id of "Z23" would be assigned first, then accounts with a account id of "Z24" would be assigned to Joan. Further, due to Joan's balance threshold (as displayed above in EmpAssignTable), she
should only review accounts on account id "Z23" that have a balance greater than or equal to $1000 and where there has not been a payment received within 150 days (See
DaysSinceLastPymtThreshold "150").
I think I can perform the assigment of accounts using an update query similar to "update MainTable, set AssignedTo equal to "Joan" where Sum(CurrentOpenProjects) is less than 10" and balance is greater than or equal to "1000." But, I want to automate the process because there
are over 50,000 accounts and each day, over 1000 accounts are appended to the Main Table.
My initial thought is that this would have to be a update query combined with several if statements within a CASE statement or maybe ADO coding with a counter?? Is this even feasible?
If so, any suggestions as to how I can accomplish? Thanks in advance!