/// <summary> /// /// </summary> /// <param name="p_objInfo"></param> /// <returns>生成的XML</returns> private string m_strMakeNewContentXml(clsQCRecordContentInfo p_objInfo) { m_objXmlMemStream.SetLength(0); m_objXmlWriter.WriteStartDocument(); m_objXmlWriter.WriteStartElement("QCRecordContent"); 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("MODIFYDATE", p_objInfo.m_strModifyDate); m_objXmlWriter.WriteAttributeString("MODIFYUSERID", p_objInfo.m_strModifyUserID); m_objXmlWriter.WriteAttributeString("WRITEDOCTORID", p_objInfo.m_strWriteDoctorID); m_objXmlWriter.WriteAttributeString("FILECHECKERID", p_objInfo.m_strFileCheckerID); m_objXmlWriter.WriteAttributeString("CHECKDOCTORID", p_objInfo.m_strCheckDoctorID); m_objXmlWriter.WriteAttributeString("FIRSTPAGETIDYVALUE", p_objInfo.m_strFirstPageTidyValue.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("FIRSTPAGETIDYREASON", p_objInfo.m_strFirstPageTidyReason.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("LITIGANTVALUE", p_objInfo.m_strLitigantValue.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("LITIGANTREASON", p_objInfo.m_strLitigantReason.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("CASEHISTORYVALUE", p_objInfo.m_strCaseHistoryValue.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("CASEHISTORYREASON", p_objInfo.m_strCaseHistoryReason.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("CHECKVALUE", p_objInfo.m_strCheckValue.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("CHECKREASON", p_objInfo.m_strCheckReason.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("DIAGNOSEVALUE", p_objInfo.m_strDiagnoseValue.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("DIAGNOSEREASON", p_objInfo.m_strDiagnoseReason.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("CUREVALUE", p_objInfo.m_strCureValue.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("CUREREASON", p_objInfo.m_strCureReason.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("STATEILLNESSVALUE", p_objInfo.m_strStateillnessValue.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("STATEILLNESSREASON", p_objInfo.m_strStateillnessReason.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("OTHERRECORDVALUE", p_objInfo.m_strOtherRecordValue.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("OTHERRECORDREASON", p_objInfo.m_strOtherRecordReason.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("DOCTORADVICEVALUE", p_objInfo.m_strDoctorAdviceValue.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("DOCTORADVICEREASON", p_objInfo.m_strDoctorAdviceReason.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("NURSEVALUE", p_objInfo.m_strNurseValue.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("NURSEREASON", p_objInfo.m_strNurseReason.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("TOTALVALUE", p_objInfo.m_strTotalValue.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("RECORDERID", p_objInfo.m_strRecorderID.Replace('\'', 'き')); 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)); }
/// <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); }
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); }