public clsEMR_InPatientOutEvaluate_VO m_objGetLatestPatientOutRecord(string p_strXML, int p_intRows, string p_strInPatientID, string p_strInPatientDate) { if (p_intRows > 0) //p_intRows==1 { clsEMR_InPatientOutEvaluate_VO objclsPatientOut = new clsEMR_InPatientOutEvaluate_VO(); XmlTextReader objReader = new XmlTextReader(p_strXML, XmlNodeType.Element, m_objXmlParser); objReader.WhitespaceHandling = WhitespaceHandling.None; while (objReader.Read()) { switch (objReader.NodeType) { case XmlNodeType.Element: if (objReader.HasAttributes) { objclsPatientOut.m_strInPatientID = p_strInPatientID; objclsPatientOut.m_dtmInPatientDate = DateTime.Parse(p_strInPatientDate); objclsPatientOut.m_dtmOpenDate = DateTime.Parse(objReader.GetAttribute("OPENDATE")); objclsPatientOut.m_strNurseSign_ID = objReader.GetAttribute("NURSESIGN_ID"); objclsPatientOut.m_strChargeNurse_ID = objReader.GetAttribute("CHARGENURSE_ID"); objclsPatientOut.m_strInHospitalDays = objReader.GetAttribute("INPATIENTDAYS"); objclsPatientOut.m_strOutHospitalDiagnose = objReader.GetAttribute("OUTHOSPITALDIAGNOSE").Replace('き', '\''); objclsPatientOut.m_strOutHospitalDiagnoseXML = objReader.GetAttribute("OUTHOSPITALDIAGNOSEXML").Replace('き', '\''); objclsPatientOut.m_strLiveAbility = objReader.GetAttribute("LIVEABILITY").Replace('き', '\''); objclsPatientOut.m_strDieteticCircs = objReader.GetAttribute("DIETETICCIRCS").Replace('き', '\''); objclsPatientOut.m_strOutHospitalMode = objReader.GetAttribute("OUTHOSPITALMODE").Replace('き', '\''); objclsPatientOut.m_strIsNurseSyndrome = objReader.GetAttribute("ISNURSESYNDROME").Replace('き', '\''); objclsPatientOut.m_strNurseSyndrome = objReader.GetAttribute("NURSESYNDROME").Replace('き', '\''); objclsPatientOut.m_strNurseSyndromeXML = objReader.GetAttribute("NURSESYNDROMEXML").Replace('き', '\''); objclsPatientOut.m_strCommonlyCoach = objReader.GetAttribute("COMMONLYCOACH").Replace('き', '\''); objclsPatientOut.m_strIsNurseIssue = objReader.GetAttribute("ISNURSEISSUE").Replace('き', '\''); objclsPatientOut.m_strNurseIssue = objReader.GetAttribute("NURSEISSUE").Replace('き', '\''); objclsPatientOut.m_strNurseIssueXML = objReader.GetAttribute("NURSEISSUEXML").Replace('き', '\''); objclsPatientOut.m_strAdviceDrug = objReader.GetAttribute("ADVICEDRUG").Replace('き', '\''); objclsPatientOut.m_strIsSpecialtiesCoach = objReader.GetAttribute("ISSPECIALTIESCOACH").Replace('き', '\''); objclsPatientOut.m_strSpecialtiesCoach = objReader.GetAttribute("SPECIALTIESCOACH").Replace('き', '\''); objclsPatientOut.m_strSpecialtiesCoachXML = objReader.GetAttribute("SPECIALTIESCOACHXML").Replace('き', '\''); } break; } } return(objclsPatientOut); } return(null); }
private string m_strGetOutXML(clsEMR_InPatientOutEvaluate_VO p_objclsInPatientOutEvaluate) { if (p_objclsInPatientOutEvaluate == null) { return(""); } m_objXmlMemStream.SetLength(0); m_objXmlWriter.WriteStartDocument(); m_objXmlWriter.WriteStartElement("Model"); m_objXmlWriter.WriteAttributeString("INPATIENTID", p_objclsInPatientOutEvaluate.m_strInPatientID); m_objXmlWriter.WriteAttributeString("INPATIENTDATE", p_objclsInPatientOutEvaluate.m_dtmInPatientDate.ToString("yyyy-MM-dd HH:mm:ss")); m_objXmlWriter.WriteAttributeString("OPENDATE", p_objclsInPatientOutEvaluate.m_dtmOpenDate.ToString("yyyy-MM-dd HH:mm:ss")); m_objXmlWriter.WriteAttributeString("MODIFYDATE", p_objclsInPatientOutEvaluate.m_dtmModifyDate.ToString("yyyy-MM-dd HH:mm:ss")); m_objXmlWriter.WriteAttributeString("MODIFYUSERID", p_objclsInPatientOutEvaluate.m_strModifyUserID); m_objXmlWriter.WriteAttributeString("NURSESIGN_ID", p_objclsInPatientOutEvaluate.m_strNurseSign_ID); m_objXmlWriter.WriteAttributeString("CHARGENURSE_ID", p_objclsInPatientOutEvaluate.m_strChargeNurse_ID); m_objXmlWriter.WriteAttributeString("INPATIENTDAYS", p_objclsInPatientOutEvaluate.m_strInHospitalDays); m_objXmlWriter.WriteAttributeString("OUTHOSPITALDIAGNOSE", p_objclsInPatientOutEvaluate.m_strOutHospitalDiagnose.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("OUTHOSPITALDIAGNOSEXML", p_objclsInPatientOutEvaluate.m_strOutHospitalDiagnoseXML.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("LIVEABILITY", p_objclsInPatientOutEvaluate.m_strLiveAbility.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("DIETETICCIRCS", p_objclsInPatientOutEvaluate.m_strDieteticCircs.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("OUTHOSPITALMODE", p_objclsInPatientOutEvaluate.m_strOutHospitalMode.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("ISNURSESYNDROME", p_objclsInPatientOutEvaluate.m_strIsNurseSyndrome.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("NURSESYNDROME", p_objclsInPatientOutEvaluate.m_strNurseSyndrome.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("NURSESYNDROMEXML", p_objclsInPatientOutEvaluate.m_strNurseSyndromeXML.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("ISNURSEISSUE", p_objclsInPatientOutEvaluate.m_strIsNurseIssue.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("NURSEISSUE", p_objclsInPatientOutEvaluate.m_strNurseIssue.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("NURSEISSUEXML", p_objclsInPatientOutEvaluate.m_strNurseIssueXML.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("COMMONLYCOACH", p_objclsInPatientOutEvaluate.m_strCommonlyCoach.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("ADVICEDRUG", p_objclsInPatientOutEvaluate.m_strAdviceDrug.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("ISSPECIALTIESCOACH", p_objclsInPatientOutEvaluate.m_strIsSpecialtiesCoach.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("SPECIALTIESCOACH", p_objclsInPatientOutEvaluate.m_strSpecialtiesCoach.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("SPECIALTIESCOACHXML", p_objclsInPatientOutEvaluate.m_strSpecialtiesCoachXML.Replace('\'', 'き')); 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)); }
/// 隠贋佚連 public long m_lngSave(clsEMR_InPatientEvaluate p_objclsInPatientEvaluate, clsEMR_InPatientHealth_VO p_objclsInPatientHealth, clsEMR_InPatientOutEvaluate_VO p_objclsInPatientOutEvaluate, bool p_blnIsAddNew) { long lngResult = 0; clsEMR_InPatientEvaluateServ m_objServ = (clsEMR_InPatientEvaluateServ)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsEMR_InPatientEvaluateServ)); try { if (p_blnIsAddNew == true) { lngResult = m_objServ.m_lngAddNew(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, m_strGetXML(p_objclsInPatientEvaluate), m_strGetEduXML(p_objclsInPatientHealth), m_strGetOutXML(p_objclsInPatientOutEvaluate)); } else { lngResult = m_objServ.m_lngModify(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, m_strGetXML(p_objclsInPatientEvaluate), m_strGetEduXML(p_objclsInPatientHealth), m_strGetOutXML(p_objclsInPatientOutEvaluate)); } } finally { //m_objServ.Dispose(); } return(lngResult); }