Ejemplo n.º 1
0
 private void btHistory_Click(object sender, EventArgs e)
 {
     this.Cursor = Cursors.WaitCursor;
     try
     {
         string dahid = "";
         if (_recordInfo.MediCard != "")
         {
             dahid = HIS.EMR_BLL.OP_EmrDataUpdate.GetPatFileId(_recordInfo.MediCard, _recordInfo.PatName);
         }
         else
         {
             FrmPatList form = new FrmPatList(HIS.EMR_BLL.OP_EmrDataUpdate.GetPatFileId(_recordInfo.PatName));
             form.ShowDialog();
             if (form.IsSure)
             {
                 dahid = form.SelectedFileId;
             }
         }
         if (dahid.Trim() != "")
         {
             FrmEmrList form = new FrmEmrList(HIS.EMR_BLL.OP_EmrDataUpdate.LoadEmrRecord(dahid, Public.PublicStaticFunction.GetEMRTypeCode(_recordInfo.RecordType)));
             form.RecordRowSelected += new EventHandler(EmrList_RecordRowSelected);
             form.ShowDialog();
         }
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Ejemplo n.º 2
0
 private void btUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         DataTable table = (DataTable)this.dGVDataList.DataSource;
         if (table == null)
         {
             return;
         }
         records = new List <EmrRecord>();
         for (int index = 0; index < table.Rows.Count; index++)
         {
             HIS.EMR_BLL.EmrRecord record = new EmrRecord();
             record = (HIS.EMR_BLL.EmrRecord)HIS.SYSTEM.PubicBaseClasses.ApiFunction.DataTableToObject(table, index, record);
             records.Add(record);
         }
         string dahid = "";
         if (this.dGVPatList["MediCard", this.dGVPatList.CurrentCell.RowIndex].Value.ToString().Trim() != "")
         {
             dahid = HIS.EMR_BLL.OP_EmrDataUpdate.GetPatFileId(
                 this.dGVPatList["MediCard", this.dGVPatList.CurrentCell.RowIndex].Value.ToString().Trim(),
                 this.dGVPatList["PatName", this.dGVPatList.CurrentCell.RowIndex].Value.ToString().Trim());
         }
         else
         {
             FrmPatList form = new FrmPatList(HIS.EMR_BLL.OP_EmrDataUpdate.GetPatFileId(this.dGVPatList["PatName", this.dGVPatList.CurrentCell.RowIndex].Value.ToString().Trim()));
             form.ShowDialog();
             if (form.IsSure)
             {
                 dahid = form.SelectedFileId;
             }
         }
         if (dahid.Trim() != "")
         {
             HIS.EMR_BLL.OP_EmrDataUpdate.UploaEmrRecord(dahid, records);
             MessageBox.Show("上传成功!");
             ViewPatData();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "");
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Ejemplo n.º 3
0
        private void toolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            try
            {
                string dahid = "";
                if (_recordInfo.MediCard != "")
                {
                    dahid = HIS.EMR_BLL.OP_EmrDataUpdate.GetPatFileId(_recordInfo.MediCard, _recordInfo.PatName);
                }
                else
                {
                    FrmPatList form = new FrmPatList(HIS.EMR_BLL.OP_EmrDataUpdate.GetPatFileId(_recordInfo.PatName));
                    form.ShowDialog();
                    if (form.IsSure)
                    {
                        dahid = form.SelectedFileId;
                    }
                }
                if (dahid.Trim() != "")
                {
                    object           oMissing = Missing.Value;
                    Word.Application wordApp  = new Word.Application();
                    wordApp.Visible = true;
                    wordApp.Documents.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing);

                    //内容
                    wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphLeft;
                    wordApp.Selection.Font.Size = 10;
                    wordApp.Selection.TypeText(HIS.EMR_BLL.OP_EmrDataUpdate.GetZhxx(dahid, ((ToolStripMenuItem)sender).Tag.ToString()));
                }
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }