取这几个值吧
1条回答 默认 最新
- threenewbee 2019-06-29 19:45关注
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml; namespace Q767525 { class Program { static void Main(string[] args) { XmlDocument doc = new XmlDocument(); doc.Load("https://t-webservice.oss-cn-beijing.aliyuncs.com/1232165648.xml"); var subjectDemographicPerson = doc.GetElementsByTagName("subjectDemographicPerson")[0]; var name = subjectDemographicPerson.ChildNodes.Cast<XmlNode>().First(x => x.Name == "name").InnerText; Console.WriteLine(name); var administrativeGenderCode = subjectDemographicPerson.ChildNodes.Cast<XmlNode>().First(x => x.Name == "administrativeGenderCode"); var code = administrativeGenderCode.Attributes["code"].Value; Console.WriteLine(code); var codeSystem = administrativeGenderCode.Attributes["codeSystem"].Value; Console.WriteLine(codeSystem); var effectiveTime = doc.GetElementsByTagName("effectiveTime")[0]; Console.WriteLine(effectiveTime.FirstChild.Attributes["value"].Value); var annotationlist = doc.GetElementsByTagName("annotation"); foreach (XmlNode item in annotationlist) { Console.WriteLine(item.FirstChild.Attributes["code"].Value); var itemvalue = item.ChildNodes.Cast<XmlNode>().FirstOrDefault(x => x.Name == "value"); if (itemvalue != null) { Console.WriteLine("\t" + itemvalue.Attributes["xsi:type"].Value); if (itemvalue.Attributes.Cast<XmlAttribute>().Any(x => x.Name == "unit")) Console.WriteLine("\t" + itemvalue.Attributes["unit"].Value); if (!string.IsNullOrEmpty(itemvalue.InnerText)) Console.WriteLine("\t" + itemvalue.InnerText); else Console.WriteLine("\t" + itemvalue.Attributes["value"]); } } } } }
张帅
M
2.16.840.1.113883.5.1
20190626102804
MDC_ECG_HEART_RATE
PQ
bpm
System.Xml.XmlAttribute
MDC_ECG_TIME_PD_PR
PQ
ms
System.Xml.XmlAttribute
MDC_ECG_TIME_PD_QRS
PQ
ms
System.Xml.XmlAttribute
MDC_ECG_TIME_PD_QT
PQ
ms
System.Xml.XmlAttribute
MDC_ECG_TIME_PD_QTc
PQ
ms
System.Xml.XmlAttribute
MDC_ECG_ANGLE_P_FRONT
PQ
deg
System.Xml.XmlAttribute
MDC_ECG_ANGLE_QRS_FRONT
PQ
deg
System.Xml.XmlAttribute
MDC_ECG_ANGLE_T_FRONT
PQ
deg
System.Xml.XmlAttribute
ZONCARE_ECG_RV5
PQ
mv
System.Xml.XmlAttribute
ZONCARE_ECG_SV1
PQ
mv
System.Xml.XmlAttribute
MDC_ECG_INTERPRETATION
MDC_ECG_INTERPRETATION_STATEMENT
ST
窦性心动过缓
MDC_ECG_INTERPRETATION_STATEMENT
ST
除心率外的正常心电图
Press any key to continue . . .解决 无用评论 打赏 举报
悬赏问题
- ¥15 关于#python#的问题:求帮写python代码
- ¥20 MATLAB画图图形出现上下震荡的线条
- ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
- ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
- ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
- ¥15 perl MISA分析p3_in脚本出错
- ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
- ¥15 ubuntu虚拟机打包apk错误
- ¥199 rust编程架构设计的方案 有偿
- ¥15 回答4f系统的像差计算