Ejemplo n.º 1
0
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }
            DataGridViewRow row = this.dataGridView1.Rows[e.RowIndex];

            EMRDBLib.Operation operation = row.Tag as EMRDBLib.Operation;

            if (operation == null)
            {
                return;
            }
            if (SystemParam.Instance.LocalConfigOption.IsNewTheme)
            {
                PatVisitInfo patVisit = new PatVisitInfo()
                {
                    PATIENT_ID = operation.PATIENT_ID, VISIT_ID = operation.VISIT_ID.ToString(), PATIENT_NAME = operation.PATIENT_NAME
                };
                this.MainForm.SwitchPatient(patVisit);
                return;
            }
            this.MainForm.OpenDocument(string.Empty, operation.PATIENT_ID, operation.VISIT_ID.ToString());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 将数据信息加载到DataGridView中
        /// </summary>
        /// <param name="row"></param>
        /// <param name="qcWorkloadStatInfo"></param>
        private void SetRowData(DataGridViewRow row, EMRDBLib.Operation operation)
        {
            if (row == null || operation == null)
            {
                return;
            }
            if (row.DataGridView == null)
            {
                return;
            }
            row.Cells[this.colPatientID.Index].Value         = operation.PATIENT_ID;
            row.Cells[this.colVisitID.Index].Value           = operation.VISIT_ID == 0?string.Empty:operation.VISIT_ID.ToString();
            row.Cells[this.colDeptName.Index].Value          = operation.DeptName;
            row.Cells[this.colSex.Index].Value               = operation.Sex;
            row.Cells[this.colPatientName.Index].Value       = operation.PATIENT_NAME;
            row.Cells[this.colOpeartionDesc.Index].Value     = operation.OPERATION_DESC;
            row.Cells[this.colOperationDate.Index].Value     = operation.OPERATING_DATE.ToShortDateString();
            row.Cells[this.colOperationNo.Index].Value       = operation.OPERATION_NO;
            row.Cells[this.colOperator.Index].Value          = operation.OPERATOR;
            row.Cells[this.colAnaesthesiaMethod.Index].Value = operation.ANAESTHESIA_METHOD;
            row.Cells[this.colHeal.Index].Value              = operation.HEAL;
            row.Cells[this.col_OPERATION_SCALE.Index].Value  = operation.OPERATION_SCALE;
            row.Cells[this.colWoundGrade.Index].Value        = operation.WOUND_GRADE;

            row.Tag = operation;
        }
Ejemplo n.º 3
0
        private void btnQuery_Click(object sender, EventArgs e)
        {
            DeptInfo deptInfo   = this.cboDeptName.SelectedItem as DeptInfo;
            string   szDeptCode = null;

            if (deptInfo != null)
            {
                szDeptCode = deptInfo.DEPT_CODE;
            }
            if (string.IsNullOrEmpty(this.cboDeptName.Text))
            {
                szDeptCode = null;
            }
            string szPatientID   = txtPatientID.Text.Trim();
            string szPatientName = txtPatientName.Text.Trim();

            GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor);
            this.ShowStatusMessage("正在查询数据,请稍候...");
            this.dataGridView1.Rows.Clear();
            List <EMRDBLib.Operation> lstOperation = null;
            short shRet = SystemData.ReturnValue.OK;

            if (!string.IsNullOrEmpty(szPatientID) || !string.IsNullOrEmpty(szPatientName))
            {
                shRet = OperationAccess.Instance.GetOperations(szPatientID, szPatientName, ref lstOperation);
            }
            else
            {
                shRet = OperationAccess.Instance.GetOperations(szDeptCode, DateTime.Parse(dtpStatTimeBegin.Value.ToString("yyyy-M-d 00:00:00")),
                                                               DateTime.Parse(dtpStatTimeEnd.Value.ToString("yyyy-M-d 23:59:59")), ref lstOperation);
            }
            if (shRet != SystemData.ReturnValue.OK &&
                shRet != SystemData.ReturnValue.RES_NO_FOUND)
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                MessageBoxEx.Show("查询数据失败!");
                return;
            }
            if (lstOperation == null || lstOperation.Count <= 0)
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                this.MainForm.ShowStatusMessage("没有找到符合条件的结果");
                return;
            }
            string pre       = null;
            int    nRowIndex = 0;

            for (int index = 0; index < lstOperation.Count; index++)
            {
                EMRDBLib.Operation operation = lstOperation[index];
                nRowIndex = this.dataGridView1.Rows.Add();
                DataGridViewRow row = this.dataGridView1.Rows[nRowIndex];
                this.SetRowData(row, operation);
            }
            this.ShowStatusMessage(string.Format("查询结果总数:{0}条", this.dataGridView1.Rows.Count.ToString()));
            GlobalMethods.UI.SetCursor(this, Cursors.Default);
        }