예제 #1
0
        private void btnCopyOrder1_Click(object sender, EventArgs e)
        {
            char padChar = ' ';

            //string copyText = "";
            for (int i = dgvOrder1.SelectedRows.Count - 1; i >= 0; i--)
            {
                string name   = dgvOrder1.SelectedRows[i].Cells[0].Value.ToString();
                int    length = TextLenght(name);
                int    spaces = 20 - length;
                copyText += name.PadRight(spaces + spaces + length, padChar);
                string quantity = dgvOrder1.SelectedRows[i].Cells[1].Value.ToString()
                                  + dgvOrder1.SelectedRows[i].Cells[2].Value.ToString();
                copyText += quantity.PadRight(8);
                copyText += dgvOrder1.SelectedRows[i].Cells[3].Value.ToString().PadRight(12);
                copyText += dgvOrder1.SelectedRows[i].Cells[4].Value.ToString();
                copyText += "\r";
            }
            //try
            //{
            //    WordApp.Selection.InsertAfter(copyText);
            //}
            //catch (Exception error)
            //{
            //    MessageBox.Show(error.Message, error.Source);
            //}
            ///* close current form */
            //this.Close();
            //FocusOnEnd();
            this.DialogResult = DialogResult.OK;
            ThisAddIn.ResetBeginTime();
        }
예제 #2
0
파일: ArchiveEmr.cs 프로젝트: zhanglg40/hmr
        private void btnOk_Click(object sender, EventArgs e)
        {
            ThisAddIn.ResetBeginTime();
            DateTime endDate = dtpDischargedDate.Value;

            RegistryID = lsbArchiveList.Text;
            if (RegistryID == "")
            {
                MessageBox.Show("请选中需要归档的患者!", "提示");
                return;
            }

            if (JudgeNoteStatus(RegistryID) == 0)
            {
                return;
            }
            if (JudgeNoteFilingSetup(RegistryID) == 0)
            {
                return;
            }
            //JudgeNoteSign();

            ThisAddIn.Archive_Single(endDate, RegistryID, lsbArchiveList);
            ThisAddIn.ResetBeginTime();
        }
예제 #3
0
        private void lbTest_SelectedIndexChanged(object sender, EventArgs e)
        {
            dgvTest.Rows.Clear();
            XmlNode form = FindFormNote(EmrConstant.StringGeneral.Test, lbTest.SelectedItem.ToString());

            if (form == null)
            {
                return;
            }

            XmlNodeList items = form.ChildNodes;

            foreach (XmlNode item in items)
            {
                string name      = item.Attributes[EmrConstant.AttributeNames.Name].Value;
                string value     = item.Attributes[EmrConstant.AttributeNames.Value].Value;
                string unit      = item.Attributes[EmrConstant.AttributeNames.Unit].Value;
                string valueunit = item.Attributes[EmrConstant.AttributeNames.ValueUnit].Value;
                string result    = item.Attributes[EmrConstant.AttributeNames.Result].Value;
                dgvTest.Rows.Add(name, value, unit, valueunit, result);
            }
            SelectAllTestItems();

            ThisAddIn.ResetBeginTime();
        }
예제 #4
0
        private void pnlNote_DragDrop(object sender, DragEventArgs e)
        {
            object data = e.Data.GetData(DataFormats.StringFormat);

            string[] items = data.ToString().Split(Delimiters.Colon);
            NewFilingUC(items[1] + ":" + items[2], items[0]);
            ThisAddIn.ResetBeginTime();
        }
예제 #5
0
파일: ArchiveEmr.cs 프로젝트: zhanglg40/hmr
        private void btnSearch_Click(object sender, EventArgs e)
        {
            ThisAddIn.ResetBeginTime();
            DateTime endDate = dtpDischargedDate.Value;

            ThisAddIn.Archive_Search(endDate, lsbArchiveList);
            ThisAddIn.ResetBeginTime();
        }
예제 #6
0
 /*----------------------------------------------------------------------------------------------------
  * copy examination reports onto the word document
  * ------------------------------------------------------------------------------------------------------*/
 private void btCopyExam_Click(object sender, EventArgs e)
 {
     copyText          = rtbExam.Text.Replace("\n", " ");
     this.DialogResult = DialogResult.OK;
     //WordApp.Selection.InsertAfter(text);
     ///* close current form */
     //this.Close();
     //FocusOnEnd();
     ThisAddIn.ResetBeginTime();
 }
예제 #7
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            ThisAddIn.ResetBeginTime();
            XmlDocument doc   = new XmlDocument();
            XmlElement  rules = doc.CreateElement(ElementNames.Rules);

            #region Put into database
            using (gjtEmrService.emrServiceXml es = new gjtEmrService.emrServiceXml())
            {
                try
                {
                    string msg = "";


                    foreach (Control cc in pnlNote.Controls)
                    {
                        FilingUC FilingUC = (FilingUC)cc;
                        msg = es.NewFilingSetup(RegistryID, FilingUC.GetNoteID().Trim(), rules, Globals.DoctorID);
                    }

                    if (pnlNote.Controls.Count == 0)
                    {
                        if (szlx == "个人")
                        {
                            MessageBox.Show("个人归档项目设置为空,将自动引用此人所属科室归档项目", "提示");
                            return;
                        }
                        else
                        {
                            MessageBox.Show("设置完成", "提示");
                            return;
                        }
                    }

                    if (msg == null)
                    {
                        MessageBox.Show("设置完成", "提示");
                        return;
                    }
                    else
                    {
                        MessageBox.Show(msg, ErrorMessage.Error);
                        return;
                    }
                }
                catch (Exception ex)
                {
                    Globals.logAdapter.Record("EX925511256895", ex.Message + ">>" + ex.ToString(), true);

                    return;
                }
            }
            #endregion
            ThisAddIn.ResetBeginTime();
        }
예제 #8
0
        private void tvNotes_ItemDrag(object sender, ItemDragEventArgs e)
        {
            ThisAddIn.ResetBeginTime();
            TreeNode note = (TreeNode)e.Item;

            if (note.Nodes.Count > 0)
            {
                return;
            }
            object item = note.Text + ":" + note.Name;

            DoDragDrop(item, DragDropEffects.Copy);
        }
예제 #9
0
        private void FilingSetup_Resize(object sender, EventArgs e)
        {
            ThisAddIn.ResetBeginTime();
            split.Height = this.Height - split.Top - 34;
            split.Width  = this.Width - 8;


            if (this.Tag != null)
            {
                RemoveFilingUC(this.Tag.ToString());
                this.Tag = null;
            }
            RerangeFilingUC();
        }
예제 #10
0
파일: UnlockEmr.cs 프로젝트: zhanglg40/hmr
 private void btnCancel_Click(object sender, EventArgs e)
 {
     ThisAddIn.ResetBeginTime();
     if (rtbReasion.Text.Length > 0)
     {
         if (MessageBox.Show("放弃开封操作?", ErrorMessage.Warning, MessageBoxButtons.YesNo,
                             MessageBoxIcon.Question, MessageBoxDefaultButton.Button1)
             == DialogResult.No)
         {
             return;
         }
     }
     DialogResult = DialogResult.Cancel;
     Close();
 }
예제 #11
0
파일: UnlockEmr.cs 프로젝트: zhanglg40/hmr
        private void btnOK_Click(object sender, EventArgs e)
        {
            ThisAddIn.ResetBeginTime();
            if (rtbReasion.Text.Length == 0)
            {
                MessageBox.Show("必须填写开封理由!", ErrorMessage.Warning);
                return;
            }
            if (MessageBox.Show("确认开封操作?", ErrorMessage.Warning, MessageBoxButtons.YesNo,
                                MessageBoxIcon.Question, MessageBoxDefaultButton.Button1)
                == DialogResult.No)
            {
                return;
            }

            DialogResult = DialogResult.OK;
            Close();
        }
예제 #12
0
        private void lbExam_SelectedIndexChanged(object sender, EventArgs e)
        {
            /* display examination reports without images */
            rtbExam.Clear();
            XmlNode form = FindFormNote(EmrConstant.StringGeneral.Exam, lbExam.SelectedItem.ToString());

            if (form == null)
            {
                return;
            }

            XmlNodeList items = form.ChildNodes;

            foreach (XmlNode item in items)
            {
                rtbExam.Text += item.Attributes[EmrConstant.AttributeNames.Name].Value + ":" + item.InnerText;
                rtbExam.Text += "\n";
            }
            ThisAddIn.ResetBeginTime();
        }
예제 #13
0
        /*----------------------------------------------------------------------------------------------------
         * copy test result onto the word document
         * ------------------------------------------------------------------------------------------------------*/
        private void btCopyTest_Click(object sender, EventArgs e)
        {
            copyText = "\r" + lbTest.SelectedItem.ToString() + "结果:\r";

            for (int i = dgvTest.SelectedRows.Count - 1; i >= 0; i--)
            {
                for (int j = 0; j < dgvTest.ColumnCount; j++)
                {
                    //copyText += " ";
                    copyText += "  " + dgvTest.SelectedRows[i].Cells[j].Value.ToString();
                }
                copyText += "\r";
            }

            //WordApp.Selection.InsertAfter(copyText);
            ///* close current form */
            //this.Close();
            //FocusOnEnd();
            this.DialogResult = DialogResult.OK;
            ThisAddIn.ResetBeginTime();
        }
예제 #14
0
 private void dgvOrder_MouseClick(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         return;
     }
     if (dgvOrder.Tag.ToString() == StringGeneral.Zero)
     {
         dgvOrder.Tag = StringGeneral.One;
         dgvOrder.BringToFront();
         dgvOrder.Location = new Point(0, 0);
         dgvOrder.Width    = this.Width;
         dgvOrder.Height   = this.Height;
     }
     else
     {
         dgvOrder.Location = dgvOrderLocation;
         dgvOrder.Width    = dgvOrderSize.Width;
         dgvOrder.Height   = dgvOrderSize.Height;
         dgvOrder.Tag      = StringGeneral.Zero;
     }
     ThisAddIn.ResetBeginTime();
 }
예제 #15
0
파일: QCReport.cs 프로젝트: zhanglg40/hmr
 private void ResetBeginTime()
 {
     ThisAddIn.ResetBeginTime();
 }
예제 #16
0
        private void btnSelect_Click(object sender, EventArgs e)
        {
            startDate = dtpStart.Value.ToString(EmrConstant.StringGeneral.DateFormat);
            //criteria += " 00:00:00" + EmrConstant.Delimiters.Seperator;
            endDate = dpendTime.Value.ToString(EmrConstant.StringGeneral.DateFormat);
            // criteria += " 23:59:59" + EmrConstant.Delimiters.Seperator;
            if (dgvQuality.Rows.Count != 0)
            {
                dgvQuality.Rows.Clear();
            }
            Cursor.Current = Cursors.WaitCursor;
            //}
            string departCode = cboDepart.SelectedValue.ToString();

            //医师条件 科室全部
            if (!string.IsNullOrEmpty(departCode))
            {
                if (cboDoctor.Text.Equals("-----") && !string.IsNullOrEmpty(cboDoctor.Text.ToString()))
                {
                    string doctorFiles = Path.Combine(Globals.linkListFolder, ResourceName.DoctorsXml);
                    if (!File.Exists(doctorFiles))
                    {
                        return;
                    }
                    XmlNode patients =
                        ThisAddIn.GetPatients(gjtEmrPatients.PatientGettingMode.PatientsInDepartment, departCode);

                    XmlNode depart = udt.jj.DoctorsAndTheirPatients(doctorFiles, patients);

                    XmlDocument doc = new XmlDocument();
                    XmlElement  qi  = doc.CreateElement(ElementNames.QualityControl);
                    doc.AppendChild(qi);

                    ThisAddIn.ResetBeginTime();
                    if (depart != null)
                    {
                        foreach (XmlNode doctor in depart.ChildNodes)
                        {
                            XmlNode qinfo = null;
                            ThisAddIn.GetQualityInfo(doctor, ref qinfo, startDate, endDate);


                            if (qinfo.ChildNodes.Count > 0)
                            {
                                XmlElement qcinfo = qi.OwnerDocument.CreateElement(ElementNames.QualityInfo);
                                qcinfo.SetAttribute(AttributeNames.Name, doctor.Attributes[AttributeNames.Name].Value);
                                qcinfo.InnerXml = qinfo.InnerXml;
                                qi.AppendChild(qcinfo);
                            }
                        }
                    }
                    qualityInfo = qi;
                }
                else
                {
                    ThisAddIn.ResetBeginTime();
                    XmlDocument doc = new XmlDocument();
                    doctorID = cboDoctor.SelectedValue.ToString();
                    string patientListFileName = udt.MakePatientListFileName(doctorID);
                    if (File.Exists(patientListFileName))
                    {
                        File.Delete(patientListFileName);
                    }
                    ThisAddIn.xmlPatientWriterQL(doctorID, 2, patientListFileName);
                    if (!File.Exists(patientListFileName))
                    {
                        return;
                    }

                    doc.Load(patientListFileName);
                    XmlNode qualityInfos = doc.CreateElement(ElementNames.QualityInfo);
                    if (!ThisAddIn.GetQualityInfo(doc.DocumentElement, ref qualityInfos, startDate, endDate))
                    {
                        return;
                    }

                    XmlNodeList patientss = qualityInfos.SelectNodes(ElementNames.Patient);
                    patients = patientss;

                    doctorID = cboDoctor.SelectedValue.ToString();
                    //qualityInfo = qualityInfos;
                    XmlDocument docc = new XmlDocument();
                    XmlElement  qi   = docc.CreateElement(ElementNames.QualityControl);
                    docc.AppendChild(qi);

                    if (qualityInfos.ChildNodes.Count > 0)
                    {
                        XmlElement qcinfo = qi.OwnerDocument.CreateElement(ElementNames.QualityInfo);
                        //qcinfo.SetAttribute(AttributeNames.Name, "");
                        qcinfo.InnerXml = qualityInfos.InnerXml;
                        qi.AppendChild(qcinfo);
                    }
                    qualityInfo = qi;
                }
            }

            displayPatients();
            Cursor.Current = Cursors.Default;
        }
예제 #17
0
 private void newFlaw_Click(object sender, EventArgs e)
 {
     ThisAddIn.ResetBeginTime();
     //dgvMark1.Rows.Add();
 }