StringBuilder sb = new StringBuilder("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
sb.Append("<ROOT>");
sb.Append("<PatientID>" + PatientID + "</PatientID>");
sb.Append("<PVID>" + VisitNo + "</PVID>");
sb.Append("</ROOT>");
var xml = GetHIsReturnXML.GetXMl("GetAllOrdersToNurse", sb.ToString());
//解析xml <ROOT><Response><ResultCode>T</ResultCode><ErrorMsg></ErrorMsg></Response>
XmlDocument xmldoc = new XmlDocument();
xmldoc.LoadXml(xml);
XmlNode node = xmldoc.SelectSingleNode("ROOT/Response");
if (node.SelectSingleNode("ResultCode").InnerText.Trim() == "F")
{
log.Info(node.SelectSingleNode("ErrorMsg").InnerText);
}else
{
hisOrders = XmlHelper.XmlToObjList<HisOrdersEntity>(xml.ToString(), "ROOT/Itemlist/Item");
}
return hisOrders;