Exemple #1
0
        private static void CreateNine()
        {
            long             provNum = ProviderC.ListShort[1].ProvNum;     //dentist#2
            Patient          pat     = Patients.GetPat(PatientTC.PatNum7); //patient#7, Madeleine Arpege
            Procedure        proc;
            Procedure        procLab;
            List <Procedure> procList = new List <Procedure>();

            procList.Add(ProcTC.AddProc("01201", pat.PatNum, new DateTime(1999, 1, 1), "", "", 27.5, "X", provNum));
            procList.Add(ProcTC.AddProc("02102", pat.PatNum, new DateTime(1999, 1, 1), "", "", 87.25, "X", provNum));
            proc = ProcTC.AddProc("67301", pat.PatNum, new DateTime(1999, 1, 1), "11", "", 412.6, "X", provNum);
            procList.Add(proc);
            procLab = ProcTC.AddProc("99111", pat.PatNum, new DateTime(1999, 1, 1), "", "", 380, "", provNum);
            ProcTC.AttachLabProc(proc.ProcNum, procLab);
            Claim claim = CreateClaim(pat, procList, provNum);

            claim.CanadianMaterialsForwarded = "";
            //billing prov already handled
            claim.CanadianReferralProviderNum = "";
            claim.CanadianReferralReason      = 0;
            //pat.SchoolName
            //assignBen can't be set here because it changes per claim in the scripts
            claim.AccidentDate             = DateTime.MinValue;
            claim.PreAuthString            = "";
            claim.CanadianIsInitialUpper   = "Y";
            claim.CanadianDateInitialUpper = DateTime.MinValue;
            claim.CanadianIsInitialLower   = "X";
            claim.CanadianDateInitialLower = DateTime.MinValue;
            //claim.CanadianMandProsthMaterial=4;
            claim.IsOrtho = true;
            Claims.Update(claim);
            ClaimNums.Add(claim.ClaimNum);
        }
Exemple #2
0
        private static void CreateTwelve()
        {
            long             provNum = ProviderC.ListShort[0].ProvNum;     //dentist#1
            Patient          pat     = Patients.GetPat(PatientTC.PatNum9); //patient#9, Fred Smith
            Procedure        proc;
            List <Procedure> procList = new List <Procedure>();

            procList.Add(ProcTC.AddProc("01201", pat.PatNum, new DateTime(1999, 1, 1), "", "", 27.5, "", provNum));
            procList.Add(ProcTC.AddProc("02102", pat.PatNum, new DateTime(1999, 1, 1), "", "", 87.25, "", provNum));
            proc = ProcTC.AddProc("21223", pat.PatNum, new DateTime(1999, 1, 1), "27", "MOD", 107.6, "", provNum);
            procList.Add(proc);
            Claim claim = CreateClaim(pat, procList, provNum);

            claim.CanadianMaterialsForwarded = "";
            //billing prov already handled
            claim.CanadianReferralProviderNum = "";
            claim.CanadianReferralReason      = 0;
            //pat.SchoolName
            //assignBen can't be set here because it changes per claim in the scripts
            claim.AccidentDate             = DateTime.MinValue;
            claim.PreAuthString            = "";
            claim.CanadianIsInitialUpper   = "Y";
            claim.CanadianDateInitialUpper = DateTime.MinValue;
            claim.CanadianIsInitialLower   = "X";
            claim.CanadianDateInitialLower = DateTime.MinValue;
            //claim.CanadianMandProsthMaterial=4;
            claim.IsOrtho = false;
            Claims.Update(claim);
            ClaimNums.Add(claim.ClaimNum);
        }
Exemple #3
0
        private static void CreateFour()
        {
            long    provNum = ProviderC.ListShort[0].ProvNum;       //dentist#1
            Patient pat     = Patients.GetPat(PatientTC.PatNum4);   //patient#4, John Smith, Jr.
            //Procedure proc;
            List <Procedure> procList = new List <Procedure>();

            procList.Add(ProcTC.AddProc("01201", pat.PatNum, new DateTime(1999, 1, 1), "", "", 27.5, "X", provNum));
            procList.Add(ProcTC.AddProc("02102", pat.PatNum, new DateTime(1999, 1, 1), "", "", 87.25, "X", provNum));
            procList.Add(ProcTC.AddProc("21113", pat.PatNum, new DateTime(1999, 1, 1), "52", "MIV", 107.6, "A", provNum));   //the date in the script is a typo.
            Claim claim = CreateClaim(pat, procList, provNum);

            claim.CanadianMaterialsForwarded = "";
            //billing prov already handled
            claim.CanadianReferralProviderNum = "";
            claim.CanadianReferralReason      = 0;
            pat.SchoolName = "Wilson Elementary School";
            //assignBen can't be set here because it changes per claim in the scripts
            claim.AccidentDate             = new DateTime(1998, 11, 2);
            claim.PreAuthString            = "";
            claim.CanadianIsInitialUpper   = "X";
            claim.CanadianDateInitialUpper = DateTime.MinValue;
            claim.CanadianIsInitialLower   = "X";
            claim.CanadianDateInitialLower = DateTime.MinValue;
            //claim.CanadianMandProsthMaterial=4;
            claim.IsOrtho = false;
            Claims.Update(claim);
            ClaimNums.Add(claim.ClaimNum);
        }
Exemple #4
0
        private static void CreateSeven()
        {
            long    provNum = ProviderC.ListShort[0].ProvNum;       //dentist#1
            Patient pat     = Patients.GetPat(PatientTC.PatNum5);   //patient#5, Bob Howard
            //Procedure proc;
            List <Procedure> procList = new List <Procedure>();

            procList.Add(ProcTC.AddProc("01202", pat.PatNum, new DateTime(1999, 1, 1), "", "", 37.5, "X", provNum));
            procList.Add(ProcTC.AddProc("02102", pat.PatNum, new DateTime(1999, 1, 1), "", "", 87.25, "X", provNum));
            procList.Add(ProcTC.AddProc("21213", pat.PatNum, new DateTime(1999, 1, 1), "22", "DIV", 107.6, "X", provNum));   //wrong code in documentation
            Claim claim = CreateClaim(pat, procList, provNum);

            claim.CanadianMaterialsForwarded = "";
            //billing prov already handled
            claim.CanadianReferralProviderNum = "081234500";
            claim.CanadianReferralReason      = 4;
            pat.SchoolName = "";
            //assignBen can't be set here because it changes per claim in the scripts
            claim.AccidentDate             = DateTime.MinValue;
            claim.PreAuthString            = "PD78901234";
            claim.CanadianIsInitialUpper   = "X";
            claim.CanadianDateInitialUpper = DateTime.MinValue;
            claim.CanadianIsInitialLower   = "X";
            claim.CanadianDateInitialLower = DateTime.MinValue;
            //claim.CanadianMandProsthMaterial=4;
            claim.IsOrtho = false;
            Claims.Update(claim);
            ClaimNums.Add(claim.ClaimNum);
        }
Exemple #5
0
        private static void CreateThree()
        {
            long             provNum = ProviderC.ListShort[0].ProvNum;     //dentist#1
            Patient          pat     = Patients.GetPat(PatientTC.PatNum2); //patient#2, John Smith
            Procedure        proc;
            Procedure        procLab;
            List <Procedure> procList = new List <Procedure>();

            procList.Add(ProcTC.AddProc("01201", pat.PatNum, new DateTime(1999, 1, 1), "", "", 27.5, "X", provNum));
            procList.Add(ProcTC.AddProc("02102", pat.PatNum, new DateTime(1999, 1, 1), "", "", 87.25, "X", provNum));
            procList.Add(ProcTC.AddProc("21223", pat.PatNum, new DateTime(1999, 1, 1), "46", "DOV", 107.6, "X", provNum));
            proc = ProcTC.AddProc("56112", pat.PatNum, new DateTime(1999, 1, 1), "", "L", 217.2, "S", provNum); //lower
            procList.Add(proc);
            procLab = ProcTC.AddProc("99111", pat.PatNum, new DateTime(1999, 1, 1), "", "", 315, "", provNum);
            ProcTC.AttachLabProc(proc.ProcNum, procLab);
            Claim claim = CreateClaim(pat, procList, provNum);

            claim.CanadianMaterialsForwarded = "";
            //billing prov already handled
            claim.CanadianReferralProviderNum = "";
            claim.CanadianReferralReason      = 0;
            //pat.SchoolName
            //assignBen can't be set here because it changes per claim in the scripts
            claim.AccidentDate               = DateTime.MinValue;
            claim.PreAuthString              = "";
            claim.CanadianIsInitialUpper     = "X";
            claim.CanadianDateInitialUpper   = DateTime.MinValue;
            claim.CanadianIsInitialLower     = "N";
            claim.CanadianDateInitialLower   = new DateTime(1984, 4, 7);
            claim.CanadianMandProsthMaterial = 4;
            claim.IsOrtho = false;
            Claims.Update(claim);
            ClaimNums.Add(claim.ClaimNum);
        }
Exemple #6
0
        private static void CreateSeven_2()
        {
            long             provNum  = ProviderC.ListShort[0].ProvNum;     //dentist#1
            Patient          pat      = Patients.GetPat(PatientTC.PatNum3); //patient#3, Mary Walls
            List <Procedure> procList = new List <Procedure>();

            procList.Add(ProcTC.AddProc("39202", pat.PatNum, new DateTime(1999, 1, 1), "36", "", 67.5, "X", provNum));
            procList.Add(ProcTC.AddProc("32222", pat.PatNum, new DateTime(1999, 1, 1), "32", "", 65, "X", provNum));
            Claim claim = CreatePredetermination(pat, procList, provNum);

            claim.CanadianMaterialsForwarded = "M";
            //billing prov already handled
            claim.CanadianReferralProviderNum = "";
            claim.CanadianReferralReason      = 0;
            //pat.SchoolName
            //assignBen can't be set here because it changes per claim in the scripts
            claim.AccidentDate             = DateTime.MinValue;
            claim.PreAuthString            = "";
            claim.CanadianIsInitialUpper   = "Y";
            claim.CanadianDateInitialUpper = DateTime.MinValue;
            claim.CanadianIsInitialLower   = "X";
            claim.CanadianDateInitialLower = DateTime.MinValue;
            claim.IsOrtho = false;
            Claims.Update(claim);
            ClaimNums.Add(claim.ClaimNum);
        }
Exemple #7
0
        private static void CreateSeven_1()
        {
            long             provNum = ProviderC.ListShort[0].ProvNum;     //dentist#1
            Patient          pat     = Patients.GetPat(PatientTC.PatNum3); //patient#3, Mary Walls
            Procedure        proc;
            Procedure        procLab;
            List <Procedure> procList = new List <Procedure>();

            procList.Add(ProcTC.AddProc("01201", pat.PatNum, new DateTime(1999, 1, 1), "", "", 27.5, "X", provNum));
            procList.Add(ProcTC.AddProc("02102", pat.PatNum, new DateTime(1999, 1, 1), "", "", 87.25, "X", provNum));
            proc = ProcTC.AddProc("67301", pat.PatNum, new DateTime(1999, 1, 1), "21", "", 450, "X", provNum);
            procList.Add(proc);
            procLab = ProcTC.AddProc("99111", pat.PatNum, new DateTime(1999, 1, 1), "", "", 300, "", provNum);
            ProcTC.AttachLabProc(proc.ProcNum, procLab);
            procLab = ProcTC.AddProc("99222", pat.PatNum, new DateTime(1999, 1, 1), "", "", 40, "", provNum);
            ProcTC.AttachLabProc(proc.ProcNum, procLab);
            procList.Add(ProcTC.AddProc("21223", pat.PatNum, new DateTime(1999, 1, 1), "25", "MIV", 107.6, "X", provNum));
            procList.Add(ProcTC.AddProc("21223", pat.PatNum, new DateTime(1999, 1, 1), "14", "DIV", 107.6, "X", provNum));
            proc = ProcTC.AddProc("27211", pat.PatNum, new DateTime(1999, 1, 1), "24", "", 450, "X", provNum);
            procList.Add(proc);
            procLab = ProcTC.AddProc("99111", pat.PatNum, new DateTime(1999, 1, 1), "", "", 238, "", provNum);
            ProcTC.AttachLabProc(proc.ProcNum, procLab);
            proc = ProcTC.AddProc("27213", pat.PatNum, new DateTime(1999, 1, 1), "26", "", 450, "E", provNum);
            procList.Add(proc);
            procLab = ProcTC.AddProc("99111", pat.PatNum, new DateTime(1999, 1, 1), "", "", 210, "", provNum);
            ProcTC.AttachLabProc(proc.ProcNum, procLab);
            procLab = ProcTC.AddProc("99222", pat.PatNum, new DateTime(1999, 1, 1), "", "", 35, "", provNum);
            ProcTC.AttachLabProc(proc.ProcNum, procLab);
            Claim claim = CreatePredetermination(pat, procList, provNum);

            claim.CanadianMaterialsForwarded = "M";
            //billing prov already handled
            claim.CanadianReferralProviderNum = "";
            claim.CanadianReferralReason      = 0;
            //pat.SchoolName
            //assignBen can't be set here because it changes per claim in the scripts
            claim.AccidentDate             = DateTime.MinValue;
            claim.PreAuthString            = "";
            claim.CanadianIsInitialUpper   = "Y";
            claim.CanadianDateInitialUpper = DateTime.MinValue;
            claim.CanadianIsInitialLower   = "X";
            claim.CanadianDateInitialLower = DateTime.MinValue;
            claim.IsOrtho = false;
            Claims.Update(claim);
            ClaimNums.Add(claim.ClaimNum);
        }
Exemple #8
0
        private static void CreateThree()
        {
            long             provNum = ProviderC.ListShort[0].ProvNum;     //dentist#1
            Patient          pat     = Patients.GetPat(PatientTC.PatNum4); //patient#4, John Smith
            Procedure        proc;
            Procedure        procLab;
            List <Procedure> procList = new List <Procedure>();

            procList.Add(ProcTC.AddProc("01201", pat.PatNum, new DateTime(1999, 1, 1), "", "", 27.5, "X", provNum));
            procList.Add(ProcTC.AddProc("02102", pat.PatNum, new DateTime(1999, 1, 1), "", "", 87.25, "X", provNum));
            proc = ProcTC.AddProc("67301", pat.PatNum, new DateTime(1999, 1, 1), "41", "", 450, "X", provNum);
            procList.Add(proc);
            procLab = ProcTC.AddProc("99111", pat.PatNum, new DateTime(1999, 1, 1), "", "", 300, "", provNum);
            ProcTC.AttachLabProc(proc.ProcNum, procLab);
            procLab = ProcTC.AddProc("99222", pat.PatNum, new DateTime(1999, 1, 1), "", "", 40, "", provNum);
            ProcTC.AttachLabProc(proc.ProcNum, procLab);
            Claim claim = CreatePredetermination(pat, procList, provNum);

            claim.CanadianMaterialsForwarded = "MI";          //L=MI
            //billing prov already handled
            claim.CanadianReferralProviderNum = "";
            claim.CanadianReferralReason      = 0;
            //pat.SchoolName
            //assignBen can't be set here because it changes per claim in the scripts
            claim.AccidentDate             = new DateTime(1997, 03, 02);
            claim.PreAuthString            = "";
            claim.CanadianIsInitialUpper   = "X";
            claim.CanadianDateInitialUpper = DateTime.MinValue;
            claim.CanadianIsInitialLower   = "Y";
            claim.CanadianDateInitialLower = DateTime.MinValue;
            claim.IsOrtho = true;
            claim.CanadaEstTreatStartDate      = new DateTime(1999, 04, 01);
            claim.CanadaInitialPayment         = 1000;
            claim.CanadaPaymentMode            = 3;
            claim.CanadaTreatDuration          = 48;
            claim.CanadaNumAnticipatedPayments = 16;
            claim.CanadaAnticipatedPayAmount   = 200;
            Claims.Update(claim);
            ClaimNums.Add(claim.ClaimNum);
        }
Exemple #9
0
        public static string SetInitialPatients()
        {
            Patient pat;
            Patient oldPatient;
            InsPlan plan;
            InsSub  sub;
            PatPlan patplan;

            pat           = new Patient();
            pat.PatStatus = PatientStatus.Patient;
            pat.Position  = PatientPosition.Single;
            pat.Gender    = PatientGender.Female;
            pat.Birthdate = new DateTime(1960, 04, 12);
            pat.LName     = "Fête";
            pat.FName     = "Lisa";
            pat.MiddleI   = "Ç";
            pat.Address   = "124 - 1500 Rue";
            pat.City      = "Montréal";
            pat.State     = "QC";
            pat.Zip       = "H1C2D4";
            pat.Language  = "fr";
            pat.CanadianEligibilityCode = 2;          //disabled
            Patients.Insert(pat, false);
            PatNum1       = pat.PatNum;
            oldPatient    = pat.Copy();
            pat.Guarantor = pat.PatNum;
            Patients.Update(pat, oldPatient);
            //Extractions
            ProcTC.SetExtracted("23", new DateTime(1995, 2, 7), pat.PatNum);
            ProcTC.SetExtracted("26", new DateTime(1996, 11, 13), pat.PatNum);
            //Missing teeth
            plan                      = new InsPlan();
            plan.CarrierNum           = CarrierTC.GetCarrierNumById("666666");
            plan.GroupNum             = "PLAN012";
            plan.DentaideCardSequence = 3;
            plan.CanadianPlanFlag     = "";
            plan.ClaimFormNum         = 7;  //Canadian claim form
            InsPlans.Insert(plan);
            sub              = new InsSub();
            sub.PlanNum      = plan.PlanNum;
            sub.Subscriber   = pat.PatNum;
            sub.SubscriberID = "AB123C4G";
            InsSubs.Insert(sub);
            patplan              = new PatPlan();
            patplan.PatNum       = pat.PatNum;
            patplan.InsSubNum    = sub.InsSubNum;
            patplan.Relationship = Relat.Self;          //1
            patplan.PatID        = "00";
            patplan.Ordinal      = 1;
            PatPlans.Insert(patplan);
            //PATIENT 2==================================================================
            pat           = new Patient();
            pat.PatStatus = PatientStatus.Patient;
            pat.Position  = PatientPosition.Married;
            pat.Gender    = PatientGender.Male;
            pat.Birthdate = new DateTime(1948, 3, 2);
            pat.LName     = "Smith";
            pat.FName     = "John";
            pat.MiddleI   = "";
            pat.CanadianEligibilityCode = 4;          //code not applicable
            pat.Address  = "P.O. Box 1500";
            pat.Address2 = "Little Field Estates";
            pat.City     = "East Westchester";
            pat.State    = "ON";
            pat.Zip      = "M7F2J9";
            pat.Language = "en";
            Patients.Insert(pat, false);
            PatNum2       = pat.PatNum;
            oldPatient    = pat.Copy();
            pat.Guarantor = pat.PatNum;
            Patients.Update(pat, oldPatient);
            //plan1
            plan                      = new InsPlan();
            plan.CarrierNum           = CarrierTC.GetCarrierNumById("666666");
            plan.GroupNum             = "PLAN02";
            plan.DivisionNo           = "1542B";
            plan.DentaideCardSequence = 0;
            plan.CanadianPlanFlag     = "";
            plan.ClaimFormNum         = 7;  //Canadian claim form
            InsPlans.Insert(plan);
            long planNum_pat2_pri = plan.PlanNum;

            sub              = new InsSub();
            sub.PlanNum      = plan.PlanNum;
            sub.Subscriber   = pat.PatNum;
            sub.SubscriberID = "123432145222";
            InsSubs.Insert(sub);
            long subNum_pat2_pri = sub.InsSubNum;

            patplan              = new PatPlan();
            patplan.PatNum       = pat.PatNum;
            patplan.InsSubNum    = sub.InsSubNum;
            patplan.Relationship = Relat.Self;          //1
            patplan.PatID        = "00";
            patplan.Ordinal      = 1;
            PatPlans.Insert(patplan);
            //plan2
            plan                      = new InsPlan();
            plan.CarrierNum           = CarrierTC.GetCarrierNumById("777777");
            plan.GroupNum             = "P9902";
            plan.DivisionNo           = "";
            plan.DentaideCardSequence = 0;
            plan.CanadianPlanFlag     = "";
            plan.ClaimFormNum         = 7;  //Canadian claim form
            InsPlans.Insert(plan);
            //long planNum_pat2_sec=plan.PlanNum;//won't need this
            sub              = new InsSub();
            sub.PlanNum      = plan.PlanNum;
            sub.Subscriber   = pat.PatNum;
            sub.SubscriberID = "12343B7";
            InsSubs.Insert(sub);
            patplan              = new PatPlan();
            patplan.PatNum       = pat.PatNum;
            patplan.InsSubNum    = sub.InsSubNum;
            patplan.Relationship = Relat.Self;          //1
            patplan.PatID        = "00";
            patplan.Ordinal      = 2;
            PatPlans.Insert(patplan);
            //PATIENT 3=========================================================================
            //common law spouse of pat2.  Pri and sec coverage from spouse.
            pat           = new Patient();
            pat.PatStatus = PatientStatus.Patient;
            pat.Position  = PatientPosition.Married;
            pat.Gender    = PatientGender.Female;
            pat.Birthdate = new DateTime(1978, 4, 12);
            pat.LName     = "Walls";
            pat.FName     = "Mary";
            pat.MiddleI   = "A";
            pat.CanadianEligibilityCode = 4;          //code not applicable
            pat.Address   = "P.O. Box 1500";
            pat.Address2  = "Little Field Estates";
            pat.City      = "East Westchester";
            pat.State     = "ON";
            pat.Zip       = "M7F2J9";
            pat.Language  = "en";
            pat.Guarantor = PatNum2;          //same family as patient #1.
            Patients.Insert(pat, false);
            PatNum3 = pat.PatNum;
            //primary coverage------------------------------
            patplan              = new PatPlan();
            patplan.PatNum       = pat.PatNum;
            patplan.InsSubNum    = subNum_pat2_pri;
            patplan.Relationship = Relat.Spouse;          //2
            patplan.PatID        = "01";
            patplan.Ordinal      = 1;
            PatPlans.Insert(patplan);
            //secondary----------------------------------------
            plan                      = new InsPlan();
            plan.CarrierNum           = CarrierTC.GetCarrierNumById("777777");
            plan.GroupNum             = "P9902";
            plan.DivisionNo           = "";
            plan.DentaideCardSequence = 0;
            plan.CanadianPlanFlag     = "";
            plan.ClaimFormNum         = 7;  //Canadian claim form
            InsPlans.Insert(plan);
            sub              = new InsSub();
            sub.PlanNum      = plan.PlanNum;
            sub.Subscriber   = PatNum2;
            sub.SubscriberID = "12343C7";          //had to add this as separate plan because of unique subscriber id.
            InsSubs.Insert(sub);
            patplan              = new PatPlan();
            patplan.PatNum       = pat.PatNum;
            patplan.InsSubNum    = sub.InsSubNum;
            patplan.Relationship = Relat.Spouse;          //2
            patplan.PatID        = "00";
            patplan.Ordinal      = 2;
            PatPlans.Insert(patplan);
            //PATIENT 4=========================================================================
            //son of pat#2
            pat           = new Patient();
            pat.PatStatus = PatientStatus.Patient;
            pat.Position  = PatientPosition.Child;
            pat.Gender    = PatientGender.Male;
            pat.Birthdate = new DateTime(1988, 11, 2);
            pat.LName     = "Smith";
            pat.FName     = "John";
            pat.MiddleI   = "B";
            pat.CanadianEligibilityCode = 4;          //code not applicable
            pat.Address   = "P.O. Box 1500";
            pat.Address2  = "Little Field Estates";
            pat.City      = "East Westchester";
            pat.State     = "ON";
            pat.Zip       = "M7F2J9";
            pat.Language  = "en";
            pat.Guarantor = PatNum2;          //same family as patient #2.
            Patients.Insert(pat, false);
            PatNum4 = pat.PatNum;
            //primary coverage------------------------------
            patplan              = new PatPlan();
            patplan.PatNum       = pat.PatNum;
            patplan.InsSubNum    = subNum_pat2_pri;
            patplan.Relationship = Relat.Child;          //3
            patplan.PatID        = "02";
            patplan.Ordinal      = 1;
            PatPlans.Insert(patplan);
            //secondary----------------------------------------
            plan                      = new InsPlan();
            plan.CarrierNum           = CarrierTC.GetCarrierNumById("777777");
            plan.GroupNum             = "P9902";
            plan.DivisionNo           = "";
            plan.DentaideCardSequence = 0;
            plan.CanadianPlanFlag     = "";
            plan.ClaimFormNum         = 7;  //Canadian claim form
            InsPlans.Insert(plan);
            sub              = new InsSub();
            sub.PlanNum      = plan.PlanNum;
            sub.Subscriber   = PatNum2;
            sub.SubscriberID = "12343D6";          //had to add this as separate plan because of unique subscriber id.
            InsSubs.Insert(sub);
            patplan              = new PatPlan();
            patplan.PatNum       = pat.PatNum;
            patplan.InsSubNum    = sub.InsSubNum;
            patplan.Relationship = Relat.Child;          //3
            patplan.PatID        = "00";
            patplan.Ordinal      = 2;
            PatPlans.Insert(patplan);
            //PATIENT 5=========================================================================
            pat           = new Patient();
            pat.PatStatus = PatientStatus.Patient;
            pat.Position  = PatientPosition.Single;
            pat.Gender    = PatientGender.Male;
            pat.Birthdate = new DateTime(1964, 5, 16);
            pat.LName     = "Howard";
            pat.FName     = "Bob";
            pat.MiddleI   = "L";
            pat.CanadianEligibilityCode = 4;          //code not applicable
            pat.Address  = "1542 West Boulevard";
            pat.Address2 = "";
            pat.City     = "Fort Happens";
            pat.State    = "SK";
            pat.Zip      = "S4J4D4";
            pat.Language = "en";
            Patients.Insert(pat, false);
            PatNum5       = pat.PatNum;
            oldPatient    = pat.Copy();
            pat.Guarantor = pat.PatNum;
            Patients.Update(pat, oldPatient);
            ToothInitialTC.SetMissing("12", pat.PatNum);
            ToothInitialTC.SetMissing("33", pat.PatNum);
            ToothInitialTC.SetMissing("34", pat.PatNum);
            //ins----------------------------------------------------------------------
            plan                      = new InsPlan();
            plan.CarrierNum           = CarrierTC.GetCarrierNumById("888888");
            plan.GroupNum             = "17542";
            plan.DivisionNo           = "";
            plan.DentaideCardSequence = 0;
            plan.CanadianPlanFlag     = "N";
            plan.ClaimFormNum         = 7;  //Canadian claim form
            InsPlans.Insert(plan);
            sub              = new InsSub();
            sub.PlanNum      = plan.PlanNum;
            sub.Subscriber   = pat.PatNum;
            sub.SubscriberID = "30322145";          //concat bandNumber(303) and familyNumber(22145)
            InsSubs.Insert(sub);
            patplan              = new PatPlan();
            patplan.PatNum       = pat.PatNum;
            patplan.InsSubNum    = sub.InsSubNum;
            patplan.Relationship = Relat.Self;          //1
            patplan.PatID        = "00";
            patplan.Ordinal      = 1;
            PatPlans.Insert(patplan);
            //PATIENT 6=========================================================================
            pat           = new Patient();
            pat.PatStatus = PatientStatus.Patient;
            pat.Position  = PatientPosition.Married;
            pat.Gender    = PatientGender.Female;
            pat.Birthdate = new DateTime(1954, 12, 25);
            pat.LName     = "West";
            pat.FName     = "Martha";
            pat.MiddleI   = "F";
            pat.CanadianEligibilityCode = 4;          //code not applicable
            pat.Address  = "156 East 154 Street";
            pat.Address2 = "";
            pat.City     = "100 Mile House";
            pat.State    = "BC";
            pat.Zip      = "V4V6D7";
            pat.Language = "en";
            Patients.Insert(pat, false);
            PatNum6       = pat.PatNum;
            oldPatient    = pat.Copy();
            pat.Guarantor = pat.PatNum;
            Patients.Update(pat, oldPatient);
            //patient 6b--------------------------------------------------------------------------
            pat           = new Patient();
            pat.PatStatus = PatientStatus.NonPatient;
            pat.Position  = PatientPosition.Married;
            pat.Gender    = PatientGender.Male;
            pat.Birthdate = new DateTime(1952, 06, 25);
            pat.LName     = "West";
            pat.FName     = "Henry";
            pat.MiddleI   = "B";
            pat.CanadianEligibilityCode = 4;          //code not applicable
            pat.Address   = "156 East 154 Street";
            pat.Address2  = "";
            pat.City      = "100 Mile House";
            pat.State     = "BC";
            pat.Zip       = "V4V6D7";
            pat.Language  = "en";
            pat.Guarantor = PatNum6;
            Patients.Insert(pat, false);
            //primary----------------------------------------------------------------------
            plan                      = new InsPlan();
            plan.CarrierNum           = CarrierTC.GetCarrierNumById("666666");
            plan.GroupNum             = "2221";
            plan.DivisionNo           = "BA1765";
            plan.DentaideCardSequence = 0;
            plan.CanadianPlanFlag     = "";
            plan.ClaimFormNum         = 7;  //Canadian claim form
            InsPlans.Insert(plan);
            sub              = new InsSub();
            sub.PlanNum      = plan.PlanNum;
            sub.Subscriber   = PatNum6;
            sub.SubscriberID = "19234G";
            InsSubs.Insert(sub);
            patplan              = new PatPlan();
            patplan.PatNum       = PatNum6;
            patplan.InsSubNum    = sub.InsSubNum;
            patplan.Relationship = Relat.Self;          //1
            patplan.PatID        = "00";
            patplan.Ordinal      = 1;
            PatPlans.Insert(patplan);
            //secondary----------------------------------------------------------------------
            plan                      = new InsPlan();
            plan.CarrierNum           = CarrierTC.GetCarrierNumById("777777");
            plan.GroupNum             = "P4042";
            plan.DivisionNo           = "15476";
            plan.DentaideCardSequence = 0;
            plan.CanadianPlanFlag     = "";
            plan.ClaimFormNum         = 7;  //Canadian claim form
            InsPlans.Insert(plan);
            sub              = new InsSub();
            sub.PlanNum      = plan.PlanNum;
            sub.Subscriber   = pat.PatNum;        //Henry
            sub.SubscriberID = "D6PD4";
            InsSubs.Insert(sub);
            patplan              = new PatPlan();
            patplan.PatNum       = PatNum6;
            patplan.InsSubNum    = sub.InsSubNum;
            patplan.Relationship = Relat.Spouse;          //2
            patplan.PatID        = "01";
            patplan.Ordinal      = 2;
            PatPlans.Insert(patplan);
            //PATIENT 7=========================================================================
            pat           = new Patient();
            pat.PatStatus = PatientStatus.Patient;
            pat.Position  = PatientPosition.Married;
            pat.Gender    = PatientGender.Female;
            pat.Birthdate = new DateTime(1940, 5, 1);
            pat.LName     = "Arpège";
            pat.FName     = "Madeleine";
            pat.MiddleI   = "É";
            pat.CanadianEligibilityCode = 4;          //code not applicable
            pat.Address  = "1542 Rue de Peel, suite 104";
            pat.Address2 = "";
            pat.City     = "Québec";
            pat.State    = "QC";
            pat.Zip      = "H4A2D7";
            pat.Language = "fr";
            Patients.Insert(pat, false);
            PatNum7       = pat.PatNum;
            oldPatient    = pat.Copy();
            pat.Guarantor = pat.PatNum;
            Patients.Update(pat, oldPatient);
            //patient 7b--------------------------------------------------------------------------
            pat           = new Patient();
            pat.PatStatus = PatientStatus.NonPatient;
            pat.Position  = PatientPosition.Married;
            pat.Gender    = PatientGender.Male;
            pat.Birthdate = new DateTime(1945, 6, 25);
            pat.LName     = "Arpège";
            pat.FName     = "Maurice";
            pat.MiddleI   = "L";
            pat.CanadianEligibilityCode = 4;          //code not applicable
            pat.Address   = "1542 Rue de Peel, suite 104";
            pat.Address2  = "";
            pat.City      = "Québec";
            pat.State     = "QC";
            pat.Zip       = "H4A2D7";
            pat.Language  = "fr";
            pat.Guarantor = PatNum7;
            Patients.Insert(pat, false);
            //primary----------------------------------------------------------------------
            plan                      = new InsPlan();
            plan.CarrierNum           = CarrierTC.GetCarrierNumById("777777");
            plan.GroupNum             = "AN99012";
            plan.DivisionNo           = "887B3";
            plan.DentaideCardSequence = 22;
            plan.CanadianPlanFlag     = "";
            plan.ClaimFormNum         = 7;  //Canadian claim form
            InsPlans.Insert(plan);
            sub              = new InsSub();
            sub.PlanNum      = plan.PlanNum;
            sub.Subscriber   = PatNum7;
            sub.SubscriberID = "344C41";
            InsSubs.Insert(sub);
            patplan              = new PatPlan();
            patplan.PatNum       = PatNum7;
            patplan.InsSubNum    = sub.InsSubNum;
            patplan.Relationship = Relat.Self;          //1
            patplan.PatID        = "00";
            patplan.Ordinal      = 1;
            PatPlans.Insert(patplan);
            //secondary----------------------------------------------------------------------
            plan                      = new InsPlan();
            plan.CarrierNum           = CarrierTC.GetCarrierNumById("666666");
            plan.GroupNum             = "P605B2";
            plan.DivisionNo           = "";
            plan.DentaideCardSequence = 0;
            plan.CanadianPlanFlag     = "";
            plan.ClaimFormNum         = 7;  //Canadian claim form
            InsPlans.Insert(plan);
            sub              = new InsSub();
            sub.PlanNum      = plan.PlanNum;
            sub.Subscriber   = pat.PatNum;        //Maurice
            sub.SubscriberID = "D6577";
            InsSubs.Insert(sub);
            patplan              = new PatPlan();
            patplan.PatNum       = PatNum7;
            patplan.InsSubNum    = sub.InsSubNum;
            patplan.Relationship = Relat.Spouse;          //2
            patplan.PatID        = "01";
            patplan.Ordinal      = 2;
            PatPlans.Insert(patplan);
            //PATIENT 8=========================================================================
            pat           = new Patient();
            pat.PatStatus = PatientStatus.Patient;
            pat.Position  = PatientPosition.Married;
            pat.Gender    = PatientGender.Male;
            pat.Birthdate = new DateTime(1946, 5, 1);
            pat.LName     = "Jones";
            pat.FName     = "Fred";
            pat.MiddleI   = "M";
            pat.CanadianEligibilityCode = 4;          //code not applicable
            pat.Address  = "100 Main Street";
            pat.Address2 = "";
            pat.City     = "Terrace";
            pat.State    = "BC";
            pat.Zip      = "V4A2D7";
            pat.Language = "en";
            Patients.Insert(pat, false);
            PatNum8       = pat.PatNum;
            oldPatient    = pat.Copy();
            pat.Guarantor = pat.PatNum;
            Patients.Update(pat, oldPatient);
            //patient 8b--------------------------------------------------------------------------
            pat           = new Patient();
            pat.PatStatus = PatientStatus.NonPatient;
            pat.Position  = PatientPosition.Married;
            pat.Gender    = PatientGender.Female;
            pat.Birthdate = new DateTime(1945, 6, 25);
            pat.LName     = "Jones";
            pat.FName     = "Wanda";
            pat.MiddleI   = "L";
            pat.CanadianEligibilityCode = 4;          //code not applicable
            pat.Address   = "100 Main Street";
            pat.Address2  = "";
            pat.City      = "Terrace";
            pat.State     = "BC";
            pat.Zip       = "V4A2D7";
            pat.Language  = "en";
            pat.Guarantor = PatNum8;
            Patients.Insert(pat, false);
            //primary----------------------------------------------------------------------
            plan                      = new InsPlan();
            plan.CarrierNum           = CarrierTC.GetCarrierNumById("777777");
            plan.GroupNum             = "BN99012";
            plan.DivisionNo           = "887OP";
            plan.DentaideCardSequence = 03;
            plan.CanadianPlanFlag     = "";
            plan.ClaimFormNum         = 7;  //Canadian claim form
            InsPlans.Insert(plan);
            sub              = new InsSub();
            sub.PlanNum      = plan.PlanNum;
            sub.Subscriber   = PatNum8;        //Fred
            sub.SubscriberID = "XX344C41";
            InsSubs.Insert(sub);
            patplan              = new PatPlan();
            patplan.PatNum       = PatNum8;
            patplan.InsSubNum    = sub.InsSubNum;
            patplan.Relationship = Relat.Self;          //1
            patplan.PatID        = "00";
            patplan.Ordinal      = 1;
            PatPlans.Insert(patplan);
            //secondary----------------------------------------------------------------------
            plan                      = new InsPlan();
            plan.CarrierNum           = CarrierTC.GetCarrierNumById("999111");
            plan.GroupNum             = "P300";
            plan.DivisionNo           = "";
            plan.DentaideCardSequence = 0;
            plan.CanadianPlanFlag     = "";
            plan.ClaimFormNum         = 7;  //Canadian claim form
            InsPlans.Insert(plan);
            sub              = new InsSub();
            sub.PlanNum      = plan.PlanNum;
            sub.Subscriber   = pat.PatNum;        //Wanda
            sub.SubscriberID = "12A6577";
            InsSubs.Insert(sub);
            patplan              = new PatPlan();
            patplan.PatNum       = PatNum8;
            patplan.InsSubNum    = sub.InsSubNum;
            patplan.Relationship = Relat.Spouse;          //2
            patplan.PatID        = "01";
            patplan.Ordinal      = 2;
            PatPlans.Insert(patplan);
            //PATIENT 9=========================================================================
            pat           = new Patient();
            pat.PatStatus = PatientStatus.Patient;
            pat.Position  = PatientPosition.Single;
            pat.Gender    = PatientGender.Male;
            pat.Birthdate = new DateTime(1964, 5, 1);
            pat.LName     = "Smith";
            pat.FName     = "Fred";
            pat.MiddleI   = "A";
            pat.CanadianEligibilityCode = 4;          //code not applicable
            pat.Address  = "1500 West 4th Street";
            pat.Address2 = "";
            pat.City     = "Wells";
            pat.State    = "BC";
            pat.Zip      = "V2D2D7";
            pat.Language = "en";
            Patients.Insert(pat, false);
            PatNum9       = pat.PatNum;
            oldPatient    = pat.Copy();
            pat.Guarantor = pat.PatNum;
            Patients.Update(pat, oldPatient);
            //ins-----------------------------------------------------------------------------
            plan                      = new InsPlan();
            plan.CarrierNum           = CarrierTC.GetCarrierNumById("555555");
            plan.GroupNum             = "44C99";
            plan.DivisionNo           = "9914";
            plan.DentaideCardSequence = 0;
            plan.CanadianPlanFlag     = "";
            plan.ClaimFormNum         = 7;  //Canadian claim form
            InsPlans.Insert(plan);
            sub              = new InsSub();
            sub.PlanNum      = plan.PlanNum;
            sub.Subscriber   = pat.PatNum;
            sub.SubscriberID = "344941";
            InsSubs.Insert(sub);
            patplan              = new PatPlan();
            patplan.PatNum       = pat.PatNum;
            patplan.InsSubNum    = sub.InsSubNum;
            patplan.Relationship = Relat.Self;          //1
            patplan.PatID        = "";
            patplan.Ordinal      = 1;
            PatPlans.Insert(patplan);
            return("Patient objects set.\r\nInsPlan objects set.\r\n");
        }