Ejemplo n.º 1
0
        /// <summary>
        /// 得到已被删除的记录相关信息,Jacky-2003-4-1
        /// </summary>
        public long m_lngGetIDandTimeOfDeletedRecord(clsPatient p_objPatient, string p_strInPatientDate, out clsQCRecordInfo p_objMainInfo)
        {
            string strXML  = "";
            int    intRows = 0;

            clsQCRecordService m_objQCRecordServ =
                (clsQCRecordService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsQCRecordService));

            long lngRes = 0;

            try
            {
                lngRes = m_objQCRecordServ.m_lngGetIDandTimeOfDeletedRecord(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, p_objPatient.m_StrInPatientID, p_strInPatientDate, ref strXML, ref intRows);
            }
            finally
            {
                //m_objQCRecordServ.Dispose();
            }
            if (lngRes > 0 && intRows == 1)
            {
                XmlTextReader objReader = new XmlTextReader(strXML, XmlNodeType.Element, m_objXmlParser);
                objReader.WhitespaceHandling = WhitespaceHandling.None;

                while (objReader.Read())
                {
                    switch (objReader.NodeType)
                    {
                    case XmlNodeType.Element:
                        if (objReader.HasAttributes)
                        {
                            p_objMainInfo = new clsQCRecordInfo();
                            //								p_objMainInfo.m_strInPatientID = objReader.GetAttribute("INPATIENTID");
                            //								p_objMainInfo.m_strInPatientDate = objReader.GetAttribute("INPATIENTDATE");
                            //								p_objMainInfo.m_strOpenDate = objReader.GetAttribute("OPENDATE");
                            //								p_objMainInfo.m_strCreateID = objReader.GetAttribute("CREATEID");

                            p_objMainInfo.m_strDeActivedDate       = objReader.GetAttribute("DEACTIVEDDATE");
                            p_objMainInfo.m_strDeActivedOperatorID = objReader.GetAttribute("DEACTIVEDOPERATORID");
                            return(1);
                        }
                        break;
                    }
                }
            }

            p_objMainInfo = null;
            return(0);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="p_objInfo"></param>
        /// <returns>
        /// 操作结果。

        /// 0,失败。

        /// 1,成功。

        /// </returns>
        public long m_lngAddNew(clsQCRecordInfo p_objMainInfo, clsQCRecordContentInfo p_objContentInfo)
        {
            clsQCRecordService m_objQCRecordServ =
                (clsQCRecordService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsQCRecordService));

            long lngRes = 0;

            try
            {
                string strMainXml    = m_strMakeNewMainXml(p_objMainInfo);
                string strContentXml = m_strMakeNewContentXml(p_objContentInfo);
                lngRes = m_objQCRecordServ.m_lngAddNew(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, strMainXml, strContentXml);
            }
            finally
            {
                //m_objQCRecordServ.Dispose();
            }
            return(lngRes);
        }
Ejemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="p_objInfo"></param>
        /// <returns>生成的XML</returns>
        private string m_strMakeNewMainXml(clsQCRecordInfo p_objInfo)
        {
            m_objXmlMemStream.SetLength(0);

            m_objXmlWriter.WriteStartDocument();
            m_objXmlWriter.WriteStartElement("QCRecord");

            m_objXmlWriter.WriteAttributeString("INPATIENTID", p_objInfo.m_strInPatientID);
            m_objXmlWriter.WriteAttributeString("INPATIENTDATE", p_objInfo.m_strInPatientDate);
            m_objXmlWriter.WriteAttributeString("OPENDATE", p_objInfo.m_strOpenDate);
            m_objXmlWriter.WriteAttributeString("CREATEID", p_objInfo.m_strCreateID);
            m_objXmlWriter.WriteAttributeString("IFCONFIRM", "0");
            m_objXmlWriter.WriteAttributeString("STATUS", "0");

            m_objXmlWriter.WriteEndElement();
            m_objXmlWriter.WriteEndDocument();

            m_objXmlWriter.Flush();

            return(System.Text.Encoding.Unicode.GetString(m_objXmlMemStream.ToArray(), 39 * 2, (int)m_objXmlMemStream.Length - 39 * 2));
        }
Ejemplo n.º 4
0
        public long m_lngGetDeleteQCRecord(clsPatient p_objPatient, string p_strInPatientDate, string p_strOpenDate, out clsQCRecordInfo p_objMainInfo, out clsQCRecordContentInfo p_objContentInfo)
        {
            string strXML  = "";
            int    intRows = 0;

            clsQCRecordService m_objQCRecordServ =
                (clsQCRecordService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsQCRecordService));

            long lngRes = 0;

            try
            {
                lngRes = m_objQCRecordServ.m_lngGetDeleteQCRecord(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, p_objPatient.m_StrInPatientID, p_strInPatientDate, p_strOpenDate, ref strXML, ref intRows);
            }
            finally
            {
                //m_objQCRecordServ.Dispose();
            }
            if (lngRes > 0 && intRows > 0)
            {
                XmlTextReader objReader = new XmlTextReader(strXML, XmlNodeType.Element, m_objXmlParser);
                objReader.WhitespaceHandling = WhitespaceHandling.None;

                while (objReader.Read())
                {
                    switch (objReader.NodeType)
                    {
                    case XmlNodeType.Element:
                        if (objReader.HasAttributes)
                        {
                            p_objContentInfo = new clsQCRecordContentInfo();
                            p_objContentInfo.m_strInPatientID         = objReader.GetAttribute("INPATIENTID");
                            p_objContentInfo.m_strInPatientDate       = objReader.GetAttribute("INPATIENTDATE");
                            p_objContentInfo.m_strOpenDate            = objReader.GetAttribute("OPENDATE");
                            p_objContentInfo.m_strModifyDate          = objReader.GetAttribute("MODIFYDATE");
                            p_objContentInfo.m_strModifyUserID        = objReader.GetAttribute("MODIFYUSERID");
                            p_objContentInfo.m_strWriteDoctorID       = objReader.GetAttribute("WRITEDOCTORID");
                            p_objContentInfo.m_strFileCheckerID       = objReader.GetAttribute("FILECHECKERID");
                            p_objContentInfo.m_strCheckDoctorID       = objReader.GetAttribute("CHECKDOCTORID");
                            p_objContentInfo.m_strFirstPageTidyValue  = objReader.GetAttribute("FIRSTPAGETIDYVALUE").Replace('き', '\'');
                            p_objContentInfo.m_strFirstPageTidyReason = objReader.GetAttribute("FIRSTPAGETIDYREASON").Replace('き', '\'');
                            p_objContentInfo.m_strLitigantValue       = objReader.GetAttribute("LITIGANTVALUE").Replace('き', '\'');
                            p_objContentInfo.m_strLitigantReason      = objReader.GetAttribute("LITIGANTREASON").Replace('き', '\'');
                            p_objContentInfo.m_strCaseHistoryValue    = objReader.GetAttribute("CASEHISTORYVALUE").Replace('き', '\'');
                            p_objContentInfo.m_strCaseHistoryReason   = objReader.GetAttribute("CASEHISTORYREASON").Replace('き', '\'');
                            p_objContentInfo.m_strCheckValue          = objReader.GetAttribute("CHECKVALUE").Replace('き', '\'');
                            p_objContentInfo.m_strCheckReason         = objReader.GetAttribute("CHECKREASON").Replace('き', '\'');
                            p_objContentInfo.m_strDiagnoseValue       = objReader.GetAttribute("DIAGNOSEVALUE").Replace('き', '\'');
                            p_objContentInfo.m_strDiagnoseReason      = objReader.GetAttribute("DIAGNOSEREASON").Replace('き', '\'');
                            p_objContentInfo.m_strCureValue           = objReader.GetAttribute("CUREVALUE").Replace('き', '\'');
                            p_objContentInfo.m_strCureReason          = objReader.GetAttribute("CUREREASON").Replace('き', '\'');
                            p_objContentInfo.m_strStateillnessValue   = objReader.GetAttribute("STATEILLNESSVALUE").Replace('き', '\'');
                            p_objContentInfo.m_strStateillnessReason  = objReader.GetAttribute("STATEILLNESSREASON").Replace('き', '\'');
                            p_objContentInfo.m_strOtherRecordValue    = objReader.GetAttribute("OTHERRECORDVALUE").Replace('き', '\'');
                            p_objContentInfo.m_strOtherRecordReason   = objReader.GetAttribute("OTHERRECORDREASON").Replace('き', '\'');
                            p_objContentInfo.m_strDoctorAdviceValue   = objReader.GetAttribute("DOCTORADVICEVALUE").Replace('き', '\'');
                            p_objContentInfo.m_strDoctorAdviceReason  = objReader.GetAttribute("DOCTORADVICEREASON").Replace('き', '\'');
                            p_objContentInfo.m_strNurseValue          = objReader.GetAttribute("NURSEVALUE").Replace('き', '\'');
                            p_objContentInfo.m_strNurseReason         = objReader.GetAttribute("NURSEREASON").Replace('き', '\'');
                            p_objContentInfo.m_strTotalValue          = objReader.GetAttribute("TOTALVALUE").Replace('き', '\'');
                            p_objContentInfo.m_strRecorderID          = objReader.GetAttribute("RECORDERID").Replace('き', '\'');

                            p_objMainInfo = new clsQCRecordInfo();
                            p_objMainInfo.m_strInPatientID   = objReader.GetAttribute("INPATIENTID");
                            p_objMainInfo.m_strInPatientDate = objReader.GetAttribute("INPATIENTDATE");
                            p_objMainInfo.m_strOpenDate      = objReader.GetAttribute("OPENDATE");
                            p_objMainInfo.m_strCreateID      = objReader.GetAttribute("CREATEID");

                            return(1);
                        }
                        break;
                    }
                }
            }

            p_objMainInfo    = null;
            p_objContentInfo = null;

            return(0);
        }