Deleting completed procedures vs. TP
Posted: Thu Dec 04, 2008 6:14 am
Not sure how to do this yet, but floating it here to see if it's even acceptable. Right now, treatment plan procedures are retained in the database after deletion and status marked "D." A lot of extra TP procedures get created, whether in various TP's or just by using "schedule recall" or deleting appointments without deleting associated TP items attached to them. Not only does it clutter up the database with a lot of deletions, but I don't see how you can distinguish these from deletions of actual completed procedures, unless the provider entered some notes. How about just deleting the TP items out of the database altogether, and only retaining deleted complete procedures? The setting of procstatus to "D" could be conditioned on whether the procstatus is "C", and the procedure deleted otherwise. Current code in Data Interface\Procedures.cs is below:
//set the procedure deleted-----------------------------------------------------------------------------------------
command="UPDATE procedurelog SET ProcStatus = "+POut.PInt((int)ProcStat.D)+", "
+"AptNum=0, "
+"PlannedAptNum=0 "
+"WHERE ProcNum = '"+POut.PInt(procNum)+"'";
General.NonQ(command);
//set the procedure deleted-----------------------------------------------------------------------------------------
command="UPDATE procedurelog SET ProcStatus = "+POut.PInt((int)ProcStat.D)+", "
+"AptNum=0, "
+"PlannedAptNum=0 "
+"WHERE ProcNum = '"+POut.PInt(procNum)+"'";
General.NonQ(command);