Ejemplo n.º 1
0
        private void m_mthSetPrintContent(clsTransDataInfo[] p_objTransDataArr,
                                          DateTime[] p_dtmFirstPrintDate)
        {
            try
            {
                if (p_objTransDataArr == null || p_dtmFirstPrintDate == null || p_objTransDataArr.Length != p_dtmFirstPrintDate.Length)
                {
                    // clsPublicFunction.ShowInformationMessageBox("打印数据有误!");E:\icar_fo2\Code\EMR\icare\PrintTool\clsICUNurseRecordPrintTool.cs
                    return;
                }

                //根据不同的表单类型,获取对应的clsDiseaseTrackInfo
                clsDiseaseTrackInfo objTrackInfo = null;
                m_objPrintDataArr = new clsEMR_intbloodsugarwatchDataInfo[p_objTransDataArr.Length];
                //				m_objPrintDataArr=(clsIntensiveTendDataInfo[])(p_objTransDataArr.Clone());
                ArrayList arlTemp = new ArrayList();
                arlTemp.AddRange(p_objTransDataArr);
                m_objPrintDataArr = (clsEMR_intbloodsugarwatchDataInfo[])arlTemp.ToArray(typeof(clsEMR_intbloodsugarwatchDataInfo));

                //System.Data.DataTable dtbBlankRecord = null;
                //new clsDiseaseTrackAddBlankDomain().m_lngGetBlankRecordContent(m_objPrintInfo.m_strInPatentID,m_objPrintInfo.m_dtmInPatientDate,out dtbBlankRecord);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 设置打印内容。
        /// </summary>
        /// <param name="p_objTransDataArr"></param>
        /// <param name="p_dtmFirstPrintDate"></param>
        private void m_mthSetPrintContent(clsTransDataInfo[] p_objTransDataArr,
                                          DateTime[] p_dtmFirstPrintDate)
        {
            int intBlankCount = 0;

            if (p_objTransDataArr == null || p_dtmFirstPrintDate == null || p_objTransDataArr.Length != p_dtmFirstPrintDate.Length)
            {
                MDIParent.ShowInformationMessageBox("打印数据有误!");
                return;
            }

            //根据不同的表单类型,获取对应的clsDiseaseTrackInfo
            clsDiseaseTrackInfo objTrackInfo = null;

            m_objPrintDataArr = new clsPrintData_GeneralNurseRecord[p_objTransDataArr.Length];
            System.Data.DataTable dtbBlankRecord = null;
            new clsDiseaseTrackAddBlankDomain().m_lngGetBlankRecordContent(m_objPrintInfo.m_strInPatentID, m_objPrintInfo.m_dtmInPatientDate, out dtbBlankRecord);
            for (int i = 0; i < p_objTransDataArr.Length; i++)
            {
                intBlankCount = 0;
                objTrackInfo  = new clsGeneralNurseRecordInfo();

                //设置clsDiseaseTrackInfo的内容
                objTrackInfo.m_ObjRecordContent = p_objTransDataArr[i].m_objRecordContent;

                m_objPrintDataArr[i] = new clsPrintData_GeneralNurseRecord();
                //根据 clsDiseaseTrackInfo 获得的文本和Xml
                m_objPrintDataArr[i].m_strCreateDate = objTrackInfo.m_ObjRecordContent.m_dtmCreateDate.ToString();
                m_objPrintDataArr[i].m_strContent    = objTrackInfo.m_strGetTrackText();
                m_objPrintDataArr[i].m_strContentXml = objTrackInfo.m_strGetTrackXml();

                string strSignText = objTrackInfo.m_strGetSignText();

                m_objPrintDataArr[i].m_strSign = strSignText;

                m_objPrintDataArr[i].m_dtmFirstPrintDate = p_dtmFirstPrintDate[i];
                //设置分页标志
                m_objPrintDataArr[i].m_strPagiNation = objTrackInfo.m_ObjRecordContent.m_StrPagination.ToString();
                if (dtbBlankRecord != null && dtbBlankRecord.Rows.Count > 0)
                {
                    foreach (System.Data.DataRow drtAdd in dtbBlankRecord.Rows)
                    {
                        if (DateTime.Parse(drtAdd[2].ToString()).ToString("yyyy-MM-dd HH:mm:ss") == objTrackInfo.m_ObjRecordContent.m_dtmOpenDate.ToString("yyyy-MM-dd HH:mm:ss"))
                        {
                            int intBlankLine = Int32.Parse(drtAdd[3].ToString());
                            intBlankCount = intBlankLine;
                            m_objPrintDataArr[i].m_intBlankCount = intBlankLine;
                            for (int j2 = 0; j2 < intBlankLine; j2++)
                            {
                                m_objPrintDataArr[i].m_strContent = "\n" + m_objPrintDataArr[i].m_strContent;
                            }
                            break;
                        }
                    }
                }
                m_arlBlockCount.Add(intBlankCount);                //保存每条记录实际空行数量
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 比较参数值与当前实例的大小
        /// </summary>
        /// <param name="p_objValue"></param>
        /// <returns></returns>
        public int CompareTo(object p_objValue)
        {
            clsDiseaseTrackInfo objDiff = (clsDiseaseTrackInfo)p_objValue;

            if (this.m_objRecordContent.m_dtmCreateDate == objDiff.m_objRecordContent.m_dtmCreateDate)
            {
                return(0);
            }
            else if (this.m_objRecordContent.m_dtmCreateDate > objDiff.m_objRecordContent.m_dtmCreateDate)
            {
                return(1);
            }
            else
            {
                return(-1);
            }
        }
Ejemplo n.º 4
0
        // 获取添加到DataTable的数据
        protected override object[][] m_objGetRecordsValueArr(clsTransDataInfo p_objTransDataInfo)
        {
            //根据不同的表单类型,获取对应的clsDiseaseTrackInfo
            clsDiseaseTrackInfo objTrackInfo = null;

            #region
            switch ((enmDiseaseTrackType)p_objTransDataInfo.m_intFlag)
            {
            case enmDiseaseTrackType.FirstIllnessNote:
                if (com.digitalwave.Emr.StaticObject.clsEMR_StaticObject.s_StrCurrentHospitalNO == "450101001")    //佛二
                {
                    objTrackInfo = new clsFirstIllnessNoteInfo();
                }
                else
                {
                    objTrackInfo = new clsFirstIllnessNoteInfo_F2();
                    p_objTransDataInfo.m_intFlag = (int)enmDiseaseTrackType.FirstIllnessNote_F2;
                }
                break;

            case enmDiseaseTrackType.GeneralDisease:
                objTrackInfo = new clsGeneralDiseaseInfo();
                break;

            case enmDiseaseTrackType.HandOver:
                objTrackInfo = new clsHandOverInfo(m_objCurrentPatient);
                break;

            case enmDiseaseTrackType.HandOver_XJ:
                objTrackInfo = new clsHandOverInfo_XJ(m_objCurrentPatient);
                break;

            case enmDiseaseTrackType.TakeOver:
                objTrackInfo = new clsTakeOverInfo(m_objCurrentPatient);
                break;

            case enmDiseaseTrackType.TakeOver_XJ:
                objTrackInfo = new clsTakeOverInfo_XJ(m_objCurrentPatient);
                break;

            case enmDiseaseTrackType.Consultation:
                objTrackInfo = new clsConsultationInfo();
                break;

            case enmDiseaseTrackType.Convey:
                objTrackInfo = new clsConveyInfo(m_objCurrentPatient);
                break;

            case enmDiseaseTrackType.Convey_XJ:
                objTrackInfo = new clsConveyInfo_XJ(m_objCurrentPatient);
                break;

            case enmDiseaseTrackType.TurnIn:
                objTrackInfo = new clsTurnInInfo(m_objCurrentPatient);
                break;

            case enmDiseaseTrackType.TurnIn_XJ:
                objTrackInfo = new clsTurnInInfo_XJ(m_objCurrentPatient);
                break;

            case enmDiseaseTrackType.DiseaseSummary:
                objTrackInfo = new clsDiseaseSummaryInfo();
                break;

            case enmDiseaseTrackType.DiseaseSummary_XJ:
                objTrackInfo = new clsDiseaseSummaryInfo_XJ(m_objCurrentPatient);
                break;

            case enmDiseaseTrackType.CheckRoom:
                objTrackInfo = new clsCheckRoomInfo();
                break;

            case enmDiseaseTrackType.CaseDiscuss:
                objTrackInfo = new clsCaseDiscussInfo();
                break;

            case enmDiseaseTrackType.BeforeOperationDiscuss:
                objTrackInfo = new clsBeforeOperationDiscussInfo();
                break;

            case enmDiseaseTrackType.DeadCaseDiscuss:
                objTrackInfo = new clsDeadCaseDiscussInfo();
                break;

            case enmDiseaseTrackType.DeathCaseDiscuss:
                objTrackInfo = new clsDeathCaseDiscussInfo();
                break;

            case enmDiseaseTrackType.AfterOperation:
                objTrackInfo = new clsAfterOperationInfo();
                break;

            case enmDiseaseTrackType.Dead:
                objTrackInfo = new clsDeadRecordInfo(m_objCurrentPatient);
                break;

            case enmDiseaseTrackType.Death:
                objTrackInfo = new clsDeathRecordInfo();
                break;

            case enmDiseaseTrackType.OutHospital:
                objTrackInfo = new clsOutHospitalInfo();
                break;

            case enmDiseaseTrackType.Save:
                objTrackInfo = new clsSaveRecordInfo();
                break;

            case enmDiseaseTrackType.FirstIllnessNote_ZY:
                objTrackInfo = new clsFirstIllnessNote_ZYInfo();
                break;

            case enmDiseaseTrackType.EMR_SummaryBeforeOP:
                objTrackInfo = new clsEMR_SummaryBeforeOPInfo();
                break;

            case enmDiseaseTrackType.FirstIllnessNote_F2:
                objTrackInfo = new clsFirstIllnessNoteInfo_F2();
                break;

            case enmDiseaseTrackType.FirstIllnessNote_XJ:
                objTrackInfo = new clsFirstIllnessNoteInfo_XJ();
                break;
            }
            #endregion
            //设置clsDiseaseTrackInfo的内容
            objTrackInfo.m_ObjRecordContent = p_objTransDataInfo.m_objRecordContent;

            int intCharPerLine  = clmContent.Width / 14 - 4;
            int intBytesPerLine = 100;

            //根据 clsDiseaseTrackInfo 获得的文本和Xml
            string strText = "";
            string strXML  = "";

            if ((enmDiseaseTrackType)p_objTransDataInfo.m_intFlag == enmDiseaseTrackType.CaseDiscuss)
            {
                ((clsCaseDiscussInfo)objTrackInfo).m_mthGetFormatTrackInfo(((int)(clmContent.Width / 17.5)) - 5, out strText, out strXML);
            }
            else if ((enmDiseaseTrackType)p_objTransDataInfo.m_intFlag == enmDiseaseTrackType.DeadCaseDiscuss)
            {
                ((clsDeadCaseDiscussInfo)objTrackInfo).m_mthGetFormatTrackInfo(((int)(clmContent.Width / 17.5)) - 5, out strText, out strXML);
            }
            else
            {
                strText = objTrackInfo.m_strGetTrackText();
                strXML  = objTrackInfo.m_strGetTrackXml();
            }

            string strSignText = objTrackInfo.m_strGetSignText();
            string strSignXml  = objTrackInfo.m_strGetSignXml();

            string strBlanks = "";
            for (int j2 = 0; j2 < intCharPerLine - strSignText.Length; j2++)
            {
                strBlanks += " ";       //注意:此处填充的空格是全角占一个汉字的空格
            }
            strSignText = strBlanks + strSignText;

            //结合DataGrid每行的显示数目
            //生成每行内容的文本和Xml数组
            string[] strTextArr, strXmlArr;

            com.digitalwave.controls.ctlRichTextBox.m_mthSplitXmlByBytes(strText, strXML, intBytesPerLine, out strTextArr, out strXmlArr);

            object[][] objData = new object[strTextArr.Length + 1][];

            for (int i = 0; i < objData.Length - 1; i++)
            {
                objData[i] = new object[7];

                //设置值
                if (i == 0)
                {
                    //只在第一行记录才由以下信息
                    objData[i][0] = objTrackInfo.m_ObjRecordContent.m_dtmCreateDate.ToString(MDIParent.s_ObjRecordDateTimeInfo.m_strGetRecordTimeFormat(this.Name)); //存放记录时间的字符串
                    objData[i][1] = (int)objTrackInfo.m_enmGetTrackType();                                                                                           //存放记录类型的int值
                    objData[i][2] = objTrackInfo.m_ObjRecordContent.m_dtmOpenDate.ToString("yyyy-MM-dd HH:mm:ss");                                                   //存放记录的OpenDate字符串
                    objData[i][3] = objTrackInfo.m_ObjRecordContent.m_dtmModifyDate.ToString("yyyy-MM-dd HH:mm:ss");                                                 //存放记录的ModifyDate字符串
                    objData[i][5] = objTrackInfo.m_ObjRecordContent.m_StrPagination;                                                                                 //存放分页
                    objData[i][6] = objTrackInfo.m_ObjRecordContent.m_strCreateUserID;                                                                               //存放记录的createuserid字符串
                }

                clsDSTRichTextBoxValue objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue();
                objclsDSTRichTextBoxValue.m_strText   = strTextArr[i];
                objclsDSTRichTextBoxValue.m_strDSTXml = strXmlArr[i];

                objData[i][4] = objclsDSTRichTextBoxValue;//存放显示内容
            }

            objData[objData.Length - 1] = new object[5];
            //   objData[objData.Length - 1] = new object[6];
            clsDSTRichTextBoxValue objclsDSTRichTextBoxValueSign = new clsDSTRichTextBoxValue();
            objclsDSTRichTextBoxValueSign.m_strText   = strSignText;
            objclsDSTRichTextBoxValueSign.m_strDSTXml = strSignXml;

            objData[objData.Length - 1][4] = objclsDSTRichTextBoxValueSign;//存放显示内容
            //  objData[objData.Length - 1][5] = objclsDSTRichTextBoxValueSign;//存放显示内容
            return(objData);
        }