示例#1
0
        //Return "" if no match and ICD if there is match
        public string DocumentHaveICDInCombinationGroup(RegScoreCalc.Data.BillingDataSet.DocumentsRow document)
        {
            foreach (var code in Combinations)
            {
                var  returnCode = String.Join(" + ", code.ICDs);
                bool exist      = false;
                foreach (var icd in code.ICDs)
                {
                    if (code.RegExp)
                    {
                        Regex regex = new Regex(icd);
                        if (regex.Match(document.ICD9_1).Success)
                        {
                            exist = true;
                        }
                        else if (regex.Match(document.ICD9_2).Success)
                        {
                            exist = true;
                        }
                        else if (regex.Match(document.ICD9_3).Success)
                        {
                            exist = true;
                        }
                        else if (regex.Match(document.ICD9_4).Success)
                        {
                            exist = true;
                        }
                        else if (regex.Match(document.ICD9_5).Success)
                        {
                            exist = true;
                        }
                        else if (regex.Match(document.ICD9_6).Success)
                        {
                            exist = true;
                        }
                        else if (regex.Match(document.ICD9_7).Success)
                        {
                            exist = true;
                        }
                        else if (regex.Match(document.ICD9_8).Success)
                        {
                            exist = true;
                        }
                        else if (regex.Match(document.ICD9_9).Success)
                        {
                            exist = true;
                        }
                        else if (regex.Match(document.ICD9_10).Success)
                        {
                            exist = true;
                        }
                        else if (regex.Match(document.ICD9_11).Success)
                        {
                            exist = true;
                        }
                        else if (regex.Match(document.ICD9_12).Success)
                        {
                            exist = true;
                        }
                        else if (regex.Match(document.ICD9_13).Success)
                        {
                            exist = true;
                        }
                        else if (regex.Match(document.ICD9_14).Success)
                        {
                            exist = true;
                        }
                        else
                        {
                            exist = false;
                            break;
                        }
                    }
                    else
                    {
                        if (document.ICD9_1 == icd)
                        {
                            exist = true;
                        }
                        else if (document.ICD9_2 == icd)
                        {
                            exist = true;
                        }
                        else if (document.ICD9_3 == icd)
                        {
                            exist = true;
                        }
                        else if (document.ICD9_4 == icd)
                        {
                            exist = true;
                        }
                        else if (document.ICD9_5 == icd)
                        {
                            exist = true;
                        }
                        else if (document.ICD9_6 == icd)
                        {
                            exist = true;
                        }
                        else if (document.ICD9_7 == icd)
                        {
                            exist = true;
                        }
                        else if (document.ICD9_8 == icd)
                        {
                            exist = true;
                        }
                        else if (document.ICD9_9 == icd)
                        {
                            exist = true;
                        }
                        else if (document.ICD9_10 == icd)
                        {
                            exist = true;
                        }
                        else if (document.ICD9_11 == icd)
                        {
                            exist = true;
                        }
                        else if (document.ICD9_12 == icd)
                        {
                            exist = true;
                        }
                        else if (document.ICD9_13 == icd)
                        {
                            exist = true;
                        }
                        else if (document.ICD9_14 == icd)
                        {
                            exist = true;
                        }
                        else
                        {
                            exist = false;
                            break;
                        }
                    }
                }

                if (exist)
                {
                    return(returnCode);
                }
            }
            return("");
        }
示例#2
0
        //// loops over all the group combinations and checks if one of them is in the input list
        //public bool IsGroupCombinationExist(List<string> allICD9CodesOfDoc)
        //{
        //    return false;
        //}



        //Return "" if no match and ICD if there is match
        public string DocumentHaveICDInStandardGroup(RegScoreCalc.Data.BillingDataSet.DocumentsRow document)
        {
            foreach (var code in Standard)
            {
                if (code.RegExp)
                {
                    Regex regex = new Regex(code.ICD);
                    if (!String.IsNullOrEmpty(document.ICD9_1) && regex.Match(document.ICD9_1).Success)
                    {
                        return(document.ICD9_1);
                    }
                    if (!String.IsNullOrEmpty(document.ICD9_2) && regex.Match(document.ICD9_2).Success)
                    {
                        return(document.ICD9_2);
                    }
                    if (!String.IsNullOrEmpty(document.ICD9_3) && regex.Match(document.ICD9_3).Success)
                    {
                        return(document.ICD9_3);
                    }
                    if (!String.IsNullOrEmpty(document.ICD9_4) && regex.Match(document.ICD9_4).Success)
                    {
                        return(document.ICD9_4);
                    }
                    if (!String.IsNullOrEmpty(document.ICD9_5) && regex.Match(document.ICD9_5).Success)
                    {
                        return(document.ICD9_5);
                    }
                    if (!String.IsNullOrEmpty(document.ICD9_6) && regex.Match(document.ICD9_6).Success)
                    {
                        return(document.ICD9_6);
                    }
                    if (!String.IsNullOrEmpty(document.ICD9_7) && regex.Match(document.ICD9_7).Success)
                    {
                        return(document.ICD9_7);
                    }
                    if (!String.IsNullOrEmpty(document.ICD9_8) && regex.Match(document.ICD9_8).Success)
                    {
                        return(document.ICD9_8);
                    }
                    if (!String.IsNullOrEmpty(document.ICD9_9) && regex.Match(document.ICD9_9).Success)
                    {
                        return(document.ICD9_9);
                    }
                    if (!String.IsNullOrEmpty(document.ICD9_10) && regex.Match(document.ICD9_10).Success)
                    {
                        return(document.ICD9_10);
                    }
                    if (!String.IsNullOrEmpty(document.ICD9_11) && regex.Match(document.ICD9_11).Success)
                    {
                        return(document.ICD9_11);
                    }
                    if (!String.IsNullOrEmpty(document.ICD9_12) && regex.Match(document.ICD9_12).Success)
                    {
                        return(document.ICD9_12);
                    }
                    if (!String.IsNullOrEmpty(document.ICD9_13) && regex.Match(document.ICD9_13).Success)
                    {
                        return(document.ICD9_13);
                    }
                    if (!String.IsNullOrEmpty(document.ICD9_14) && regex.Match(document.ICD9_14).Success)
                    {
                        return(document.ICD9_14);
                    }
                }
                else
                {
                    if (document.ICD9_1 == code.ICD)
                    {
                        return(code.ICD);
                    }
                    if (document.ICD9_2 == code.ICD)
                    {
                        return(code.ICD);
                    }
                    if (document.ICD9_3 == code.ICD)
                    {
                        return(code.ICD);
                    }
                    if (document.ICD9_4 == code.ICD)
                    {
                        return(code.ICD);
                    }
                    if (document.ICD9_5 == code.ICD)
                    {
                        return(code.ICD);
                    }
                    if (document.ICD9_6 == code.ICD)
                    {
                        return(code.ICD);
                    }
                    if (document.ICD9_7 == code.ICD)
                    {
                        return(code.ICD);
                    }
                    if (document.ICD9_8 == code.ICD)
                    {
                        return(code.ICD);
                    }
                    if (document.ICD9_9 == code.ICD)
                    {
                        return(code.ICD);
                    }
                    if (document.ICD9_10 == code.ICD)
                    {
                        return(code.ICD);
                    }
                    if (document.ICD9_11 == code.ICD)
                    {
                        return(code.ICD);
                    }
                    if (document.ICD9_12 == code.ICD)
                    {
                        return(code.ICD);
                    }
                    if (document.ICD9_13 == code.ICD)
                    {
                        return(code.ICD);
                    }
                    if (document.ICD9_14 == code.ICD)
                    {
                        return(code.ICD);
                    }
                }
            }
            return("");
        }