Пример #1
0
        public static string RunFour(bool showForms)
        {
            string  retVal  = "";
            long    provNum = ProviderC.ListShort[1].ProvNum;       //dentist #2
            Patient pat     = Patients.GetPat(PatientTC.PatNum6);   //patient#6

            if (pat.PriProv != provNum)
            {
                Patient oldPat = pat.Copy();
                pat.PriProv = provNum;              //this script uses the primary provider for the patient
                Patients.Update(pat, oldPat);
            }
            PatPlan          patplan        = PatPlans.GetPatPlan(pat.PatNum, 1);
            InsSub           sub            = InsSubs.GetOne(patplan.InsSubNum);
            InsPlan          plan           = InsPlans.GetPlan(sub.PlanNum, new List <InsPlan>());
            long             etransNum      = CanadianOutput.SendElegibility(pat.PatNum, plan, new DateTime(1999, 1, 1), patplan.Relationship, patplan.PatID, showForms, sub);
            Etrans           etrans         = Etranss.GetEtrans(etransNum);
            string           message        = EtransMessageTexts.GetMessageText(etrans.EtransMessageTextNum);
            CCDFieldInputter formData       = new CCDFieldInputter(message);
            string           responseStatus = formData.GetValue("G05");

            if (responseStatus != "M")
            {
                throw new Exception("Should be M");
            }
            retVal += "Eligibility #4 successful.\r\n";
            return(retVal);
        }
Пример #2
0
        public static string RunOne(bool showForms)
        {
            string  retVal  = "";
            long    provNum = ProviderC.ListShort[0].ProvNum;       //dentist #1
            Patient pat     = Patients.GetPat(PatientTC.PatNum1);   //patient#1

            if (pat.PriProv != provNum)
            {
                Patient oldPat = pat.Copy();
                pat.PriProv = provNum;              //this script uses the primary provider for the patient
                Patients.Update(pat, oldPat);
            }
            PatPlan patplan = PatPlans.GetPatPlan(pat.PatNum, 1);
            InsSub  sub     = InsSubs.GetOne(patplan.InsSubNum);
            InsPlan plan    = InsPlans.GetPlan(sub.PlanNum, new List <InsPlan>());
            //the UI would block this due to carrier not supporting this transaction type.
            Clearinghouse    clearinghouseHq   = Clearinghouses.GetDefaultDental();
            Clearinghouse    clearinghouseClin = Clearinghouses.OverrideFields(clearinghouseHq, Clinics.ClinicNum);
            long             etransNum         = CanadianOutput.SendElegibility(clearinghouseClin, pat.PatNum, plan, new DateTime(1999, 1, 1), patplan.Relationship, patplan.PatID, showForms, sub);
            Etrans           etrans            = Etranss.GetEtrans(etransNum);
            string           message           = EtransMessageTexts.GetMessageText(etrans.EtransMessageTextNum);
            CCDFieldInputter formData          = new CCDFieldInputter(message);
            string           responseStatus    = formData.GetValue("G05");

            if (responseStatus != "R")
            {
                throw new Exception("Should be R");
            }
            retVal += "Eligibility #1 successful.\r\n";
            return(retVal);
        }
Пример #3
0
        public static void ProcessIN1(Patient pat, SegmentHL7 seg)
        {
            //as a general strategy, if certain things are the same, like subscriber and carrier,
            //then we change the existing plan.
            //However, if basics change at all, then we drop the old plan and create a new one
            int     ordinal    = PIn.Int(seg.GetFieldFullText(1));
            PatPlan oldPatPlan = PatPlans.GetPatPlan(pat.PatNum, ordinal);

            if (oldPatPlan == null)
            {
                //create a new plan and a new patplan
            }
            //InsPlan oldPlan=InsPlans.g
            //we'll have to get back to this.  This is lower priority than appointments.
        }