111,092
社区成员




<RCMR_IN000031UV01 ITSVersion="XML_1.0" xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 file:///E:/hl7/HL7/v3ballot_fullsite_2011MAY/v3ballot/html/processable/multicacheschemas/RCMR_IN000031UV01.xsd">
<!--id-消息流水号-->
<id root="2.16.156.10011.2.5.1.1" extension="22a0f9e0-4454-11dc-a6be-3603d6866807"/>
<!--creationTime-消息创建时间-->
<creationTime value="20130501130624"/>
<!--interactionId-消息的服务标识-->
<interactionId root="2.16.156.10011.2.5.1.2" extension="RCMR_IN000031UV01"/>
<!--processingCode-处理代码。标识此消息是否是产品、训练、调试系统的一部分。D:调试;P:产品;T:训练-->
<processingCode code="P"/>
<!--processingModeCode-处理模型代码。定义此消息是一个文档处理还是一个初始装载的一部分。A:存档;I:初始装载;R:从存档中恢复;T:当前处理,间隔传递。-->
<processingModeCode/>
<!--acceptAckCode-接收确认类型 AL:总是确认;NE:从不确认;ER:仅在错误/或拒绝时确认;SU:仅在成功完成时确认。-->
<acceptAckCode code="AL"/>
<receiver typeCode="RCV">
<device classCode="DEV" determinerCode="INSTANCE">
<id>
<item root="2.16.156.10011.2.5.1.3" extension="1111"/>
</id>
</device>
</receiver>
<sender typeCode="SND">
<device classCode="DEV" determinerCode="INSTANCE">
<id>
<item root="2.16.156.10011.2.5.1.3" extension="222"/>
</id>
</device>
</sender>
<controlActProcess classCode="CACT" moodCode="EVN">
<queryByParameter>
<!--查询ID-->
<queryId extension="18204"/>
<!--文档类型-->
<clinicalDocument.code>
<value code="C0001" codeSystem="2.16.156.10011.2.5.1.23" codeSystemName="文档类型代码">
<displayName value="病历概要"/>
</value>
</clinicalDocument.code>
<!--文档流水号-->
<clinicalDocument.id>
<value root="2.16.156.10011.2.5.1.24" extension="文档流水号"/>
</clinicalDocument.id>
<!--患者就诊号-->
<encompassingEncounter.id>
<value root="2.16.156.10011.1.12" extension="住院号"/>
<value root="2.16.156.10011.1.11" extension="门诊号"/>
</encompassingEncounter.id>
<!--患者id-->
<patient.id>
<value root="2.16.156.10011.2.5.1.4" extension="PatientID"/>
<value root="2.16.156.10011.1.3" extension="患者身份证号"/>
<semanticsText value="赵五"/>
</patient.id>
</queryByParameter>
</controlActProcess>
</RCMR_IN000031UV01>
<patient.id>
<value root="2.16.156.10011.2.5.1.4" extension="PatientID"/>
<value root="2.16.156.10011.1.3" extension="患者身份证号"/>
<semanticsText value="赵五"/>
</patient.id>
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(path);
System.Xml.XmlNode node = xmlDoc.SelectSingleNode("//*[@extension='患者身份证号']");
Console.WriteLine(node.Attributes["root"].InnerText);
if (string.IsNullOrEmpty(val))
{
int index = xml.IndexOf("<" + tag + ">");
if (index >= 0)
{
val = xml.Substring(index + tag.Length + 2);
index = val.IndexOf("</" + tag + ">");
if (index >= 0)
{
val = val.Substring(0, index);
val = val.Replace("<", "").Replace(">", "").Replace("/", "").Trim();
}
}
}