Esempio n. 1
0
        private void button_pregCert_Click(object sender, EventArgs e)
        {
            ReportViewer rptViewer = new ReportViewer();

            rptViewer.preparePregCert(consMgr.issue_preg_cert(int.Parse(consId), checkBox_pat_isPregnant.Checked, dateTimePicker_edc.Value.ToString("dd/MM/yyyy")));
            rptViewer.ShowDialog();
        }
Esempio n. 2
0
        private void button_medRec_Click(object sender, EventArgs e)
        {
            ReportViewer rptViewer = new ReportViewer();

            rptViewer.prepareMedicalReport(Login.user.CurrentLoginClinicId, int.Parse(textBox_patId.Text), int.Parse(consId));
            rptViewer.ShowDialog();
        }
Esempio n. 3
0
        private void button_consCert_Click(object sender, EventArgs e)
        {
            ReportViewer rptViewer = new ReportViewer();

            rptViewer.prepareConsultationCert(int.Parse(consId));
            rptViewer.ShowDialog();
        }
Esempio n. 4
0
        private void button_patListing_Click(object sender, EventArgs e)
        {
            ReportViewer rptViewer = new ReportViewer();

            rptViewer.preparePatientListing(Login.user.CurrentLoginClinicId, Login.user.UserId);
            rptViewer.ShowDialog();
        }
Esempio n. 5
0
        private void button_clinicConsStatByDay30_Click(object sender, EventArgs e)
        {
            ReportViewer rptViewer = new ReportViewer();

            rptViewer.prepareClinicConsStatByDay30(Login.user.CurrentLoginClinicId);
            rptViewer.ShowDialog();
        }
Esempio n. 6
0
        private void button_issueSickLeaveCert_Click(object sender, EventArgs e)
        {
            int certId = consMgr.issue_sick_leave_cert(int.Parse(consId), dateTimePicker_sickLeaveStart.Value.ToString("dd/MM/yyyy"), dateTimePicker_sickLeaveEnd.Value.ToString("dd/MM/yyyy"), int.Parse(textBox_sickLeaveNDays.Text));

            if (certId > 0)
            {
                ReportViewer rptViewer = new ReportViewer();
                rptViewer.prepareSickLeaveCert(certId);
                rptViewer.ShowDialog();
            }
            else if (certId == -1)
            {
                MessageBox.Show("現時距離診症完成時間已超24小時, 不能補發病假證明書", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (certId == -2)
            {
                MessageBox.Show("病假開始日期不能早於診症日期", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 7
0
        private void button_finalSave_Click(object sender, EventArgs e)
        {
            String statusMsg = "";
            bool   isSuccess = false;

            String presIds = "";

            foreach (PermissibleValueObj o in comboBox_presId.Items)
            {
                presIds += "||" + o.Value;
            }
            if (presIds.Length > 0)
            {
                presIds = presIds.Substring(2);
            }

            int saveConStatus = consMgr.saveConsultation(consId, textBox_patId.Text, permissibleValueObjListValueToString(examination), permissibleValueObjListNameToString(examination), permissibleValueObjListValueToString(differentiation), permissibleValueObjListNameToString(differentiation), permissibleValueObjListValueToString(diagnosis), permissibleValueObjListNameToString(diagnosis), presIds, permissibleValueObjListValueToString(acupuncture), permissibleValueObjListNameToString(acupuncture), drRmk[0].Value, ref statusMsg);

            if (saveConStatus == 0)
            {
                isSuccess = true;
            }
            else
            {
                if (saveConStatus == 19)
                {
                    DialogResult needChange = MessageBox.Show(statusMsg, "", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);
                    if (needChange == System.Windows.Forms.DialogResult.Yes)
                    {
                        return;
                    }
                    else
                    {
                        isSuccess = true;
                    }
                }
                else
                {
                    isSuccess = false;
                }
            }

            if (isSuccess)
            {
                refresh_consultation_data(false);
                isSuccess = consMgr.confirmedConsultation(consId, ref statusMsg);
                MessageBox.Show(statusMsg, "", MessageBoxButtons.OK, MessageBoxIcon.Information);
                if (isSuccess)
                {
                    refresh_consultation_data(false);
                    DialogResult isPrint = MessageBox.Show("列印處方?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                    if (isPrint == System.Windows.Forms.DialogResult.Yes)
                    {
                        ReportViewer rptViewer = new ReportViewer();
                        rptViewer.preparePrescription(consId);
                        rptViewer.ShowDialog();
                    }
                }
            }
            else
            {
                MessageBox.Show(statusMsg, "", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }