Ejemplo n.º 1
0
        ///<summary>Fills the missing data field on the queueItem that was passed in.  This contains all missing data on this claim.  Claim will not be allowed to be sent electronically unless this string comes back empty.</summary>
        public static void GetMissingData(ClaimSendQueueItem queueItem)         //, out string warnings){
        {
            queueItem.Warnings    = "";
            queueItem.MissingData = "";
            Clearinghouse clearhouse = ClearinghouseL.GetClearinghouse(queueItem.ClearinghouseNum, true);         //Suppress error message in case no default medical clearinghouse set.

            //this is usually just the default clearinghouse or the clearinghouse for the PayorID.
            if (clearhouse == null)
            {
                if (queueItem.MedType == EnumClaimMedType.Dental)
                {
                    queueItem.MissingData += "No default dental clearinghouse set.";
                }
                else
                {
                    queueItem.MissingData += "No default medical/institutional clearinghouse set.";
                }
                return;
            }
            if (clearhouse.Eformat == ElectronicClaimFormat.x837D_4010)
            {
                X837_4010.Validate(queueItem);                //,out warnings);
                //return;
            }
            else if (clearhouse.Eformat == ElectronicClaimFormat.x837D_5010_dental ||
                     clearhouse.Eformat == ElectronicClaimFormat.x837_5010_med_inst)
            {
                X837_5010.Validate(queueItem);                //,out warnings);
                //return;
            }
            else if (clearhouse.Eformat == ElectronicClaimFormat.Renaissance)
            {
                queueItem.MissingData = Renaissance.GetMissingData(queueItem);
                //return;
            }
            else if (clearhouse.Eformat == ElectronicClaimFormat.Canadian)
            {
                queueItem.MissingData = Canadian.GetMissingData(queueItem);
                //return;
            }
            else if (clearhouse.Eformat == ElectronicClaimFormat.Dutch)
            {
                Dutch.GetMissingData(queueItem);                //,out warnings);
                //return;
            }
            //return "";
        }
Ejemplo n.º 2
0
 ///<summary>Fills the missing data field on the queueItem that was passed in.  This contains all missing data on this claim.  Claim will not be allowed to be sent electronically unless this string comes back empty.</summary>
 public static ClaimSendQueueItem GetMissingData(Clearinghouse clearinghouseClin, ClaimSendQueueItem queueItem)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         return(Meth.GetObject <ClaimSendQueueItem>(MethodBase.GetCurrentMethod(), clearinghouseClin, queueItem));
     }
     queueItem.Warnings    = "";
     queueItem.MissingData = "";
     //this is usually just the default clearinghouse or the clearinghouse for the PayorID.
     if (clearinghouseClin == null)
     {
         if (queueItem.MedType == EnumClaimMedType.Dental)
         {
             queueItem.MissingData += "No default dental clearinghouse set.";
         }
         else
         {
             queueItem.MissingData += "No default medical/institutional clearinghouse set.";
         }
         return(queueItem);
     }
     #region Data Sanity Checking (for Replication)
     //Example: We had one replication customer who was able to delete an insurance plan for which was attached to a claim.
     //Imagine two replication servers, server A and server B.  An insplan is created which is not associated to any claims.
     //Both databases have a copy of the insplan.  The internet connection is lost.  On server A, a user deletes the insurance
     //plan (which is allowed because no claims are attached).  On server B, a user creates a claim with the insurance plan.
     //When the internet connection returns, the delete insplan statement is run on server B, which then creates a claim with
     //an invalid InsPlanNum on server B.  Without the checking below, the send claims window would crash for this one scenario.
     Claim   claim   = Claims.GetClaim(queueItem.ClaimNum); //This should always exist, because we just did a select to get the queue item.
     InsPlan insPlan = InsPlans.RefreshOne(claim.PlanNum);
     if (insPlan == null)                                   //Check for missing PlanNums
     {
         queueItem.MissingData = Lans.g("Eclaims", "Claim insurance plan record missing.  Please recreate claim.");
         return(queueItem);
     }
     if (claim.InsSubNum2 != 0)
     {
         InsPlan insPlan2 = InsPlans.RefreshOne(claim.PlanNum2);
         if (insPlan2 == null)               //Check for missing PlanNums
         {
             queueItem.MissingData = Lans.g("Eclaims", "Claim other insurance plan record missing.  Please recreate claim.");
             return(queueItem);                   //This will let the office send other claims that passed validation without throwing an exception.
         }
     }
     #endregion Data Sanity Checking (for Replication)
     if (clearinghouseClin.Eformat == ElectronicClaimFormat.x837D_4010)
     {
         X837_4010.Validate(clearinghouseClin, queueItem);               //,out warnings);
         //return;
     }
     else if (clearinghouseClin.Eformat == ElectronicClaimFormat.x837D_5010_dental ||
              clearinghouseClin.Eformat == ElectronicClaimFormat.x837_5010_med_inst)
     {
         X837_5010.Validate(clearinghouseClin, queueItem);               //,out warnings);
         //return;
     }
     else if (clearinghouseClin.Eformat == ElectronicClaimFormat.Renaissance)
     {
         queueItem.MissingData = Renaissance.GetMissingData(queueItem);
         //return;
     }
     else if (clearinghouseClin.Eformat == ElectronicClaimFormat.Canadian)
     {
         queueItem.MissingData = Canadian.GetMissingData(queueItem);
         //return;
     }
     else if (clearinghouseClin.Eformat == ElectronicClaimFormat.Dutch)
     {
         Dutch.GetMissingData(queueItem);                //,out warnings);
         //return;
     }
     else if (clearinghouseClin.Eformat == ElectronicClaimFormat.Ramq)
     {
         Ramq.GetMissingData(queueItem);
     }
     return(queueItem);
 }