package com.docus.server.collection.parser.xml.test;


import com.docus.server.collection.dto.DeptDto;
import com.docus.server.collection.dto.UserDto;
import com.docus.server.collection.xml.parsers.MzZyParser;
import org.junit.Test;

public class MzZyParserTest {
    public String createDeptXmlTemplate="<PRPM_IN401030UV01 xmlns=\"urn:hl7-org:v3\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ITSVersion=\"XML_1.0\" xsi:schemaLocation=\"urn:hl7-org:v3 ../multicacheschemas/PRPM_IN401030UV01.xsd\">\n" +
            " <id root=\"2.16.156.10011.2.5.1.1\" extension=\"8D73520B-D489-4B70-8F4B-7B5C2D7961B5\"/>\n" +
            " <creationTime value=\"20130116112855\"/>\n" +
            " <interactionId root=\"2.16.156.10011.2.5.1.2\" extension=\"PRPM_IN401030UV01\"/>\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=\"111\"/>\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=\"111\"/>\n" +
            "   </id>\n" +
            "  </device>\n" +
            " </sender>\n" +
            " <controlActProcess classCode=\"CACT\" moodCode=\"EVN\">\n" +
            "  <subject typeCode=\"SUBJ\">\n" +
            "   <registrationRequest classCode=\"REG\" moodCode=\"RQO\">\n" +
            "    <statusCode code=\"active\"/>\n" +
            "    <subject1 typeCode=\"SBJ\">\n" +
            "     <assignedEntity classCode=\"ASSIGNED \">\n" +
            "      <!--医疗卫生机构（科室）标识-科室-->\n" +
            "      <id>\n" +
            "       <item root=\"2.16.156.10011.1.26\" extension=\"${deptCode}\"/>\n" +
            "      </id>\n" +
            "      <!--医疗卫生机构（科室）类别-科室-->\n" +
            "      <code code=\"A03.01\" codeSystem=\"2.16.156.10011.2.3.2.62\" codeSystemName=\"医疗卫生\n" +
            "机构业务科室分类与代码表\">\n" +
            "       <displayName value=\"呼吸内科专业测试\"/>\n" +
            "      </code>\n" +
            "      <!--医疗卫生机构（科室）角色名称-->\n" +
            "      <name xsi:type=\"LIST_EN\">\n" +
            "       <item>\n" +
            "        <part value=\"\"/>\n" +
            "       </item>\n" +
            "      </name>\n" +
            "      <!--工作地址-->\n" +
            "      <addr xsi:type=\"DSET_AD\">\n" +
            "       <item>\n" +
            "        <part value=\"\"/>\n" +
            "       </item>\n" +
            "      </addr>\n" +
            "      <!--工作联系方式：电话、邮箱地址等-->\n" +
            "      <telecom xsi:type=\"DSET_TEL\">\n" +
            "       <item value=\"13897021787\"/>\n" +
            "       <!--科室电话号码-->\n" +
            "       <item value=\"13897021787\" use=\"WP\"/>\n" +
            "      </telecom>\n" +
            "      <!--角色状态RoleStatus-->\n" +
            "      <statusCode code=\"active\"/>\n" +
            "      <!--角色有效期间-->\n" +
            "      <effectiveTime>\n" +
            "       <low value=\"20100101\"/>\n" +
            "       <high value=\"20501231\"/>\n" +
            "      </effectiveTime>\n" +
            "      <assignedPrincipalOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "       <!--医疗卫生机构（科室）实体名称-->\n" +
            "       <name xsi:type=\"LIST_EN\">\n" +
            "        <item use=\"OR\">\n" +
            "         <part value=\"${deptName}\"/>\n" +
            "        </item>\n" +
            "        <!--拼音-->\n" +
            "        <item use=\"SYL\">\n" +
            "         <part value=\"hxnky\"/>\n" +
            "        </item>\n" +
            "        <!--五笔-->\n" +
            "        <item use=\"PHON\">\n" +
            "         <part value=\"xkd\"/>\n" +
            "        </item>\n" +
            "        <!-- 自定义码 -->\n" +
            "        <item use=\"SRCH\">\n" +
            "         <part value=\"xkddd\"/>\n" +
            "        </item>\n" +
            "        <!--英文名-->\n" +
            "        <item use=\"ABC\">\n" +
            "         <part value=\"hxnky\"/>\n" +
            "        </item>\n" +
            "       </name>\n" +
            "       <asAffiliate classCode=\"AFFL\">\n" +
            "        <code/>\n" +
            "        <effectiveTime/>\n" +
            "        <!--上级机构-->\n" +
            "        <scoper2 classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "         <!--上级医疗卫生机构（科室）号标识-->\n" +
            "         <id>\n" +
            "          <item root=\"2.16.156.10011.1.26\" extension=\"0234567890\"/>\n" +
            "         </id>\n" +
            "         <name xsi:type=\"LIST_EN\">\n" +
            "          <item>\n" +
            "           <part value=\"内科\"/>\n" +
            "          </item>\n" +
            "         </name>\n" +
            "         <asAffiliate classCode=\"AFFL\">\n" +
            "          <code/>\n" +
            "          <effectiveTime/>\n" +
            "          <scoper2 classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "           <!--院区-->\n" +
            "           <id>\n" +
            "            <item root=\"2.16.156.10011.0.9.1.64\" extension=\"0234567890\"/>\n" +
            "           </id>\n" +
            "           <name xsi:type=\"LIST_EN\">\n" +
            "            <item>\n" +
            "             <part value=\"院区名称\"/>\n" +
            "            </item>\n" +
            "           </name>\n" +
            "           <asAffiliate classCode=\"AFFL\">\n" +
            "            <code/>\n" +
            "            <!--机构成立批准日期-->\n" +
            "            <effectiveTime>\n" +
            "             <any value=\"20101212\"/>\n" +
            "            </effectiveTime>\n" +
            "            <scoper2 classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "             <!--医疗机构-->\n" +
            "             <id>\n" +
            "              <item root=\"2.16.156.10011.1.5\" extension=\"0234567890\"/>\n" +
            "             </id>\n" +
            "             <name xsi:type=\"LIST_EN\">\n" +
            "              <item>\n" +
            "               <part value=\"医疗机构名称\"/>\n" +
            "              </item>\n" +
            "             </name>\n" +
            "            </scoper2>\n" +
            "           </asAffiliate>\n" +
            "          </scoper2>\n" +
            "         </asAffiliate>\n" +
            "        </scoper2>\n" +
            "       </asAffiliate>\n" +
            "      </assignedPrincipalOrganization>\n" +
            "      <subjectOf2 typeCode=\"SBJ\">\n" +
            "       <roleActivation classCode=\"CACT\" moodCode=\"EVN\">\n" +
            "        <reasonCode/>\n" +
            "        <subjectOf typeCode=\"SUBJ\">\n" +
            "         <controlActEvent classCode=\"CACT\" moodCode=\"EVN\">\n" +
            "          <id/>\n" +
            "          <custodian typeCode=\"CST\">\n" +
            "           <assignedEntity classCode=\"ASSIGNED\">\n" +
            "            <!-- 是否核算科室 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.010.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"是否核算科室\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "            <!-- 是否挂号科室 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.011.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"是否挂号科室\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "            <!-- 特殊科室类型 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.012.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"特殊科室类型\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"CD\" code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.104\" codeSystemName=\"特殊科室类型代码表\">\n" +
            "               <displayName value=\"xx科室\"/>\n" +
            "              </value>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "            <!-- 科室级别 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.013.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"科室级别\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"INT\" value=\"2\"/>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "            <!-- 临床分类 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.014.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"临床分类\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"CD\" code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.106\" codeSystemName=\"科室临床分类代码表\">\n" +
            "               <displayName value=\"xx类\"/>\n" +
            "              </value>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "            <!-- 有效性标志 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.015.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"有效性标志\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"CD\" code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.106\" codeSystemName=\"科室状态代码表\">\n" +
            "              </value>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "            <!-- 警戒线 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.016.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"警戒线\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"ST\" value=\"1\"/>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "            <!-- 顺序号 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.017.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"顺序号\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"INT\" value=\"133\"/>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "            <!-- 是否手术科室 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.018.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"是否手术科室\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "            <!-- 是否亚专科 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.019.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"是否亚专科\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "           </assignedEntity>\n" +
            "          </custodian>\n" +
            "         </controlActEvent>\n" +
            "        </subjectOf>\n" +
            "       </roleActivation>\n" +
            "      </subjectOf2>\n" +
            "     </assignedEntity>\n" +
            "    </subject1>\n" +
            "    <author typeCode=\"AUT\">\n" +
            "     <!--创建时间-->\n" +
            "     <time>\n" +
            "      <any value=\"202012121515\"/>\n" +
            "     </time>\n" +
            "     <assignedEntity classCode=\"ASSIGNED\">\n" +
            "      <!--医务人员ID-->\n" +
            "      <id>\n" +
            "       <item root=\"2.16.156.10011.1.4\" extension=\"120109197706015518\"/>\n" +
            "      </id>\n" +
            "      <assignedPerson classCode=\"PSN\" determinerCode=\"INSTANCE\">\n" +
            "       <name xsi:type=\"LIST_EN\">\n" +
            "        <item>\n" +
            "         <part value=\"李人事\"/>\n" +
            "        </item>\n" +
            "       </name>\n" +
            "      </assignedPerson>\n" +
            "      <representedOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "       <!--科室号标识-->\n" +
            "       <id>\n" +
            "        <item root=\"2.16.156.10011.1.26\" extension=\"xxx12345-X\"/>\n" +
            "       </id>\n" +
            "       <name xsi:type=\"LIST_EN\">\n" +
            "        <item>\n" +
            "         <part value=\"人事科\"/>\n" +
            "        </item>\n" +
            "       </name>\n" +
            "       <contactParty classCode=\"CON\">\n" +
            "        <contactPerson classCode=\"PSN\" determinerCode=\"INSTANCE\">\n" +
            "         <name xsi:type=\"LIST_EN\">\n" +
            "          <item>\n" +
            "           <part value=\"王联系\"/>\n" +
            "          </item>\n" +
            "         </name>\n" +
            "        </contactPerson>\n" +
            "       </contactParty>\n" +
            "      </representedOrganization>\n" +
            "     </assignedEntity>\n" +
            "    </author>\n" +
            "   </registrationRequest>\n" +
            "  </subject>\n" +
            " </controlActProcess>\n" +
            "</PRPM_IN401030UV01>\n";
    public String updateDeptXmlTemplate="<PRPM_IN403010UV01 xmlns=\"urn:hl7-org:v3\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ITSVersion=\"XML_1.0\" xsi:schemaLocation=\"urn:hl7-org:v3 ../multicacheschemas/PRPM_IN403010UV01.xsd\">\n" +
            " <id root=\"2.16.156.10011.2.5.1.1\" extension=\"8D73520B-D489-4B70-8F4B-7B5C2D7961B5\"/>\n" +
            " <creationTime value=\"20130116112855\"/>\n" +
            " <interactionId root=\"2.16.156.10011.2.5.1.2\" extension=\"PRPM_IN403010UV01\"/>\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=\"111\"/>\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=\"111\"/>\n" +
            "   </id>\n" +
            "  </device>\n" +
            " </sender>\n" +
            " <controlActProcess classCode=\"CACT\" moodCode=\"EVN\">\n" +
            "  <subject typeCode=\"SUBJ\">\n" +
            "   <registrationRequest classCode=\"REG\" moodCode=\"RQO\">\n" +
            "    <statusCode code=\"active\"/>\n" +
            "    <subject1 typeCode=\"SBJ\">\n" +
            "     <assignedEntity classCode=\"ASSIGNED \">\n" +
            "      <!--医疗卫生机构（科室）标识-科室-->\n" +
            "      <id>\n" +
            "       <item root=\"2.16.156.10011.1.26\" extension=\"${deptCode}\"/>\n" +
            "      </id>\n" +
            "      <!--医疗卫生机构（科室）类别-科室-->\n" +
            "      <code code=\"A03.01\" codeSystem=\"2.16.156.10011.2.3.2.62\" codeSystemName=\"医疗卫生\n" +
            "机构业务科室分类与代码表\">\n" +
            "       <displayName value=\"呼吸内科专业测试\"/>\n" +
            "      </code>\n" +
            "      <!--医疗卫生机构（科室）角色名称-->\n" +
            "      <name xsi:type=\"LIST_EN\">\n" +
            "       <item>\n" +
            "        <part value=\"\"/>\n" +
            "       </item>\n" +
            "      </name>\n" +
            "      <!--工作地址-->\n" +
            "      <addr xsi:type=\"DSET_AD\">\n" +
            "       <item>\n" +
            "        <part value=\"\"/>\n" +
            "       </item>\n" +
            "      </addr>\n" +
            "      <!--工作联系方式：电话、邮箱地址等-->\n" +
            "      <telecom xsi:type=\"DSET_TEL\">\n" +
            "       <item value=\"13897021787\"/>\n" +
            "       <!--科室电话号码-->\n" +
            "       <item value=\"13897021787\" use=\"WP\"/>\n" +
            "      </telecom>\n" +
            "      <!--角色状态RoleStatus-->\n" +
            "      <statusCode code=\"active\"/>\n" +
            "      <!--角色有效期间-->\n" +
            "      <effectiveTime>\n" +
            "       <low value=\"20100101\"/>\n" +
            "       <high value=\"20501231\"/>\n" +
            "      </effectiveTime>\n" +
            "      <assignedPrincipalOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "       <!--医疗卫生机构（科室）实体名称-->\n" +
            "       <name xsi:type=\"LIST_EN\">\n" +
            "        <item use=\"OR\">\n" +
            "         <part value=\"${deptName}\"/>\n" +
            "        </item>\n" +
            "        <!--拼音-->\n" +
            "        <item use=\"SYL\">\n" +
            "         <part value=\"hxnky\"/>\n" +
            "        </item>\n" +
            "        <!--五笔-->\n" +
            "        <item use=\"PHON\">\n" +
            "         <part value=\"xkd\"/>\n" +
            "        </item>\n" +
            "        <!-- 自定义码 -->\n" +
            "        <item use=\"SRCH\">\n" +
            "         <part value=\"xkddd\"/>\n" +
            "        </item>\n" +
            "        <!--英文名-->\n" +
            "        <item use=\"ABC\">\n" +
            "         <part value=\"hxnky\"/>\n" +
            "        </item>\n" +
            "       </name>\n" +
            "       <asAffiliate classCode=\"AFFL\">\n" +
            "        <code/>\n" +
            "        <effectiveTime/>\n" +
            "        <!--上级机构-->\n" +
            "        <affiliatedPrincipalOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "         <!--上级医疗卫生机构（科室）号标识-->\n" +
            "         <id>\n" +
            "          <item root=\"2.16.156.10011.1.26\" extension=\"0234567890\"/>\n" +
            "         </id>\n" +
            "         <name xsi:type=\"LIST_EN\">\n" +
            "          <item>\n" +
            "           <part value=\"内科\"/>\n" +
            "          </item>\n" +
            "         </name>\n" +
            "         <asAffiliate classCode=\"AFFL\">\n" +
            "          <code/>\n" +
            "          <effectiveTime/>\n" +
            "          <affiliatedPrincipalOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "           <!--院区-->\n" +
            "           <id>\n" +
            "            <item root=\"2.16.156.10011.0.9.1.64\" extension=\"0234567890\"/>\n" +
            "           </id>\n" +
            "           <name xsi:type=\"LIST_EN\">\n" +
            "            <item>\n" +
            "             <part value=\"院区名称\"/>\n" +
            "            </item>\n" +
            "           </name>\n" +
            "           <asAffiliate classCode=\"AFFL\">\n" +
            "            <code/>\n" +
            "            <!--机构成立批准日期-->\n" +
            "            <effectiveTime>\n" +
            "             <any value=\"20101212\"/>\n" +
            "            </effectiveTime>\n" +
            "            <affiliatedPrincipalOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "             <!--医疗机构-->\n" +
            "             <id>\n" +
            "              <item root=\"2.16.156.10011.1.5\" extension=\"0234567890\"/>\n" +
            "             </id>\n" +
            "             <name xsi:type=\"LIST_EN\">\n" +
            "              <item>\n" +
            "               <part value=\"医疗机构名称\"/>\n" +
            "              </item>\n" +
            "             </name>\n" +
            "            </affiliatedPrincipalOrganization>\n" +
            "           </asAffiliate>\n" +
            "          </affiliatedPrincipalOrganization>\n" +
            "         </asAffiliate>\n" +
            "        </affiliatedPrincipalOrganization>\n" +
            "       </asAffiliate>\n" +
            "      </assignedPrincipalOrganization>\n" +
            "      <subjectOf2 typeCode=\"SBJ\">\n" +
            "       <roleActivation classCode=\"CACT\" moodCode=\"EVN\">\n" +
            "        <reasonCode/>\n" +
            "        <subjectOf typeCode=\"SUBJ\">\n" +
            "         <controlActEvent classCode=\"CACT\" moodCode=\"EVN\">\n" +
            "          <id/>\n" +
            "          <custodian typeCode=\"CST\">\n" +
            "           <assignedEntity classCode=\"ASSIGNED\">\n" +
            "            <!-- 是否核算科室 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.010.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"是否核算科室\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "            <!-- 是否挂号科室 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.011.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"是否挂号科室\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "            <!-- 特殊科室类型 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.012.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"特殊科室类型\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"CD\" code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.104\" codeSystemName=\"特殊科室类型代码表\">\n" +
            "               <displayName value=\"xx科室\"/>\n" +
            "              </value>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "            <!-- 科室级别 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.013.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"科室级别\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"INT\" value=\"2\"/>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "            <!-- 临床分类 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.014.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"临床分类\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"CD\" code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.106\" codeSystemName=\"科室临床分类代码表\">\n" +
            "               <displayName value=\"xx类\"/>\n" +
            "              </value>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "            <!-- 有效性标志 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.015.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"有效性标志\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"CD\" code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.106\" codeSystemName=\"科室状态代码表\">\n" +
            "              </value>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "            <!-- 警戒线 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.016.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"警戒线\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"ST\" value=\"1\"/>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "            <!-- 顺序号 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.017.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"顺序号\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"INT\" value=\"133\"/>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "            <!-- 是否手术科室 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.018.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"是否手术科室\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "            <!-- 是否亚专科 -->\n" +
            "            <subjectOf typeCode=\"SBJ\">\n" +
            "             <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "              <code code=\"CDE01.30.019.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "               <displayName value=\"是否亚专科\"/>\n" +
            "              </code>\n" +
            "              <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "             </observationEvent>\n" +
            "            </subjectOf>\n" +
            "           </assignedEntity>\n" +
            "          </custodian>\n" +
            "         </controlActEvent>\n" +
            "        </subjectOf>\n" +
            "       </roleActivation>\n" +
            "      </subjectOf2>\n" +
            "     </assignedEntity>\n" +
            "    </subject1>\n" +
            "    <author typeCode=\"AUT\">\n" +
            "     <!--创建时间-->\n" +
            "     <time>\n" +
            "      <any value=\"202012121515\"/>\n" +
            "     </time>\n" +
            "     <assignedEntity classCode=\"ASSIGNED\">\n" +
            "      <!--医务人员ID-->\n" +
            "      <id>\n" +
            "       <item root=\"2.16.156.10011.1.4\" extension=\"120109197706015518\"/>\n" +
            "      </id>\n" +
            "      <assignedPerson classCode=\"PSN\" determinerCode=\"INSTANCE\">\n" +
            "       <name xsi:type=\"LIST_EN\">\n" +
            "        <item>\n" +
            "         <part value=\"李人事\"/>\n" +
            "        </item>\n" +
            "       </name>\n" +
            "      </assignedPerson>\n" +
            "      <representedOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "       <!--科室号标识-->\n" +
            "       <id>\n" +
            "        <item root=\"2.16.156.10011.1.26\" extension=\"xxx12345-X\"/>\n" +
            "       </id>\n" +
            "       <name xsi:type=\"LIST_EN\">\n" +
            "        <item>\n" +
            "         <part value=\"人事科\"/>\n" +
            "        </item>\n" +
            "       </name>\n" +
            "       <contactParty classCode=\"CON\">\n" +
            "        <contactPerson classCode=\"PSN\" determinerCode=\"INSTANCE\">\n" +
            "         <name xsi:type=\"LIST_EN\">\n" +
            "          <item>\n" +
            "           <part value=\"王联系\"/>\n" +
            "          </item>\n" +
            "         </name>\n" +
            "        </contactPerson>\n" +
            "       </contactParty>\n" +
            "      </representedOrganization>\n" +
            "     </assignedEntity>\n" +
            "    </author>\n" +
            "   </registrationRequest>\n" +
            "  </subject>\n" +
            " </controlActProcess>\n" +
            "</PRPM_IN403010UV01>\n";

    @Test
    public void parseCreateDeptTest(){
        String deptCode="222";
        String deptName="路脑外科";
        String createDeptXml=createDeptXmlTemplate.replace("${deptCode}",deptCode)
                .replace("${deptName}",deptName);

        DeptDto deptDto = MzZyParser.parseCreateDept(createDeptXml);
        System.out.println(deptDto);
        assert deptCode.equals(deptDto.getDeptCode());
        assert deptName.equals(deptDto.getDeptName());
    }

    @Test
    public void parseUpdateDept(){
        String deptCode="221";
        String deptName="神经内科";
        String createDeptXml=updateDeptXmlTemplate.replace("${deptCode}",deptCode)
                .replace("${deptName}",deptName);

        DeptDto deptDto = MzZyParser.parseUpdateDept(createDeptXml);
        System.out.println(deptDto);
        assert deptCode.equals(deptDto.getDeptCode());
        assert deptName.equals(deptDto.getDeptName());
    }



    private String createUserXmlTemplate="<PRPM_IN301010UV01 xmlns=\"urn:hl7-org:v3\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ITSVersion=\"XML_1.0\" xsi:schemaLocation=\"urn:hl7-org:v3 ../multicacheschemas/PRPM_IN301010UV01.xsd\">\n" +
            " <id root=\"2.16.156.10011.2.5.1.1\" extension=\"8D73520B-D489-4B70-8F4B-7B5C2D7961B5\"/>\n" +
            " <creationTime value=\"20130116112855\"/>\n" +
            " <interactionId root=\"2.16.156.10011.2.5.1.2\" extension=\"PRPM_IN301010UV01\"/>\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" +
            "  <authorOrPerformer typeCode=\"AUT\">\n" +
            "   <assignedDevice classCode=\"ASSIGNED\">\n" +
            "    <assignedDevice classCode=\"DEV\" determinerCode=\"INSTANCE\">\n" +
            "     <asLocatedEntity classCode=\"LOCE\">\n" +
            "      <id>\n" +
            "       <!-- 院区编码 -->\n" +
            "       <item root=\"2.16.156.10011.0.9.1.64\" extension=\"321\"/>\n" +
            "      </id>\n" +
            "      <location classCode=\"PLC\" determinerCode=\"INSTANCE\">\n" +
            "       <name xsi:type=\"DSET_EN\">\n" +
            "        <item>\n" +
            "         <!-- 院区名称 -->\n" +
            "         <part value=\"院区名称1\"/>\n" +
            "        </item>\n" +
            "       </name>\n" +
            "      </location>\n" +
            "     </asLocatedEntity>\n" +
            "    </assignedDevice>\n" +
            "    <representedOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "     <id>\n" +
            "      <!-- 医院编码 -->\n" +
            "      <item root=\"2.16.156.10011.1.5\" extension=\"123\"/>\n" +
            "     </id>\n" +
            "     <name xsi:type=\"DSET_EN\">\n" +
            "      <item>\n" +
            "       <!-- 医院名称 -->\n" +
            "       <part value=\"医院名称1\"/>\n" +
            "      </item>\n" +
            "     </name>\n" +
            "    </representedOrganization>\n" +
            "   </assignedDevice>\n" +
            "  </authorOrPerformer>\n" +
            "  <subject typeCode=\"SUBJ\">\n" +
            "   <registrationRequest classCode=\"REG\" moodCode=\"RQO\">\n" +
            "    <statusCode code=\"active\"/>\n" +
            "    <subject1 typeCode=\"SBJ\">\n" +
            "     <healthCareProvider classCode=\"PROV\">\n" +
            "      <!--医务人员ID-->\n" +
            "      <id>\n" +
            "       <item root=\"2.16.156.10011.1.4\" extension=\"${userName}\"/>\n" +
            "      </id>\n" +
            "      <!--专业技术职务代码-->\n" +
            "      <code code=\"231\" codeSystem=\"2.16.156.10011.2.3.3.10\" codeSystemName=\"专业技术职务代码（ GB/T 8561-1988）\">\n" +
            "       <displayName value=\"主任医师\"/>\n" +
            "      </code>\n" +
            "      <!--工作地址-->\n" +
            "      <addr xsi:type=\"DSET_AD\">\n" +
            "       <item use=\"WP\">\n" +
            "        <part value=\"门诊楼#2-2\"/>\n" +
            "       </item>\n" +
            "      </addr>\n" +
            "      <!--工作联系方式：电话、邮箱地址等-->\n" +
            "      <telecom xsi:type=\"DSET_TEL\">\n" +
            "       <!--工作电话-->\n" +
            "       <item value=\"19912345678\" use=\"WP\"/>\n" +
            "       <!--移动电话-->\n" +
            "       <item value=\"19912345678\" use=\"MC\"/>\n" +
            "       <!--电子邮件地址-->\n" +
            "       <item value=\"p1@123.com\" use=\"TMP\"/>\n" +
            "      </telecom>\n" +
            "      <!--角色状态RoleStatus-->\n" +
            "      <statusCode code=\"active\"/>\n" +
            "      <!--角色有效期间-->\n" +
            "      <effectiveTime>\n" +
            "       <low value=\"20100101\"/>\n" +
            "       <high value=\"20501231\"/>\n" +
            "      </effectiveTime>\n" +
            "      <healthCarePrincipalPerson classCode=\"PSN\" determinerCode=\"INSTANCE\">\n" +
            "       <!--身份证号-->\n" +
            "       <id>\n" +
            "        <item root=\"2.16.156.10011.1.3\" extension=\"120109197706015518\"/>\n" +
            "       </id>\n" +
            "       <idCategory code=\"01\" codeSystem=\"2.16.156.10011.2.3.1.1\" codeSystemName=\"身份证件类别代码表\">\n" +
            "        <displayName value=\"居民身份证\"/>\n" +
            "       </idCategory>\n" +
            "       <!--姓名-->\n" +
            "       <name xsi:type=\"LIST_EN\">\n" +
            "        <!--正式名、员工姓名-->\n" +
            "        <item use=\"OR\">\n" +
            "         <part value=\"${name}\"/>\n" +
            "        </item>\n" +
            "        <!--拼音-->\n" +
            "        <item use=\"SYL\">\n" +
            "         <part value=\"liuyonghao\"/>\n" +
            "        </item>\n" +
            "        <!--五笔-->\n" +
            "        <item use=\"PHON\">\n" +
            "         <part value=\"xkd\"/>\n" +
            "        </item>\n" +
            "        <!--中文通用名-->\n" +
            "        <item use=\"IDE\">\n" +
            "         <part value=\"刘永好\"/>\n" +
            "        </item>\n" +
            "        <!--英文通用名-->\n" +
            "        <item use=\"ABC\">\n" +
            "         <part value=\"Yonghao Liu\"/>\n" +
            "        </item>\n" +
            "       </name>\n" +
            "       <!--性别-->\n" +
            "       <administrativeGenderCode code=\"1\" codeSystem=\"2.16.156.10011.2.3.3.4\" codeSystemName=\"生理性别代码表（GB/T 2261.1）\">\n" +
            "        <displayName value=\"男性\"/>\n" +
            "       </administrativeGenderCode>\n" +
            "       <!--出生日期-->\n" +
            "       <birthTime value=\"19570323\"/>\n" +
            "       <!--隶属-->\n" +
            "       <asAffiliate classCode=\"AFFL\">\n" +
            "        <code/>\n" +
            "        <effectiveTime/>\n" +
            "        <affiliatedPrincipalOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "         <!--科室号标识-->\n" +
            "         <id>\n" +
            "          <item root=\"2.16.156.10011.1.26\" extension=\"${deptId}\"/>\n" +
            "         </id>\n" +
            "         <name xsi:type=\"LIST_EN\">\n" +
            "          <item>\n" +
            "           <part value=\"呼吸内科\"/>\n" +
            "          </item>\n" +
            "         </name>\n" +
            "        </affiliatedPrincipalOrganization>\n" +
            "       </asAffiliate>\n" +
            "       <!--出生地-->\n" +
            "       <birthplace classCode=\"BIRTHPL\">\n" +
            "        <addr>\n" +
            "         <part value=\"辽宁\"/>\n" +
            "        </addr>\n" +
            "       </birthplace>\n" +
            "      </healthCarePrincipalPerson>\n" +
            "      <relatedTo typeCode=\"REL\">\n" +
            "       <assignedEntity classCode=\"ASSIGNED\">\n" +
            "        <id>\n" +
            "         <!-- 工资号 -->\n" +
            "         <item root=\"2.16.156.10011.0.9.1.67\" extension=\"xxx12345-G\"/>\n" +
            "         <!-- 顺序号 -->\n" +
            "         <item root=\"2.16.156.10011.0.9.1.68\" extension=\"xxx12345-G\"/>\n" +
            "         <!-- Pacs人员号 -->\n" +
            "         <item root=\"2.16.156.10011.0.9.1.69\" extension=\"xxx12345-G\"/>\n" +
            "         <!-- CA人员号 -->\n" +
            "         <item root=\"2.16.156.10011.0.9.1.70\" extension=\"xxx12345-G\"/>\n" +
            "         <!-- OA号 -->\n" +
            "         <item root=\"2.16.156.10011.0.9.1.71\" extension=\"xxx12345-G\"/>\n" +
            "         <!-- 人事号 -->\n" +
            "         <item root=\"2.16.156.10011.0.9.1.72\" extension=\"xxx12345-G\"/>\n" +
            "         <!-- HIS人员号 -->\n" +
            "         <item root=\"2.16.156.10011.0.9.1.73\" extension=\"xxx12345-G\"/>\n" +
            "        </id>\n" +
            "        <!-- 人员类型 -->\n" +
            "        <code code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.108\" codeSystemName=\"人员类型代码表\">\n" +
            "         <displayName value=\"医护\"/>\n" +
            "        </code>\n" +
            "        <effectiveTime>\n" +
            "         <!-- 本单位入职时间 -->\n" +
            "         <low value=\"20100101\"/>\n" +
            "        </effectiveTime>\n" +
            "        <representedOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "         <!--部门编码-->\n" +
            "         <id>\n" +
            "          <item root=\"2.16.156.10011.0.9.1.76\" extension=\"12314\"/>\n" +
            "         </id>\n" +
            "         <name xsi:type=\"DSET_EN\">\n" +
            "          <item>\n" +
            "           <part value=\"住院部\"/>\n" +
            "          </item>\n" +
            "         </name>\n" +
            "        </representedOrganization>\n" +
            "        <subjectOf2 typeCode=\"SBJ\">\n" +
            "         <roleActivation classCode=\"CACT\" moodCode=\"EVN\">\n" +
            "          <reasonCode/>\n" +
            "          <subjectOf typeCode=\"SUBJ\">\n" +
            "           <controlActEvent classCode=\"CACT\" moodCode=\"EVN\">\n" +
            "            <id/>\n" +
            "            <custodian typeCode=\"CST\">\n" +
            "             <assignedEntity classCode=\"ASSIGNED\">\n" +
            "              <!-- 能否修改票据 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.020.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"能否修改票据\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 能否直接收费 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.021.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"能否直接收费\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 是否专家标志 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.031.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"是否专家标志\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 是否学科带头人 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.022.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"是否学科带头人\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 高层次人才 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.023.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"高层次人才\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 是否外籍医生 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.026.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"是否外籍医生\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 专业方向 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.024.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"专业方向\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"ST\" value=\"具体专业方向\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 年龄 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.030.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"年龄\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"INT\" value=\"26\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 政治面貌 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.025.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"政治面貌\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"ST\" value=\"群众\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 特长 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.028.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"特长\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"ST\" value=\"特长内容\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 建档日期 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.029.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"建档日期\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"TS\" value=\"20201212\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- CA人员对应电子签章 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.027.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"CA人员对应电子签章\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"ED\" mediaType=\"text/plain\" value=\"wuiqoryhuqihruiqhruqi\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 有效性标志 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.015.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"有效性标志\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"CD\" code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.125\" codeSystemName=\"人员状态代码表\">\n" +
            "                </value>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "             </assignedEntity>\n" +
            "            </custodian>\n" +
            "           </controlActEvent>\n" +
            "          </subjectOf>\n" +
            "         </roleActivation>\n" +
            "        </subjectOf2>\n" +
            "        <!-- 简介（备注） -->\n" +
            "        <subjectOf4 typeCode=\"SBJ\">\n" +
            "         <note classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "          <text value=\"简介（备注）内容\"/>\n" +
            "          <effectiveTime/>\n" +
            "         </note>\n" +
            "        </subjectOf4>\n" +
            "        <performance typeCode=\"PPRF\">\n" +
            "         <actDefinitionOrEvent classCode=\"ACT\" moodCode=\"DEF\">\n" +
            "          <location typeCode=\"LOC\">\n" +
            "           <serviceDeliveryLocation classCode=\"SDLOC\">\n" +
            "            <!--护理站号标识-->\n" +
            "            <id root=\"2.16.156.10011.0.9.1.74\" extension=\"12314\"/>\n" +
            "            <location classCode=\"PLC\" determinerCode=\"INSTANCE\">\n" +
            "             <name>\n" +
            "              <!--护理站名称-->\n" +
            "              <part value=\"护理站1\"/>\n" +
            "             </name>\n" +
            "            </location>\n" +
            "           </serviceDeliveryLocation>\n" +
            "          </location>\n" +
            "         </actDefinitionOrEvent>\n" +
            "        </performance>\n" +
            "        <relatedTo typeCode=\"REL\">\n" +
            "         <assignedEntity classCode=\"ASSIGNED\">\n" +
            "          <!-- 职务 -->\n" +
            "          <code code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.122\" codeSystemName=\"职务代码表\">\n" +
            "           <displayName value=\"${roleName}\"/>\n" +
            "          </code>\n" +
            "         </assignedEntity>\n" +
            "        </relatedTo>\n" +
            "        <relatedTo typeCode=\"REL\">\n" +
            "         <assignedEntity classCode=\"ASSIGNED\">\n" +
            "          <!-- 职级 -->\n" +
            "          <code code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.123\" codeSystemName=\"职级代码表\">\n" +
            "           <displayName value=\"5级\"/>\n" +
            "          </code>\n" +
            "         </assignedEntity>\n" +
            "        </relatedTo>\n" +
            "        <relatedTo typeCode=\"REL\">\n" +
            "         <assignedEntity classCode=\"ASSIGNED\">\n" +
            "          <!-- 职业类型、从业状况（个人身份） -->\n" +
            "          <code code=\"1\" codeSystem=\"2.16.156.10011.2.3.3.13\" codeSystemName=\"从业状况（个人身份）代码表（GB/T 2261.4）\">\n" +
            "           <displayName value=\"干部\"/>\n" +
            "          </code>\n" +
            "         </assignedEntity>\n" +
            "        </relatedTo>\n" +
            "        <relatedTo typeCode=\"REL\">\n" +
            "         <assignedEntity classCode=\"ASSIGNED\">\n" +
            "          <!-- 职业类别 -->\n" +
            "          <code code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.109\" codeSystemName=\"职业类别代码表\">\n" +
            "           <displayName value=\"医护\"/>\n" +
            "          </code>\n" +
            "         </assignedEntity>\n" +
            "        </relatedTo>\n" +
            "        <relatedTo typeCode=\"REL\">\n" +
            "         <assignedEntity classCode=\"ASSIGNED\">\n" +
            "          <!-- 职工性质 -->\n" +
            "          <code code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.110\" codeSystemName=\"职工性质代码表\">\n" +
            "           <displayName value=\"医护\"/>\n" +
            "          </code>\n" +
            "         </assignedEntity>\n" +
            "        </relatedTo>\n" +
            "        <relatedTo typeCode=\"REL\">\n" +
            "         <assignedEntity classCode=\"ASSIGNED\">\n" +
            "          <!-- 聘任职称类别 -->\n" +
            "          <code code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.112\" codeSystemName=\"职称类别代码表\">\n" +
            "           <displayName value=\"教学系列\"/>\n" +
            "          </code>\n" +
            "         </assignedEntity>\n" +
            "        </relatedTo>\n" +
            "        <relatedTo typeCode=\"REL\">\n" +
            "         <assignedEntity classCode=\"ASSIGNED\">\n" +
            "          <!-- 聘任职称 -->\n" +
            "          <code code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.113\" codeSystemName=\"职称代码表\">\n" +
            "           <displayName value=\"高\"/>\n" +
            "          </code>\n" +
            "          <!-- 职称晋升时间 -->\n" +
            "          <effectiveTime>\n" +
            "           <low value=\"20201212\"/>\n" +
            "          </effectiveTime>\n" +
            "         </assignedEntity>\n" +
            "        </relatedTo>\n" +
            "       </assignedEntity>\n" +
            "      </relatedTo>\n" +
            "      <relatedTo typeCode=\"REL\">\n" +
            "       <qualifiedEntity classCode=\"QUAL\">\n" +
            "        <!-- 学历 -->\n" +
            "        <code code=\"1\" codeSystem=\"2.16.156.10011.2.3.3.6\" codeSystemName=\"学历代码表（GB/T 4658）\">\n" +
            "         <displayName value=\"大本\"/>\n" +
            "        </code>\n" +
            "        <!-- 学历时间 -->\n" +
            "        <effectiveTime>\n" +
            "         <low value=\"20101011\"/>\n" +
            "        </effectiveTime>\n" +
            "        <!-- 毕业学校 -->\n" +
            "        <qualificationGrantingOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "         <name xsi:type=\"DSET_EN\">\n" +
            "          <item>\n" +
            "           <part value=\"医大\"/>\n" +
            "          </item>\n" +
            "         </name>\n" +
            "        </qualificationGrantingOrganization>\n" +
            "       </qualifiedEntity>\n" +
            "      </relatedTo>\n" +
            "      <relatedTo typeCode=\"REL\">\n" +
            "       <qualifiedEntity classCode=\"QUAL\">\n" +
            "        <!-- 学位 -->\n" +
            "        <code>\n" +
            "         <originalText value=\"学位文本\"/>\n" +
            "        </code>\n" +
            "        <effectiveTime/>\n" +
            "       </qualifiedEntity>\n" +
            "      </relatedTo>\n" +
            "      <relatedTo typeCode=\"REL\">\n" +
            "       <qualifiedEntity classCode=\"QUAL\">\n" +
            "        <!-- 执业资格证书编号 -->\n" +
            "        <id>\n" +
            "         <item root=\"2.16.156.10011.1.30\" extension=\"12331241\"/>\n" +
            "        </id>\n" +
            "        <code/>\n" +
            "        <effectiveTime/>\n" +
            "       </qualifiedEntity>\n" +
            "      </relatedTo>\n" +
            "      <relatedTo typeCode=\"REL\">\n" +
            "       <qualifiedEntity classCode=\"QUAL\">\n" +
            "        <!-- 取得职称类别(取得证书) -->\n" +
            "        <code code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.112\" codeSystemName=\"职称类别代码表\">\n" +
            "         <displayName value=\"教学系列\"/>\n" +
            "        </code>\n" +
            "        <effectiveTime/>\n" +
            "       </qualifiedEntity>\n" +
            "      </relatedTo>\n" +
            "      <relatedTo typeCode=\"REL\">\n" +
            "       <qualifiedEntity classCode=\"QUAL\">\n" +
            "        <!-- 取得职称级别(取得证书) -->\n" +
            "        <code code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.113\" codeSystemName=\"职称级别代码表\">\n" +
            "         <displayName value=\"高\"/>\n" +
            "        </code>\n" +
            "        <!-- 取得职称时间 -->\n" +
            "        <effectiveTime>\n" +
            "         <low value=\"20101011\"/>\n" +
            "        </effectiveTime>\n" +
            "       </qualifiedEntity>\n" +
            "      </relatedTo>\n" +
            "     </healthCareProvider>\n" +
            "    </subject1>\n" +
            "    <!--申请者-->\n" +
            "    <author typeCode=\"AUT\">\n" +
            "     <!-- 操作时间 -->\n" +
            "     <time>\n" +
            "      <any value=\"201212121314\"/>\n" +
            "     </time>\n" +
            "     <assignedEntity classCode=\"ASSIGNED\">\n" +
            "      <!--医务人员ID-->\n" +
            "      <id>\n" +
            "       <item root=\"2.16.156.10011.1.4\" extension=\"120109197706015518\"/>\n" +
            "      </id>\n" +
            "      <assignedPerson classCode=\"PSN\" determinerCode=\"INSTANCE\">\n" +
            "       <name xsi:type=\"LIST_EN\">\n" +
            "        <item>\n" +
            "         <part value=\"李人事\"/>\n" +
            "        </item>\n" +
            "       </name>\n" +
            "      </assignedPerson>\n" +
            "      <representedOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "       <!--科室号标识-->\n" +
            "       <id>\n" +
            "        <item root=\"2.16.156.10011.1.26\" extension=\"xxx12345-X\"/>\n" +
            "       </id>\n" +
            "       <name xsi:type=\"LIST_EN\">\n" +
            "        <item>\n" +
            "         <part value=\"人事科\"/>\n" +
            "        </item>\n" +
            "       </name>\n" +
            "       <contactParty classCode=\"CON\">\n" +
            "        <contactPerson classCode=\"PSN\" determinerCode=\"INSTANCE\">\n" +
            "         <name xsi:type=\"LIST_EN\">\n" +
            "          <item>\n" +
            "           <part value=\"王联系\"/>\n" +
            "          </item>\n" +
            "         </name>\n" +
            "        </contactPerson>\n" +
            "       </contactParty>\n" +
            "      </representedOrganization>\n" +
            "     </assignedEntity>\n" +
            "    </author>\n" +
            "   </registrationRequest>\n" +
            "  </subject>\n" +
            " </controlActProcess>\n" +
            "</PRPM_IN301010UV01>\n";




    @Test
    public void parseCreateUser(){
        String userName="121";
        String name="皮皮蛙一号";
        String roleName="科主任";
        String deptId="022";

        String createUserXml=createUserXmlTemplate.replace("${roleName}",roleName)
                .replace("${userName}",userName)
                .replace("${name}",name)
                .replace("${deptId}",deptId);
        UserDto userDto = MzZyParser.parseCreateUser(createUserXml);
        System.out.println(userDto);
        assert userName.equals(userDto.getUserName());
        assert name.equals(userDto.getName());
        assert roleName.equals(userDto.getPosition());
        assert deptId.equals(userDto.getDeptId());

    }


    private String updateUserXmlTemplate="<PRPM_IN303010UV01 xmlns=\"urn:hl7-org:v3\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ITSVersion=\"XML_1.0\" xsi:schemaLocation=\"urn:hl7-org:v3 ../multicacheschemas/PRPM_IN303010UV01.xsd\">\n" +
            " <id root=\"2.16.156.10011.2.5.1.1\" extension=\"8D73520B-D489-4B70-8F4B-7B5C2D7961B5\"/>\n" +
            " <creationTime value=\"20130116112855\"/>\n" +
            " <interactionId root=\"2.16.156.10011.2.5.1.2\" extension=\"PRPM_IN303010UV01\"/>\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" +
            "  <authorOrPerformer typeCode=\"AUT\">\n" +
            "   <assignedDevice classCode=\"ASSIGNED\">\n" +
            "    <assignedDevice classCode=\"DEV\" determinerCode=\"INSTANCE\">\n" +
            "     <asLocatedEntity classCode=\"LOCE\">\n" +
            "      <id>\n" +
            "       <!-- 院区编码 -->\n" +
            "       <item root=\"2.16.156.10011.0.9.1.64\" extension=\"321\"/>\n" +
            "      </id>\n" +
            "      <location classCode=\"PLC\" determinerCode=\"INSTANCE\">\n" +
            "       <name xsi:type=\"DSET_EN\">\n" +
            "        <item>\n" +
            "         <!-- 院区名称 -->\n" +
            "         <part value=\"院区名称1\"/>\n" +
            "        </item>\n" +
            "       </name>\n" +
            "      </location>\n" +
            "     </asLocatedEntity>\n" +
            "    </assignedDevice>\n" +
            "    <representedOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "     <id>\n" +
            "      <!-- 医院编码 -->\n" +
            "      <item root=\"2.16.156.10011.1.5\" extension=\"123\"/>\n" +
            "     </id>\n" +
            "     <name xsi:type=\"DSET_EN\">\n" +
            "      <item>\n" +
            "       <!-- 医院名称 -->\n" +
            "       <part value=\"医院名称1\"/>\n" +
            "      </item>\n" +
            "     </name>\n" +
            "    </representedOrganization>\n" +
            "   </assignedDevice>\n" +
            "  </authorOrPerformer>\n" +
            "  <subject typeCode=\"SUBJ\">\n" +
            "   <registrationRequest classCode=\"REG\" moodCode=\"RQO\">\n" +
            "    <statusCode code=\"active\"/>\n" +
            "    <subject1 typeCode=\"SBJ\">\n" +
            "     <healthCareProvider classCode=\"PROV\">\n" +
            "      <!--医务人员ID-->\n" +
            "      <id>\n" +
            "       <item root=\"2.16.156.10011.1.4\" extension=\"${userName}\"/>\n" +
            "      </id>\n" +
            "      <!--专业技术职务代码-->\n" +
            "      <code code=\"231\" codeSystem=\"2.16.156.10011.2.3.3.10\" codeSystemName=\"专业技术职务代码（ GB/T 8561-1988）\">\n" +
            "       <displayName value=\"主任医师\"/>\n" +
            "      </code>\n" +
            "      <!--工作地址-->\n" +
            "      <addr xsi:type=\"DSET_AD\">\n" +
            "       <item use=\"WP\">\n" +
            "        <part value=\"门诊楼#2-2\"/>\n" +
            "       </item>\n" +
            "      </addr>\n" +
            "      <!--工作联系方式：电话、邮箱地址等-->\n" +
            "      <telecom xsi:type=\"DSET_TEL\">\n" +
            "       <!--工作电话-->\n" +
            "       <item value=\"19912345678\" use=\"WP\"/>\n" +
            "       <!--移动电话-->\n" +
            "       <item value=\"19912345678\" use=\"MC\"/>\n" +
            "       <!--电子邮件地址-->\n" +
            "       <item value=\"p1@123.com\" use=\"TMP\"/>\n" +
            "      </telecom>\n" +
            "      <!--角色状态RoleStatus-->\n" +
            "      <statusCode code=\"active\"/>\n" +
            "      <!--角色有效期间-->\n" +
            "      <effectiveTime>\n" +
            "       <low value=\"20100101\"/>\n" +
            "       <high value=\"20501231\"/>\n" +
            "      </effectiveTime>\n" +
            "      <healthCarePrincipalPerson classCode=\"PSN\" determinerCode=\"INSTANCE\">\n" +
            "       <!--身份证号-->\n" +
            "       <id>\n" +
            "        <item root=\"2.16.156.10011.1.3\" extension=\"120109197706015518\"/>\n" +
            "       </id>\n" +
            "       <idCategory code=\"01\" codeSystem=\"2.16.156.10011.2.3.1.1\" codeSystemName=\"身份证件类别代码表\">\n" +
            "        <displayName value=\"居民身份证\"/>\n" +
            "       </idCategory>\n" +
            "       <!--姓名-->\n" +
            "       <name xsi:type=\"LIST_EN\">\n" +
            "        <!--正式名、员工姓名-->\n" +
            "        <item use=\"OR\">\n" +
            "         <part value=\"${name}\"/>\n" +
            "        </item>\n" +
            "        <!--拼音-->\n" +
            "        <item use=\"SYL\">\n" +
            "         <part value=\"liuyonghao\"/>\n" +
            "        </item>\n" +
            "        <!--五笔-->\n" +
            "        <item use=\"PHON\">\n" +
            "         <part value=\"xkd\"/>\n" +
            "        </item>\n" +
            "        <!--中文通用名-->\n" +
            "        <item use=\"IDE\">\n" +
            "         <part value=\"刘永好\"/>\n" +
            "        </item>\n" +
            "        <!--英文通用名-->\n" +
            "        <item use=\"ABC\">\n" +
            "         <part value=\"Yonghao Liu\"/>\n" +
            "        </item>\n" +
            "       </name>\n" +
            "       <!--性别-->\n" +
            "       <administrativeGenderCode code=\"1\" codeSystem=\"2.16.156.10011.2.3.3.4\" codeSystemName=\"生理性别代码表（GB/T 2261.1）\">\n" +
            "        <displayName value=\"男性\"/>\n" +
            "       </administrativeGenderCode>\n" +
            "       <!--出生日期-->\n" +
            "       <birthTime value=\"19570323\"/>\n" +
            "       <!--隶属-->\n" +
            "       <asAffiliate classCode=\"AFFL\">\n" +
            "        <code/>\n" +
            "        <effectiveTime/>\n" +
            "        <affiliatedPrincipalOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "         <!--科室号标识-->\n" +
            "         <id>\n" +
            "          <item root=\"2.16.156.10011.1.26\" extension=\"${deptId}\"/>\n" +
            "         </id>\n" +
            "         <name xsi:type=\"LIST_EN\">\n" +
            "          <item>\n" +
            "           <part value=\"呼吸内科\"/>\n" +
            "          </item>\n" +
            "         </name>\n" +
            "        </affiliatedPrincipalOrganization>\n" +
            "       </asAffiliate>\n" +
            "       <!--出生地-->\n" +
            "       <birthplace classCode=\"BIRTHPL\">\n" +
            "        <addr>\n" +
            "         <part value=\"辽宁\"/>\n" +
            "        </addr>\n" +
            "       </birthplace>\n" +
            "      </healthCarePrincipalPerson>\n" +
            "      <relatedTo typeCode=\"REL\">\n" +
            "       <assignedEntity classCode=\"ASSIGNED\">\n" +
            "        <id>\n" +
            "         <!-- 工资号 -->\n" +
            "         <item root=\"2.16.156.10011.0.9.1.67\" extension=\"xxx12345-G\"/>\n" +
            "         <!-- 顺序号 -->\n" +
            "         <item root=\"2.16.156.10011.0.9.1.68\" extension=\"xxx12345-G\"/>\n" +
            "         <!-- Pacs人员号 -->\n" +
            "         <item root=\"2.16.156.10011.0.9.1.69\" extension=\"xxx12345-G\"/>\n" +
            "         <!-- CA人员号 -->\n" +
            "         <item root=\"2.16.156.10011.0.9.1.70\" extension=\"xxx12345-G\"/>\n" +
            "         <!-- OA号 -->\n" +
            "         <item root=\"2.16.156.10011.0.9.1.71\" extension=\"xxx12345-G\"/>\n" +
            "         <!-- 人事号 -->\n" +
            "         <item root=\"2.16.156.10011.0.9.1.72\" extension=\"xxx12345-G\"/>\n" +
            "         <!-- HIS人员号 -->\n" +
            "         <item root=\"2.16.156.10011.0.9.1.73\" extension=\"xxx12345-G\"/>\n" +
            "        </id>\n" +
            "        <!-- 人员类型 -->\n" +
            "        <code code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.108\" codeSystemName=\"人员类型代码表\">\n" +
            "         <displayName value=\"医护\"/>\n" +
            "        </code>\n" +
            "        <effectiveTime>\n" +
            "         <!-- 本单位入职时间 -->\n" +
            "         <low value=\"20100101\"/>\n" +
            "        </effectiveTime>\n" +
            "        <representedOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "         <!--部门编码-->\n" +
            "         <id>\n" +
            "          <item root=\"2.16.156.10011.0.9.1.76\" extension=\"12314\"/>\n" +
            "         </id>\n" +
            "         <name xsi:type=\"DSET_EN\">\n" +
            "          <item>\n" +
            "           <part value=\"住院部\"/>\n" +
            "          </item>\n" +
            "         </name>\n" +
            "        </representedOrganization>\n" +
            "        <subjectOf2 typeCode=\"SBJ\">\n" +
            "         <roleActivation classCode=\"CACT\" moodCode=\"EVN\">\n" +
            "          <reasonCode/>\n" +
            "          <subjectOf typeCode=\"SUBJ\">\n" +
            "           <controlActEvent classCode=\"CACT\" moodCode=\"EVN\">\n" +
            "            <id/>\n" +
            "            <custodian typeCode=\"CST\">\n" +
            "             <assignedEntity classCode=\"ASSIGNED\">\n" +
            "              <!-- 能否修改票据 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.020.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"能否修改票据\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 能否直接收费 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.021.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"能否直接收费\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 是否专家标志 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.031.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"是否专家标志\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 是否学科带头人 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.022.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"是否学科带头人\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 高层次人才 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.023.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"高层次人才\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 是否外籍医生 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.026.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"是否外籍医生\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"BL\" value=\"1\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 专业方向 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.024.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"专业方向\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"ST\" value=\"具体专业方向\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 年龄 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.030.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"年龄\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"INT\" value=\"26\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 政治面貌 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.025.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"政治面貌\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"ST\" value=\"群众\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 特长 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.028.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"特长\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"ST\" value=\"特长内容\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 建档日期 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.029.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"建档日期\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"TS\" value=\"20201212\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- CA人员对应电子签章 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.027.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"CA人员对应电子签章\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"ED\" mediaType=\"text/plain\" value=\"wuiqoryhuqihruiqhruqi\"/>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "              <!-- 有效性标志 -->\n" +
            "              <subjectOf typeCode=\"SBJ\">\n" +
            "               <observationEvent classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "                <code code=\"CDE01.30.015.00\" codeSystem=\"2.16.156.10011.0.9.2.2.1\" codeSystemName=\"扩展卫生信息数据元目录\">\n" +
            "                 <displayName value=\"有效性标志\"/>\n" +
            "                </code>\n" +
            "                <value xsi:type=\"CD\" code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.125\" codeSystemName=\"人员状态代码表\">\n" +
            "                </value>\n" +
            "               </observationEvent>\n" +
            "              </subjectOf>\n" +
            "             </assignedEntity>\n" +
            "            </custodian>\n" +
            "           </controlActEvent>\n" +
            "          </subjectOf>\n" +
            "         </roleActivation>\n" +
            "        </subjectOf2>\n" +
            "        <!-- 简介（备注） -->\n" +
            "        <subjectOf4 typeCode=\"SBJ\">\n" +
            "         <note classCode=\"OBS\" moodCode=\"EVN\">\n" +
            "          <text value=\"简介（备注）内容\"/>\n" +
            "          <effectiveTime/>\n" +
            "         </note>\n" +
            "        </subjectOf4>\n" +
            "        <performance typeCode=\"PPRF\">\n" +
            "         <actDefinitionOrEvent classCode=\"ACT\" moodCode=\"DEF\">\n" +
            "          <location typeCode=\"LOC\">\n" +
            "           <serviceDeliveryLocation classCode=\"SDLOC\">\n" +
            "            <!--护理站号标识-->\n" +
            "            <id root=\"2.16.156.10011.0.9.1.74\" extension=\"12314\"/>\n" +
            "            <location classCode=\"PLC\" determinerCode=\"INSTANCE\">\n" +
            "             <name>\n" +
            "              <!--护理站名称-->\n" +
            "              <part value=\"护理站1\"/>\n" +
            "             </name>\n" +
            "            </location>\n" +
            "           </serviceDeliveryLocation>\n" +
            "          </location>\n" +
            "         </actDefinitionOrEvent>\n" +
            "        </performance>\n" +
            "        <relatedTo typeCode=\"REL\">\n" +
            "         <assignedEntity classCode=\"ASSIGNED\">\n" +
            "          <!-- 职务 -->\n" +
            "          <code code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.122\" codeSystemName=\"职务代码表\">\n" +
            "           <displayName value=\"${roleName}\"/>\n" +
            "          </code>\n" +
            "         </assignedEntity>\n" +
            "        </relatedTo>\n" +
            "        <relatedTo typeCode=\"REL\">\n" +
            "         <assignedEntity classCode=\"ASSIGNED\">\n" +
            "          <!-- 职级 -->\n" +
            "          <code code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.123\" codeSystemName=\"职级代码表\">\n" +
            "           <displayName value=\"5级\"/>\n" +
            "          </code>\n" +
            "         </assignedEntity>\n" +
            "        </relatedTo>\n" +
            "        <relatedTo typeCode=\"REL\">\n" +
            "         <assignedEntity classCode=\"ASSIGNED\">\n" +
            "          <!-- 职业类型、从业状况（个人身份） -->\n" +
            "          <code code=\"1\" codeSystem=\"2.16.156.10011.2.3.3.13\" codeSystemName=\"从业状况（个人身份）代码表（GB/T 2261.4）\">\n" +
            "           <displayName value=\"干部\"/>\n" +
            "          </code>\n" +
            "         </assignedEntity>\n" +
            "        </relatedTo>\n" +
            "        <relatedTo typeCode=\"REL\">\n" +
            "         <assignedEntity classCode=\"ASSIGNED\">\n" +
            "          <!-- 职业类别 -->\n" +
            "          <code code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.109\" codeSystemName=\"职业类别代码表\">\n" +
            "           <displayName value=\"医护\"/>\n" +
            "          </code>\n" +
            "         </assignedEntity>\n" +
            "        </relatedTo>\n" +
            "        <relatedTo typeCode=\"REL\">\n" +
            "         <assignedEntity classCode=\"ASSIGNED\">\n" +
            "          <!-- 职工性质 -->\n" +
            "          <code code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.110\" codeSystemName=\"职工性质代码表\">\n" +
            "           <displayName value=\"医护\"/>\n" +
            "          </code>\n" +
            "         </assignedEntity>\n" +
            "        </relatedTo>\n" +
            "        <relatedTo typeCode=\"REL\">\n" +
            "         <assignedEntity classCode=\"ASSIGNED\">\n" +
            "          <!-- 聘任职称类别 -->\n" +
            "          <code code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.112\" codeSystemName=\"职称类别代码表\">\n" +
            "           <displayName value=\"教学系列\"/>\n" +
            "          </code>\n" +
            "         </assignedEntity>\n" +
            "        </relatedTo>\n" +
            "        <relatedTo typeCode=\"REL\">\n" +
            "         <assignedEntity classCode=\"ASSIGNED\">\n" +
            "          <!-- 聘任职称 -->\n" +
            "          <code code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.113\" codeSystemName=\"职称代码表\">\n" +
            "           <displayName value=\"高\"/>\n" +
            "          </code>\n" +
            "          <!-- 职称晋升时间 -->\n" +
            "          <effectiveTime>\n" +
            "           <low value=\"20201212\"/>\n" +
            "          </effectiveTime>\n" +
            "         </assignedEntity>\n" +
            "        </relatedTo>\n" +
            "       </assignedEntity>\n" +
            "      </relatedTo>\n" +
            "      <relatedTo typeCode=\"REL\">\n" +
            "       <qualifiedEntity classCode=\"QUAL\">\n" +
            "        <!-- 学历 -->\n" +
            "        <code code=\"1\" codeSystem=\"2.16.156.10011.2.3.3.6\" codeSystemName=\"学历代码表（GB/T 4658）\">\n" +
            "         <displayName value=\"大本\"/>\n" +
            "        </code>\n" +
            "        <!-- 学历时间 -->\n" +
            "        <effectiveTime>\n" +
            "         <low value=\"20101011\"/>\n" +
            "        </effectiveTime>\n" +
            "        <!-- 毕业学校 -->\n" +
            "        <qualificationGrantingOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "         <name xsi:type=\"DSET_EN\">\n" +
            "          <item>\n" +
            "           <part value=\"医大\"/>\n" +
            "          </item>\n" +
            "         </name>\n" +
            "        </qualificationGrantingOrganization>\n" +
            "       </qualifiedEntity>\n" +
            "      </relatedTo>\n" +
            "      <relatedTo typeCode=\"REL\">\n" +
            "       <qualifiedEntity classCode=\"QUAL\">\n" +
            "        <!-- 学位 -->\n" +
            "        <code>\n" +
            "         <originalText value=\"学位文本\"/>\n" +
            "        </code>\n" +
            "        <effectiveTime/>\n" +
            "       </qualifiedEntity>\n" +
            "      </relatedTo>\n" +
            "      <relatedTo typeCode=\"REL\">\n" +
            "       <qualifiedEntity classCode=\"QUAL\">\n" +
            "        <!-- 执业资格证书编号 -->\n" +
            "        <id>\n" +
            "         <item root=\"2.16.156.10011.1.30\" extension=\"12331241\"/>\n" +
            "        </id>\n" +
            "        <code/>\n" +
            "        <effectiveTime/>\n" +
            "       </qualifiedEntity>\n" +
            "      </relatedTo>\n" +
            "      <relatedTo typeCode=\"REL\">\n" +
            "       <qualifiedEntity classCode=\"QUAL\">\n" +
            "        <!-- 取得职称类别(取得证书) -->\n" +
            "        <code code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.112\" codeSystemName=\"职称类别代码表\">\n" +
            "         <displayName value=\"教学系列\"/>\n" +
            "        </code>\n" +
            "        <effectiveTime/>\n" +
            "       </qualifiedEntity>\n" +
            "      </relatedTo>\n" +
            "      <relatedTo typeCode=\"REL\">\n" +
            "       <qualifiedEntity classCode=\"QUAL\">\n" +
            "        <!-- 取得职称级别(取得证书) -->\n" +
            "        <code code=\"1\" codeSystem=\"2.16.156.10011.0.9.2.3.2.113\" codeSystemName=\"职称级别代码表\">\n" +
            "         <displayName value=\"高\"/>\n" +
            "        </code>\n" +
            "        <!-- 取得职称时间 -->\n" +
            "        <effectiveTime>\n" +
            "         <low value=\"20101011\"/>\n" +
            "        </effectiveTime>\n" +
            "       </qualifiedEntity>\n" +
            "      </relatedTo>\n" +
            "     </healthCareProvider>\n" +
            "    </subject1>\n" +
            "    <!--申请者-->\n" +
            "    <author typeCode=\"AUT\">\n" +
            "     <!-- 操作时间 -->\n" +
            "     <time>\n" +
            "      <any value=\"201212121314\"/>\n" +
            "     </time>\n" +
            "     <assignedEntity classCode=\"ASSIGNED\">\n" +
            "      <!--医务人员ID-->\n" +
            "      <id>\n" +
            "       <item root=\"2.16.156.10011.1.4\" extension=\"120109197706015518\"/>\n" +
            "      </id>\n" +
            "      <assignedPerson classCode=\"PSN\" determinerCode=\"INSTANCE\">\n" +
            "       <name xsi:type=\"LIST_EN\">\n" +
            "        <item>\n" +
            "         <part value=\"李人事\"/>\n" +
            "        </item>\n" +
            "       </name>\n" +
            "      </assignedPerson>\n" +
            "      <representedOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" +
            "       <!--科室号标识-->\n" +
            "       <id>\n" +
            "        <item root=\"2.16.156.10011.1.26\" extension=\"xxx12345-X\"/>\n" +
            "       </id>\n" +
            "       <name xsi:type=\"LIST_EN\">\n" +
            "        <item>\n" +
            "         <part value=\"人事科\"/>\n" +
            "        </item>\n" +
            "       </name>\n" +
            "       <contactParty classCode=\"CON\">\n" +
            "        <contactPerson classCode=\"PSN\" determinerCode=\"INSTANCE\">\n" +
            "         <name xsi:type=\"LIST_EN\">\n" +
            "          <item>\n" +
            "           <part value=\"王联系\"/>\n" +
            "          </item>\n" +
            "         </name>\n" +
            "        </contactPerson>\n" +
            "       </contactParty>\n" +
            "      </representedOrganization>\n" +
            "     </assignedEntity>\n" +
            "    </author>\n" +
            "   </registrationRequest>\n" +
            "  </subject>\n" +
            " </controlActProcess>\n" +
            "</PRPM_IN303010UV01>\n";
    @Test
    public void parseUpdateUser(){
        String userName="121";
        String name="皮皮娃二号";
        String roleName="院长";
        String deptId="032";

        String updateUserXml=updateUserXmlTemplate.replace("${roleName}",roleName)
                .replace("${userName}",userName)
                .replace("${name}",name)
                .replace("${deptId}",deptId);
        UserDto userDto = MzZyParser.parseUpdateUser(updateUserXml);
        System.out.println(userDto);
        assert userName.equals(userDto.getUserName());
        assert name.equals(userDto.getName());
        assert roleName.equals(userDto.getPosition());
        assert deptId.equals(userDto.getDeptId());
    }

}
