private void FillObjects() { textResults.Text = ""; Application.DoEvents(); Cursor = Cursors.WaitCursor; if (!DatabaseTools.SetDbConnection("canadatest")) //if database doesn't exist //MessageBox.Show("Database canadatest does not exist."); { DatabaseTools.SetDbConnection(""); textResults.Text += DatabaseTools.FreshFromDump(); //this also sets database to be unittest. } else { textResults.Text += DatabaseTools.ClearDb(); } Prefs.RefreshCache(); List <Userod> listUsers = Userods.GetAll(); Security.CurUser = listUsers[0]; textResults.Text += ProviderTC.SetInitialProviders(); Application.DoEvents(); textResults.Text += CarrierTC.SetInitialCarriers(); Application.DoEvents(); textResults.Text += PatientTC.SetInitialPatients(); Application.DoEvents(); textResults.Text += ClaimTC.CreateAllClaims(); Application.DoEvents(); textResults.Text += PredeterminationTC.CreateAllPredeterminations(); Application.DoEvents(); }
public static string RunEight(bool showForms) { Claim claim = Claims.GetClaim(ClaimNums[7]); InsSubTC.SetAssignBen(true, claim.InsSubNum); CarrierTC.SetEncryptionMethod(claim.PlanNum, 2); return(Run(8, "", "21", claim, showForms)); }
public static string RunTen(bool showForms) { Claim claim = Claims.GetClaim(ClaimNums[9]); InsSubTC.SetAssignBen(true, claim.InsSubNum); CarrierTC.SetEncryptionMethod(claim.PlanNum, 1); return(Run(10, "", "21", claim, showForms)); //test the result of the COB }
public static string RunSeven(bool showForms) { Claim claim = Claims.GetClaim(ClaimNums[6]); InsSubTC.SetAssignBen(false, claim.InsSubNum); CarrierTC.SetEncryptionMethod(claim.PlanNum, 1); return(Run(7, "", "21", claim, showForms)); }
public static string RunThree(bool showForms) { Claim claim = Claims.GetClaim(ClaimNums[2]); InsSubTC.SetAssignBen(false, claim.InsSubNum); CarrierTC.SetEncryptionMethod(claim.PlanNum, 1); return(Run(3, "", "23", claim, showForms, 1, 1, 350, 250)); }
public static string RunFour(bool showForms) { Claim claim = Claims.GetClaim(ClaimNums[3]); InsSubTC.SetAssignBen(false, claim.InsSubNum); CarrierTC.SetEncryptionMethod(claim.PlanNum, 2); return(Run(4, "", "21", claim, showForms)); //expecting EOB }
public static string RunThree(bool showForms) { Claim claim = Claims.GetClaim(ClaimNums[2]); InsSubTC.SetAssignBen(true, claim.InsSubNum); CarrierTC.SetEncryptionMethod(claim.PlanNum, 2); //Even though the test says 1, the example message uses 2 return(Run(3, "", "21", claim, showForms)); //expecting EOB }
public static string RunOne(bool showForms) { Claim claim = Claims.GetClaim(ClaimNums[0]); InsSubTC.SetAssignBen(false, claim.InsSubNum); CarrierTC.SetEncryptionMethod(claim.PlanNum, 2); return(Run(1, "C", "11", claim, showForms)); }
public static string RunEight(bool showForms) { Claim claim = Claims.GetClaim(ClaimNums[9]); InsSubTC.SetAssignBen(false, claim.InsSubNum); CarrierTC.SetEncryptionMethod(claim.PlanNum, 1); return(Run(8, "C", "13", claim, showForms, 1, 1, 0, 0)); }
public static string RunThree() { Claim claim = Claims.GetClaim(ClaimTC.ClaimNums[6]); claim.CanadaTransRefNum = "CCC12345 "; InsSubTC.SetAssignBen(false, claim.InsSubNum); CarrierTC.SetEncryptionMethod(claim.PlanNum, 1); return(Run(3, "R", claim)); }
public static string RunThree() { long carrierNum = CarrierTC.GetCarrierNumById("111555"); Carrier carrier = Carriers.GetCarrier(carrierNum); Provider prov = Providers.GetProv(PrefC.GetLong(PrefName.PracticeDefaultProv)); Etrans etransAck; return(Run(3, carrier, null, prov, out etransAck, new DateTime(1999, 6, 1))); }
public static string RunThree() { long carrierNum = CarrierTC.GetCarrierNumById("111555"); Carrier carrier = Carriers.GetCarrier(carrierNum); Provider prov = Providers.GetProv(PrefC.GetLong(PrefName.PracticeDefaultProv)); List <Etrans> etransAcks; return(Run(1, carrier, prov, prov, new DateTime(1999, 6, 16), out etransAcks)); }
public static string RunTwo() { Claim claim = Claims.GetClaim(ClaimTC.ClaimNums[2]); claim.CanadaTransRefNum = "BCD88345 "; InsSubTC.SetAssignBen(true, claim.InsSubNum); CarrierTC.SetEncryptionMethod(claim.PlanNum, 1); return(Run(2, "A", claim)); //TODO: We need to run the reversal for the secondary claim. Can't do this yet since we don't have COB claims implemented yet. }
public static string RunTwelve(bool showForms) { Claim claim = Claims.GetClaim(ClaimNums[11]); InsSubTC.SetAssignBen(false, claim.InsSubNum); CarrierTC.SetEncryptionMethod(claim.PlanNum, 1); string oldVersion = CarrierTC.SetCDAnetVersion(claim.PlanNum, "02"); string retval = Run(12, "", "21", claim, showForms); CarrierTC.SetCDAnetVersion(claim.PlanNum, oldVersion); return(retval); }
public static string RunFour() { Claim claim = Claims.GetClaim(ClaimTC.ClaimNums[11]); claim.CanadaTransRefNum = "AB123456V2 "; InsSubTC.SetAssignBen(false, claim.InsSubNum); CarrierTC.SetEncryptionMethod(claim.PlanNum, 1); string oldVersion = CarrierTC.SetCDAnetVersion(claim.PlanNum, "02"); string retval = Run(4, "A", claim); CarrierTC.SetCDAnetVersion(claim.PlanNum, oldVersion); return(retval); }
public static string RunSeven(bool showForms) { Claim claim = Claims.GetClaim(ClaimNums[7]); //Claim 7 page 1 InsSubTC.SetAssignBen(false, claim.InsSubNum); CarrierTC.SetEncryptionMethod(claim.PlanNum, 1); string result = Run(7, "", "13", claim, showForms, 1, 2, 0, 0); claim = Claims.GetClaim(ClaimNums[8]); //Claim 7 page 2 InsSubTC.SetAssignBen(false, claim.InsSubNum); CarrierTC.SetEncryptionMethod(claim.PlanNum, 1); result += Environment.NewLine + Run(7, "", "13", claim, showForms, 2, 2, 0, 0); return(result); }
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"); }