예제 #1
0
        private void FillGridServices()
        {
            _listServices = ResellerServices.GetServicesForReseller(_resellerCur.ResellerNum);
            gridServices.BeginUpdate();
            gridServices.ListGridColumns.Clear();
            GridColumn col = new GridColumn("Description", 180);

            gridServices.ListGridColumns.Add(col);
            col           = new GridColumn("Fee", 0);
            col.TextAlign = HorizontalAlignment.Right;
            gridServices.ListGridColumns.Add(col);
            gridServices.ListGridRows.Clear();
            GridRow row;

            for (int i = 0; i < _listServices.Count; i++)
            {
                row = new GridRow();
                row.Cells.Add(ProcedureCodes.GetLaymanTerm(_listServices[i].CodeNum));
                row.Cells.Add(_listServices[i].Fee.ToString("F"));
                gridServices.ListGridRows.Add(row);
            }
            gridServices.EndUpdate();
            //The Available Services grid has changed, re-evaluate the bundle requirement label visibility.
            labelBundleRequired.Visible = IsBundleMissing();
        }
예제 #2
0
 private void FillProcs()
 {
     listProcs.Items.Clear();
     foreach (string procStr in _listCCProcs)
     {
         listProcs.Items.Add(procStr + "- " + ProcedureCodes.GetLaymanTerm(ProcedureCodes.GetProcCode(procStr).CodeNum));
     }
 }
예제 #3
0
 private void FormResellerServiceEdit_Load(object sender, EventArgs e)
 {
     if (!IsNew)
     {
         textCode.Text = ProcedureCodes.GetStringProcCode(ResellerServiceCur.CodeNum);
         textDesc.Text = ProcedureCodes.GetLaymanTerm(ResellerServiceCur.CodeNum);
         textFee.Text  = ResellerServiceCur.Fee.ToString("F");
     }
 }
예제 #4
0
 private void FillProcs()
 {
     listProcs.Items.Clear();
     if (String.IsNullOrEmpty(CreditCardCur.Procedures))
     {
         return;
     }
     string[] arrayProcCodes = CreditCardCur.Procedures.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
     for (int i = 0; i < arrayProcCodes.Length; i++)
     {
         listProcs.Items.Add(arrayProcCodes[i] + "- " + ProcedureCodes.GetLaymanTerm(ProcedureCodes.GetProcCode(arrayProcCodes[i]).CodeNum));
     }
 }
예제 #5
0
        private void butPick_Click(object sender, EventArgs e)
        {
            FormProcCodes FormPC = new FormProcCodes();

            FormPC.IsSelectionMode = true;
            FormPC.ShowDialog();
            if (FormPC.DialogResult == DialogResult.OK)
            {
                ResellerServiceCur.CodeNum = FormPC.SelectedCodeNum;
                textCode.Text = ProcedureCodes.GetStringProcCode(ResellerServiceCur.CodeNum);
                textDesc.Text = ProcedureCodes.GetLaymanTerm(ResellerServiceCur.CodeNum);
            }
        }
예제 #6
0
        private void FillTriggers()
        {
            listTriggers.Items.Clear();
            if (TriggerList.Count == 0)
            {
                return;
            }
            string str;

            for (int i = 0; i < TriggerList.Count; i++)
            {
                str  = ProcedureCodes.GetStringProcCode(TriggerList[i].CodeNum);
                str += "- " + ProcedureCodes.GetLaymanTerm(TriggerList[i].CodeNum);
                listTriggers.Items.Add(str);
            }
        }
예제 #7
0
        private void FillTriggers()
        {
            listTriggers.Items.Clear();
            if (TriggerList.Count == 0 || comboSpecial.SelectedIndex == 2)         //child prophy special type has no triggers, triggers from Prophy type are used
            {
                return;
            }
            string str;

            for (int i = 0; i < TriggerList.Count; i++)
            {
                str  = ProcedureCodes.GetStringProcCode(TriggerList[i].CodeNum);
                str += "- " + ProcedureCodes.GetLaymanTerm(TriggerList[i].CodeNum);
                listTriggers.Items.Add(str);
            }
        }
예제 #8
0
        private void FillProcs()
        {
            listProcs.Items.Clear();
            if (RecallTypeCur.Procedures == null || RecallTypeCur.Procedures == "")
            {
                return;
            }
            string[] strArray = RecallTypeCur.Procedures.Split(',');
            string   str;

            for (int i = 0; i < strArray.Length; i++)
            {
                str  = strArray[i];
                str += "- " + ProcedureCodes.GetLaymanTerm(ProcedureCodes.GetProcCode(str).CodeNum);
                listProcs.Items.Add(str);
            }
        }
예제 #9
0
        private void FillGridServices()
        {
            ListServices = ResellerServices.GetServicesForReseller(ResellerCur.ResellerNum);
            gridServices.BeginUpdate();
            gridServices.Columns.Clear();
            ODGridColumn col = new ODGridColumn("Description", 180);

            gridServices.Columns.Add(col);
            col           = new ODGridColumn("Fee", 0);
            col.TextAlign = HorizontalAlignment.Right;
            gridServices.Columns.Add(col);
            gridServices.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < ListServices.Count; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(ProcedureCodes.GetLaymanTerm(ListServices[i].CodeNum));
                row.Cells.Add(ListServices[i].Fee.ToString("F"));
                gridServices.Rows.Add(row);
            }
            gridServices.EndUpdate();
        }
예제 #10
0
        private void FillGrid()
        {
            if (textDateTo.errorProvider1.GetError(textDateTo) != "" || textDateFrom.errorProvider1.GetError(textDateFrom) != "")               //Test To and From dates
            {
                MsgBox.Show(this, "Please enter valid To and From dates.");
                return;
            }
            DateFrom = PIn.Date(textDateFrom.Text);
            DateTo   = PIn.Date(textDateTo.Text);
            if (DateTo < DateFrom)
            {
                MsgBox.Show(this, "Date To cannot be before Date From.");
                return;
            }
//todo: checkbox
            RefAttachList = RefAttaches.RefreshForReferralProcTrack(DateFrom, DateTo, checkComplete.Checked);
            Table         = Procedures.GetReferred(DateFrom, DateTo, checkComplete.Checked);
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col;

            col = new ODGridColumn(Lan.g(this, "Patient"), 125);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Referred To"), 125);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Description"), 125);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Note"), 125);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Date Referred"), 86);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Date Done"), 86);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Status"), 84);
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            ODGridRow row;
            DateTime  date;

            for (int i = 0; i < Table.Rows.Count; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(Patients.GetPat(PIn.Long(Table.Rows[i]["PatNum"].ToString())).GetNameLF());
                row.Cells.Add(Table.Rows[i]["LName"].ToString() + ", " + Table.Rows[i]["FName"].ToString() + " " + Table.Rows[i]["MName"].ToString());
                row.Cells.Add(ProcedureCodes.GetLaymanTerm(PIn.Long(Table.Rows[i]["CodeNum"].ToString())));
                row.Cells.Add(Table.Rows[i]["Note"].ToString());
                date = PIn.Date(Table.Rows[i]["RefDate"].ToString());
                if (date.Year < 1880)
                {
                    row.Cells.Add("");
                }
                else
                {
                    row.Cells.Add(date.ToShortDateString());
                }
                date = PIn.Date(Table.Rows[i]["DateProcComplete"].ToString());
                if (date.Year < 1880)
                {
                    row.Cells.Add("");
                }
                else
                {
                    row.Cells.Add(date.ToShortDateString());
                }
                ReferralToStatus refStatus = (ReferralToStatus)PIn.Int(Table.Rows[i]["RefToStatus"].ToString());
                if (refStatus == ReferralToStatus.None)
                {
                    row.Cells.Add("");
                }
                else
                {
                    row.Cells.Add(refStatus.ToString());
                }
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
        }
예제 #11
0
        ///<summary>Both grid s should be filled with the same columns. This method prevents the need for two nearly identical fill grid patterns.</summary>
        private void FillGrid(ref ODGrid grid)
        {
            grid.BeginUpdate();
            grid.Columns.Clear();
            grid.Columns.Add(new ODGridColumn(Lan.g(this, "Status"), 40));
            grid.Columns.Add(new ODGridColumn(Lan.g(this, "Tth"), 30));
            grid.Columns.Add(new ODGridColumn(Lan.g(this, "Surf"), 40));
            grid.Columns.Add(new ODGridColumn(Lan.g(this, "Code"), 40));
            grid.Columns.Add(new ODGridColumn(Lan.g(this, "Description"), 195));
            grid.Columns.Add(new ODGridColumn(Lan.g(this, "TPs"), 35));
            grid.Columns.Add(new ODGridColumn(Lan.g(this, "Apt"), 40));
            grid.Rows.Clear();
            ODGridRow        row;
            List <Procedure> listProcs;

            if (grid == gridAll)
            {
                listProcs = _listTpProcsAll.FindAll(x => _listTpProcsCur.All(y => x.ProcNum != y.ProcNum)).OrderBy(x => Tooth.ToInt(x.ToothNum)).ToList();
            }
            else
            {
                listProcs = _listTpProcsCur.OrderBy(x => Tooth.ToInt(x.ToothNum)).ToList();
            }
            foreach (Procedure proc in listProcs)
            {
                row = new ODGridRow();
                ProcedureCode proccode = ProcedureCodes.GetProcCode(proc.CodeNum);
                row.Cells.Add(proc.ProcStatus.ToString());
                row.Cells.Add(Tooth.ToInternat(proc.ToothNum));
                row.Cells.Add(proc.Surf);
                row.Cells.Add(proccode.ProcCode);
                row.Cells.Add(ProcedureCodes.GetLaymanTerm(proc.CodeNum));
                row.Cells.Add(_listTpAttachesAll.FindAll(x => x.ProcNum == proc.ProcNum && x.TreatPlanNum != _treatPlanUnassigned.TreatPlanNum).Count.ToString());
                string aptStatus = "";
                foreach (long aptNum in new[] { proc.AptNum, proc.PlannedAptNum }.Where(x => x > 0))
                {
                    Appointment apt = _listAppointments.FirstOrDefault(x => x.AptNum == aptNum);
                    if (apt != null)
                    {
                        switch (apt.AptStatus)
                        {
                        case ApptStatus.UnschedList:
                            aptStatus += "U";
                            break;

                        case ApptStatus.Scheduled:
                            aptStatus += "S";
                            break;

                        case ApptStatus.Complete:
                            aptStatus += "C";
                            break;

                        case ApptStatus.Broken:
                            aptStatus += "B";
                            break;

                        case ApptStatus.Planned:
                            aptStatus += "P";
                            break;

                        case ApptStatus.PtNote:
                        case ApptStatus.PtNoteCompleted:
                        case ApptStatus.None:
                        default:
                            aptStatus += "!";                                   //should never happen
                            break;
                        }
                    }
                }
                row.Cells.Add(aptStatus);
                row.Tag = proc;
                grid.Rows.Add(row);
            }
            grid.EndUpdate();
        }
예제 #12
0
        public static string GetChanges(Procedure procCur, Procedure procOld, OrionProc orionProcCur, OrionProc orionProcOld)
        {
            Changes = "";
            if (orionProcOld.DPC != orionProcCur.DPC)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "DPC changed from " + POut.String(orionProcOld.DPC.ToString()) + " to " + POut.String(orionProcCur.DPC.ToString()) + ".";
            }
            if (orionProcOld.DPCpost != orionProcCur.DPCpost)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "DPC Post Visit changed from " + POut.String(orionProcOld.DPCpost.ToString()) + " to " + POut.String(orionProcCur.DPCpost.ToString()) + ".";
            }
            //PatNum, AptNum, PlannedAptNum should never change---------------------------------------------------------------------------------------------
            if (procOld.PatNum != procCur.PatNum)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Patient Num changed from " + procOld.PatNum + " to " + procCur.PatNum + ".";
            }
            if (procOld.AptNum != procCur.AptNum)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Apt Num changed from " + procOld.AptNum + " to " + procCur.AptNum + ".";
            }
            if (procOld.PlannedAptNum != procCur.PlannedAptNum)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Planned Apt Num changed from " + procOld.PlannedAptNum + " to " + procCur.PlannedAptNum + ".";
            }
            //Date and time related fields------------------------------------------------------------------------------------------------------------------
            if (procOld.DateEntryC.Date != procCur.DateEntryC.Date)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Date Entry changed from " + procOld.DateEntryC.ToShortDateString() + " to " + procCur.DateEntryC.ToShortDateString() + ".";
            }
            if (procOld.ProcDate.Date != procCur.ProcDate.Date)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Proc Date changed from " + procOld.ProcDate.ToShortDateString() + " to " + procCur.ProcDate.ToShortDateString() + ".";
            }
            //if(procOld.StartTime != procCur.StartTime) {
            //  if(Changes!=""){ Changes+="\r\n";}
            //  Changes+="Start Time changed from "+procOld.StartTime+" to "+procCur.StartTime+".";
            //}
            //if(procOld.StopTime != procCur.StopTime) {
            //  if(Changes!=""){ Changes+="\r\n";}
            //  Changes+="Stop Time changed from "+procOld.StopTime+" to "+procCur.StopTime+".";
            //}
            if (procOld.ProcTime != procCur.ProcTime)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Procedure Time changed from "
                           + (PIn.DateT(procOld.ProcTime.ToString()).ToShortTimeString() == "12:00 AM"?"none":PIn.DateT(procOld.ProcTime.ToString()).ToShortTimeString())
                           + " to " + (PIn.DateT(procCur.ProcTime.ToString()).ToShortTimeString() == "12:00 AM"?"none":PIn.DateT(procCur.ProcTime.ToString()).ToShortTimeString()) + ".";
            }
            if (procOld.ProcTimeEnd != procCur.ProcTimeEnd)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Procedure End Time changed from "
                           + (PIn.DateT(procOld.ProcTimeEnd.ToString()).ToShortTimeString() == "12:00 AM"?"none":PIn.DateT(procOld.ProcTimeEnd.ToString()).ToShortTimeString())
                           + " to " + (PIn.DateT(procCur.ProcTimeEnd.ToString()).ToShortTimeString() == "12:00 AM"?"none":PIn.DateT(procCur.ProcTimeEnd.ToString()).ToShortTimeString()) + ".";
            }
            //Procedure, related areas, amount, hide graphics, etc.-----------------------------------------------------------------------------------------
            if (procOld.CodeNum != procCur.CodeNum)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Procedure changed from " + ProcedureCodes.GetLaymanTerm(procOld.CodeNum) + " to " + ProcedureCodes.GetLaymanTerm(procCur.CodeNum) + ".";
            }
            if (procOld.ProcFee != procCur.ProcFee)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Proc Fee changed from $" + procOld.ProcFee.ToString("F") + " to $" + procCur.ProcFee.ToString("F") + ".";
            }
            if (procOld.ToothNum != procCur.ToothNum)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Tooth Num changed from " + procOld.ToothNum + " to " + procCur.ToothNum + ".";
            }
            if (procOld.Surf != procCur.Surf)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Surface changed from " + procOld.Surf + " to " + procCur.Surf + ".";
            }
            if (procOld.ToothRange != procCur.ToothRange)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Tooth Range changed from " + procOld.ToothRange + " to " + procCur.ToothRange + ".";
            }
            if (procOld.HideGraphics != procCur.HideGraphics)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Hide Graphics changed from " + (procOld.HideGraphics?"Hide Graphics":"Do Not Hide Graphics")
                           + " to " + (procCur.HideGraphics?"Hide Graphics":"Do Not Hide Graphics") + ".";
            }
            //Provider, Diagnosis, Priority, Place of Service, Clinic, Site---------------------------------------------------------------------------------
            if (procOld.ProvNum != procCur.ProvNum)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Provider changed from " + Providers.GetAbbr(procOld.ProvNum) + " to " + Providers.GetAbbr(procCur.ProvNum) + ".";
            }
            if (procOld.Dx != procCur.Dx)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Diagnosis changed from " + Defs.GetDef(DefCat.Diagnosis, procOld.Dx).ItemName
                           + " to " + Defs.GetDef(DefCat.Diagnosis, procCur.Dx).ItemName + ".";
            }
            if (procOld.Priority != procCur.Priority)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Priority changed from " + ((procOld.Priority != 0)?Defs.GetDef(DefCat.TxPriorities, procOld.Priority).ItemName:"no priority")
                           + " to " + ((procCur.Priority != 0)?Defs.GetDef(DefCat.TxPriorities, procCur.Priority).ItemName:"no priority") + ".";
            }
            if (procOld.PlaceService != procCur.PlaceService)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Place of Service changed from " + procOld.PlaceService.ToString() + " to " + procCur.PlaceService.ToString() + ".";
            }
            if (procOld.ClinicNum != procCur.ClinicNum)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Clinic changed from " + Clinics.GetAbbr(procOld.ClinicNum) + " to " + Clinics.GetAbbr(procCur.ClinicNum) + ".";
            }
            if (procOld.SiteNum != procCur.SiteNum)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Site changed from " + (procOld.SiteNum == 0?"none":Sites.GetDescription(procOld.SiteNum))
                           + " to " + (procCur.SiteNum == 0?"none":Sites.GetDescription(procCur.SiteNum)) + ".";
            }
            //Prosthesis reverse lookup---------------------------------------------------------------------------------------------------------------------
            if (procOld.Prosthesis != procCur.Prosthesis)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                string prosthesisOld;
                switch (procOld.Prosthesis.ToString())
                {
                case "": prosthesisOld = "no"; break;

                case "I":       prosthesisOld = "Initial"; break;

                case "R": prosthesisOld = "Replacement"; break;

                default: prosthesisOld = "error"; break;
                }
                string prosthesisCur;
                switch (procCur.Prosthesis.ToString())
                {
                case "": prosthesisCur = "no"; break;

                case "I": prosthesisCur = "Initial"; break;

                case "R": prosthesisCur = "Replacement"; break;

                default: prosthesisCur = "error"; break;
                }
                Changes += "Prosthesis changed from " + prosthesisOld + " to " + prosthesisCur + ".";
            }
            if (procOld.DateOriginalProsth.Date != procCur.DateOriginalProsth.Date)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Date of Original Prosthesis changed from " + procOld.DateOriginalProsth.ToShortDateString()
                           + " to " + procCur.DateOriginalProsth.ToShortDateString() + ".";
            }
            //Claim Note & Orion Proc Fields----------------------------------------------------------------------------------------------------------------
            if (procOld.ClaimNote != procCur.ClaimNote)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Claim Note changed from " + (procOld.ClaimNote == ""?"none":"'" + procOld.ClaimNote + "'")
                           + " to " + (procCur.ClaimNote == ""?"none":"'" + procCur.ClaimNote + "'");
            }
            if (orionProcOld.OrionProcNum != orionProcCur.OrionProcNum)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Orion Proc Num changed from " + POut.Long(orionProcOld.OrionProcNum) + " to " + POut.Long(orionProcCur.OrionProcNum) + ".";
            }
            if (orionProcOld.ProcNum != orionProcCur.ProcNum)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Proc Num changed from " + POut.Long(orionProcOld.ProcNum) + " to " + POut.Long(orionProcCur.ProcNum) + ".";
            }
            //Orion Status Reverse Lookup for Description----------------------------------//None is equivalent to TP---------------------------------------
            if (orionProcOld.Status2 != orionProcCur.Status2 && !(orionProcOld.Status2 == OrionStatus.None && orionProcCur.Status2 == OrionStatus.TP))
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                string[] status2     = new string[2];
                string[] status2Desc = new string[2];
                status2[0] = orionProcOld.Status2.ToString();
                status2[1] = orionProcCur.Status2.ToString();
                for (int i = 0; i < 2; i++)
                {
                    switch (status2[i])
                    {
                    case "None":            status2Desc[i] = "TP-treatment planned"; break;

                    case "TP":                      status2Desc[i] = "TP-treatment planned"; break;

                    case "C":                               status2Desc[i] = "C-completed";   break;

                    case "E":                               status2Desc[i] = "E-existing prior to incarceration"; break;

                    case "R":                               status2Desc[i] = "R-refused treatment"; break;

                    case "RO":                      status2Desc[i] = "RO-referred out to specialist"; break;

                    case "CS":                      status2Desc[i] = "CS-completed by specialist"; break;

                    case "CR":                      status2Desc[i] = "CR-completed by registry"; break;

                    case "CA_Tx":           status2Desc[i] = "CA_Tx-cancelled, tx plan changed"; break;

                    case "CA_EPRD": status2Desc[i] = "CA_EPRD-cancelled, eligible parole"; break;

                    case "CA_P/D":  status2Desc[i] = "CA_P/D--cancelled, parole/discharge"; break;

                    case "S":                               status2Desc[i] = "S-suspended, unacceptable plaque"; break;

                    case "ST":                      status2Desc[i] = "ST-stop clock, multi visit"; break;

                    case "W":                               status2Desc[i] = "W-watch"; break;

                    case "A":                               status2Desc[i] = "A-alternative"; break;

                    default:                                status2Desc[i] = "error"; break;
                    }
                }
                Changes += "Orion Procedure Status changed from " + status2Desc[0] + " to " + status2Desc[1] + ".";
            }
            //Other orion fields----------------------------------------------------------------------------------------------------------------------------
            if (orionProcOld.DateScheduleBy.Date != orionProcCur.DateScheduleBy.Date)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Date Schedule By changed from " + orionProcOld.DateScheduleBy.ToShortDateString()
                           + " to " + orionProcCur.DateScheduleBy.ToShortDateString() + ".";
            }
            if (orionProcOld.DateStopClock.Date != orionProcCur.DateStopClock.Date)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Date Stop Clock changed from " + orionProcOld.DateStopClock.ToShortDateString()
                           + " to " + orionProcCur.DateStopClock.ToShortDateString() + ".";
            }
            if (orionProcOld.IsOnCall != orionProcCur.IsOnCall)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Is On Call changed from " + (orionProcOld.IsOnCall?"Is On Call":"Is Not On Call")
                           + " to " + (orionProcCur.IsOnCall?"Is On Call":"Is Not On Call") + ".";
            }
            if (orionProcOld.IsEffectiveComm != orionProcCur.IsEffectiveComm)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Is Effective Comm changed from " + (orionProcOld.IsEffectiveComm?"Is an Effective Communicator":"Is Not an Effective Communicator")
                           + " to " + (orionProcCur.IsEffectiveComm?"Is an Effective Communicator":"Is Not an Effective Communicator") + ".";
            }
            if (orionProcOld.IsRepair != orionProcCur.IsRepair)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Is Repair changed from " + (orionProcOld.IsRepair?"Is a Repair":"Is Not a Repair")
                           + " to " + (orionProcCur.IsRepair?"Is a Repair":"Is Not a Repair") + ".";
            }
            //Medical fields--------------------------------------------------------------------------------------------------------------------------------
            if (procOld.MedicalCode != procCur.MedicalCode)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Medical Code changed from " + (procOld.MedicalCode == ""?"none":procOld.MedicalCode)
                           + " to " + (procCur.MedicalCode == ""?"none":procCur.MedicalCode) + ".";
            }
            if (procOld.DiagnosticCode != procCur.DiagnosticCode)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Diagnostic Code changed from " + (procOld.DiagnosticCode == ""?"none":procOld.DiagnosticCode)
                           + " to " + (procCur.DiagnosticCode == ""?"none":procCur.DiagnosticCode) + ".";
            }
            if (procOld.IsPrincDiag != procCur.IsPrincDiag)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Is Princ Diag changed from " + (procOld.IsPrincDiag?"Principal Diagnosis":"Not Principal Diagnosis")
                           + " to " + (procCur.IsPrincDiag?"Principal Diagnosis":"Not Principal Diagnosis") + ".";
            }
            //if(procOld.RevCode != procCur.RevCode) {
            //  if(Changes!=""){ Changes+="\r\n";}
            //  Changes+="Rev Code changed from "+POut.String(procOld.RevCode)+"' to '"+POut.String(procCur.RevCode)+".";
            //}
            //Proc status and billing fields----------------------------------------------------------------------------------------------------------------
            if (procOld.ProcStatus != procCur.ProcStatus)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Procedure Status changed from " + procOld.ProcStatus.ToString() + " to " + procCur.ProcStatus.ToString() + ".";
            }
            if (procOld.DateTP.Date != procCur.DateTP.Date && procOld.DateTP.Date != DateTime.MinValue.Date)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Date TP changed from " + procOld.DateTP.ToShortDateString() + " to " + procCur.DateTP.ToShortDateString() + ".";
            }
            //if(procOld.BillingTypeOne != procCur.BillingTypeOne) {
            //  if(Changes!=""){ Changes+="\r\n";}
            //  Changes+="Billing Type One changed from "+(procOld.BillingTypeOne!=0?Defs.GetDef(DefCat.BillingTypes,procOld.BillingTypeOne).ItemName:"none")
            //		+" to "+(procCur.BillingTypeOne!=0?Defs.GetDef(DefCat.BillingTypes,procCur.BillingTypeOne).ItemName:"none")+".";
            //}
            //if(procOld.BillingTypeTwo != procCur.BillingTypeTwo) {
            //  if(Changes!=""){ Changes+="\r\n";}
            //  Changes+="Billing Type Two changed from "+(procOld.BillingTypeTwo!=0?Defs.GetDef(DefCat.BillingTypes,procOld.BillingTypeTwo).ItemName:"none")
            //		+" to "+(procCur.BillingTypeTwo!=0?Defs.GetDef(DefCat.BillingTypes,procCur.BillingTypeTwo).ItemName:"none")+".";
            //}
            if (procOld.ProcNumLab != procCur.ProcNumLab)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Proc Num Lab changed from " + POut.Long(procOld.ProcNumLab) + " to " + POut.Long(procCur.ProcNumLab) + ".";
            }
            //if(procOld.UnitCode != procCur.UnitCode) {
            //  if(Changes!=""){ Changes+="\r\n";}
            //  Changes+="Unit Code changed from "+POut.String(procOld.UnitCode)+" to "+POut.String(procCur.UnitCode)+".";
            //}
            //UnitQty, Canadian Type Codes, and Note--------------------------------------------------------------------------------------------------------
            if (procOld.UnitQty != procCur.UnitQty)
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Unit Quantity changed from " + POut.Int(procOld.UnitQty) + " to " + POut.Int(procCur.UnitQty) + ".";
            }
            //if(procOld.CanadianTypeCodes != procCur.CanadianTypeCodes) {
            //  if(Changes!=""){ Changes+="\r\n";}
            //  Changes+="Canadian Code Type changed from "+POut.String(procOld.CanadianTypeCodes)+" to "+POut.String(procCur.CanadianTypeCodes)+".";
            // }
            if (procOld.Note != procCur.Note && !(procOld.Note == null && procCur.Note == ""))         //Null note is equivalent to an empty note string.
            {
                if (Changes != "")
                {
                    Changes += "\r\n";
                }
                Changes += "Note changed from " + (procOld.Note == ""?"none":"'" + procOld.Note + "'")
                           + " to " + (procCur.Note == ""?"none":"'" + procCur.Note + "'");
            }
            return(Changes);
        }
예제 #13
0
        private void FillGrid()
        {
            List <Procedure> entireList = Procedures.Refresh(AptCur.PatNum);

            ProcList = new List <Procedure>();
            bool       isPlanned  = AptCur.AptStatus == ApptStatus.Planned;
            ApptStatus apptStatus = AptCur.AptStatus;

            for (int i = 0; i < entireList.Count; i++)
            {
                //We want all unattached completed procs with same date as appt.
                //but only if one of these types
                if (apptStatus == ApptStatus.Scheduled || apptStatus == ApptStatus.Complete || apptStatus == ApptStatus.Broken)
                {
                    if (entireList[i].AptNum == 0 &&
                        entireList[i].ProcStatus == ProcStat.C &&
                        entireList[i].ProcDate.Date == AptCur.AptDateTime.Date)
                    {
                        ProcList.Add(entireList[i]);
                    }
                }
                //otherwise, we only want TP procs that are not attached to this appointment.
                //As for TP procs attached to other appointments, we will show this to the user and warn them about it,
                //but we won't filter them out.
                if (entireList[i].ProcStatus != ProcStat.TP)
                {
                    continue;
                }
                if (isPlanned)
                {
                    if (entireList[i].PlannedAptNum == AptCur.AptNum)
                    {
                        continue;
                    }
                }
                else
                {
                    if (entireList[i].AptNum == AptCur.AptNum)
                    {
                        continue;
                    }
                }
                ProcList.Add(entireList[i]);
            }
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col;

            col = new ODGridColumn(Lan.g("TableProcSelect", "OtherAppt"), 70, HorizontalAlignment.Center);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableProcSelect", "Code"), 55);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableProcSelect", "Priority"), 55);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableProcSelect", "Tooth"), 50);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableProcSelect", "Description"), 250);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableProcSelect", "Fee"), 60, HorizontalAlignment.Right);
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < ProcList.Count; i++)
            {
                row = new ODGridRow();
                if (ProcList[i].ProcStatus == ProcStat.C)              //so unattached
                {
                    row.Cells.Add("");
                }
                else if (isPlanned && ProcList[i].PlannedAptNum != 0)
                {
                    row.Cells.Add("X");
                }
                else if (!isPlanned && ProcList[i].AptNum != 0)
                {
                    row.Cells.Add("X");
                }
                else
                {
                    row.Cells.Add("");
                }
                row.Cells.Add(ProcedureCodes.GetStringProcCode(ProcList[i].CodeNum));
                row.Cells.Add(Defs.GetName(DefCat.TxPriorities, ProcList[i].Priority));
                row.Cells.Add(Tooth.ToInternat(ProcList[i].ToothNum));
                row.Cells.Add(ProcedureCodes.GetLaymanTerm(ProcList[i].CodeNum));
                row.Cells.Add(ProcList[i].ProcFee.ToString("F"));
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
        }