コード例 #1
0
        private void frmRegister2_Load(object sender, EventArgs e)
        {
            frmBGScreen frmbg = new frmBGScreen();

            frmbg.Show();
            Application.DoEvents();

            try
            {
                uiFooter1.SetTitle = "1.6 All Patient HPC Site";
                this.WindowState   = FormWindowState.Maximized;
                if (!Program.IsDummy)
                {
                    // Add Button in Gridview
                    DataGridViewButtonColumn dgvButton = new DataGridViewButtonColumn();
                    dgvButton.HeaderText = "Send";
                    dgvButton.Name       = "btnSend";
                    dgvButton.UseColumnTextForButtonValue = true;
                    dgvButton.Text  = "Send";
                    dgvButton.Width = 40;
                    GridWaitingListSendBMS.Columns.Add(dgvButton);
                }
                LoadDataAll();
                //uiFooter1.LoadData();
                timer1.Start();
            }
            catch
            {
            }
            frmbg.Close();
        }
コード例 #2
0
        private void frmWaiting_Load(object sender, EventArgs e)
        {
            this.Text = Program.GetRoomName("Waiting");
            frmBGScreen frmbg = new frmBGScreen();

            frmbg.Show();
            Application.DoEvents();

            //Load Data
            if (Program.CurrentSite != null)
            {
                List <mst_hpc_site> objsite = (from t1 in dbc.mst_hpc_sites
                                               where t1.mhs_status == 'A' && t1.mhs_type == 'P'
                                               select t1).ToList();
                mst_hpc_site newselect = new mst_hpc_site();
                //newselect.mhs_id = 0;
                //newselect.mhs_ename = "Select All";
                //objsite.Add(newselect);

                DDSite.DataSource    = objsite.OrderBy(x => x.mhs_id).ToList();
                DDSite.DisplayMember = "mhs_ename";
                DDSite.ValueMember   = "mhs_id";
                DDSite.SelectedValue = Program.CurrentSite.mhs_id;

                uiQueue1.LoadData(dbc, Program.CurrentSite.mhs_id);
                BindData("", Program.CurrentSite.mhs_id);
            }

            frmbg.Close();
        }
コード例 #3
0
        private void dgvData_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            frmBGScreen frmbg = new frmBGScreen();

            frmbg.Show();
            Application.DoEvents();

            displaychart1.Series["sr"].Points.Clear();
            string str_value;

            str_value = IsFloatOrInt(dgvData.CurrentRow.Cells[3].Value.ToString()).ToString();
            if (str_value == "False")
            {
                lblwarning.Visible      = true;
                lblwarning.Text         = "Cannot display value";
                this.AutoScrollPosition = new Point(0, 0);
                lblwarning.Focus();
            }
            else
            {
                series_chart = dgvData.CurrentRow.Cells[2].Value.ToString();
                strID        = dgvData.CurrentRow.Cells[5].Value.ToString();
                str_value    = GenGraph(str_value);
                System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
            }

            frmbg.Close();
        }
コード例 #4
0
 private void RetrieveXrayBtn_Click(object sender, EventArgs e)
 {
     try
     {
         using (frmBGScreen frmbg = new frmBGScreen())
         {
             frmbg.Show();
             using (Service.WS_CheckupCls ws = new Service.WS_CheckupCls())
             {
                 using (InhCheckupDataContext contxt = new InhCheckupDataContext())
                 {
                     DateTime dateNow = Program.GetServerDateTime();
                     var      patient = contxt.trn_patient_regis
                                        .Where(x => x.tpr_id == Program.CurrentRegis.tpr_id)
                                        .Select(x => new
                     {
                         x.tpr_en_no,
                         x.trn_patient.tpt_hn_no
                     }).FirstOrDefault();
                     ws.InsertDBEmrCheckupResultXray(patient.tpt_hn_no, patient.tpr_en_no, dateNow.AddYears(-5), dateNow, true);
                     //LoadInvestigation();
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Program.MessageError(this.Name, "RetrieveXrayBtn_Click", ex, false);
     }
 }
コード例 #5
0
        private void frmAppointment_Load(object sender, EventArgs e)
        {
            // Add Button in Gridview
            //DataGridViewButtonColumn doppatientButton = new DataGridViewButtonColumn();
            //doppatientButton.HeaderText = "";
            //doppatientButton.Name = "Colcall";
            //doppatientButton.UseColumnTextForButtonValue = true;
            //doppatientButton.Text = "ลงทะเบียน";
            //doppatientButton.Width = 80;
            //dgvAppointments.Columns.Add(doppatientButton);
            timer1.Enabled = false;
            this.Text      = Program.GetRoomName();

            frmBGScreen frmbg = new frmBGScreen();

            frmbg.Show();
            Application.DoEvents();
            //Load Data
            this.LoadAppointmentHead();

            GvQuestionaire.ColumnHeadersHeightSizeMode             = DataGridViewColumnHeadersHeightSizeMode.EnableResizing;
            GvQuestionaire.ColumnHeadersHeight                     = GvQuestionaire.ColumnHeadersHeight * 2;
            GvQuestionaire.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomCenter;

            dgvAppointments.ClearSelection();
            //this.LoadHistoryCheckup();
            //this.LoadAppointment();
            //this.LoadQuestionaire();
            //this.LoadDiagnosis();
            //this.LoadGraphBasicMeasurement();
            //this.LoadLabAll();
            frmbg.Close();
        }
コード例 #6
0
        private void LoadPatient30Day()
        {
            try
            {
                //test date;

                //DateTime dtTest = ddlAppointDate.Value;
                //
                frmBGScreen frmbg = new frmBGScreen();
                frmbg.Show();

                var objPatient = (from t1 in dbc.trn_patient_regis
                                  where t1.tpr_arrive_date.Value.Date == Program.GetServerDateTime().Date
                                  //where System.Data.Linq.SqlClient.SqlMethods.DateDiffDay(t1.tpr_arrive_date, Program.GetServerDateTime()) > 335
                                  select t1).ToList();

                int seq = 1;
                foreach (var data in objPatient)
                {
                    var pt = data.trn_patient;
                    GvPatient30Day.Rows.Add(seq, pt.tpt_hn_no, pt.tpt_othername, data.tpr_arrive_date, data.tpr_mobile_phone);
                    seq++;
                }

                label2.Text = String.Format("Next Annual Checkup 30 Day {0} Records.", GvPatient30Day.RowCount);
                frmbg.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #7
0
        public StatusTransaction isCallQueue(int tps_id, ref string message)
        {
            frmBGScreen frmbg = new frmBGScreen();

            frmbg.Show();
            Application.DoEvents();
            try
            {
                using (InhCheckupDataContext cdc = new InhCheckupDataContext())
                {
                    trn_patient_queue tps = cdc.trn_patient_queues.Where(x => x.tps_id == tps_id &&
                                                                         x.tps_status == "NS" &&
                                                                         x.tps_ns_status == "QL").FirstOrDefault();
                    if (tps != null)
                    {
                        _tpr_id = tps.tpr_id;
                        _tps_id = tps.tps_id;

                        uiUserprofile1.LoadData(_tpr_id);

                        trn_patient_regi tpr = cdc.trn_patient_regis.Where(x => x.tpr_id == _tpr_id).FirstOrDefault();
                        _queue_no = tpr.tpr_queue_no;

                        if (Program.CurrentRegis == null)
                        {
                            btnCallQueue.Visible = true;
                        }
                        else
                        {
                            btnCallQueue.Visible = false;
                            lbAlertMsg.Text      = "ไม่สามารถ Call Queue ได้ เนื่องจากมีผู้ใช้บริการ";
                        }
                        frmbg.Close();
                        this.ShowDialog();
                        tps_id  = tps.tps_id;
                        message = messageAlert;
                        return(transaction);
                    }
                    else
                    {
                        frmbg.Close();
                        message = _queue_no + " ไม่สามารถดำเนินการต่อได้ กรุณาตรวจสอบอีกครั้ง";
                        return(StatusTransaction.NoProcess);
                    }
                }
            }
            catch (Exception ex)
            {
                Program.MessageError("frmManageWaiting", "isCallQueue", ex, false);
                return(StatusTransaction.Error);
            }
        }
コード例 #8
0
        private void frmPatientStatus_Load(object sender, EventArgs e)
        {
            frmBGScreen frmbg = new frmBGScreen();

            frmbg.Show();
            Application.DoEvents();

            uiFooter1.RoomCode    = "XX";
            Program.FooterIsclick = true;
            uiFooter1.LoadData();

            frmbg.Close();
        }
コード例 #9
0
        private void frmPE_Load(object sender, EventArgs e)
        {
            this.Text = Program.GetRoomName();
            frmBGScreen frmbg = new frmBGScreen();

            frmbg.Show();
            Application.DoEvents();

            //Load Data
            LoadLeftGrid();
            this.Loadfrm();

            SetUIProfileHorizontal1();
            //End Load Data

            frmbg.Close();
        }
コード例 #10
0
 private void btnRetreiveLab_Click(object sender, EventArgs e)
 {
     try
     {
         using (frmBGScreen frmbg = new frmBGScreen())
         {
             frmbg.Show();
             using (Service.WS_CheckupCls ws = new Service.WS_CheckupCls())
             {
                 ws.getCheckUpLabResult("", Program.CurrentRegis.tpr_id);
             }
         }
     }
     catch (Exception ex)
     {
         Program.MessageError(this.Name, "btnRetreiveLab_Click", ex, false);
     }
 }
コード例 #11
0
        private void chart1_MouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                frmBGScreen frmbg = new frmBGScreen();
                frmbg.Show();
                Application.DoEvents();

                displaychart1.Series["sr"].Points.Clear();
                Chart itemdata = (Chart)sender;
                strID        = itemdata.Text;
                series_chart = itemdata.Tag.ToString();
                string str_value;
                str_value = IsFloatOrInt(dgvData.CurrentRow.Cells[3].Value.ToString()).ToString();
                GenGraph(str_value);

                frmbg.Close();
            }
        }
コード例 #12
0
        private void frmNextAnnualCheckup_Load(object sender, EventArgs e)
        {
            this.Text = Program.GetRoomName();
            frmBGScreen frmbg = new frmBGScreen();

            frmbg.Show();
            Application.DoEvents();

            //Load Data
            this.LoadPatient30Day();

            GvQuestionaire.ColumnHeadersHeightSizeMode             = DataGridViewColumnHeadersHeightSizeMode.EnableResizing;
            GvQuestionaire.ColumnHeadersHeight                     = GvQuestionaire.ColumnHeadersHeight * 2;
            GvQuestionaire.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomCenter;

            GvPatient30Day.ClearSelection();

            frmbg.Close();
        }
コード例 #13
0
        private void btnRebister_Click(object sender, EventArgs e)
        {
            frmBGScreen frmbg = new frmBGScreen();

            frmbg.Show();
            Application.DoEvents();

            //Avation Type Value
            label18.ForeColor = Color.Black;
            if (Program.GetValueRadioTochar(GBPatienttype) == '2' || Program.GetValueRadioTochar(GBPatienttype) == '4')
            {
                var AvationtypeValue = Program.GetValueRadioTochar(GBAviationType);
                if (AvationtypeValue == null || CBAviationCategory.SelectedValue == null)
                {
                    if (CBAviationCategory.SelectedValue == null)
                    {
                        lbAlertMsg.Text = "Avation Category must have value!";
                    }
                    if (AvationtypeValue == null)
                    {
                        lbAlertMsg.Text = "Avation type must have value!";
                    }
                    lbAlertMsg.Focus();
                    label18.ForeColor = Color.Red;
                    frmbg.Close();
                    return;
                }
            }

            //check NEO Time Correct
            TimeSpan interval;
            bool     isconvert = true;

            try
            {
                interval = TimeSpan.Parse(txtnpotimeRemark.Text.Trim());
            }
            catch (FormatException)
            {
                isconvert = true;
            }
            catch (OverflowException)
            {
                isconvert = false;
            }

            if (RDnpotimeYes.Checked && (txtnpotimeRemark.Text.Trim().Length < 5 || isconvert == false))
            {
                lbAlertMsg.Text = "NPO Time incorrect.";
                lbAlertMsg.Focus();
                frmbg.Close();
                return;
            }

            //Save Data
            try
            {
                Boolean saveIsCompleted = false;
                dbc.Connection.Open();
                DbTransaction trans = dbc.Connection.BeginTransaction();
                dbc.Transaction = trans;
                DateTime datenowvalue = Program.GetServerDateTime();
                var      objregis     = (tmp_patient_regi)this.TmpPatientRegisBindingSource.Current;

                objregis.hn_no        = HNno;
                objregis.appoint_date = AppointDate;//รับค่าจากปุ่มที่กดตอนเปิดหน้าจอ
                objregis.status       = 'N';

                if (CBAviationCategory.Enabled == true && CBAviationCategory.SelectedValue != null)
                {
                    objregis.mac_id = Program.GetValueComboBoxInt(CBAviationCategory);
                }
                else
                {
                    objregis.mac_id = null;
                }

                if (CBDoctorCategory.Enabled == true && CBDoctorCategory.SelectedValue != null)
                {
                    objregis.mdc_id = Program.GetValueComboBoxInt(CBDoctorCategory);
                }
                else
                {
                    objregis.mdc_id = null;
                }
                if (CBHealthCheckUPProgram.SelectedValue != null)
                {
                    objregis.mhc_id = Convert1.ToInt32(CBHealthCheckUPProgram.SelectedValue);
                }
                else
                {
                    objregis.mhc_id = null;
                }
                objregis.patient_type     = Program.GetValueRadioTochar(GBPatienttype);
                objregis.req_pe_bef_chkup = Program.GetValueRadioTochar(GBRequestPEBefore);
                objregis.req_doctor       = Program.GetValueRadioTochar(GBRequestPE);
                if (objregis.req_doctor == 'N')
                {
                    objregis.req_doc_gender     = null;
                    objregis.req_inorout_doctor = string.Empty;
                    objregis.req_doc_code       = string.Empty;
                    objregis.req_doc_name       = string.Empty;
                }
                else
                {
                    objregis.req_doc_gender     = Program.GetValueRadioTochar(GBDoctorGender);
                    objregis.req_inorout_doctor = Program.GetValueRadio(GBRequestDoctor);
                }
                if (RDPatientType_Aviation.Checked || RDPatientType_AviationAircrew.Checked)
                {//ถ้าเลือกAViation ค่อย Save
                    objregis.aviation_type = Program.GetValueRadioTochar(GBAviationType);
                }
                objregis.pe_type   = Program.GetValueRadioTochar(GBPEType);
                objregis.npo_time  = Program.GetValueRadioTochar(GBNPOTime);
                objregis.send_book = Program.GetValueRadioTochar(GBBook);
                objregis.send_to   = Program.GetValueRadioTochar(panelBookSendTo);
                objregis.vip_hpc   = (chkviphpc.Checked) ? true : false;//Added.Akkaradech on 2013-12-24{viphpc}
                try
                {
                    tmpoutdepartmentsBindingSource.EndEdit();
                    TmpPatientRegisBindingSource.EndEdit();
                    dbc.SubmitChanges();
                    dbc.Transaction.Commit();
                    saveIsCompleted = true;
                    Iscompleted     = true;
                }
                catch (Exception ex)
                {
                    dbc.Transaction.Rollback();
                    Program.MessageError(this.Name, "btnRebister_Click", ex, false);
                }
                finally
                {
                    dbc.Connection.Close();
                }

                if (saveIsCompleted == true)
                {
                    lbAlertMsg.Text = "Save data completed.";
                    lbAlertMsg.Focus();
                }
            }
            catch (Exception ex)
            {
                Program.MessageError(this.Name, "btnRebister_Click", ex, false);
            }
            //ปิดหน้าจอมืดๆๆ
            frmbg.Close();
        }
コード例 #14
0
        private void frmPreRegister_Load(object sender, EventArgs e)
        {
            this.Text           = "Pre Register";
            lbDataFullName.Text = FullName;
            lbDataHN.Text       = HNno;
            frmBGScreen frmbg = new frmBGScreen();

            frmbg.Show();
            Application.DoEvents();

            LoadData();

            Application.DoEvents();
            try
            {
                DateTime datenow = Program.GetServerDateTime();

                var objlocation = (from t1 in dbc.mst_locations
                                   where datenow.Date >= t1.mlc_effective_date.Value.Date &&
                                   (t1.mlc_expire_date == null || (t1.mlc_expire_date != null && datenow.Date <= t1.mlc_expire_date.Value.Date))
                                   select new LocationRegis {
                    strlocation = t1.mlc_ename
                }).ToList();
                LocationRegis newselect = new LocationRegis();
                newselect.strlocation = "- Select -";
                objlocation.Insert(0, newselect);
                DDLocation.DataSource    = objlocation;
                DDLocation.DisplayMember = "strlocation";
                DDLocation.ValueMember   = "strlocation";
                if (isAddnew == true)
                {
                    using (Service.WS_TrakcareCls ws = new Service.WS_TrakcareCls())
                    {
                        string SiteCode = Program.CurrentSite.mhs_code;

                        //LoadOutDepart
                        DataTable dtOutDepart = ws.getApptByHN(HNno, SiteCode, datenow.ToString("yyyy-MM-dd"));
                        foreach (DataRow droutDepart in dtOutDepart.Rows)
                        {
                            tmp_out_department newitem = (tmp_out_department)tmpoutdepartmentsBindingSource.AddNew();
                            newitem.description = droutDepart["SER_Desc"].ToString();
                            newitem.location    = droutDepart["CTLOC_Desc"].ToString();

                            try
                            {
                                DateTime dtdata       = Convert.ToDateTime(droutDepart["AS_Date"].ToString());
                                TimeSpan tarrivaltime = TimeSpan.Parse(droutDepart["AS_SessStartTime"].ToString().Replace("PT", "").Replace("H", ":").Replace("M", ""));
                                newitem.start_date = new DateTime(dtdata.Year, dtdata.Month, dtdata.Day, tarrivaltime.Hours, tarrivaltime.Minutes, 0);
                            }
                            catch (Exception)
                            {
                                newitem.start_date = null;
                                return;
                            }
                        }
                    }
                }
                GenRowNoDridoutDepartment();
                //this.GetPackageTakecare(Program.Tmp_GetPtarrived.paadm_rowid);// Load Pacakge
            }
            catch (Exception ex)
            {
                Program.MessageError(this.Name, "frmPreRegister_Load", ex, false);
                //throw;
            }

            //ไม่Default Aviation Type
            RDAviationCategoryNewcase.Enabled = false;
            RDaviationTypeFollowup.Enabled    = false;
            RDAviationCategoryNewcase.Checked = false;
            RDaviationTypeFollowup.Checked    = false;
            CBAviationCategory.Enabled        = false;
            // Other
            GridOtherAddress.AutoGenerateColumns = false;
            panel2.Enabled = true;
            GC.Collect();

            frmbg.Close();
        }
コード例 #15
0
        private void LoadAppointmentHead()
        {
            frmBGScreen frmbg = new frmBGScreen();

            frmbg.Show();

            if (dgvAppointments.Rows.Count > 0)
            {
                dgvAppointments.Rows.Clear();
            }

            try
            {
                using (Service.WS_TrakcareCls ws = new Service.WS_TrakcareCls())
                {
                    string    SiteCode = Program.CurrentSite.mhs_code;
                    DataTable dt       = ws.GetPTAppointment(SiteCode, ddlAppointDate.Value.ToString("yyyy-MM-dd"));

                    if (dt.Rows.Count != 0)
                    {
                        int i = 1;

                        var TmpDT = (from DataRow t1 in dt.Rows
                                     select new
                        {
                            No = i++,
                            HN = t1.Field <string>("PAPMI_No"),
                            Fullname = t1.Field <string>("Fullname"),
                            Date = Program.ConvertDateFromServer(t1.Field <DateTime>("AS_Date").ToString(), t1.Field <TimeSpan>("AS_SessStartTime").ToString()),
                            RowId = t1.Field <string>("APPT_RowId"),
                            TelNo = t1.Field <string>("PAPER_MobPhone")
                                    + ((t1.Field <string>("PAPER_TelO") != null) ? "," + t1.Field <string>("PAPER_TelO") : "")
                                    + ((t1.Field <string>("PAPER_TelH") != null) ? "," + t1.Field <string>("PAPER_TelH") : "")
                        }).ToList();
                        for (int a = 0; a < TmpDT.Count; a++)
                        {
                            dgvAppointments.Rows.Add(TmpDT[a].No, TmpDT[a].HN, TmpDT[a].Fullname, TmpDT[a].Date, TmpDT[a].TelNo, false, false, String.Empty, "ลงทะเบียน", TmpDT[a].RowId, 0);
                        }

                        for (int j = 0; j < dgvAppointments.Rows.Count; j++)
                        {
                            var objAp = (from ap in dbc.trn_appoints
                                         where ap.tap_row_id == dgvAppointments.Rows[j].Cells["Colrowid"].Value.ToString() &&
                                         ap.tap_appoint_date == Convert.ToDateTime(dgvAppointments.Rows[j].Cells["Colarrivedate"].Value)
                                         select ap).ToList();
                            if (objAp.Count != 0)
                            {
                                dgvAppointments.Rows[j].Cells["Colsms"].Value    = objAp[0].tap_contact_sms;
                                dgvAppointments.Rows[j].Cells["Coltel"].Value    = objAp[0].tap_contact_tel;
                                dgvAppointments.Rows[j].Cells["ColtapId"].Value  = objAp[0].tap_id;
                                dgvAppointments.Rows[j].Cells["Colremark"].Value = objAp[0].tap_remark;
                            }
                            else
                            {
                                dgvAppointments.Rows[j].Cells["Colsms"].Value    = false;
                                dgvAppointments.Rows[j].Cells["Coltel"].Value    = false;
                                dgvAppointments.Rows[j].Cells["ColtapId"].Value  = 0;
                                dgvAppointments.Rows[j].Cells["Colremark"].Value = String.Empty;
                            }

                            dgvAppointments.Rows[j].Cells["Colcall"].Value = "ลงทะเบียน";
                        }
                    }
                }
                frmbg.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }