Beispiel #1
0
        ///<summary>"CODE SOURCE 237: Place of Service Codes for Professional Claims" is published by CMS (Centers for Medicare and Medicaid Services),
        ///according to https://www.cms.gov/Medicare/Coding/place-of-service-codes/.
        ///See code list here: https://www.cms.gov/Medicare/Medicare-Fee-for-Service-Payment/PhysicianFeeSched/Downloads/Website-POS-database.pdf
        ///Copy of PDF saved to "Place-of-Service-Codes.pdf" in internal documents.</summary>
        public static string GetPlaceService(PlaceOfService place)
        {
            switch (place)
            {
            case PlaceOfService.AmbulatorySurgicalCenter:
                return("24");

            case PlaceOfService.CustodialCareFacility:
                return("33");

            case PlaceOfService.EmergencyRoomHospital:
                return("23");

            case PlaceOfService.FederalHealthCenter:
                return("50");

            case PlaceOfService.InpatHospital:
                return("21");

            case PlaceOfService.MilitaryTreatFac:
                return("26");

            case PlaceOfService.MobileUnit:
                return("15");

            case PlaceOfService.Office:
            case PlaceOfService.OtherLocation:
                return("11");

            case PlaceOfService.OutpatHospital:
                return("22");

            case PlaceOfService.PatientsHome:
                return("12");

            case PlaceOfService.PublicHealthClinic:
                return("71");

            case PlaceOfService.RuralHealthClinic:
                return("72");

            case PlaceOfService.School:
                return("03");

            case PlaceOfService.SkilledNursFac:
                return("31");

            case PlaceOfService.Telehealth:
                return("02");
            }
            return("11");
        }
 public ProcNotBilled(Patient pat, long procNum, int rowIndex, bool isRowSelected,
                      bool hasPriClaim, bool hasSecClaim, long clinicNum, PlaceOfService placeService)
 {
     Patient       = pat;
     ProcNum       = procNum;
     RowIndex      = rowIndex;
     IsRowSelected = isRowSelected;
     IsAttached    = false;
     HasPriClaim   = hasPriClaim;
     HasSecClaim   = hasSecClaim;
     ClinicNum     = clinicNum;
     PlaceService  = placeService;
 }
Beispiel #3
0
        private static List <PlaceOfService> CreatePlaceOfServices(int numberPlaceofServices)
        {
            List <PlaceOfService> placeOfServices = new List <PlaceOfService>();

            for (int n = 1; n <= numberPlaceofServices; n++)
            {
                PlaceOfService cpdArea = new PlaceOfService
                {
                    PlaceOfServiceId = n,
                    Name             = $"Place of Service {n}"
                };

                placeOfServices.Add(cpdArea);
            }

            return(placeOfServices);
        }
Beispiel #4
0
		private static string GetPlaceService(PlaceOfService place) {
			switch(place) {
				case PlaceOfService.AmbulatorySurgicalCenter:
					return "24";
				case PlaceOfService.CustodialCareFacility:
					return "33";
				case PlaceOfService.EmergencyRoomHospital:
					return "23";
				case PlaceOfService.FederalHealthCenter:
					return "50";
				case PlaceOfService.InpatHospital:
					return "21";
				case PlaceOfService.MilitaryTreatFac:
					return "26";
				case PlaceOfService.MobileUnit:
					return "15";
				case PlaceOfService.Office:
				case PlaceOfService.OtherLocation:
					return "11";
				case PlaceOfService.OutpatHospital:
					return "22";
				case PlaceOfService.PatientsHome:
					return "12";
				case PlaceOfService.PublicHealthClinic:
					return "71";
				case PlaceOfService.RuralHealthClinic:
					return "72";
				case PlaceOfService.School:
					return "03";
				case PlaceOfService.SkilledNursFac:
					return "31";
			}
			return "11";
		}
        private Claim CreateClaim(string claimType, List <PatPlan> patPlanList, List <InsPlan> planList, List <ClaimProc> claimProcList, Procedure proc, List <InsSub> subList)
        {
            long           claimFormNum = 0;
            InsPlan        planCur      = new InsPlan();
            InsSub         subCur       = new InsSub();
            Relat          relatOther   = Relat.Self;
            long           clinicNum    = proc.ClinicNum;
            PlaceOfService placeService = proc.PlaceService;

            switch (claimType)
            {
            case "P":
                subCur  = InsSubs.GetSub(PatPlans.GetInsSubNum(patPlanList, PatPlans.GetOrdinal(PriSecMed.Primary, patPlanList, planList, subList)), subList);
                planCur = InsPlans.GetPlan(subCur.PlanNum, planList);
                break;

            case "S":
                subCur  = InsSubs.GetSub(PatPlans.GetInsSubNum(patPlanList, PatPlans.GetOrdinal(PriSecMed.Secondary, patPlanList, planList, subList)), subList);
                planCur = InsPlans.GetPlan(subCur.PlanNum, planList);
                break;

            case "Med":
                //It's already been verified that a med plan exists
                subCur  = InsSubs.GetSub(PatPlans.GetInsSubNum(patPlanList, PatPlans.GetOrdinal(PriSecMed.Medical, patPlanList, planList, subList)), subList);
                planCur = InsPlans.GetPlan(subCur.PlanNum, planList);
                break;
            }
            ClaimProc claimProcCur = Procedures.GetClaimProcEstimate(proc.ProcNum, claimProcList, planCur, subCur.InsSubNum);

            if (claimProcCur == null)
            {
                claimProcCur = new ClaimProc();
                ClaimProcs.CreateEst(claimProcCur, proc, planCur, subCur);
            }
            Claim claimCur = new Claim();

            claimCur.PatNum       = proc.PatNum;
            claimCur.DateService  = proc.ProcDate;
            claimCur.ClinicNum    = proc.ClinicNum;
            claimCur.PlaceService = proc.PlaceService;
            claimCur.ClaimStatus  = "W";
            claimCur.DateSent     = DateTimeOD.Today;
            claimCur.PlanNum      = planCur.PlanNum;
            claimCur.InsSubNum    = subCur.InsSubNum;
            InsSub sub;

            switch (claimType)
            {
            case "P":
                claimCur.PatRelat   = PatPlans.GetRelat(patPlanList, PatPlans.GetOrdinal(PriSecMed.Primary, patPlanList, planList, subList));
                claimCur.ClaimType  = "P";
                claimCur.InsSubNum2 = PatPlans.GetInsSubNum(patPlanList, PatPlans.GetOrdinal(PriSecMed.Secondary, patPlanList, planList, subList));
                sub = InsSubs.GetSub(claimCur.InsSubNum2, subList);
                if (sub.PlanNum > 0 && InsPlans.RefreshOne(sub.PlanNum).IsMedical)
                {
                    claimCur.PlanNum2  = 0;                         //no sec ins
                    claimCur.PatRelat2 = Relat.Self;
                }
                else
                {
                    claimCur.PlanNum2  = sub.PlanNum;                         //might be 0 if no sec ins
                    claimCur.PatRelat2 = PatPlans.GetRelat(patPlanList, PatPlans.GetOrdinal(PriSecMed.Secondary, patPlanList, planList, subList));
                }
                break;

            case "S":
                claimCur.PatRelat   = PatPlans.GetRelat(patPlanList, PatPlans.GetOrdinal(PriSecMed.Secondary, patPlanList, planList, subList));
                claimCur.ClaimType  = "S";
                claimCur.InsSubNum2 = PatPlans.GetInsSubNum(patPlanList, PatPlans.GetOrdinal(PriSecMed.Primary, patPlanList, planList, subList));
                sub = InsSubs.GetSub(claimCur.InsSubNum2, subList);
                claimCur.PlanNum2  = sub.PlanNum;
                claimCur.PatRelat2 = PatPlans.GetRelat(patPlanList, PatPlans.GetOrdinal(PriSecMed.Primary, patPlanList, planList, subList));
                break;

            case "Med":
                claimCur.PatRelat  = PatPlans.GetFromList(patPlanList, subCur.InsSubNum).Relationship;
                claimCur.ClaimType = "Other";
                if (PrefC.GetBool(PrefName.ClaimMedTypeIsInstWhenInsPlanIsMedical))
                {
                    claimCur.MedType = EnumClaimMedType.Institutional;
                }
                else
                {
                    claimCur.MedType = EnumClaimMedType.Medical;
                }
                break;

            case "Other":
                claimCur.PatRelat  = relatOther;
                claimCur.ClaimType = "Other";
                //plannum2 is not automatically filled in.
                claimCur.ClaimForm = claimFormNum;
                if (planCur.IsMedical)
                {
                    if (PrefC.GetBool(PrefName.ClaimMedTypeIsInstWhenInsPlanIsMedical))
                    {
                        claimCur.MedType = EnumClaimMedType.Institutional;
                    }
                    else
                    {
                        claimCur.MedType = EnumClaimMedType.Medical;
                    }
                }
                break;
            }
            if (planCur.PlanType == "c")          //if capitation
            {
                claimCur.ClaimType = "Cap";
            }
            claimCur.ProvTreat = proc.ProvNum;
            if (Providers.GetIsSec(proc.ProvNum))
            {
                claimCur.ProvTreat = Patients.GetPat(proc.PatNum).PriProv;
                //OK if zero, because auto select first in list when open claim
            }
            claimCur.IsProsthesis  = "N";
            claimCur.ProvBill      = Providers.GetBillingProvNum(claimCur.ProvTreat, claimCur.ClinicNum);    //OK if zero, because it will get fixed in claim
            claimCur.EmployRelated = YN.No;
            claimCur.ClaimForm     = planCur.ClaimFormNum;
            Claims.Insert(claimCur);
            //attach procedure
            claimProcCur.ClaimNum = claimCur.ClaimNum;
            if (planCur.PlanType == "c")           //if capitation
            {
                claimProcCur.Status = ClaimProcStatus.CapClaim;
            }
            else
            {
                claimProcCur.Status = ClaimProcStatus.NotReceived;
            }
            if (planCur.UseAltCode && (ProcedureCodes.GetProcCode(proc.CodeNum).AlternateCode1 != ""))
            {
                claimProcCur.CodeSent = ProcedureCodes.GetProcCode(proc.CodeNum).AlternateCode1;
            }
            else if (planCur.IsMedical && proc.MedicalCode != "")
            {
                claimProcCur.CodeSent = proc.MedicalCode;
            }
            else
            {
                claimProcCur.CodeSent = ProcedureCodes.GetProcCode(proc.CodeNum).ProcCode;
                if (claimProcCur.CodeSent.Length > 5 && claimProcCur.CodeSent.Substring(0, 1) == "D")
                {
                    claimProcCur.CodeSent = claimProcCur.CodeSent.Substring(0, 5);
                }
                if (CultureInfo.CurrentCulture.Name.EndsWith("CA"))         //Canadian. en-CA or fr-CA
                {
                    if (claimProcCur.CodeSent.Length > 5)                   //In Canadian e-claims, codes can contain letters or numbers and cannot be longer than 5 characters.
                    {
                        claimProcCur.CodeSent = claimProcCur.CodeSent.Substring(0, 5);
                    }
                }
            }
            claimProcCur.LineNumber = (byte)1;
            ClaimProcs.Update(claimProcCur);
            return(claimCur);
        }