Commit 17d0ee32 by yanxiaofei

顺义中医

parent 0cbf1af5
...@@ -2224,10 +2224,10 @@ private static final String MODEL = "/zy"; ...@@ -2224,10 +2224,10 @@ private static final String MODEL = "/zy";
"</PRPM_IN303010UV01>";*/ "</PRPM_IN303010UV01>";*/
try { try {
ProResearcher info=new ProResearcher(); ProResearcher info=new ProResearcher();
String sex=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN303010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/healthCarePrincipalPerson/administrativeGenderCode/@code"); String sex=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN301010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/healthCarePrincipalPerson/administrativeGenderCode/@code");
info.setSex(sex);//性别 info.setSex(sex);//性别
int nation=1; int nation=1;
String nat=XmlParseUtil.xmlParse(xmlString, "/PRPM_IN303010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/healthCarePrincipalPerson/Nation/@code"); String nat=XmlParseUtil.xmlParse(xmlString, "/PRPM_IN301010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/healthCarePrincipalPerson/Nation/@code");
String nations="01"; String nations="01";
if(nat!=null&&!"".equals(nat)) { if(nat!=null&&!"".equals(nat)) {
nation=Integer.parseInt(nat); nation=Integer.parseInt(nat);
...@@ -2238,9 +2238,9 @@ private static final String MODEL = "/zy"; ...@@ -2238,9 +2238,9 @@ private static final String MODEL = "/zy";
} }
info.setNation(nations);//民族 info.setNation(nations);//民族
info.setIsPass("0"); info.setIsPass("0");
String name=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN303010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/healthCarePrincipalPerson/name"); String name=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN301010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/healthCarePrincipalPerson/name");
info.setName(name);//姓名 info.setName(name);//姓名
String birth=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN303010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/healthCarePrincipalPerson/birthTime/@value");//出生日期 String birth=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN301010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/healthCarePrincipalPerson/birthTime/@value");//出生日期
if(birth!=null&&!"".equals(birth)) { if(birth!=null&&!"".equals(birth)) {
if (birth.length() == 8) { if (birth.length() == 8) {
// 使用substring方法拆分字符串并在中间插入"-" // 使用substring方法拆分字符串并在中间插入"-"
...@@ -2258,11 +2258,11 @@ private static final String MODEL = "/zy"; ...@@ -2258,11 +2258,11 @@ private static final String MODEL = "/zy";
} }
} }
} }
String idno=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN303010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/healthCarePrincipalPerson/id/@extension");//身份证 String idno=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN301010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/healthCarePrincipalPerson/id/@extension");//身份证
info.setIdNumber(idno); info.setIdNumber(idno);
String phoneNumber=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN303010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/telecom");//电话 String phoneNumber=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN301010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/telecom");//电话
info.setPhoneNumber(phoneNumber); info.setPhoneNumber(phoneNumber);
String StartWorkingTime=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN303010UV01/controlActProcess/subject/registrationRequest/subject1/assignedEntity/subjectOf2/roleActivation/reasonCode/displayName/translation[7]/@value");//参加工作时间 String StartWorkingTime=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN301010UV01/controlActProcess/subject/registrationRequest/subject1/assignedEntity/subjectOf2/roleActivation/reasonCode/displayName/translation[7]/@value");//参加工作时间
if(StartWorkingTime!=null&&!"".equals(StartWorkingTime)) { if(StartWorkingTime!=null&&!"".equals(StartWorkingTime)) {
if (StartWorkingTime.length() == 8) { if (StartWorkingTime.length() == 8) {
// 使用substring方法拆分字符串并在中间插入"-" // 使用substring方法拆分字符串并在中间插入"-"
...@@ -2281,7 +2281,7 @@ private static final String MODEL = "/zy"; ...@@ -2281,7 +2281,7 @@ private static final String MODEL = "/zy";
} }
} }
//学历 //学历
String education=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN303010UV01/controlActProcess/subject/registrationRequest/subject1/assignedEntity/subjectOf2/roleActivation/reasonCode/displayName/translation[2]/@displayName");//学历 String education=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN301010UV01/controlActProcess/subject/registrationRequest/subject1/assignedEntity/subjectOf2/roleActivation/reasonCode/displayName/translation[2]/@displayName");//学历
if(education!=null&&!"".equals(education)) { if(education!=null&&!"".equals(education)) {
List<CoreDict> list=indexTbService.tranDict("eduExp",education); List<CoreDict> list=indexTbService.tranDict("eduExp",education);
if(list!=null&&list.size()>0) { if(list!=null&&list.size()>0) {
...@@ -2290,15 +2290,15 @@ private static final String MODEL = "/zy"; ...@@ -2290,15 +2290,15 @@ private static final String MODEL = "/zy";
} }
} }
//专业技术职务 //专业技术职务
String currentTechPost=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN303010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/code/@displayName"); String currentTechPost=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN301010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/code/@displayName");
info.setCurrentTechPost(currentTechPost); info.setCurrentTechPost(currentTechPost);
//所属科室 //所属科室
String inDeptCode=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN303010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/healthCarePrincipalPerson/asAffiliate/affiliatedPrincipalOrganization/id/@extension"); String inDeptCode=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN301010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/healthCarePrincipalPerson/asAffiliate/affiliatedPrincipalOrganization/id/@extension");
CoreOrg org=coreOrgDao.queryOrgByCode(inDeptCode); CoreOrg org=coreOrgDao.queryOrgByCode(inDeptCode);
if(org!=null) { if(org!=null) {
info.setInDept(org.getId()); info.setInDept(org.getId());
} }
String jobNumber=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN303010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/id/@extension"); String jobNumber=XmlParseUtil.xmlParse(xmlString,"/PRPM_IN301010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/id/@extension");
info.setJobNumber(jobNumber); info.setJobNumber(jobNumber);
info.setCreateTime(new Date()); info.setCreateTime(new Date());
//user表 //user表
...@@ -2312,11 +2312,11 @@ private static final String MODEL = "/zy"; ...@@ -2312,11 +2312,11 @@ private static final String MODEL = "/zy";
user.setCreateTime(new Date()); user.setCreateTime(new Date());
proResearcherService.save(info); proResearcherService.save(info);
proResearcherService.saveResearcherAndUserRole(user); proResearcherService.saveResearcherAndUserRole(user);
return indexTbService.sucessRegisterOrgT01Xy(xmlString,"4"); return indexTbService.sucessRegisterOrgT01Xy(xmlString,"5");
}catch (Exception e) { }catch (Exception e) {
// TODO: handle exception // TODO: handle exception
e.printStackTrace(); e.printStackTrace();
return indexTbService.errorRegisterOrgT01Xy(xmlString,"4"); return indexTbService.errorRegisterOrgT01Xy(xmlString,"5");
} }
} }
//JH0701医疗卫生人员信息更新服务-T01--更新 //JH0701医疗卫生人员信息更新服务-T01--更新
...@@ -2746,4 +2746,22 @@ private static final String MODEL = "/zy"; ...@@ -2746,4 +2746,22 @@ private static final String MODEL = "/zy";
return indexTbService.errorRegisterOrgT01Xy(xmlString,"4"); return indexTbService.errorRegisterOrgT01Xy(xmlString,"4");
} }
} }
//嘉和同步 xmlString xml字符串,type 执行的类型,1.注册科室,2.更新科室,3.删除科室,4.注册用户,5.更新用户,6.删除用户
@RequestMapping(MODEL+"/jcData.json")
@ResponseBody
public String jcData(String xmlString,String type) {
if("1".equals(type)) {
return registerOrgJh(xmlString);
}else if("2".equals(type)) {
return updateOrgJH(xmlString);
}else if("3".equals(type)) {
return delOrgJH(xmlString);
}else if("4".equals(type)) {
return registerUserJh(xmlString);
}else if("5".equals(type)) {
return updateUserJh(xmlString);
}else{
return deUserJh(xmlString);
}
}
} }
...@@ -902,6 +902,50 @@ public class IndexTbService extends BaseService<PaperMeeting>{ ...@@ -902,6 +902,50 @@ public class IndexTbService extends BaseService<PaperMeeting>{
"</acknowledgementDetail>\r\n" + "</acknowledgementDetail>\r\n" +
"</acknowledgement>\r\n" + "</acknowledgement>\r\n" +
"</MCCI_IN000002UV01>"); "</MCCI_IN000002UV01>");
}else if("5".equals(methonCode)) {
returnStr.append("<MCCI_IN000002UV01 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/MCCI_IN000002UV01.xsd\">\r\n");
returnStr.append("<!-- 消息ID extension请使用GUID生成 -->\r\n");
returnStr.append("<id root=\""+formattedDateTime+"\" extension=\""+UUID.randomUUID().toString()+"\"/>\r\n");
returnStr.append("<!-- 消息创建时间 -->\r\n");
returnStr.append("<creationTime value=\""+formattedDateTime+"\"/>\r\n");
returnStr.append("<!-- 服务标识,extension为唯一事件编码,区分服务事件 -->\r\n");
returnStr.append("<interactionId root=\""+XmlParseUtil.xmlParse(xmlStr, "/PRPM_IN301010UV01/interactionId/@root")+"\" extension=\""+XmlParseUtil.xmlParse(xmlStr, "/PRPM_IN301010UV01/interactionId/@extension")+"\"/>\r\n");
returnStr.append("<!-- 消息用途: P(Production); D(Debugging); T(Training) -->\r\n");
returnStr.append("<processingCode code=\""+XmlParseUtil.xmlParse(xmlStr, "/PRPM_IN301010UV01/processingCode/@code")+"\"/>\r\n");
returnStr.append("<!-- 消息处理模式: \"取值可以为以下列出值中任意一个,正式使用时设置为\"\"T\"\"A(Archive);I(Initial load); R(Restore from archive); T(Current processing)\" -->\r\n");
returnStr.append("<processingModeCode code=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/processingModeCode/@code")+"\"/>\r\n");
returnStr.append("<!-- 消息应答: \"取值可以为以下列出值中任意一个,正式使用时设置为\"\"NE\"\"AL(Always); ER(Error/reject only); NE(Never)\" -->\r\n");
returnStr.append("<acceptAckCode code=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/acceptAckCode/@code")+"\"/>\r\n");
returnStr.append("<!-- 接受者 -->\r\n");
returnStr.append("<receiver typeCode=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/receiver/@typeCode")+"\">\r\n");
returnStr.append("<!-- 接受设备/应用 -->\r\n");
returnStr.append("<device classCode=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/receiver/device/@classCode")+"\" determinerCode=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/receiver/device/@determinerCode")+"\">\r\n");
returnStr.append("<!-- 接收系统ID -->\r\n");
returnStr.append("<id>\r\n" +
"<item root=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/receiver/device/id/item/@root")+"\" extension=\""+XmlParseUtil.xmlParse(xmlStr, "/PRPM_IN301010UV01/receiver/device/id/item/@extension")+" \"/>\r\n" +
"</id>\r\n</device>\r\n</receiver>\r\n");
returnStr.append("<!-- 发送者 -->\r\n");
returnStr.append("<sender typeCode=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/sender/@typeCode")+"\">\r\n");
returnStr.append("<!-- 发送设备/应用 -->\r\n" +
"<device classCode=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/sender/device/@classCode")+"\" determinerCode=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/sender/device/@determinerCode")+"\">\r\n" +
"<!-- 发送系统ID -->\r\n");
returnStr.append("<id>\r\n" +
"<item root=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/sender/device/id/item/@root")+"\" extension=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/sender/device/id/item/@extension")+" \"/>\r\n" +
"</id>\r\n" +
"</device>\r\n" +
"</sender>");
returnStr.append("<!-- typeCode 为处理结果,AA表示成功 AE 表示失败 -->\r\n" +
"<acknowledgement typeCode=\"AA\">\r\n" +
"<targetMessage>\r\n" +
"<!-- 请求的消息ID -->\r\n" +
"<id extension=\"\"/>\r\n" +
"</targetMessage>\r\n" +
"<acknowledgementDetail>\r\n" +
"<!-- 处理结果说明 -->\r\n" +
"<text>成功</text>\r\n" +
"</acknowledgementDetail>\r\n" +
"</acknowledgement>\r\n" +
"</MCCI_IN000002UV01>");
} }
return returnStr.toString(); return returnStr.toString();
...@@ -1044,6 +1088,50 @@ public class IndexTbService extends BaseService<PaperMeeting>{ ...@@ -1044,6 +1088,50 @@ public class IndexTbService extends BaseService<PaperMeeting>{
"</acknowledgementDetail>\r\n" + "</acknowledgementDetail>\r\n" +
"</acknowledgement>\r\n" + "</acknowledgement>\r\n" +
"</MCCI_IN000002UV01>"); "</MCCI_IN000002UV01>");
}else if("5".equals(methonCode)) {
returnStr.append("<MCCI_IN000002UV01 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/MCCI_IN000002UV01.xsd\">\r\n");
returnStr.append("<!-- 消息ID extension请使用GUID生成 -->\r\n");
returnStr.append("<id root=\""+formattedDateTime+"\" extension=\""+UUID.randomUUID().toString()+"\"/>\r\n");
returnStr.append("<!-- 消息创建时间 -->\r\n");
returnStr.append("<creationTime value=\""+formattedDateTime+"\"/>\r\n");
returnStr.append("<!-- 服务标识,extension为唯一事件编码,区分服务事件 -->\r\n");
returnStr.append("<interactionId root=\""+XmlParseUtil.xmlParse(xmlStr, "/PRPM_IN301010UV01/interactionId/@root")+"\" extension=\""+XmlParseUtil.xmlParse(xmlStr, "/PRPM_IN301010UV01/interactionId/@extension")+"\"/>\r\n");
returnStr.append("<!-- 消息用途: P(Production); D(Debugging); T(Training) -->\r\n");
returnStr.append("<processingCode code=\""+XmlParseUtil.xmlParse(xmlStr, "/PRPM_IN301010UV01/processingCode/@code")+"\"/>\r\n");
returnStr.append("<!-- 消息处理模式: \"取值可以为以下列出值中任意一个,正式使用时设置为\"\"T\"\"A(Archive);I(Initial load); R(Restore from archive); T(Current processing)\" -->\r\n");
returnStr.append("<processingModeCode code=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/processingModeCode/@code")+"\"/>\r\n");
returnStr.append("<!-- 消息应答: \"取值可以为以下列出值中任意一个,正式使用时设置为\"\"NE\"\"AL(Always); ER(Error/reject only); NE(Never)\" -->\r\n");
returnStr.append("<acceptAckCode code=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/acceptAckCode/@code")+"\"/>\r\n");
returnStr.append("<!-- 接受者 -->\r\n");
returnStr.append("<receiver typeCode=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/receiver/@typeCode")+"\">\r\n");
returnStr.append("<!-- 接受设备/应用 -->\r\n");
returnStr.append("<device classCode=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/receiver/device/@classCode")+"\" determinerCode=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/receiver/device/@determinerCode")+"\">\r\n");
returnStr.append("<!-- 接收系统ID -->\r\n");
returnStr.append("<id>\r\n" +
"<item root=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/receiver/device/id/item/@root")+"\" extension=\""+XmlParseUtil.xmlParse(xmlStr, "/PRPM_IN301010UV01/receiver/device/id/item/@extension")+" \"/>\r\n" +
"</id>\r\n</device>\r\n</receiver>\r\n");
returnStr.append("<!-- 发送者 -->\r\n");
returnStr.append("<sender typeCode=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/sender/@typeCode")+"\">\r\n");
returnStr.append("<!-- 发送设备/应用 -->\r\n" +
"<device classCode=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/sender/device/@classCode")+"\" determinerCode=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/sender/device/@determinerCode")+"\">\r\n" +
"<!-- 发送系统ID -->\r\n");
returnStr.append("<id>\r\n" +
"<item root=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/sender/device/id/item/@root")+"\" extension=\""+XmlParseUtil.xmlParse(xmlStr,"/PRPM_IN301010UV01/sender/device/id/item/@extension")+" \"/>\r\n" +
"</id>\r\n" +
"</device>\r\n" +
"</sender>");
returnStr.append("<!-- typeCode 为处理结果,AA表示成功 AE 表示失败 -->\r\n" +
"<acknowledgement typeCode=\"AE\">\r\n" +
"<targetMessage>\r\n" +
"<!-- 请求的消息ID -->\r\n" +
"<id extension=\"\"/>\r\n" +
"</targetMessage>\r\n" +
"<acknowledgementDetail>\r\n" +
"<!-- 处理结果说明 -->\r\n" +
"<text>失败</text>\r\n" +
"</acknowledgementDetail>\r\n" +
"</acknowledgement>\r\n" +
"</MCCI_IN000002UV01>");
} }
return returnStr.toString(); return returnStr.toString();
} }
......
...@@ -62,7 +62,7 @@ server.session.cookie.http-only=false ...@@ -62,7 +62,7 @@ server.session.cookie.http-only=false
#是否开启session超时检测 #是否开启session超时检测
session.checkLoginEnable=true session.checkLoginEnable=true
#session拦截器会忽略这些地址 #session拦截器会忽略这些地址
session.ExcludePathPatterns=/,/login.do,/logout.do,/getRandom.do,/zy/loginAjax.do,/reLogin.do,/remind,/checkUserOnline,/loginRegister.do,/loginPassword.do,/loginPasswords.do,/register.json,/zy/singLogin.json,/zy/singloginAjax.do,/error.html,/repeat.html,/zy/registerOrg.json,/zy/delOrgJh.json,/zy/updateOrgJh.json,/zy/registerUserJh.json,/zy/updateUserJh.json,/zy/deUserJh.json,/services/OrderService session.ExcludePathPatterns=/,/login.do,/logout.do,/getRandom.do,/zy/loginAjax.do,/reLogin.do,/remind,/checkUserOnline,/loginRegister.do,/loginPassword.do,/loginPasswords.do,/register.json,/zy/singLogin.json,/zy/singloginAjax.do,/error.html,/repeat.html,/zy/registerOrg.json,/zy/delOrgJh.json,/zy/updateOrgJh.json,/zy/registerUserJh.json,/zy/updateUserJh.json,/zy/deUserJh.json,/zy/jcData.json,/services/OrderService
#session拦截器只检测这些请求后缀 #session拦截器只检测这些请求后缀
session.PathPatterns=.json,.do,.html session.PathPatterns=.json,.do,.html
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment