예제 #1
0
        ///<summary>This helper function is called any time a new browser window needs to be opened.  By default, new windows launched by clicking a link
        ///from within the webbrowser control will open in Internet Explorer, even if the system default is another web browser such as Mozilla.  We had a
        ///problem with cookies not being carried over from our webbrowser control into Internet Explorer when a link is clicked.  To preserve cookies, we
        ///intercept the new window creation, cancel it, then launch the destination URL in a new OD browser window.  Cancel the new window creation
        ///inside the calling event.</summary>
        private void CreateNewWindow(string url)
        {
            //For example, the "ScureScripts Drug History" link within the "Compose Rx" tab for NewCrop.
            if (Regex.IsMatch(url, "^.*javascript\\:.*$", RegexOptions.IgnoreCase))           //Ignore tab clicks because the user is not navigating to a new page.
            {
                return;
            }
            FormWebBrowser formNew = new FormWebBrowser(url);          //Open the page in a new window, but stay inside of OD.

            formNew.WindowState = FormWindowState.Normal;
            formNew.Show();            //Non-modal, so that we get the effect of opening in an independent window.
        }
예제 #2
0
 private void butPrint_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(_htmlResponse))
     {
         FormWebBrowser formWB = new FormWebBrowser(htmlContent: _htmlResponse);
         formWB.Show();
         return;
     }
     //only visible in Message mode.
     pagesPrinted   = 0;
     headingPrinted = false;
     PrinterL.TryPrintOrDebugRpPreview(pd_PrintPage,
                                       Lan.g(this, "Electronic benefit request from") + " " + EtransCur.DateTimeTrans.ToShortDateString() + " " + Lan.g(this, "printed"),
                                       auditPatNum: EtransCur.PatNum,
                                       margins: new Margins(25, 25, 40, 80)
                                       );
 }
예제 #3
0
        ///<summary>Sends data for the DXC credit check program link.</summary>
        ///<param name="prog">The program calling this. Should be DXC.</param>
        ///<param name="pat">The current patient.</param>
        public static void SendData(Program prog, Patient pat)
        {
            string url = "https://";

                        #if DEBUG
            url += "prelive.dentalxchange.com";
                        #else
            url += "register.dentalxchange.com";
                        #endif
            url += "/reg/pmslogin";
            Clearinghouse claimConnectClearingHouse = Clearinghouses.GetFirstOrDefault(x => x.CommBridge == EclaimsCommBridge.ClaimConnect);
            if (claimConnectClearingHouse == null)
            {
                MsgBox.Show("ContrAccount", "ClaimConnect clearinghouse not found.");
                return;
            }
            //This is the postdata
            string         postData = $"username={ claimConnectClearingHouse.LoginID }&pwd={ claimConnectClearingHouse.Password }&app=pfs&pagename=creditcheck";
            FormWebBrowser browser  = new FormWebBrowser(url: url, postData: postData, additionalHeaders: "Content-Type: application/x-www-form-urlencoded\r\n");
            browser.Show();
        }
예제 #4
0
        ///<summary>Typically used when user clicks a button to a Program link.  This method attempts to identify and execute the program based on the given programNum.</summary>
        public static void Execute(long programNum, Patient pat)
        {
            Program prog = Programs.GetFirstOrDefault(x => x.ProgramNum == programNum);

            if (prog == null)           //no match was found
            {
                MessageBox.Show("Error, program entry not found in database.");
                return;
            }
            if (pat != null && PrefC.GetBool(PrefName.ShowFeaturePatientClone))
            {
                pat = Patients.GetOriginalPatientForClone(pat);
            }
            if (prog.PluginDllName != "")
            {
                if (pat == null)
                {
                    Plugins.LaunchToolbarButton(programNum, 0);
                }
                else
                {
                    Plugins.LaunchToolbarButton(programNum, pat.PatNum);
                }
                return;
            }
            if (ODBuild.IsWeb() && prog.ProgName.In(Programs.GetListDisabledForWeb().Select(x => x.ToString())))
            {
                MsgBox.Show("ProgramLinks", "Bridge is not available while viewing through the web.");
                return;                //bridge is not available for web users at this time.
            }
            if (prog.ProgName == ProgramName.ActeonImagingSuite.ToString())
            {
                ActeonImagingSuite.SendData(prog, pat);
                return;
            }
            if (prog.ProgName == ProgramName.Adstra.ToString())
            {
                Adstra.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Apixia.ToString())
            {
                Apixia.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Apteryx.ToString())
            {
                Apteryx.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.AudaxCeph.ToString())
            {
                AudaxCeph.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.BencoPracticeManagement.ToString())
            {
                Benco.SendData(prog);
                return;
            }
            else if (prog.ProgName == ProgramName.BioPAK.ToString())
            {
                BioPAK.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.CADI.ToString())
            {
                CADI.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Camsight.ToString())
            {
                Camsight.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.CaptureLink.ToString())
            {
                CaptureLink.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Carestream.ToString())
            {
                Carestream.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Cerec.ToString())
            {
                Cerec.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.CleaRay.ToString())
            {
                CleaRay.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.CliniView.ToString())
            {
                Cliniview.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.ClioSoft.ToString())
            {
                ClioSoft.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.DBSWin.ToString())
            {
                DBSWin.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.DemandForce.ToString())
            {
                DemandForce.SendData(prog, pat);
                return;
            }
#if !DISABLE_WINDOWS_BRIDGES
            else if (prog.ProgName == ProgramName.DentalEye.ToString())
            {
                DentalEye.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.DentalStudio.ToString())
            {
                DentalStudio.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.DentX.ToString())
            {
                DentX.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.DrCeph.ToString())
            {
                DrCeph.SendData(prog, pat);
                return;
            }
#endif
            else if (prog.ProgName == ProgramName.DentalTekSmartOfficePhone.ToString())
            {
                DentalTek.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.DentForms.ToString())
            {
                DentForms.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Dexis.ToString())
            {
                Dexis.SendData(prog, pat);
                return;
            }
#if !DISABLE_WINDOWS_BRIDGES
            else if (prog.ProgName == ProgramName.DexisIntegrator.ToString())
            {
                DexisIntegrator.SendData(prog, pat);
                return;
            }
#endif
            else if (prog.ProgName == ProgramName.Digora.ToString())
            {
                Digora.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Dimaxis.ToString())
            {
                Planmeca.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Office.ToString())
            {
                Office.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Dolphin.ToString())
            {
                Dolphin.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.DXCPatientCreditScore.ToString())
            {
                DentalXChange.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Dxis.ToString())
            {
                Dxis.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.EvaSoft.ToString())
            {
                EvaSoft.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.EwooEZDent.ToString())
            {
                Ewoo.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.FloridaProbe.ToString())
            {
                FloridaProbe.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Guru.ToString())
            {
                Guru.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.HandyDentist.ToString())
            {
                HandyDentist.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.HouseCalls.ToString())
            {
                FormHouseCalls FormHC = new FormHouseCalls();
                FormHC.ProgramCur = prog;
                FormHC.ShowDialog();
                return;
            }
            else if (prog.ProgName == ProgramName.iCat.ToString())
            {
                ICat.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.HdxWill.ToString())
            {
                HdxWill.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.iDixel.ToString())
            {
                iDixel.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.ImageFX.ToString())
            {
                ImageFX.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.iRYS.ToString())
            {
                Irys.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Lightyear.ToString())
            {
                Lightyear.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.NewTomNNT.ToString())
            {
                NewTomNNT.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.MediaDent.ToString())
            {
                MediaDent.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Midway.ToString())
            {
                Midway.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.MiPACS.ToString())
            {
                MiPACS.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.OrthoCAD.ToString())
            {
                OrthoCad.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Oryx.ToString())
            {
                Oryx.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.OrthoInsight3d.ToString())
            {
                OrthoInsight3d.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Owandy.ToString())
            {
                Owandy.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.PandaPerio.ToString())
            {
                PandaPerio.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.PandaPerioAdvanced.ToString())
            {
                PandaPerioAdvanced.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Patterson.ToString())
            {
                Patterson.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.PDMP.ToString())
            {
                string response = "";
                if (PDMP.TrySendData(prog, pat, out response))
                {
                    FormWebBrowser formWebBrowser = new FormWebBrowser(response);
                    formWebBrowser.Show();
                }
                else
                {
                    MessageBox.Show(response, "PDMP");
                }
                return;
            }
            else if (prog.ProgName == ProgramName.PerioPal.ToString())
            {
                PerioPal.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.PracticeByNumbers.ToString())
            {
                PracticeByNumbers.ShowPage();
                return;
            }
            else if (prog.ProgName == ProgramName.Progeny.ToString())
            {
                Progeny.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.PT.ToString())
            {
                PaperlessTechnology.SendData(prog, pat, false);
                return;
            }
            else if (prog.ProgName == ProgramName.PTupdate.ToString())
            {
                PaperlessTechnology.SendData(prog, pat, true);
                return;
            }
            else if (prog.ProgName == ProgramName.RayMage.ToString())
            {
                RayMage.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Romexis.ToString())
            {
                Romexis.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Scanora.ToString())
            {
                Scanora.SendData(prog, pat);
                return;
            }
#if !DISABLE_WINDOWS_BRIDGES
            else if (prog.ProgName == ProgramName.Schick.ToString())
            {
                Schick.SendData(prog, pat);
                return;
            }
#endif
            else if (prog.ProgName == ProgramName.Sirona.ToString())
            {
                Sirona.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.SMARTDent.ToString())
            {
                SmartDent.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Sopro.ToString())
            {
                Sopro.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.TigerView.ToString())
            {
                TigerView.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Triana.ToString())
            {
                Triana.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.TrojanExpressCollect.ToString())
            {
                using (FormTrojanCollect FormT = new FormTrojanCollect(pat)) {
                    FormT.ShowDialog();
                }
                return;
            }
            else if (prog.ProgName == ProgramName.Trophy.ToString())
            {
                Trophy.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.TrophyEnhanced.ToString())
            {
                TrophyEnhanced.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.Tscan.ToString())
            {
                Tscan.SendData(prog, pat);
                return;
            }
#if !DISABLE_WINDOWS_BRIDGES
            else if (prog.ProgName == ProgramName.Vipersoft.ToString())
            {
                Vipersoft.SendData(prog, pat);
                return;
            }
#endif
            else if (prog.ProgName == ProgramName.visOra.ToString())
            {
                Visora.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.VistaDent.ToString())
            {
                VistaDent.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.VixWin.ToString())
            {
                VixWin.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.VixWinBase36.ToString())
            {
                VixWinBase36.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.VixWinBase41.ToString())
            {
                VixWinBase41.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.VixWinNumbered.ToString())
            {
                VixWinNumbered.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.VixWinOld.ToString())
            {
                VixWinOld.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.XDR.ToString())
            {
                XDR.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.XVWeb.ToString())
            {
                XVWeb.SendData(prog, pat);
                return;
            }
            else if (prog.ProgName == ProgramName.ZImage.ToString())
            {
                ZImage.SendData(prog, pat);
                return;
            }
            //all remaining programs:
            try{
                string cmdline        = prog.CommandLine;
                string path           = Programs.GetProgramPath(prog);
                string outputFilePath = prog.FilePath;
                string fileTemplate   = prog.FileTemplate;
                if (pat != null)
                {
                    cmdline = ReplaceHelper(cmdline, pat);
                    path    = ReplaceHelper(path, pat);
                    if (!String.IsNullOrEmpty(outputFilePath) && !String.IsNullOrEmpty(fileTemplate))
                    {
                        fileTemplate = ReplaceHelper(fileTemplate, pat);
                        fileTemplate = fileTemplate.Replace("\n", "\r\n");
                        ODFileUtils.WriteAllTextThenStart(outputFilePath, fileTemplate, path, cmdline);
                        //Nothing else to do so return;
                        return;
                    }
                }
                //We made it this far and we haven't started the program yet so start it.
                ODFileUtils.ProcessStart(path, cmdline);
            }
            catch (Exception e) {
                MessageBox.Show(prog.ProgDesc + " is not available.");
                return;
            }
        }