From 376c1f1782fda955d0344dbcc1305dd5fb750448 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 10 六月 2025 17:30:41 +0800
Subject: [PATCH] 代码提交

---
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/ApplicationTemplate.java |  176 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 176 insertions(+), 0 deletions(-)

diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/ApplicationTemplate.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/ApplicationTemplate.java
new file mode 100644
index 0000000..cfa645f
--- /dev/null
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/ApplicationTemplate.java
@@ -0,0 +1,176 @@
+package cn.lihu.jh.module.ecg.service.devrent;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
+public class ApplicationTemplate {
+
+    /**
+     * 杩斿洖鐨刋ML澶暱浜嗭紝涓嶆兂鐪嬩簡锛岀洿鎺ユ壘涓ā鏉匡紝鎶婇渶瑕佺殑鍊兼斁杩涘幓锛岃繑鍥炵粨鏉焇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;
+    }
+
+}

--
Gitblit v1.9.3