Ejemplo n.º 1
0
        ///<summary>An important part of creating a "canadian claim" is setting all the missing teeth.  So this must be passed in.  It is preferrable to not include any dates with the missing teeth.  This will force the user to enter dates.</summary>
        public static CanadianClaim Insert(int claimNum, List <CanadianExtract> missingList)
        {
            CanadianExtracts.UpdateForClaim(claimNum, missingList);
            string command = "INSERT INTO canadianclaim (ClaimNum) VALUES("
                             + "'" + POut.PInt(claimNum) + "')";

            //+"'"+POut.PString(schoolName)+"')";
            General.NonQ(command);
            CanadianClaim retVal = new CanadianClaim();

            retVal.ClaimNum           = claimNum;
            retVal.MaterialsForwarded = "";
            return(retVal);
        }
Ejemplo n.º 2
0
 private void butOK_Click(object sender, System.EventArgs e)
 {
     if (textAccidentDate.errorProvider1.GetError(textAccidentDate) != "" ||
         textDateInitialUpper.errorProvider1.GetError(textDateInitialUpper) != "" ||
         textDateInitialLower.errorProvider1.GetError(textDateInitialLower) != "")
     {
         MsgBox.Show(this, "Please fix data entry errors first.");
         return;
     }
     #region Warnings
     string warning = "";
     if (!radioSecondaryYes.Checked && !radioSecondaryNo.Checked && !radioSecondaryX.Checked)
     {
         if (warning != "")
         {
             warning += "\r\n";
         }
         warning += "Secondary coverage not indicated.";
     }
     if (textReferralProvider.Text != "" && comboReferralReason.SelectedIndex == 0)
     {
         if (warning != "")
         {
             warning += "\r\n";
         }
         warning += "Referral reason is required if provider indicated.";
     }
     if (textReferralProvider.Text == "" && comboReferralReason.SelectedIndex != 0)
     {
         if (warning != "")
         {
             warning += "\r\n";
         }
         warning += "Referring provider required if referring reason is indicated.";
     }
     if (listEligibilityCode.SelectedIndex == 0 && textSchoolName.Text == "")
     {
         if (warning != "")
         {
             warning += "\r\n";
         }
         warning += "School should be entered if full-time student.";
     }
     if (listEligibilityCode.SelectedIndex == -1)
     {
         if (warning != "")
         {
             warning += "\r\n";
         }
         warning += "Eligibility code is required.";
     }
     if (listPayeeCode.SelectedIndex == -1)
     {
         if (warning != "")
         {
             warning += "\r\n";
         }
         warning += "Payee not selected.";
     }
     if (textAccidentDate.Text != "")
     {
         if (PIn.PDate(textAccidentDate.Text) > DateTime.Today)
         {
             if (warning != "")
             {
                 warning += "\r\n";
             }
             warning += "Accident date must be in the past.";
         }
         if (PIn.PDate(textAccidentDate.Text).Year < 1980)
         {
             if (warning != "")
             {
                 warning += "\r\n";
             }
             warning += "Accident date is not reasonable.";
         }
     }
     //Max prosth----------------------------------------------------------------------------------------------------------
     if (!radioMaxProsthYes.Checked && !radioMaxProsthNo.Checked && !radioMaxProsthX.Checked)
     {
         if (warning != "")
         {
             warning += "\r\n";
         }
         warning += "Max prosth not indicated.";
     }
     if (textDateInitialUpper.Text != "")
     {
         if (PIn.PDate(textDateInitialUpper.Text) > DateTime.Today)
         {
             if (warning != "")
             {
                 warning += "\r\n";
             }
             warning += "Initial max date must be in the past.";
         }
         if (PIn.PDate(textDateInitialUpper.Text).Year < 1900)
         {
             if (warning != "")
             {
                 warning += "\r\n";
             }
             warning += "Initial max date is not reasonable.";
         }
     }
     if (radioMaxProsthNo.Checked)
     {
         if (textDateInitialUpper.Text == "")
         {
             if (warning != "")
             {
                 warning += "\r\n";
             }
             warning += "Max initial date is required if 'no' is checked.";
         }
         if (comboMaxProsthMaterial.SelectedIndex == 0)
         {
             if (warning != "")
             {
                 warning += "\r\n";
             }
             warning += "Max prosth material must be indicated";                  // (unless for a crown).";
         }
     }
     if (comboMaxProsthMaterial.SelectedIndex != 0 && radioMaxProsthX.Checked)
     {
         if (warning != "")
         {
             warning += "\r\n";
         }
         warning += "Max prosth should not have a material selected.";
     }
     //Mand prosth----------------------------------------------------------------------------------------------------------
     if (!radioMandProsthYes.Checked && !radioMandProsthNo.Checked && !radioMandProsthX.Checked)
     {
         if (warning != "")
         {
             warning += "\r\n";
         }
         warning += "Mand prosth not indicated.";
     }
     if (textDateInitialLower.Text != "")
     {
         if (PIn.PDate(textDateInitialLower.Text) > DateTime.Today)
         {
             if (warning != "")
             {
                 warning += "\r\n";
             }
             warning += "Initial mand date must be in the past.";
         }
         if (PIn.PDate(textDateInitialLower.Text).Year < 1900)
         {
             if (warning != "")
             {
                 warning += "\r\n";
             }
             warning += "Initial mand date is not reasonable.";
         }
     }
     if (radioMandProsthNo.Checked)
     {
         if (textDateInitialLower.Text == "")
         {
             if (warning != "")
             {
                 warning += "\r\n";
             }
             warning += "Mand initial date is required if 'no' is checked.";
         }
         if (comboMandProsthMaterial.SelectedIndex == 0)
         {
             if (warning != "")
             {
                 warning += "\r\n";
             }
             warning += "Mand prosth material must be indicated";                  // (unless for a crown).";
         }
     }
     if (comboMandProsthMaterial.SelectedIndex != 0 && radioMandProsthX.Checked)
     {
         if (warning != "")
         {
             warning += "\r\n";
         }
         warning += "Mand prosth should not have a material selected.";
     }
     //missing teeth------------------------------------------------------------------------------
     if (radioMandProsthYes.Checked)
     {
         if (comboMandProsthMaterial.SelectedIndex != 7)              //if not a crown
         {
             if (MissingList.Count == 0)
             {
                 if (warning != "")
                 {
                     warning += "\r\n";
                 }
                 warning += "Missing teeth need to be entered.";
             }
             else
             {
                 bool missingDatesPresent = false;
                 for (int i = 0; i < MissingList.Count; i++)
                 {
                     if (MissingList[i].DateExtraction.Year > 1880)
                     {
                         missingDatesPresent = true;
                     }
                 }
                 if (!missingDatesPresent)
                 {
                     if (warning != "")
                     {
                         warning += "\r\n";
                     }
                     warning += "Dates need to be entered for missing teeth.";
                 }
             }
         }
     }
     if (radioMaxProsthYes.Checked)
     {
         if (comboMaxProsthMaterial.SelectedIndex != 7)               //if not a crown
         {
             if (MissingList.Count == 0)
             {
                 if (warning != "")
                 {
                     warning += "\r\n";
                 }
                 warning += "Missing teeth need to be entered.";
             }
             else
             {
                 bool missingDatesPresent = false;
                 for (int i = 0; i < MissingList.Count; i++)
                 {
                     if (MissingList[i].DateExtraction.Year > 1880)
                     {
                         missingDatesPresent = true;
                     }
                 }
                 if (!missingDatesPresent)
                 {
                     if (warning != "")
                     {
                         warning += "\r\n";
                     }
                     warning += "Dates need to be entered for missing teeth.";
                 }
             }
         }
     }
     if (warning != "")
     {
         DialogResult result = MessageBox.Show("Warnings:\r\n" + warning + "\r\nDo you wish to continue anyway?", "",
                                               MessageBoxButtons.OKCancel);
         if (result != DialogResult.OK)
         {
             return;
         }
     }
     #endregion Warnings
     CanCur.MaterialsForwarded = "";
     if (checkEmail.Checked)
     {
         CanCur.MaterialsForwarded += "E";
     }
     if (checkCorrespondence.Checked)
     {
         CanCur.MaterialsForwarded += "C";
     }
     if (checkModels.Checked)
     {
         CanCur.MaterialsForwarded += "M";
     }
     if (checkXrays.Checked)
     {
         CanCur.MaterialsForwarded += "X";
     }
     if (checkImages.Checked)
     {
         CanCur.MaterialsForwarded += "I";
     }
     if (radioSecondaryYes.Checked)
     {
         CanCur.SecondaryCoverage = "Y";
     }
     if (radioSecondaryNo.Checked)
     {
         CanCur.SecondaryCoverage = "N";
     }
     if (radioSecondaryX.Checked)
     {
         CanCur.SecondaryCoverage = "X";
     }
     CanCur.ReferralProviderNum = textReferralProvider.Text;
     CanCur.ReferralReason      = comboReferralReason.SelectedIndex;
     CanCur.EligibilityCode     = listEligibilityCode.SelectedIndex + 1;
     CanCur.SchoolName          = textSchoolName.Text;
     CanCur.PayeeCode           = listPayeeCode.SelectedIndex + 1;
     ClaimCur.AccidentDate      = PIn.PDate(textAccidentDate.Text);
     //CanCur.CardSequenceNumber=PIn.PInt(textCardSequenceNumber.Text);
     //max prosth-----------------------------------------------------------------------------------------------------
     if (radioMaxProsthYes.Checked)
     {
         CanCur.IsInitialUpper = "Y";
     }
     if (radioMaxProsthNo.Checked)
     {
         CanCur.IsInitialUpper = "N";
     }
     if (radioMandProsthX.Checked)
     {
         CanCur.IsInitialUpper = "X";
     }
     CanCur.DateInitialUpper  = PIn.PDate(textDateInitialUpper.Text);
     CanCur.MaxProsthMaterial = comboMaxProsthMaterial.SelectedIndex;
     //mand prosth-----------------------------------------------------------------------------------------------------
     if (radioMandProsthYes.Checked)
     {
         CanCur.IsInitialLower = "Y";
     }
     if (radioMandProsthNo.Checked)
     {
         CanCur.IsInitialLower = "N";
     }
     if (radioMandProsthX.Checked)
     {
         CanCur.IsInitialLower = "X";
     }
     CanCur.DateInitialLower   = PIn.PDate(textDateInitialLower.Text);
     CanCur.MandProsthMaterial = comboMandProsthMaterial.SelectedIndex;
     CanadianExtracts.UpdateForClaim(ClaimCur.ClaimNum, MissingList);
     CanadianClaims.Update(CanCur);
     DialogResult = DialogResult.OK;
 }
Ejemplo n.º 3
0
        private void FormClaimCanadian_Load(object sender, System.EventArgs e)
        {
            comboReferralReason.Items.Add("none");                   //0. -1 never used
            comboReferralReason.Items.Add("Pathological Anomalies"); //1
            comboReferralReason.Items.Add("Disabled (physical or mental)");
            comboReferralReason.Items.Add("Complexity of Treatment");
            comboReferralReason.Items.Add("Seizure Disorders");
            comboReferralReason.Items.Add("Extensive Surgery");
            comboReferralReason.Items.Add("Surgical Complexity");
            comboReferralReason.Items.Add("Rampant decay");
            comboReferralReason.Items.Add("Medical History (to provide details upon request)");
            comboReferralReason.Items.Add("Temporal Mandibular Joint Anomalies");
            comboReferralReason.Items.Add("Accidental Injury");
            comboReferralReason.Items.Add("Anaesthesia complications (local or general)");
            comboReferralReason.Items.Add("Developmental Anomalies");
            comboReferralReason.Items.Add("Behavioral Management");        //13
            listEligibilityCode.Items.Add("Full-time student");            //0
            listEligibilityCode.Items.Add("Disabled");
            listEligibilityCode.Items.Add("Disabled student");
            listEligibilityCode.Items.Add("Code not applicable");
            listPayeeCode.Items.Add("Pay the subscriber");            //0
            listPayeeCode.Items.Add("Pay other third party");
            listPayeeCode.Items.Add("Reserved");
            listPayeeCode.Items.Add("Pay the dentist");
            comboMaxProsthMaterial.Items.Add("not applicable");            //this always starts out selected. -1 never used.
            comboMaxProsthMaterial.Items.Add("Fixed bridge");
            comboMaxProsthMaterial.Items.Add("Maryland bridge");
            comboMaxProsthMaterial.Items.Add("Denture (Acrylic)");
            comboMaxProsthMaterial.Items.Add("Denture (Chrome Cobalt)");
            comboMaxProsthMaterial.Items.Add("Implant (Fixed)");
            comboMaxProsthMaterial.Items.Add("Implant (Removable)");
            comboMaxProsthMaterial.Items.Add("Crown");            //7.  not an official type
            comboMandProsthMaterial.Items.Add("not applicable");  //this always starts out selected. -1 never used.
            comboMandProsthMaterial.Items.Add("Fixed bridge");
            comboMandProsthMaterial.Items.Add("Maryland bridge");
            comboMandProsthMaterial.Items.Add("Denture (Acrylic)");
            comboMandProsthMaterial.Items.Add("Denture (Chrome Cobalt)");
            comboMandProsthMaterial.Items.Add("Implant (Fixed)");
            comboMandProsthMaterial.Items.Add("Implant (Removable)");
            comboMandProsthMaterial.Items.Add("Crown");
            //Load data for this claim---------------------------------------------------------------------------------------------
            if (CanCur.MaterialsForwarded.Contains("E"))
            {
                checkEmail.Checked = true;
            }
            if (CanCur.MaterialsForwarded.Contains("C"))
            {
                checkCorrespondence.Checked = true;
            }
            if (CanCur.MaterialsForwarded.Contains("M"))
            {
                checkModels.Checked = true;
            }
            if (CanCur.MaterialsForwarded.Contains("X"))
            {
                checkXrays.Checked = true;
            }
            if (CanCur.MaterialsForwarded.Contains("I"))
            {
                checkImages.Checked = true;
            }
            //this starts out blank, but they might be editing an existing claim
            if (CanCur.SecondaryCoverage == "Y")
            {
                radioSecondaryYes.Checked = true;
            }
            if (CanCur.SecondaryCoverage == "N")
            {
                radioSecondaryNo.Checked = true;
            }
            if (CanCur.SecondaryCoverage == "X")
            {
                radioSecondaryX.Checked = true;
            }
            textReferralProvider.Text         = CanCur.ReferralProviderNum;
            comboReferralReason.SelectedIndex = CanCur.ReferralReason;
            listEligibilityCode.SelectedIndex = CanCur.EligibilityCode - 1;
            //eg if code is 0, then -1 selected. If code is 1(full-time student), then 0 is selected
            textSchoolName.Text         = CanCur.SchoolName;
            listPayeeCode.SelectedIndex = CanCur.PayeeCode - 1;
            if (ClaimCur.AccidentDate.Year < 1900)
            {
                textAccidentDate.Text = "";
            }
            else
            {
                textAccidentDate.Text = ClaimCur.AccidentDate.ToShortDateString();
            }

            /*if(CanCur.CardSequenceNumber==0){
             *      textCardSequenceNumber.Text="";
             * }
             * else{
             *      textCardSequenceNumber.Text=CanCur.CardSequenceNumber.ToString();
             * }*/
            //max prosth-----------------------------------------------------------------------------------------------------
            if (CanCur.IsInitialUpper == "Y")
            {
                radioMaxProsthYes.Checked = true;
            }
            if (CanCur.IsInitialUpper == "N")
            {
                radioMaxProsthNo.Checked = true;
            }
            if (CanCur.IsInitialUpper == "X")
            {
                radioMaxProsthX.Checked = true;
            }
            if (CanCur.DateInitialUpper.Year < 1880)
            {
                textDateInitialUpper.Text = "";
            }
            else
            {
                textDateInitialUpper.Text = CanCur.DateInitialUpper.ToShortDateString();
            }
            comboMaxProsthMaterial.SelectedIndex = CanCur.MaxProsthMaterial;
            //mand prosth-----------------------------------------------------------------------------------------------------
            if (CanCur.IsInitialLower == "Y")
            {
                radioMandProsthYes.Checked = true;
            }
            if (CanCur.IsInitialLower == "N")
            {
                radioMandProsthNo.Checked = true;
            }
            if (CanCur.IsInitialLower == "X")
            {
                radioMandProsthX.Checked = true;
            }
            if (CanCur.DateInitialLower.Year < 1880)
            {
                textDateInitialLower.Text = "";
            }
            else
            {
                textDateInitialLower.Text = CanCur.DateInitialLower.ToShortDateString();
            }
            comboMandProsthMaterial.SelectedIndex = CanCur.MandProsthMaterial;
            //Missing teeth--------------------------------------------------------------------------------------------------
            MissingList = CanadianExtracts.GetForClaim(CanCur.ClaimNum);
            FillMissing();
        }