我正在尝试使用MDHT解析CCD中的问题部分。我试图解析的XML代码是:
<entry>
<act classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.3" />
<id root="2.16.840.1.113883.3.441" extension="85cec11c26ff475fac469cc9fa7a040c" />
<code code="CONC" codeSystem="2.16.840.1.113883.5.6" />
<statusCode code="active" />
<effectiveTime nullFlavor="UNK">
<low value="20110925000000" />
<high nullFlavor="UNK" />
</effectiveTime>
<entryRelationship typeCode="SUBJ" inversionInd="false">
<observation classCode="OBS" moodCode="EVN" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.4" />
<id root="2.16.840.1.113883.3.441.1.50.300011.51.26604.61" extension="1348" />
<code nullFlavor="NA" />
<text>Asthma<reference value="#ref_d910f32f622b4615970569407d739ca6_problem_name_1" />
</text>
<statusCode code="completed" />
<effectiveTime nullFlavor="UNK">
<low value="20110925000000" />
<high nullFlavor="UNK" />
</effectiveTime>
<value xsi:type="CD" nullFlavor="UNK">
<translation code="195967001" displayName="Asthma" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT">
<originalText>
<reference value="#ref_d910f32f622b4615970569407d739ca6_problem_name_1" />
</originalText>
</translation>
</value>我想读翻译标签(displayName=“哮喘”)。我想读哮喘,它的代码值和代码系统。
但在MDHT中,我无法在值标记中获得转换标记。我正在做的事情是:
entry.getAct().getEntryRelationships().get(0).getObservation().getValues().get(0) //no translation tag.发布于 2014-04-26 12:34:43
与其他JAVA/XML代相比,使用MDHT的优点之一是我们生成特定于域的类,以帮助您更有效地浏览文档
您应该避免使用特定的get()和泛型getObservation,因为底层的CDA标准限制了所需的内容,但是生产者可以在文档中放置任何类型的观察等等。下面是一个示例片段,用于遍历问题部分
观察类本身以及问题观察值本身是需要正确转换才能转换到CD类型的任何值的集合,而CD类型又将具有您正在寻找的翻译属性。
西恩
ProblemSection ps = ...
for (ProblemConcernAct cpc : ps.getConsolProblemConcerns()) {
for (ProblemObservation pos : cpc.getProblemObservations()) {
for (ANY any : pos.getValues()) {
if (any instanceof CD) {
CD code = (CD) any;
for (CD translationCode : code.getTranslations()) {
System.out.println(translationCode.getCode());
}
}
}
}
}https://stackoverflow.com/questions/23290239
复制相似问题