コード例 #1
0
        private void GetPatientIdFromWebBrowser(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            WebBrowser myWebBrowser = sender as WebBrowser;

            if (e.Url != null && !string.IsNullOrEmpty(e.Url.Query))
            {
                int    doseSpotPatID;
                string patIdStr = DoseSpot.GetQueryParameterFromQueryString(e.Url.Query, "PatientId");
                if ((!string.IsNullOrEmpty(patIdStr)) && int.TryParse(patIdStr.Trim(), out doseSpotPatID))
                {
                    if (doseSpotPatID != 0)
                    {
                        DoseSpot.CreateOIDForPatient(doseSpotPatID, PatCur.PatNum);
                    }
                }
            }
            myWebBrowser.DocumentCompleted -= new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.GetPatientIdFromWebBrowser);
        }
コード例 #2
0
        private void GetPatientIdFromWebBrowser(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            WebBrowser myWebBrowser = sender as WebBrowser;

            if (e.Url != null && !string.IsNullOrEmpty(e.Url.Query))
            {
                int    doseSpotPatID;
                string patIdStr = DoseSpot.GetQueryParameterFromQueryString(e.Url.Query, "PatientId");
                if ((!string.IsNullOrEmpty(patIdStr)) && int.TryParse(patIdStr.Trim(), out doseSpotPatID))
                {
                    if (doseSpotPatID != 0)
                    {
                        OIDExternal oidExternalForPat = new OIDExternal();
                        oidExternalForPat.rootExternal = DoseSpot.GetDoseSpotRoot() + "." + POut.Int((int)IdentifierType.Patient);
                        oidExternalForPat.IDExternal   = doseSpotPatID.ToString();
                        oidExternalForPat.IDInternal   = PatCur.PatNum;
                        oidExternalForPat.IDType       = IdentifierType.Patient;
                        OIDExternals.Insert(oidExternalForPat);
                    }
                }
            }
            myWebBrowser.DocumentCompleted -= new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.GetPatientIdFromWebBrowser);
        }