public long m_lngSave(clsXRayCheckOrder p_objXRayCheckOrder, clsXRayCommonRecord[] p_objXRayCommonRecordArr, clsXRaySpecialRecord[] p_objXRaySpecialRecordArr, clsXRayOperatorID[] p_objOperatorIDArr, ImageRequest p_objImageRequest, ref string p_strApplicationID, bool p_bnlIsNew) { /*///////////操作PS_ImageApplication表中的记录///////////*/ string m_strApplicationID = ""; long m_lngRe; if (p_objXRayCheckOrder == null) { return(-1); } else if (p_bnlIsNew == false) { m_strApplicationID = p_objXRayCheckOrder.m_strApplicationID; } if (p_objXRayCheckOrder == null) { return(-1); } /*/////////////////////////////*/ clsXRayCheckOrderServ m_objServ = (clsXRayCheckOrderServ)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsXRayCheckOrderServ)); try { string strOrderXML = m_strOrderXML(p_objXRayCheckOrder); string[] strCommonXML = m_strCommonXML(p_objXRayCommonRecordArr); string[] strSpecialXML = m_strSpecialXML(p_objXRaySpecialRecordArr); string[] strOperatorXML = m_strOperatorXML(p_objOperatorIDArr); m_lngRe = m_objServ.m_lngAddNew(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, strOrderXML, strCommonXML, strSpecialXML, strOperatorXML, p_objImageRequest, ref m_strApplicationID, p_bnlIsNew); p_strApplicationID = m_strApplicationID; } finally { //m_objServ.Dispose(); } return(m_lngRe); }
private string m_strOrderXML(clsXRayCheckOrder p_objXRayCheckOrder) { if (p_objXRayCheckOrder == null) { return(null); } m_objXmlMemStream.SetLength(0); m_objXmlWriter.WriteStartDocument(); m_objXmlWriter.WriteStartElement("RecordMaster"); m_objXmlWriter.WriteAttributeString("INPATIENTID", p_objXRayCheckOrder.m_strInPatientID.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("INPATIENTDATE", p_objXRayCheckOrder.m_strInPatientDate.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("CREATEDATE", p_objXRayCheckOrder.m_strCreateDate.Replace('\'', 'き')); // m_objXmlWriter.WriteAttributeString("MODIFYDATE", p_objXRayCheckOrder.m_strModifyDate.Replace('\'','き')); m_objXmlWriter.WriteAttributeString("CREATEUSERID", p_objXRayCheckOrder.m_strCreateUserID.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("STATUS", p_objXRayCheckOrder.m_strStatus.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("IFCONFIRM", p_objXRayCheckOrder.m_strIfConfirm.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("HISTORY", p_objXRayCheckOrder.m_strHistory.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("CLINICALCHECKANDRESULT", p_objXRayCheckOrder.m_strClinicalCheckAndResult.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("CLINICALDIGNOSE", p_objXRayCheckOrder.m_strClinicalDignose.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("CHECKAIM", p_objXRayCheckOrder.m_strCheckAim.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("CHECKPLACE", p_objXRayCheckOrder.m_strCheckPlace.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("CLAIRVOYANCE", p_objXRayCheckOrder.m_strClairvoyance.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("PHOTO", p_objXRayCheckOrder.m_strPhoto.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("NOTHAVEOLDPHOTO", p_objXRayCheckOrder.m_strNotHaveOldPhoto.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("HAVEOLDPHOTO", p_objXRayCheckOrder.m_strHaveOldPhoto.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("HAVEOLDPHOTOOUT", p_objXRayCheckOrder.m_strHaveOldPhotoOut.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("CHARGE", p_objXRayCheckOrder.m_strCharge.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("ADDITIONCHARGE", p_objXRayCheckOrder.m_strAdditionCharge.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("CHECKPARTSELECTION", p_objXRayCheckOrder.m_strCheckPartSelection.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("XRAYNO", p_objXRayCheckOrder.m_strXRayNo.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("INSURANCENO", p_objXRayCheckOrder.m_strInsuranceNo.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("OTHERCHECKINFO", p_objXRayCheckOrder.m_strOtherCheckInfo.Replace('\'', 'き')); m_objXmlWriter.WriteAttributeString("CONTACTINFO", p_objXRayCheckOrder.m_strContactInfo.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_strInPatientID"></param> /// <param name="p_strInPatientDate"></param> /// <param name="p_strCreateDate"></param> /// <returns></returns> public clsXRayCheckOrder m_objGetXRayCheckOrder(string p_strInPatientID, string p_strInPatientDate, string p_strCreateDate) { if (p_strInPatientID == null || p_strInPatientID == "" || p_strInPatientDate == null || p_strInPatientDate == "" || p_strCreateDate == null || p_strCreateDate == "") { return(null); } clsXRayCheckOrder objXRayCheckOrder = null; clsXRayCheckOrderServ m_objServ = (clsXRayCheckOrderServ)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsXRayCheckOrderServ)); try { string strXml = ""; int intRows = 0; long lngRes = m_objServ.GetXRayCheckOrder(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, p_strInPatientID, p_strInPatientDate, p_strCreateDate, ref strXml, ref intRows); 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) { objXRayCheckOrder = new clsXRayCheckOrder(); objXRayCheckOrder.m_strInPatientID = objReader.GetAttribute("INPATIENTID").ToString().Replace('き', '\''); objXRayCheckOrder.m_strInPatientDate = objReader.GetAttribute("INPATIENTDATE").ToString().Replace('き', '\''); objXRayCheckOrder.m_strCreateDate = objReader.GetAttribute("CREATEDATE").ToString().Replace('き', '\''); objXRayCheckOrder.m_strStatus = objReader.GetAttribute("STATUS").ToString().Replace('き', '\''); objXRayCheckOrder.m_strIfConfirm = objReader.GetAttribute("IFCONFIRM").ToString().Replace('き', '\''); objXRayCheckOrder.m_strDeActivedDate = objReader.GetAttribute("DEACTIVEDDATE").ToString().Replace('き', '\''); objXRayCheckOrder.m_strDeActivedOperatorID = objReader.GetAttribute("DEACTIVEDOPERATORID").ToString().Replace('き', '\''); objXRayCheckOrder.m_strConfirmReason = objReader.GetAttribute("CONFIRMREASON").ToString().Replace('き', '\'');; objXRayCheckOrder.m_strConfirmReasonXML = objReader.GetAttribute("CONFIRMREASONXML").ToString().Replace('き', '\''); objXRayCheckOrder.m_strCreateUserID = objReader.GetAttribute("CREATEUSERID").ToString().Replace('き', '\''); objXRayCheckOrder.m_strModifyDate = objReader.GetAttribute("MODIFYDATE").ToString().Replace('き', '\'');//ben 2003-4-29 objXRayCheckOrder.m_strHistory = objReader.GetAttribute("HISTORY").ToString().Replace('き', '\''); objXRayCheckOrder.m_strClinicalCheckAndResult = objReader.GetAttribute("CLINICALCHECKANDRESULT").ToString().Replace('き', '\''); objXRayCheckOrder.m_strClinicalDignose = objReader.GetAttribute("CLINICALDIGNOSE").ToString().Replace('き', '\''); objXRayCheckOrder.m_strCheckAim = objReader.GetAttribute("CHECKAIM").ToString().Replace('き', '\''); objXRayCheckOrder.m_strCheckPlace = objReader.GetAttribute("CHECKPLACE").ToString().Replace('き', '\''); objXRayCheckOrder.m_strClairvoyance = objReader.GetAttribute("CLAIRVOYANCE").ToString().Replace('き', '\''); objXRayCheckOrder.m_strPhoto = objReader.GetAttribute("PHOTO").ToString().Replace('き', '\''); objXRayCheckOrder.m_strNotHaveOldPhoto = objReader.GetAttribute("NOTHAVEOLDPHOTO").ToString().Replace('き', '\''); objXRayCheckOrder.m_strHaveOldPhoto = objReader.GetAttribute("HAVEOLDPHOTO").ToString().Replace('き', '\''); objXRayCheckOrder.m_strHaveOldPhotoOut = objReader.GetAttribute("HAVEOLDPHOTOOUT").ToString().Replace('き', '\''); objXRayCheckOrder.m_strCharge = objReader.GetAttribute("CHARGE").ToString().Replace('き', '\''); objXRayCheckOrder.m_strAdditionCharge = objReader.GetAttribute("ADDITIONCHARGE").ToString().Replace('き', '\''); objXRayCheckOrder.m_strCheckPartSelection = objReader.GetAttribute("CHECKPARTSELECTION").ToString().Replace('き', '\''); objXRayCheckOrder.m_strXRayNo = objReader.GetAttribute("XRAYNO").ToString().Replace('き', '\''); objXRayCheckOrder.m_strInsuranceNo = objReader.GetAttribute("INSURANCENO").ToString().Replace('き', '\''); objXRayCheckOrder.m_strOtherCheckInfo = objReader.GetAttribute("OTHERCHECKINFO").ToString().Replace('き', '\''); objXRayCheckOrder.m_strContactInfo = objReader.GetAttribute("CONTACTINFO").ToString().Replace('き', '\''); objXRayCheckOrder.m_strApplicationID = objReader.GetAttribute("APPLICATIONID").ToString().Replace('き', '\''); } break; } } } } finally { //m_objServ.Dispose(); } return(objXRayCheckOrder); }