Esempio n. 1
0
        private void btnSendToDocscan_Click(object sender, EventArgs e)
        {
            try
            {
                string result = new EmrClass.DocScan.SendToDocScanCls().Send(Program.CurrentRegis.tpr_id, "HS101", Program.CurrentSite.mhs_code, Program.CurrentUser.mut_username);
                lbAlertMsg.Text = result;

                //if (Program.CurrentUser.mut_type.ToString() == "D")
                //{

                //if (docscan.SendtoDocscan("HS101", Program.CurrentRegis.tpr_id, Program.CurrentRegis.tpr_en_no, Program.getCurrentCareProvider))
                //{
                //    lbAlertMsg.Text = HistoryData.savestatus;
                //}
                //else
                //    lbAlertMsg.Text = "Cannot send to docsan user authentication failed";
                //}
                //else
                //lbAlertMsg.Text = "Cannot send to docscan";
            }
            catch (Exception ex)
            {
                lbAlertMsg.Text = ex.Message;
            }
        }
Esempio n. 2
0
        private void btnSendToDocscan_Click(object sender, EventArgs e)
        {
            string rptCode = "";

            switch (tabCarotidUC1.TabSelected)
            {
            case 0:
                rptCode = "CD101";
                break;

            case 1:
                rptCode = "CD102";
                break;

            default:
                rptCode = "CD101";
                break;
            }

            string result = new EmrClass.DocScan.SendToDocScanCls().Send(Program.CurrentRegis.tpr_id, rptCode, Program.CurrentSite.mhs_code, Program.CurrentUser.mut_username);

            lbAlertMsg.Text = result;

            //if (docscan.SendtoDocscan(rptCode, Program.CurrentRegis.tpr_id, Program.CurrentRegis.tpr_en_no, Program.getCurrentCareProvider))
            //{
            //    lbAlertMsg.Text = HistoryData.savestatus;
            //}
            //else
            //    lbAlertMsg.Text = "Cannot send to docsan user authentication failed";
        }
Esempio n. 3
0
        private void btnSendToDocscan_Click(object sender, EventArgs e)
        {
            string rptCode = "";

            switch (tabObstetricsCKUC1.TabSelected)
            {
            case 0:
                rptCode = "PT101";
                break;

            case 1:
                rptCode = "PT101";
                break;

            case 2:

                switch (cmbLang.SelectedIndex)
                {
                case 0:         //ผลการตรวจมะเร็งปากมดลูก (EN)
                    rptCode = "PT102";
                    break;

                case 1:         //ผลการตรวจมะเร็งปากมดลูก (ARB)
                    rptCode = "PT103";
                    break;

                case 2:         //ผลการตรวจมะเร็งปากมดลูก (JAP)
                    //rptCode = IsThai ? new List<string> { "PE701" } : new List<string> { "PE702" };
                    rptCode = "PT104";
                    break;

                default:
                    rptCode = "PT102";
                    break;
                }
                break;

            default:
                rptCode = "PT101";
                break;
            }

            string result = new EmrClass.DocScan.SendToDocScanCls().Send(Program.CurrentRegis.tpr_id, rptCode, Program.CurrentSite.mhs_code, Program.CurrentUser.mut_username);

            lbAlertMsg.Text = result;

            //if (docscan.SendtoDocscan(rptCode, Program.CurrentRegis.tpr_id, Program.CurrentRegis.tpr_en_no, Program.getCurrentCareProvider))
            //{
            //    lbAlertMsg.Text = HistoryData.savestatus;
            //}
            //else
            //    lbAlertMsg.Text = "Cannot send to docsan user authentication failed";
        }
Esempio n. 4
0
        private void btnSend_Click(object sender, EventArgs e)
        {
            try
            {
                if (SaveData())
                {
                    ////Code Not Confirm
                    trn_pft objcurrentpft = (trn_pft)PFTbindingSource1.Current;
                    objcurrentpft.tpf_type       = 'N';
                    objcurrentpft.tpf_doc_result = true;
                    PictureBox p1 = new PictureBox();
                    using (Bitmap bitmap = new Bitmap(pictureBox_result.ClientSize.Width, pictureBox_result.ClientSize.Height))
                    {
                        pictureBox_result.DrawToBitmap(bitmap, pictureBox_result.ClientRectangle);
                        Bitmap bmp = new Bitmap(bitmap);
                        p1.SizeMode = PictureBoxSizeMode.StretchImage;
                        p1.Image    = (Image)bmp;
                    }
                    MemoryStream stream = new MemoryStream();
                    p1.Image.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg);
                    byte[] img1 = stream.ToArray();
                    objcurrentpft.tpf_docscan_img = img1;
                    dbc.SubmitChanges();
                    lbAlertMsg.Text = "Save Data Completed.";
                }

                string result = new EmrClass.DocScan.SendToDocScanCls().Send(Program.CurrentRegis.tpr_id, "LR102", Program.CurrentSite.mhs_code, Program.CurrentUser.mut_username);
                //lbAlertMsg.Text = result;

                //if (docscan.SendtoDocscan("LR102", Program.CurrentRegis.tpr_id, Program.CurrentRegis.tpr_en_no, Program.getCurrentCareProvider))
                //{
                //    lbAlertMsg.Text = "Save Data Completed.";
                //}
                //else
                //{

                //}
            }
            catch
            {
                return;
            }
        }
Esempio n. 5
0
        private void btnSendToDocscan_Click(object sender, EventArgs e)
        {
            if (_tpr_id != null)
            {
                string rptCode = "PE101";
                switch (tabPhyExamUC1.TabSelected)
                {
                case 1:
                    rptCode = "QA103";
                    break;

                case 5:     //off shore
                    rptCode = "PE601";
                    break;

                //case 6: //fit to fly
                //    //rptCode = IsThai ? new List<string> { "PE701" } : new List<string> { "PE702" };
                //    rptCode = "AV103";
                //    break;
                case 7:     // occ med
                    rptCode = "PE701";
                    break;

                default:
                    rptCode = "PE101";
                    break;
                }

                string result = new EmrClass.DocScan.SendToDocScanCls().Send(Program.CurrentRegis.tpr_id, rptCode, Program.CurrentSite.mhs_code, Program.CurrentUser.mut_username);
                lbAlertMsg.Text = result;

                //DocScan docscan = new DocScan();
                //if (docscan.SendtoDocscan(rptCode, Program.CurrentRegis.tpr_id, Program.CurrentRegis.tpr_en_no, Program.getCurrentCareProvider))
                //{
                //    lbAlertMsg.Visible = true;
                //    lbAlertMsg.Text = "Send To Docscan Completed";
                //    return;
                //}
                //else
                //    lbAlertMsg.Text = "Cannot send to docsan user authentication failed";
            }
        }
Esempio n. 6
0
        private void btnSendDoc_Click(object sender, EventArgs e)
        {
            try
            {
                if (Program.CurrentUser.mut_type.ToString() == "D")
                {
                    string code = "QA301";
                    if (radThai.Checked)
                    {
                        code = "QA301";
                    }
                    else
                    {
                        code = "QA302";
                    }
                    string result = new EmrClass.DocScan.SendToDocScanCls().Send(Program.CurrentRegis.tpr_id, code, Program.CurrentSite.mhs_code, Program.CurrentUser.mut_username);
                    lblMsg.Visible = true;
                    lblMsg.Text    = result;

                    //if (docscan.SendtoDocscan(code, Program.CurrentRegis.tpr_id, Program.CurrentRegis.tpr_en_no, Program.getCurrentCareProvider))
                    //{
                    //    lblMsg.Visible = true;
                    //    lblMsg.Text = "Send To Docscan Completed";

                    //    return;

                    //}
                    //else
                    //    lblMsg.Text = "Cannot send to docsan user authentication failed";
                }
                else
                {
                    lblMsg.Text = "Cannot send to docscan";
                }
            }
            catch (Exception ex)
            {
                lblMsg.Text = ex.Message;
            }
        }