|
@ -22,12 +22,12 @@ import com.yihu.jw.hospital.prescription.dao.PrescriptionDao;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.util.ConvertUtil;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.util.MqSdkUtil;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.util.WebserviceUtil;
|
|
|
import com.yihu.jw.restmodel.hospital.archive.ArchiveVO;
|
|
|
import com.yihu.jw.restmodel.hospital.prescription.*;
|
|
|
import com.yihu.jw.util.common.PwdUtil;
|
|
|
import com.yihu.jw.util.date.DateUtil;
|
|
|
import com.yihu.jw.util.http.HttpClientUtil;
|
|
|
import com.yihu.jw.util.idcard.IdCardUtil;
|
|
|
import com.yihu.jw.utils.StringUtil;
|
|
|
import net.sf.json.JSON;
|
|
|
import net.sf.json.JSONArray;
|
|
|
import net.sf.json.xml.XMLSerializer;
|
|
@ -2282,4 +2282,139 @@ public class EntranceService {
|
|
|
}}
|
|
|
return i;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 建立档案
|
|
|
* @param archiveVO
|
|
|
* @param demoFlag
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public net.sf.json.JSONObject BS16018(ArchiveVO archiveVO, boolean demoFlag) throws Exception {
|
|
|
String fid="BS16018";
|
|
|
logger.info(" BS16018 begin");
|
|
|
|
|
|
String resp="";
|
|
|
if (demoFlag) {
|
|
|
resp = getJosnFileResullt(fid);
|
|
|
} else {
|
|
|
StringBuffer sbs = new StringBuffer();
|
|
|
//AccessControl :用户、密码、服务id
|
|
|
sbs.append("<ESBEntry><AccessControl><Fid>" + fid + "</Fid><UserName>"+mqUser+"</UserName><Password>"+mqPwd+"</Password></AccessControl>");
|
|
|
//MessageHeader :固定值 消费方系统编号 S60,提供方系统编号 S01
|
|
|
sbs.append("<MessageHeader><Fid>" + fid + "</Fid><MsgDate>" + DateUtil.dateToStr(new Date(), DateUtil.YYYY_MM_DD_HH_MM_SS) + "</MsgDate><SourceSysCode>"+sourceSysCode+"</SourceSysCode><TargetSysCode>"+targetSysCode+"</TargetSysCode></MessageHeader>");
|
|
|
sbs.append("<MsgInfo>");
|
|
|
sbs.append("<endNum>20000</endNum>");
|
|
|
sbs.append("<Msg>");
|
|
|
sbs.append("<root>");
|
|
|
sbs.append("<request ");
|
|
|
if(StringUtils.isNotBlank(archiveVO.getId0000())){
|
|
|
sbs.append(" id0000=\""+archiveVO.getId0000()+"\" ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(archiveVO.getCardno())){
|
|
|
sbs.append(" cardno=\""+archiveVO.getCardno()+"\" ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(archiveVO.getXming0())){
|
|
|
sbs.append(" xming0=\""+archiveVO.getXming0()+"\" ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(archiveVO.getSfzhao())){
|
|
|
sbs.append(" sfzhao=\""+archiveVO.getSfzhao()+"\" ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(archiveVO.getXbie00())){
|
|
|
sbs.append(" xbie00=\""+archiveVO.getXbie00()+"\" ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(archiveVO.getBrnl00())){
|
|
|
sbs.append(" brnl00=\""+archiveVO.getBrnl00()+"\" ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(archiveVO.getYytel0())){
|
|
|
sbs.append(" yytel0=\""+archiveVO.getYytel0()+"\" ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(archiveVO.getCsrq00())){
|
|
|
sbs.append(" csrq00=\""+archiveVO.getCsrq00()+"\" ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(archiveVO.getBjjbie())){
|
|
|
sbs.append(" bjjbie=\""+archiveVO.getBjjbie()+"\" ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(archiveVO.getCardtype())){
|
|
|
sbs.append(" cardtype=\""+archiveVO.getCardtype()+"\" ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(archiveVO.getGuid00())){
|
|
|
sbs.append(" guid00=\""+archiveVO.getGuid00()+"\" ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(archiveVO.getGrsfen())){
|
|
|
sbs.append(" grsfen=\""+archiveVO.getGrsfen()+"\" ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(archiveVO.getAddres())){
|
|
|
sbs.append(" addres=\""+archiveVO.getAddres()+"\" ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(archiveVO.getSmdj00())){
|
|
|
sbs.append(" smdj00=\""+archiveVO.getSmdj00()+"\" ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(archiveVO.getEhealthCardId())){
|
|
|
sbs.append(" ehealth_card_id=\""+archiveVO.getEhealthCardId()+"\" ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(archiveVO.getMindexId())){
|
|
|
sbs.append(" mindex_id=\""+archiveVO.getMindexId()+"\" ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(archiveVO.getSmkId())){
|
|
|
sbs.append(" smk_id=\""+archiveVO.getSmkId()+"\" ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(archiveVO.getFwqd00())){
|
|
|
sbs.append(" fwqd00=\""+archiveVO.getFwqd00()+"\" ");
|
|
|
}
|
|
|
sbs.append(" />");
|
|
|
sbs.append("</root>");
|
|
|
sbs.append("</Msg>");
|
|
|
sbs.append("<startNum>1</startNum></MsgInfo></ESBEntry>");
|
|
|
|
|
|
//查询信息拼接
|
|
|
logger.info(fid+" sbs:"+sbs.toString());
|
|
|
sbs.append("<startNum>1</startNum></MsgInfo></ESBEntry>");
|
|
|
resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
|
|
|
resp = MqSdkUtil.xml2jsonArrayRootRow(resp);
|
|
|
logger.info(fid+" resp:"+resp);
|
|
|
}
|
|
|
return ConvertUtil.convertListEnvelopInRequest(resp);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 获取居民基本信息
|
|
|
* @param idcard 身份证
|
|
|
* @param patientId his 居民ID
|
|
|
* @param admitNum 就诊次数
|
|
|
* @param demoFlag
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public JSONArray BS10008(String idcard,String patientId,String admitNum,boolean demoFlag) throws Exception {
|
|
|
String fid="BS10008";
|
|
|
String resp="";
|
|
|
if (demoFlag) {
|
|
|
resp = getJosnFileResullt(fid);
|
|
|
} else {
|
|
|
StringBuffer sbs = new StringBuffer();
|
|
|
//AccessControl :用户、密码、服务id
|
|
|
sbs.append("<ESBEntry><AccessControl><Fid>" + fid + "</Fid><UserName>"+mqUser+"</UserName><Password>"+mqPwd+"</Password></AccessControl>");
|
|
|
//MessageHeader :固定值 消费方系统编号 S60,提供方系统编号 S01
|
|
|
sbs.append("<MessageHeader><Fid>" + fid + "</Fid><MsgDate>" + DateUtil.dateToStr(new Date(), DateUtil.YYYY_MM_DD_HH_MM_SS) + "</MsgDate><SourceSysCode>"+sourceSysCode+"</SourceSysCode><TargetSysCode>"+targetSysCode+"</TargetSysCode></MessageHeader>");
|
|
|
//查询信息拼接
|
|
|
sbs.append("<MsgInfo><endNum>1000</endNum>");
|
|
|
sbs.append("<Msg>");
|
|
|
if(StringUtils.isNotBlank(idcard)){
|
|
|
sbs.append(" and Id_Card = '"+idcard+"' ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(patientId)){
|
|
|
sbs.append(" and Patient_Id = '"+patientId+"' ");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(admitNum)){
|
|
|
sbs.append(" and Admit_Num = '"+admitNum+"' ");
|
|
|
}
|
|
|
sbs.append("</Msg>");
|
|
|
sbs.append("<startNum>1</startNum></MsgInfo></ESBEntry>");
|
|
|
resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
|
|
|
resp = MqSdkUtil.xml2jsonArrayRootRow(resp);
|
|
|
}
|
|
|
return ConvertUtil.convertListEnvelopInBodyRow(resp);
|
|
|
}
|
|
|
}
|