예제 #1
0
        /// <summary>
        /// 从数据库初始化打印内容。如果没有记录,打印空报表。(当从数据库读取时要调用.)
        /// </summary>
        public void m_mthInitPrintContent()
        {
            m_blnWantInit = false;//
            if (m_objPrintInfo == null)
            {
                clsPublicFunction.ShowInformationMessageBox("调用m_mthInitPrintContent之前请首先调用m_mthSetPrintInfo函数");
                return;
            }

            clsEMR_OPInstrumentDomain m_objRecordsDomain = new clsEMR_OPInstrumentDomain();
            long lngRes = m_objRecordsDomain.m_lngGetActiveItemsFromDict(out m_objDict);

            if (m_objPrintInfo.m_strInPatentID == "" || m_objPrintInfo.m_dtmOpenDate == DateTime.MinValue)
            {
                m_objRecordContent = null;
            }
            else
            {
                clsTrackRecordContent objContent = new clsTrackRecordContent();
                lngRes = m_objRecordsDomain.m_lngGetRecordContent(m_objPrintInfo.m_strInPatentID, m_objPrintInfo.m_dtmInPatientDate.ToString("yyyy-MM-dd HH:mm:ss"), m_objPrintInfo.m_dtmOpenDate.ToString("yyyy-MM-dd HH:mm:ss"), out objContent);
                if (lngRes <= 0)
                {
                    return;
                }

                m_objRecordContent = (clsEMR_OPInstrument)objContent;
            }
            m_objRecordsDomain = null;
            //设置表单内容到打印中
            m_objPrintInfo.m_objRecordContent = m_objRecordContent;
        }
예제 #2
0
        /// <summary>
        /// 把特殊记录的值显示到界面上。
        /// </summary>
        /// <param name="p_objContent"></param>
        protected override void m_mthSetGUIFromContent(clsTrackRecordContent p_objContent)
        {
            if (p_objContent == null)
            {
                return;
            }

            clsEMR_OPInstrument objInstrument = p_objContent as clsEMR_OPInstrument;

            if (objInstrument == null)
            {
                return;
            }
            m_dtbInstrumentItem.Clear();

            m_dtpCreateDate.Value = objInstrument.m_dtmRecordDate;
            //clsEmrEmployeeBase_VO objEmpVO = new clsEmrEmployeeBase_VO();
            //objEmployeeSign.m_lngGetEmpByNO(objInstrument.m_strCreateUserID, out objEmpVO);
            //if (objEmpVO != null)
            //{
            //    txtSign.Tag = objEmpVO;
            //    txtSign.Text = objEmpVO.m_strLASTNAME_VCHR;
            //}
            m_lngCurrentEMR_SEQ = objInstrument.m_lngEMR_SEQ;

            #region 签名集合
            if (objInstrument.objSignerArr != null)
            {
                m_mthAddSignToTextBoxBase(new TextBoxBase[] { txtSign }, objInstrument.objSignerArr, new bool[] { true }, false);
                m_mthAddSignToListView(m_lsvOperationer, objInstrument.objSignerArr);
                m_mthAddSignToListView(m_lsvAssitantor, objInstrument.objSignerArr);
                m_mthAddSignToListView(m_lsvInstrumentNurse, objInstrument.objSignerArr);
                m_mthAddSignToListView(m_lsvItinerationNurse, objInstrument.objSignerArr);
                m_mthAddSignToListView(m_lsvCheckNurse, objInstrument.objSignerArr);
                m_mthAddSignToListView(m_lsvCheckNurseName, objInstrument.objSignerArr);
                //m_lsvOperationer.Items.Clear();
                //m_lsvAssitantor.Items.Clear();
                //m_lsvInstrumentNurse.Items.Clear();
                //m_lsvItinerationNurse.Items.Clear();
                //m_lsvCheckNurse.Items.Clear();
                //m_lsvCheckNurseName.Items.Clear();

                //for (int i = 0 ; i < objInstrument.objSignerArr.Length ; i++)
                //{
                //    if (objInstrument.objSignerArr[i].controlName == "m_lsvOperationer")
                //    {
                //        ListViewItem lviNewItem = new ListViewItem(objInstrument.objSignerArr[i].objEmployee.m_strLASTNAME_VCHR);
                //        //ID 检查重复用
                //        lviNewItem.SubItems.Add(objInstrument.objSignerArr[i].objEmployee.m_strEMPID_CHR);
                //        //级别 排序用
                //        lviNewItem.SubItems.Add(objInstrument.objSignerArr[i].objEmployee.m_strLEVEL_CHR);
                //        //tag均为对象
                //        lviNewItem.Tag = objInstrument.objSignerArr[i].objEmployee;
                //        //是按顺序保存故获取顺序也一样
                //        m_lsvOperationer.Items.Add(lviNewItem);
                //    }
                //    else if (objInstrument.objSignerArr[i].controlName == "m_lsvAssitantor")
                //    {
                //        ListViewItem lviNewItem = new ListViewItem(objInstrument.objSignerArr[i].objEmployee.m_strLASTNAME_VCHR);
                //        //ID 检查重复用
                //        lviNewItem.SubItems.Add(objInstrument.objSignerArr[i].objEmployee.m_strEMPID_CHR);
                //        //级别 排序用
                //        lviNewItem.SubItems.Add(objInstrument.objSignerArr[i].objEmployee.m_strLEVEL_CHR);
                //        //tag均为对象
                //        lviNewItem.Tag = objInstrument.objSignerArr[i].objEmployee;
                //        //是按顺序保存故获取顺序也一样
                //        m_lsvAssitantor.Items.Add(lviNewItem);
                //    }
                //    else if (objInstrument.objSignerArr[i].controlName == "m_lsvInstrumentNurse")
                //    {
                //        ListViewItem lviNewItem = new ListViewItem(objInstrument.objSignerArr[i].objEmployee.m_strLASTNAME_VCHR);
                //        //ID 检查重复用
                //        lviNewItem.SubItems.Add(objInstrument.objSignerArr[i].objEmployee.m_strEMPID_CHR);
                //        //级别 排序用
                //        lviNewItem.SubItems.Add(objInstrument.objSignerArr[i].objEmployee.m_strLEVEL_CHR);
                //        //tag均为对象
                //        lviNewItem.Tag = objInstrument.objSignerArr[i].objEmployee;
                //        //是按顺序保存故获取顺序也一样
                //        m_lsvInstrumentNurse.Items.Add(lviNewItem);
                //    }
                //    else if (objInstrument.objSignerArr[i].controlName == "m_lsvItinerationNurse")
                //    {
                //        ListViewItem lviNewItem = new ListViewItem(objInstrument.objSignerArr[i].objEmployee.m_strLASTNAME_VCHR);
                //        //ID 检查重复用
                //        lviNewItem.SubItems.Add(objInstrument.objSignerArr[i].objEmployee.m_strEMPID_CHR);
                //        //级别 排序用
                //        lviNewItem.SubItems.Add(objInstrument.objSignerArr[i].objEmployee.m_strLEVEL_CHR);
                //        //tag均为对象
                //        lviNewItem.Tag = objInstrument.objSignerArr[i].objEmployee;
                //        //是按顺序保存故获取顺序也一样
                //        m_lsvItinerationNurse.Items.Add(lviNewItem);
                //    }
                //    else if (objInstrument.objSignerArr[i].controlName == "m_lsvCheckNurse")
                //    {
                //        ListViewItem lviNewItem = new ListViewItem(objInstrument.objSignerArr[i].objEmployee.m_strLASTNAME_VCHR);
                //        //ID 检查重复用
                //        lviNewItem.SubItems.Add(objInstrument.objSignerArr[i].objEmployee.m_strEMPID_CHR);
                //        //级别 排序用
                //        lviNewItem.SubItems.Add(objInstrument.objSignerArr[i].objEmployee.m_strLEVEL_CHR);
                //        //tag均为对象
                //        lviNewItem.Tag = objInstrument.objSignerArr[i].objEmployee;
                //        //是按顺序保存故获取顺序也一样
                //        m_lsvCheckNurse.Items.Add(lviNewItem);
                //    }
                //    else if (objInstrument.objSignerArr[i].controlName == "m_lsvCheckNurseName")
                //    {
                //        ListViewItem lviNewItem = new ListViewItem(objInstrument.objSignerArr[i].objEmployee.m_strLASTNAME_VCHR);
                //        //ID 检查重复用
                //        lviNewItem.SubItems.Add(objInstrument.objSignerArr[i].objEmployee.m_strEMPID_CHR);
                //        //级别 排序用
                //        lviNewItem.SubItems.Add(objInstrument.objSignerArr[i].objEmployee.m_strLEVEL_CHR);
                //        //tag均为对象
                //        lviNewItem.Tag = objInstrument.objSignerArr[i].objEmployee;
                //        //是按顺序保存故获取顺序也一样
                //        m_lsvCheckNurseName.Items.Add(lviNewItem);
                //    }
                //}
            }
            #endregion

            #region 显示数据到DataGrid
            if (objInstrument.m_objOPInstrument != null)
            {
                int ItemsLength = objInstrument.m_objOPInstrument.Length;
                int EveryColumn = ItemsLength % 3 > 0 ? ItemsLength / 3 + 1 : ItemsLength / 3;
                m_dtbInstrumentItem.BeginLoadData();
                for (int i = 0; i < EveryColumn; i++)
                {
                    string[] strOne = new string[] { objInstrument.m_objOPInstrument[i].m_objOPInstrumentInfo.m_strOPInstrumentName,
                                                     objInstrument.m_objOPInstrument[i].m_strBeforeOP,
                                                     objInstrument.m_objOPInstrument[i].m_strBeforeClose,
                                                     objInstrument.m_objOPInstrument[i].m_strAfterClose };
                    string[] strTwo = null;
                    if (i + EveryColumn < ItemsLength)
                    {
                        strTwo = new string[] { objInstrument.m_objOPInstrument[i + EveryColumn].m_objOPInstrumentInfo.m_strOPInstrumentName,
                                                objInstrument.m_objOPInstrument[i + EveryColumn].m_strBeforeOP,
                                                objInstrument.m_objOPInstrument[i + EveryColumn].m_strBeforeClose,
                                                objInstrument.m_objOPInstrument[i + EveryColumn].m_strAfterClose };
                    }
                    string[] strThree = null;
                    if (i + 2 * EveryColumn < ItemsLength)
                    {
                        strThree = new string[] { objInstrument.m_objOPInstrument[i + 2 * EveryColumn].m_objOPInstrumentInfo.m_strOPInstrumentName,
                                                  objInstrument.m_objOPInstrument[i + 2 * EveryColumn].m_strBeforeOP,
                                                  objInstrument.m_objOPInstrument[i + 2 * EveryColumn].m_strBeforeClose,
                                                  objInstrument.m_objOPInstrument[i + 2 * EveryColumn].m_strAfterClose };
                    }
                    m_dtbInstrumentItem.LoadDataRow(AddObject(strOne, strTwo, strThree), true);
                }
                m_dtbInstrumentItem.EndLoadData();
            }
            #endregion

            m_cmdRecorder.Enabled   = false;
            m_dtpCreateDate.Enabled = false;
        }
예제 #3
0
        /// <summary>
        /// 从界面获取特殊记录的值。如果界面值出错,返回null。
        /// </summary>
        /// <returns></returns>
        protected override clsTrackRecordContent m_objGetContentFromGUI()
        {
            //界面参数校验
            if (m_objCurrentPatient == null || m_ObjCurrentEmrPatientSession == null)
            {
                return(null);
            }

            if (txtSign.Tag == null)
            {
                clsPublicFunction.ShowInformationMessageBox("请记录者签名!");
                return(null);
            }
            clsEMR_OPInstrument objInstrument = new clsEMR_OPInstrument();

            objInstrument.m_dtmRecordDate = m_dtpCreateDate.Value;
            clsEmrEmployeeBase_VO objCreat = txtSign.Tag as clsEmrEmployeeBase_VO;

            if (objCreat != null)
            {
                objInstrument.m_strCreateUserID = objCreat.m_strEMPNO_CHR;
            }
            objInstrument.m_strModifyUserID = clsEMRLogin.LoginInfo.m_strEmpNo;
            #region 获取签名集合
            int intSignCount = 0;

            intSignCount = m_lsvOperationer.Items.Count + m_lsvAssitantor.Items.Count + m_lsvInstrumentNurse.Items.Count
                           + m_lsvItinerationNurse.Items.Count + m_lsvCheckNurse.Items.Count + m_lsvCheckNurseName.Items.Count + 1;
            objInstrument.objSignerArr = new clsEmrSigns_VO[intSignCount];
            m_mthGetSignArr(new Control[] { m_lsvOperationer, m_lsvAssitantor, m_lsvInstrumentNurse, m_lsvCheckNurseName, m_lsvCheckNurse, m_lsvItinerationNurse, txtSign }, ref objInstrument.objSignerArr, ref strUserIDList, ref strUserNameList);
            //int currentSignCount = 0;
            //for (int i = 0 ; i < m_lsvOperationer.Items.Count ; i++)
            //{
            //    objInstrument.objSignerArr[i] = new clsEmrSigns_VO();
            //    objInstrument.objSignerArr[i].objEmployee = new clsEmrEmployeeBase_VO();
            //    objInstrument.objSignerArr[i].objEmployee = (clsEmrEmployeeBase_VO)(m_lsvOperationer.Items[i].Tag);
            //    objInstrument.objSignerArr[i].controlName = "m_lsvOperationer";
            //    objInstrument.objSignerArr[i].m_strFORMID_VCHR = "frmEMR_OPInstrumentQty";
            //    objInstrument.objSignerArr[i].m_strREGISTERID_CHR = com.digitalwave.emr.BEDExplorer.frmHRPExplorer.objpCurrentPatient.m_strREGISTERID_CHR;
            //}
            //currentSignCount = m_lsvOperationer.Items.Count;

            //for (int i = 0 ; i < m_lsvAssitantor.Items.Count ; i++)
            //{
            //    objInstrument.objSignerArr[currentSignCount + i] = new clsEmrSigns_VO();
            //    objInstrument.objSignerArr[currentSignCount + i].objEmployee = new clsEmrEmployeeBase_VO();
            //    objInstrument.objSignerArr[currentSignCount + i].objEmployee = (clsEmrEmployeeBase_VO)(m_lsvAssitantor.Items[i].Tag);
            //    objInstrument.objSignerArr[currentSignCount + i].controlName = "m_lsvAssitantor";
            //    objInstrument.objSignerArr[currentSignCount + i].m_strFORMID_VCHR = "frmEMR_OPInstrumentQty";
            //    objInstrument.objSignerArr[currentSignCount + i].m_strREGISTERID_CHR = com.digitalwave.emr.BEDExplorer.frmHRPExplorer.objpCurrentPatient.m_strREGISTERID_CHR;
            //}
            //currentSignCount += m_lsvAssitantor.Items.Count;

            //for (int i = 0 ; i < m_lsvInstrumentNurse.Items.Count ; i++)
            //{
            //    objInstrument.objSignerArr[currentSignCount + i] = new clsEmrSigns_VO();
            //    objInstrument.objSignerArr[currentSignCount + i].objEmployee = new clsEmrEmployeeBase_VO();
            //    objInstrument.objSignerArr[currentSignCount + i].objEmployee = (clsEmrEmployeeBase_VO)(m_lsvInstrumentNurse.Items[i].Tag);
            //    objInstrument.objSignerArr[currentSignCount + i].controlName = "m_lsvInstrumentNurse";
            //    objInstrument.objSignerArr[currentSignCount + i].m_strFORMID_VCHR = "frmEMR_OPInstrumentQty";
            //    objInstrument.objSignerArr[currentSignCount + i].m_strREGISTERID_CHR = com.digitalwave.emr.BEDExplorer.frmHRPExplorer.objpCurrentPatient.m_strREGISTERID_CHR;
            //}
            //currentSignCount += m_lsvInstrumentNurse.Items.Count;

            //for (int i = 0 ; i < m_lsvItinerationNurse.Items.Count ; i++)
            //{
            //    objInstrument.objSignerArr[currentSignCount + i] = new clsEmrSigns_VO();
            //    objInstrument.objSignerArr[currentSignCount + i].objEmployee = new clsEmrEmployeeBase_VO();
            //    objInstrument.objSignerArr[currentSignCount + i].objEmployee = (clsEmrEmployeeBase_VO)(m_lsvItinerationNurse.Items[i].Tag);
            //    objInstrument.objSignerArr[currentSignCount + i].controlName = "m_lsvItinerationNurse";
            //    objInstrument.objSignerArr[currentSignCount + i].m_strFORMID_VCHR = "frmEMR_OPInstrumentQty";
            //    objInstrument.objSignerArr[currentSignCount + i].m_strREGISTERID_CHR = com.digitalwave.emr.BEDExplorer.frmHRPExplorer.objpCurrentPatient.m_strREGISTERID_CHR;
            //}
            //currentSignCount += m_lsvItinerationNurse.Items.Count;

            //for (int i = 0 ; i < m_lsvCheckNurse.Items.Count ; i++)
            //{
            //    objInstrument.objSignerArr[currentSignCount + i] = new clsEmrSigns_VO();
            //    objInstrument.objSignerArr[currentSignCount + i].objEmployee = new clsEmrEmployeeBase_VO();
            //    objInstrument.objSignerArr[currentSignCount + i].objEmployee = (clsEmrEmployeeBase_VO)(m_lsvCheckNurse.Items[i].Tag);
            //    objInstrument.objSignerArr[currentSignCount + i].controlName = "m_lsvCheckNurse";
            //    objInstrument.objSignerArr[currentSignCount + i].m_strFORMID_VCHR = "frmEMR_OPInstrumentQty";
            //    objInstrument.objSignerArr[currentSignCount + i].m_strREGISTERID_CHR = com.digitalwave.emr.BEDExplorer.frmHRPExplorer.objpCurrentPatient.m_strREGISTERID_CHR;
            //}
            //currentSignCount += m_lsvCheckNurse.Items.Count;

            //for (int i = 0 ; i < m_lsvCheckNurseName.Items.Count ; i++)
            //{
            //    objInstrument.objSignerArr[currentSignCount + i] = new clsEmrSigns_VO();
            //    objInstrument.objSignerArr[currentSignCount + i].objEmployee = new clsEmrEmployeeBase_VO();
            //    objInstrument.objSignerArr[currentSignCount + i].objEmployee = (clsEmrEmployeeBase_VO)(m_lsvCheckNurseName.Items[i].Tag);
            //    objInstrument.objSignerArr[currentSignCount + i].controlName = "m_lsvCheckNurseName";
            //    objInstrument.objSignerArr[currentSignCount + i].m_strFORMID_VCHR = "frmEMR_OPInstrumentQty";
            //    objInstrument.objSignerArr[currentSignCount + i].m_strREGISTERID_CHR = com.digitalwave.emr.BEDExplorer.frmHRPExplorer.objpCurrentPatient.m_strREGISTERID_CHR;
            //}

            //objInstrument.objSignerArr[intSignCount - 1] = new clsEmrSigns_VO();
            //objInstrument.objSignerArr[intSignCount - 1].objEmployee = new clsEmrEmployeeBase_VO();
            //objInstrument.objSignerArr[intSignCount - 1].objEmployee = (clsEmrEmployeeBase_VO)(txtSign.Tag);
            //objInstrument.objSignerArr[intSignCount - 1].controlName = "txtSign";
            //objInstrument.objSignerArr[intSignCount - 1].m_strFORMID_VCHR = "frmEMR_OPInstrumentQty";
            //objInstrument.objSignerArr[intSignCount - 1].m_strREGISTERID_CHR = com.digitalwave.emr.BEDExplorer.frmHRPExplorer.objpCurrentPatient.m_strREGISTERID_CHR;
            #endregion

            #region 获取DataGrid内容
            m_txtBedNO.Focus();
            m_dtgInstrument.EndEdit();
            objInstrument.m_objOPInstrument = new clsEMR_OPInstrumentItem[m_objDictArr.Length];
            int intRowNum = m_dtbInstrumentItem.Rows.Count;
            for (int i = 0; i < intRowNum; i++)
            {
                objInstrument.m_objOPInstrument[i] = new clsEMR_OPInstrumentItem();
                objInstrument.m_objOPInstrument[i].m_objOPInstrumentInfo = m_objDictArr[i];
                objInstrument.m_objOPInstrument[i].m_strAfterClose       = m_dtbInstrumentItem.Rows[i][3].ToString();
                objInstrument.m_objOPInstrument[i].m_strBeforeClose      = m_dtbInstrumentItem.Rows[i][2].ToString();
                objInstrument.m_objOPInstrument[i].m_strBeforeOP         = m_dtbInstrumentItem.Rows[i][1].ToString();

                if (m_dtbInstrumentItem.Rows[i][4] != DBNull.Value && i + intRowNum < m_objDictArr.Length)
                {
                    objInstrument.m_objOPInstrument[i + intRowNum] = new clsEMR_OPInstrumentItem();
                    objInstrument.m_objOPInstrument[i + intRowNum].m_objOPInstrumentInfo = m_objDictArr[i + intRowNum];
                    objInstrument.m_objOPInstrument[i + intRowNum].m_strAfterClose       = m_dtbInstrumentItem.Rows[i][7].ToString();
                    objInstrument.m_objOPInstrument[i + intRowNum].m_strBeforeClose      = m_dtbInstrumentItem.Rows[i][6].ToString();
                    objInstrument.m_objOPInstrument[i + intRowNum].m_strBeforeOP         = m_dtbInstrumentItem.Rows[i][5].ToString();
                }

                if (m_dtbInstrumentItem.Rows[i][8] != DBNull.Value && i + 2 * intRowNum < m_objDictArr.Length)
                {
                    objInstrument.m_objOPInstrument[i + 2 * intRowNum] = new clsEMR_OPInstrumentItem();
                    objInstrument.m_objOPInstrument[i + 2 * intRowNum].m_objOPInstrumentInfo = m_objDictArr[i + 2 * intRowNum];
                    objInstrument.m_objOPInstrument[i + 2 * intRowNum].m_strAfterClose       = m_dtbInstrumentItem.Rows[i][11].ToString();
                    objInstrument.m_objOPInstrument[i + 2 * intRowNum].m_strBeforeClose      = m_dtbInstrumentItem.Rows[i][10].ToString();
                    objInstrument.m_objOPInstrument[i + 2 * intRowNum].m_strBeforeOP         = m_dtbInstrumentItem.Rows[i][9].ToString();
                }
            }
            #endregion
            objInstrument.m_lngEMR_SEQ = m_lngCurrentEMR_SEQ;
            return(objInstrument);
        }