liusheng
2 天以前 5ba25cb53dab2ef0f8052a93796ef67a8a2ee820
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
package cn.lihu.jh.module.ecg.service.devrent;
 
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
 
public class ApplicationTemplate {
 
    /**
     * 返回的XML太长了,不想看了,直接找个模板,把需要的值放进去,返回结束^O^
     *
     * @return
     */
    public String getXML(String applyNo, String checkStatue, String checkName, String updater, String patDeptCode, String patDeptName, String patWardCode, String patWardName, String patBedno, String lsh, String booksrc, String patid, String patName) {
        String xml = "<POOR_IN200902UV ITSVersion=\"XML_1.0\"\n" +
                "    xmlns=\"urn:hl7-org:v3\"\n" +
                "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:hl7-org:v3 ../multicacheschemas/POOR_IN200902UV.xsd\">\n" +
                "    <id root=\"2.16.156.10011.2.5.1.1\" extension=\"c8c67234-d026-479b-9f56-36127cb93772\"/>\n" +
                "    <creationTime value=\"" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + "\"/>\n" +
                "    <interactionId root=\"2.16.156.10011.2.5.1.2\" extension=\"\"/>\n" +
                "    <processingCode code=\"P\"/>\n" +
                "    <processingModeCode/>\n" +
                "    <acceptAckCode code=\"AL\"/>\n" +
                "    <receiver typeCode=\"RCV\">\n" +
                "        <device classCode=\"DEV\" determinerCode=\"INSTANCE\">\n" +
                "            <id>\n" +
                "                <item root=\"2.16.156.10011.2.5.1.3\" extension=\"\"/>\n" +
                "            </id>\n" +
                "        </device>\n" +
                "    </receiver>\n" +
                "    <sender typeCode=\"SND\">\n" +
                "        <device classCode=\"DEV\" determinerCode=\"INSTANCE\">\n" +
                "            <id>\n" +
                "                <item root=\"2.16.156.10011.2.5.1.3\" extension=\"\"/>\n" +
                "            </id>\n" +
                "        </device>\n" +
                "    </sender>\n" +
                "    <controlActProcess classCode=\"CACT\" moodCode=\"EVN\">\n" +
                "        <subject typeCode=\"SUBJ\" xsi:nil=\"false\">\n" +
                "            <placerGroup>\n" +
                "                <component2>\n" +
                "                    <observationRequest classCode=\"OBS\">\n" +
                "                        <id>\n" +
                "                            <item extension=\"" + applyNo + "\" root=\"2.16.156.10011.1.24\"/>\n" +
                "                        </id>\n" +
                "                        <code/>\n" +
                "                        <statusCode/>\n" +
                "                        <effectiveTime xsi:type=\"IVL_TS\"/>\n" +
                "                        <performer typeCode=\"PRF\">\n" +
                "                            <time>\n" +
                "                                <low value=\"" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + "\"/>\n" +
                "                             </time>\n" +
                "                            <assignedEntity classCode=\"ASSIGNED\">\n" +
                "                                <id>\n" +
                "                                    <item extension=\"" + updater + "\" root=\"2.16.156.10011.1.4\"/>\n" +
                "                                </id>\n" +
                "                                <assignedPerson determinerCode=\"INSTANCE\" classCode=\"PSN\">\n" +
                "                                    <name xsi:type=\"BAG_EN\">\n" +
                "                                        <item>\n" +
                "                                            <part value=\"\"/>\n" +
                "                                        </item>\n" +
                "                                    </name>\n" +
                "                                </assignedPerson>\n" +
                "                            </assignedEntity>\n" +
                "                        </performer>\n" +
                "                        <location typeCode=\"LOC\" xsi:nil=\"false\">\n" +
                "                            <time/>\n" +
                "                            <serviceDeliveryLocation classCode=\"SDLOC\">\n" +
                "                                <serviceProviderOrganization determinerCode=\"INSTANCE\" classCode=\"ORG\">\n" +
                "                                    <id>\n" +
                "                                        <item extension=\"" + patDeptCode + "\" root=\"2.16.156.10011.1.26\"/>\n" +
                "                                    </id>\n" +
                "                                    <name xsi:type=\"BAG_EN\">\n" +
                "                                        <item>\n" +
                "                                            <part value=\"" + patDeptName + "\"/>\n" +
                "                                        </item>\n" +
                "                                    </name>\n" +
                "                                </serviceProviderOrganization>\n" +
                "                            </serviceDeliveryLocation>\n" +
                "                        </location>\n" +
                "                        <component1 contextConductionInd=\"true\">\n" +
                "                            <processStep classCode=\"PROC\">\n" +
                "                                <code code=\"" + checkStatue + "\" codeSystem=\"2.16.156.10011. 2.5.1.12\">\n" +
                "                                    <displayName value=\"" + checkName + "\"/>\n" +
                "                                    <originalText value=\"\"/>\n" +
                "                                </code>\n" +
                "                            </processStep>\n" +
                "                        </component1>\n" +
                "                    </observationRequest>\n" +
                "                </component2>\n" +
                "                <componentOf1 contextConductionInd=\"false\" xsi:nil=\"false\" typeCode=\"COMP\">\n" +
                "                    <encounter classCode=\"ENC\" moodCode=\"EVN\">\n" +
                "                        <id>\n" +
                "                            <item extension=\"\" root=\"2.16.156.10011.2.5.1.8\"/>\n" +
                "                            <item extension=\"" + lsh + "\" root=\"2.16.156.10011.2.5.1.9\"/>\n" +
                "                        </id>\n" +
                "                        <code codeSystem=\"2.16.156.10011.2.3.1.271\" code=\"" + booksrc + "\">\n" +
                "                            <displayName value=\"\"/>\n" +
                "                        </code>\n" +
                "                        <statusCode code=\"Active\"/>\n" +
                "                        <subject typeCode=\"SBJ\">\n" +
                "                            <patient classCode=\"PAT\">\n" +
                "                                <id>\n" +
                "                                    <item root=\"2.16.156.10011.2.5.1.5\" extension=\"\"/>\n" +
                "                                    <item root=\"2.16.156.10011.2.5.1.4\" extension=\"" + patid + "\"/>\n" +
                "                                    <item root=\"2.16.156.10011.1.11\" extension=\"\"/>\n" +
                "                                    <item root=\"2.16.156.10011.1.12\" extension=\"\"/>\n" +
                "                                </id>\n" +
                "                                <patientPerson classCode=\"PSN\" determinerCode=\"INSTANCE\" xsi:nil=\"false\">\n" +
                "                                    <name xsi:type=\"DSET_EN\">\n" +
                "                                        <item>\n" +
                "                                            <part value=\"" + patName + "\"/>\n" +
                "                                        </item>\n" +
                "                                    </name>\n" +
                "                                </patientPerson>\n" +
                "                            </patient>\n" +
                "                        </subject>\n" +
                "                        <location typeCode=\"LOC\">\n" +
                "                            <time/>\n" +
                "                            <serviceDeliveryLocation classCode=\"SDLOC\">\n" +
                "                                <location classCode=\"PLC\" determinerCode=\"INSTANCE\">\n" +
                "                                    <id>\n" +
                "                                        <item extension=\"\"/>\n" +
                "                                    </id>\n" +
                "                                    <name xsi:type=\"BAG_EN\">\n" +
                "                                        <item use=\"IDE\">\n" +
                "                                            <part value=\"" + patBedno + "\"/>\n" +
                "                                        </item>\n" +
                "                                    </name>\n" +
                "                                    <asLocatedEntityPartOf classCode=\"LOCE\">\n" +
                "                                        <location classCode=\"PLC\" determinerCode=\"INSTANCE\">\n" +
                "                                            <id>\n" +
                "                                                <item extension=\"null\"/>\n" +
                "                                            </id>\n" +
                "                                            <name xsi:type=\"BAG_EN\">\n" +
                "                                                <item use=\"IDE\">\n" +
                "                                                    <part value=\"null\"/>\n" +
                "                                                </item>\n" +
                "                                            </name>\n" +
                "                                        </location>\n" +
                "                                    </asLocatedEntityPartOf>\n" +
                "                                </location>\n" +
                "                                <serviceProviderOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
                "                                    <id>\n" +
                "                                        <item extension=\"" + patDeptCode + "\"/>\n" +
                "                                    </id>\n" +
                "                                    <name xsi:type=\"BAG_EN\">\n" +
                "                                        <item use=\"IDE\">\n" +
                "                                            <part value=\"" + patDeptName + "\"/>\n" +
                "                                        </item>\n" +
                "                                    </name>\n" +
                "                                    <asOrganizationPartOf classCode=\"PART\">\n" +
                "                                        <wholeOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
                "                                            <id>\n" +
                "                                                <item extension=\"" + patWardCode + "\"/>\n" +
                "                                            </id>\n" +
                "                                            <name xsi:type=\"BAG_EN\">\n" +
                "                                                <item use=\"IDE\">\n" +
                "                                                    <part value=\"" + patWardName + "\"/>\n" +
                "                                                </item>\n" +
                "                                            </name>\n" +
                "                                        </wholeOrganization>\n" +
                "                                    </asOrganizationPartOf>\n" +
                "                                </serviceProviderOrganization>\n" +
                "                            </serviceDeliveryLocation>\n" +
                "                        </location>\n" +
                "                    </encounter>\n" +
                "                </componentOf1>\n" +
                "            </placerGroup>\n" +
                "        </subject>\n" +
                "    </controlActProcess>\n" +
                "</POOR_IN200902UV>";
        System.out.println("-------------xml的值为:" + xml);
        return xml;
    }
 
}