Example #1
0
        public static LoadData GetLoadData(Patient pat, Family fam, Claim claim)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                return(Meth.GetObject <LoadData>(MethodBase.GetCurrentMethod(), pat, fam, claim));
            }
            LoadData data = new LoadData();

            data.ListPatPlans            = PatPlans.Refresh(pat.PatNum);
            data.ListInsSubs             = InsSubs.RefreshForFam(fam);
            data.ListInsPlans            = InsPlans.RefreshForSubList(data.ListInsSubs);
            data.ListClaimProcs          = ClaimProcs.Refresh(pat.PatNum);
            data.ListProcs               = Procedures.Refresh(pat.PatNum);
            data.ListClaimValCodes       = ClaimValCodeLogs.GetForClaim(claim.ClaimNum);
            data.ClaimCondCodeLogCur     = ClaimCondCodeLogs.GetByClaimNum(claim.ClaimNum);
            data.TablePayments           = ClaimPayments.GetForClaim(claim.ClaimNum);
            data.TablePayments.TableName = "ClaimPayments";
            data.ListToothInitials       = ToothInitials.Refresh(pat.PatNum);
            data.ListCustomStatusEntries = ClaimTrackings.RefreshForClaim(ClaimTrackingType.StatusHistory, claim.ClaimNum);
            return(data);
        }
Example #2
0
        ///<summary>Returns the toothNums from 1-32 to skip for the given patient.</summary>
        private static List <int> GetSkippedTeethForExam(Patient pat, PerioExam examCur)
        {
            List <int>       listSkippedTeeth     = new List <int>();
            List <PerioExam> listOtherExamsForPat = GetExamsList(pat.PatNum)
                                                    .Where(x => x.PerioExamNum != examCur.PerioExamNum)
                                                    .OrderBy(x => x.ExamDate)
                                                    .ToList();

            //If any other perio exams exist, we'll use the latest exam for the skipped tooth.
            if (!listOtherExamsForPat.IsNullOrEmpty())
            {
                listSkippedTeeth = PerioMeasures.GetSkipped(listOtherExamsForPat.Last().PerioExamNum);
            }
            //For patient's first perio chart, any teeth marked missing are automatically marked skipped.
            else if (PrefC.GetBool(PrefName.PerioSkipMissingTeeth))
            {
                //Procedures will only be queried for as needed.
                List <Procedure> listProcs = null;
                foreach (string missingTooth in ToothInitials.GetMissingOrHiddenTeeth(ToothInitials.Refresh(pat.PatNum)))
                {
                    if (missingTooth.CompareTo("A") >= 0 && missingTooth.CompareTo("Z") <= 0)
                    {
                        //If is a letter (not a number)
                        //Skipped teeth are only recorded by tooth number within the perio exam.
                        continue;
                    }
                    int toothNum = PIn.Int(missingTooth);
                    //Check if this tooth has had an implant done AND the office has the preference to SHOW implants
                    if (PrefC.GetBool(PrefName.PerioTreatImplantsAsNotMissing))
                    {
                        if (listProcs == null)
                        {
                            listProcs = Procedures.Refresh(pat.PatNum);
                        }
                        if (IsToothImplant(toothNum, listProcs))
                        {
                            //Remove the tooth from the list of skipped teeth if it exists.
                            listSkippedTeeth.RemoveAll(x => x == toothNum);
                            //We do not want to add it back to the list below.
                            continue;
                        }
                    }
                    //This tooth is missing and we know it is not an implant OR the office has the preference to ignore implants.
                    //Simply add it to our list of skipped teeth.
                    listSkippedTeeth.Add(toothNum);
                }
            }
            return(listSkippedTeeth);
        }