簡體   English   中英

使用MDHT從CCD讀取問題部分

[英]Read ProblemSection From CCD Using MDHT

我正在嘗試使用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 =“ Asthma”)。 我想閱讀哮喘,其代碼值和代碼系統。

但是在MDHT中,我無法在value標簽內獲取翻譯標簽。 我正在做為:

entry.getAct().getEntryRelationships().get(0).getObservation().getValues().get(0) //no translation tag.

與其他幾代JAVA / XML相比,使用MDHT的優勢之一是我們生成了特定於域的類,以幫助您更有效地瀏覽文檔

您應該避免使用特定的get()和通用的getObservation,因為基本的CDA標准限制了所需的內容,但是生產者可以在文檔中放置任何類型的觀察結果。 這是解決問題部分的示例片段

觀察類本身以及這樣的問題觀察值是ANY的集合,它需要正確轉換為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());
                        }

                    }
                }
            }
        }

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM