P
pietlinden
I have a database that works fine... I was just trying to make it a
bit more intuitive to use.
Basic structure:
CaseManager---(1,M)---Caseworker---(1,M)---Case---(1,M)---Paperwork
Rules:
Each caseworker may have no more than 10 open cases at a time.
Opening a new case "spawns" a series of due dates for paperwork (based
on a couple of dates. Joint Visit Date and Admit Date... these work
already).
Closing a case requires the scheduling of another joint visit and some
specialized paperwork.
Transferring a case to another social worker may only be allocated to
a caseworker with fewer than 10 cases (like original assignment).
Assigning a new case - get the caseworker with the fewest open cases
and in case of a tie, the first one with the oldest last case
assignment.
So I was thinking of something like:
iMAXCASES = 10 (just a named constant so that I can set the max # of
cases to determine if a social worker can accept another case).
clsSocialWorker
..FirstName
..LastName
..Caseload (a number)
..LastCaseAssignment(a date)
openCases (collection?)
clsCase
..OpenDate
..AssignedToSocialWorker
Methods:
OpenCase (create paperwork) '--once a case is opened, you can't reopen
it unless it's closed first...
ExtendCase(create paperwork) '--only applies to open cases
CloseCase (create paperwork) '--only applies to open cases
TransferCase (can only assign to SW with less than iMAXCASES)
"Paperwork" would be a collection "belonging to" clsCase.
Is this a sane approach or just a waste of time? (well, other than
learning to use classes...) The screwy logic it would encapsulate are
scheduling rules and assign/deassignment rules for new/transferred
cases. And then I could just encapsulate all the rules there.
Useful non-public properties...
..CaseLoad (just get a count from the DB of open cases, so use a totals
query and loop through the records?)
LastAssignDate (from another query).
It's not nearly as complicated as Albert's sample from the Rides
(http://members.shaw.ca/AlbertKallal/Articles/WhyClass.html)
application, but it's a manageable database that I could at least
learn this on... any ideas?
Thanks,
Pieter
bit more intuitive to use.
Basic structure:
CaseManager---(1,M)---Caseworker---(1,M)---Case---(1,M)---Paperwork
Rules:
Each caseworker may have no more than 10 open cases at a time.
Opening a new case "spawns" a series of due dates for paperwork (based
on a couple of dates. Joint Visit Date and Admit Date... these work
already).
Closing a case requires the scheduling of another joint visit and some
specialized paperwork.
Transferring a case to another social worker may only be allocated to
a caseworker with fewer than 10 cases (like original assignment).
Assigning a new case - get the caseworker with the fewest open cases
and in case of a tie, the first one with the oldest last case
assignment.
So I was thinking of something like:
iMAXCASES = 10 (just a named constant so that I can set the max # of
cases to determine if a social worker can accept another case).
clsSocialWorker
..FirstName
..LastName
..Caseload (a number)
..LastCaseAssignment(a date)
openCases (collection?)
clsCase
..OpenDate
..AssignedToSocialWorker
Methods:
OpenCase (create paperwork) '--once a case is opened, you can't reopen
it unless it's closed first...
ExtendCase(create paperwork) '--only applies to open cases
CloseCase (create paperwork) '--only applies to open cases
TransferCase (can only assign to SW with less than iMAXCASES)
"Paperwork" would be a collection "belonging to" clsCase.
Is this a sane approach or just a waste of time? (well, other than
learning to use classes...) The screwy logic it would encapsulate are
scheduling rules and assign/deassignment rules for new/transferred
cases. And then I could just encapsulate all the rules there.
Useful non-public properties...
..CaseLoad (just get a count from the DB of open cases, so use a totals
query and loop through the records?)
LastAssignDate (from another query).
It's not nearly as complicated as Albert's sample from the Rides
(http://members.shaw.ca/AlbertKallal/Articles/WhyClass.html)
application, but it's a manageable database that I could at least
learn this on... any ideas?
Thanks,
Pieter