
Right now, the automated-quadrant code is limited to one such procedure. If you want a two four-quad procedures, it begins duplicating UR on the second procedure.
The following simple patch against the current head should* change this behavior to allow multiple procedures by starting over after the last quad.
I say should*, because I haven't tested it yet (my toolchain isn't setup yet). This post is mainly here so I can get all the community etiquette straight first, since I couldn't find a contribution guidelines document or something similar (e.g. patch format - i used "diff -up"... where patches should be placed... etc).
Code: Select all
--- ContrChart.cs.original 2010-07-02 19:47:15.997000000 -0700
+++ ContrChart.cs 2010-07-02 19:52:12.950125000 -0700
@@ -4995,14 +4995,13 @@ namespace OpenDental{
continue;//only entered if n=0, so they don't get entered more than once.
}
else if(tArea==TreatmentArea.Quad){
- // switch(quadCount){
+ // switch(quadCount++){
// case 0: Procedures.Cur.Surf="UR"; break;
// case 1: Procedures.Cur.Surf="UL"; break;
// case 2: Procedures.Cur.Surf="LL"; break;
// case 3: Procedures.Cur.Surf="LR"; break;
- // default: Procedures.Cur.Surf="UR"; break;//this could happen.
+ // default: Procedures.Cur.Surf="UR"; quadCount=1; break;//this could happen.
// }
- // quadCount++;
// AddQuick();
//Procedures.Cur=ProcCur;
AddProcedure(ProcCur);
@@ -5229,14 +5228,13 @@ namespace OpenDental{
continue;//only entered if n=0, so they don't get entered more than once.
}
else if(tArea==TreatmentArea.Quad){
- switch(quadCount){
+ switch(quadCount++){
case 0: ProcCur.Surf="UR"; break;
case 1: ProcCur.Surf="UL"; break;
case 2: ProcCur.Surf="LL"; break;
case 3: ProcCur.Surf="LR"; break;
- default: ProcCur.Surf="UR"; break;//this could happen.
+ default: ProcCur.Surf="UR"; quadCount=1; break;//this could happen.
}
- quadCount++;
AddQuick(ProcCur);
}
else if(tArea==TreatmentArea.Surf){
@@ -5326,14 +5324,13 @@ namespace OpenDental{
continue;//only entered if n=0, so they don't get entered more than once.
}
else if(tArea==TreatmentArea.Quad){
- switch(quadCount){
+ switch(quadCount++){
case 0: ProcCur.Surf="UR"; break;
case 1: ProcCur.Surf="UL"; break;
case 2: ProcCur.Surf="LL"; break;
case 3: ProcCur.Surf="LR"; break;
- default: ProcCur.Surf="UR"; break;//this could happen.
+ default: ProcCur.Surf="UR"; quadCount=1; break;//this could happen.
}
- quadCount++;
AddQuick(ProcCur);
}
else if(tArea==TreatmentArea.Surf){
@@ -5467,14 +5464,13 @@ namespace OpenDental{
continue;//only entered if n=0, so they don't get entered more than once.
}
else if(tArea==TreatmentArea.Quad) {
- switch(quadCount) {
+ switch(quadCount++) {
case 0: ProcCur.Surf="UR"; break;
case 1: ProcCur.Surf="UL"; break;
case 2: ProcCur.Surf="LL"; break;
case 3: ProcCur.Surf="LR"; break;
- default: ProcCur.Surf="UR"; break;//this could happen.
+ default: ProcCur.Surf="UR"; quadCount=1; break;//this could happen.
}
- quadCount++;
AddQuick(ProcCur);
}
else if(tArea==TreatmentArea.Surf) {