|
@ -45,6 +45,7 @@ import com.yihu.jw.util.network.HttpResponse;
|
|
|
import com.yihu.jw.util.network.HttpUtils;
|
|
|
import com.yihu.jw.utils.WebserviceUtil;
|
|
|
import com.yihu.jw.utils.dsyyUtil.SendMessge_ServiceLocator;
|
|
|
import com.yihu.jw.utils.dsyyUtil.ServiceLocator;
|
|
|
import com.yihu.jw.utils.dsyyUtil.WritebackCvalueInterfaceLocator;
|
|
|
import com.yihu.jw.utils.dsyyUtil.ZoesoftHipServiceLocator;
|
|
|
import com.yihu.jw.utils.hibernate.HibenateUtils;
|
|
@ -146,7 +147,9 @@ public class DsyyEntranceService {
|
|
|
@Autowired
|
|
|
private YlzMedicailRelationDao ylzMedicailRelationDao;
|
|
|
|
|
|
private static String key="bvvsf3JA0mUXMU+mVnMaOQ==";
|
|
|
private static String key="5aKX8TLoagFbQiQFFEfRbxr5ClB3P/HG";
|
|
|
|
|
|
private static String operate = "测试库";
|
|
|
|
|
|
private static String caKey = "bvvsf3JA0mUXMU+mVnMaOQ==";
|
|
|
|
|
@ -1344,7 +1347,7 @@ public class DsyyEntranceService {
|
|
|
return buffer.toString();
|
|
|
}
|
|
|
|
|
|
//=============his webservice 调用开始 =============================
|
|
|
//=============his webservice 调用开始 =============================
|
|
|
|
|
|
/**
|
|
|
* 挂号(调his后台包)
|
|
@ -1362,8 +1365,9 @@ public class DsyyEntranceService {
|
|
|
"<root> " +
|
|
|
" <serverName>"+api+"</serverName> " +
|
|
|
" <format>xml</format>" +
|
|
|
" <callOperator></callOperator> " +
|
|
|
" <callOperator>"+operate+"</callOperator> " +
|
|
|
" <certificate>"+key+"</certificate> " +
|
|
|
" <orgCode>01</orgCode> " +
|
|
|
"</root>";
|
|
|
String condition ="";
|
|
|
logger.info("clinicclass:"+clinicclass);
|
|
@ -1418,8 +1422,9 @@ public class DsyyEntranceService {
|
|
|
"<root> " +
|
|
|
" <serverName>"+api+"</serverName> " +
|
|
|
" <format>xml</format>" +
|
|
|
" <callOperator></callOperator> " +
|
|
|
" <callOperator>"+operate+"</callOperator> " +
|
|
|
" <certificate>"+key+"</certificate> " +
|
|
|
" <orgCode>01</orgCode> " +
|
|
|
"</root>";
|
|
|
String condition ="";
|
|
|
if (!StringUtils.isEmpty(IoFlag)){
|
|
@ -1486,14 +1491,15 @@ public class DsyyEntranceService {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public String delHisPrescriptionByHisNo(String IoFlag,String PayCardNo,String NullahNumber,
|
|
|
String ApplyDept,String ApplyDoctor,String ExecuteDept,String PresNo)throws Exception{
|
|
|
String ApplyDept,String ApplyDoctor,String ExecuteDept,String PresNo)throws Exception{
|
|
|
String api = "delHisPrescriptionByHisNo";
|
|
|
String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
|
|
|
"<root> " +
|
|
|
" <serverName>"+api+"</serverName> " +
|
|
|
" <format>xml</format>" +
|
|
|
" <callOperator></callOperator> " +
|
|
|
" <callOperator>"+operate+"</callOperator> " +
|
|
|
" <certificate>"+key+"</certificate> " +
|
|
|
" <orgCode>01</orgCode> " +
|
|
|
"</root>";
|
|
|
String condition ="";
|
|
|
if (!StringUtils.isEmpty(IoFlag)){
|
|
@ -1548,8 +1554,9 @@ public class DsyyEntranceService {
|
|
|
"<root> " +
|
|
|
" <serverName>"+api+"</serverName> " +
|
|
|
" <format>xml</format>" +
|
|
|
" <callOperator></callOperator> " +
|
|
|
" <callOperator>"+operate+"</callOperator> " +
|
|
|
" <certificate>"+key+"</certificate> " +
|
|
|
" <orgCode>01</orgCode> " +
|
|
|
"</root>";
|
|
|
String condition ="";
|
|
|
if (!StringUtils.isEmpty(ApplyNo)){
|
|
@ -1593,8 +1600,9 @@ public class DsyyEntranceService {
|
|
|
"<root> " +
|
|
|
" <serverName>"+api+"</serverName> " +
|
|
|
" <format>xml</format>" +
|
|
|
" <callOperator></callOperator> " +
|
|
|
" <callOperator>"+operate+"</callOperator> " +
|
|
|
" <certificate>"+key+"</certificate> " +
|
|
|
" <orgCode>01</orgCode> " +
|
|
|
"</root>";
|
|
|
String condition ="";
|
|
|
if (!StringUtils.isEmpty(ApplyNo)){
|
|
@ -1631,8 +1639,9 @@ public class DsyyEntranceService {
|
|
|
"<root> " +
|
|
|
" <serverName>"+api+"</serverName> " +
|
|
|
" <format>xml</format>" +
|
|
|
" <callOperator></callOperator> " +
|
|
|
" <callOperator>"+operate+"</callOperator> " +
|
|
|
" <certificate>"+key+"</certificate> " +
|
|
|
" <orgCode>01</orgCode> " +
|
|
|
"</root>";
|
|
|
String condition ="";
|
|
|
condition = "<IoFlag>"+IoFlag+"</IoFlag>";
|
|
@ -1697,8 +1706,9 @@ public class DsyyEntranceService {
|
|
|
"<root> " +
|
|
|
" <serverName>"+api+"</serverName> " +
|
|
|
" <format>xml</format>" +
|
|
|
" <callOperator></callOperator> " +
|
|
|
" <callOperator>"+operate+"</callOperator> " +
|
|
|
" <certificate>"+key+"</certificate> " +
|
|
|
" <orgCode>01</orgCode> " +
|
|
|
"</root>";
|
|
|
String condition ="";
|
|
|
JSONObject object = new JSONObject();
|
|
@ -1721,17 +1731,14 @@ public class DsyyEntranceService {
|
|
|
object.put("termNo",termNo);
|
|
|
}
|
|
|
condition = object.toJSONString();
|
|
|
String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
|
|
"<root>"+condition+"</root>";
|
|
|
String msgBody =condition;
|
|
|
Map<String,String> params = new HashedMap();
|
|
|
params.put("msgHeader",msgHeader);
|
|
|
params.put("msgBody",msgBody);
|
|
|
logger.info("getSettlement params:"+params.toString());
|
|
|
String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
|
|
|
XMLSerializer xmlSerializer = new XMLSerializer();
|
|
|
String json = xmlSerializer.read(xml).toString();
|
|
|
logger.info(" getSettlement json:"+json);
|
|
|
return json;
|
|
|
logger.info(" getSettlement json:"+xml);
|
|
|
return xml;
|
|
|
|
|
|
}
|
|
|
|
|
@ -1749,14 +1756,15 @@ public class DsyyEntranceService {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public String confirmPayGjyb(String cardNo,String xtgzh0,String depositAmount,String outChargeNo,
|
|
|
String operatorId,String operatorName,String termNo) throws Exception{
|
|
|
String operatorId,String operatorName,String termNo) throws Exception{
|
|
|
String api = "confirm_pay_gjyb";
|
|
|
String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
|
|
|
"<root> " +
|
|
|
" <serverName>"+api+"</serverName> " +
|
|
|
" <format>xml</format>" +
|
|
|
" <callOperator></callOperator> " +
|
|
|
" <callOperator>"+operate+"</callOperator> " +
|
|
|
" <certificate>"+key+"</certificate> " +
|
|
|
" <orgCode>01</orgCode> " +
|
|
|
"</root>";
|
|
|
String condition ="";
|
|
|
JSONObject object = new JSONObject();
|
|
@ -1782,17 +1790,14 @@ public class DsyyEntranceService {
|
|
|
object.put("outChargeNo",outChargeNo);
|
|
|
}
|
|
|
condition = object.toJSONString();
|
|
|
String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
|
|
"<root>"+condition+"</root>";
|
|
|
String msgBody =condition;
|
|
|
Map<String,String> params = new HashedMap();
|
|
|
params.put("msgHeader",msgHeader);
|
|
|
params.put("msgBody",msgBody);
|
|
|
logger.info("confirm_pay_gjyb params:"+params.toString());
|
|
|
String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
|
|
|
XMLSerializer xmlSerializer = new XMLSerializer();
|
|
|
String json = xmlSerializer.read(xml).toString();
|
|
|
logger.info(" confirm_pay_gjyb json:"+json);
|
|
|
return json;
|
|
|
logger.info(" confirm_pay_gjyb json:"+xml);
|
|
|
return xml;
|
|
|
|
|
|
}
|
|
|
|
|
@ -1811,8 +1816,9 @@ public class DsyyEntranceService {
|
|
|
"<root> " +
|
|
|
" <serverName>"+api+"</serverName> " +
|
|
|
" <format>xml</format>" +
|
|
|
" <callOperator></callOperator> " +
|
|
|
" <callOperator>"+operate+"</callOperator> " +
|
|
|
" <certificate>"+key+"</certificate> " +
|
|
|
" <orgCode>01</orgCode> " +
|
|
|
"</root>";
|
|
|
String condition ="";
|
|
|
JSONObject object = new JSONObject();
|
|
@ -1823,82 +1829,66 @@ public class DsyyEntranceService {
|
|
|
object.put("idNo",idNo);
|
|
|
}
|
|
|
condition = object.toJSONString();
|
|
|
String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
|
|
"<root>"+condition+"</root>";
|
|
|
String msgBody =condition;
|
|
|
Map<String,String> params = new HashedMap();
|
|
|
params.put("msgHeader",msgHeader);
|
|
|
params.put("msgBody",msgBody);
|
|
|
logger.info("op_query_card_list params:"+params.toString());
|
|
|
String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
|
|
|
XMLSerializer xmlSerializer = new XMLSerializer();
|
|
|
String json = xmlSerializer.read(xml).toString();
|
|
|
logger.info(" op_query_card_list json:"+json);
|
|
|
return json;
|
|
|
logger.info(" op_query_card_list json:"+xml);
|
|
|
return xml;
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 账户建档接口
|
|
|
* @param operatorId 操作者id
|
|
|
* @param operatorName 操作者姓名
|
|
|
* @param termNo 终端
|
|
|
* @param userName 姓名
|
|
|
* @param idNo 身份证
|
|
|
* @param idType 证件类型 默认01
|
|
|
* @param gend 性别 1男 2女
|
|
|
* @param phone 手机号
|
|
|
* @param brdy 出生日期 yyyy-mm-dd
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public String buildAccount(String operatorId,String operatorName,String termNo,String userName,String idNo,String idType,
|
|
|
String gend,String phone,String brdy) throws Exception{
|
|
|
public String buildAccount(String userName,String idNo,String gend,String phone,String cardNo) throws Exception{
|
|
|
String api = "build_account";
|
|
|
String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
|
|
|
"<root> " +
|
|
|
" <serverName>"+api+"</serverName> " +
|
|
|
" <format>xml</format>" +
|
|
|
" <callOperator></callOperator> " +
|
|
|
" <callOperator>"+operate+"</callOperator> " +
|
|
|
" <certificate>"+key+"</certificate> " +
|
|
|
" <orgCode>01</orgCode> " +
|
|
|
"</root>";
|
|
|
String condition ="";
|
|
|
JSONObject object = new JSONObject();
|
|
|
if (StringUtils.isNoneBlank(operatorId)){
|
|
|
object.put("operatorId",operatorId);
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(operatorName)){
|
|
|
object.put("operatorName",operatorName);
|
|
|
object.put("operatorId","HLWYY");
|
|
|
object.put("operatorName","HLWYY");
|
|
|
object.put("termNo","DSYYHLWYY");
|
|
|
if (StringUtils.isNoneBlank(idNo)){
|
|
|
object.put("idNo",idNo);
|
|
|
object.put("brdy",IdCardUtil.getBirthdayForIdcardStr(idNo));
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(termNo)){
|
|
|
object.put("termNo",termNo);
|
|
|
if (StringUtils.isNoneBlank(cardNo)){
|
|
|
object.put("cardNo",cardNo);
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(userName)){
|
|
|
object.put("userName",userName);
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(idType)){
|
|
|
object.put("idType",idType);
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(gend)){
|
|
|
object.put("gend",gend);
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(phone)){
|
|
|
object.put("phone",phone);
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(brdy)){
|
|
|
object.put("brdy",brdy);
|
|
|
}
|
|
|
condition = object.toJSONString();
|
|
|
String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
|
|
"<root>"+condition+"</root>";
|
|
|
String msgBody =condition;
|
|
|
Map<String,String> params = new HashedMap();
|
|
|
params.put("msgHeader",msgHeader);
|
|
|
params.put("msgBody",msgBody);
|
|
|
logger.info("build_account params:"+params.toString());
|
|
|
String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
|
|
|
XMLSerializer xmlSerializer = new XMLSerializer();
|
|
|
String json = xmlSerializer.read(xml).toString();
|
|
|
logger.info(" build_account json:"+json);
|
|
|
return json;
|
|
|
logger.info(" build_account json:"+xml);
|
|
|
return xml;
|
|
|
|
|
|
}
|
|
|
|
|
@ -1922,15 +1912,16 @@ public class DsyyEntranceService {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public String SendHospitalizedCard(String cardNo ,String visitDeptCode,String visitDoctor,String visitNo,String inDeptCode,String diagnosisCode,
|
|
|
String diagnosisName,String admissionType,String admissionCondition,String admissionCause,
|
|
|
String trumFlag,String relTtpFlag) throws Exception{
|
|
|
String diagnosisName,String admissionType,String admissionCondition,String admissionCause,
|
|
|
String trumFlag,String relTtpFlag) throws Exception{
|
|
|
String api = "SendHospitalizedCard";
|
|
|
String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
|
|
|
"<root> " +
|
|
|
" <serverName>"+api+"</serverName> " +
|
|
|
" <format>xml</format>" +
|
|
|
" <callOperator></callOperator> " +
|
|
|
" <callOperator>"+operate+"</callOperator> " +
|
|
|
" <certificate>"+key+"</certificate> " +
|
|
|
" <orgCode>01</orgCode> " +
|
|
|
"</root>";
|
|
|
String condition ="";
|
|
|
JSONObject object = new JSONObject();
|
|
@ -1971,17 +1962,14 @@ public class DsyyEntranceService {
|
|
|
object.put("relTtpFlag",relTtpFlag);
|
|
|
}
|
|
|
condition = object.toJSONString();
|
|
|
String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
|
|
"<root>"+condition+"</root>";
|
|
|
String msgBody =condition;
|
|
|
Map<String,String> params = new HashedMap();
|
|
|
params.put("msgHeader",msgHeader);
|
|
|
params.put("msgBody",msgBody);
|
|
|
logger.info("SendHospitalizedCard params:"+params.toString());
|
|
|
String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
|
|
|
XMLSerializer xmlSerializer = new XMLSerializer();
|
|
|
String json = xmlSerializer.read(xml).toString();
|
|
|
logger.info(" SendHospitalizedCard json:"+json);
|
|
|
return json;
|
|
|
logger.info(" SendHospitalizedCard json:"+xml);
|
|
|
return xml;
|
|
|
|
|
|
}
|
|
|
|
|
@ -2000,14 +1988,15 @@ public class DsyyEntranceService {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public String queryDayDetailList(String operatorId ,String operatorName,String termNo,String orgCode,String iptNo,String patientId,
|
|
|
String beginDate,String endData) throws Exception{
|
|
|
String beginDate,String endData) throws Exception{
|
|
|
String api = "query_day_detail_list";
|
|
|
String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
|
|
|
"<root> " +
|
|
|
" <serverName>"+api+"</serverName> " +
|
|
|
" <format>xml</format>" +
|
|
|
" <callOperator></callOperator> " +
|
|
|
" <callOperator>"+operate+"</callOperator> " +
|
|
|
" <certificate>"+key+"</certificate> " +
|
|
|
" <orgCode>01</orgCode> " +
|
|
|
"</root>";
|
|
|
String condition ="";
|
|
|
JSONObject object = new JSONObject();
|
|
@ -2036,17 +2025,14 @@ public class DsyyEntranceService {
|
|
|
object.put("endData",endData);
|
|
|
}
|
|
|
condition = object.toJSONString();
|
|
|
String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
|
|
"<root>"+condition+"</root>";
|
|
|
String msgBody =condition;
|
|
|
Map<String,String> params = new HashedMap();
|
|
|
params.put("msgHeader",msgHeader);
|
|
|
params.put("msgBody",msgBody);
|
|
|
logger.info("query_day_detail_list params:"+params.toString());
|
|
|
String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
|
|
|
XMLSerializer xmlSerializer = new XMLSerializer();
|
|
|
String json = xmlSerializer.read(xml).toString();
|
|
|
logger.info(" query_day_detail_list json:"+json);
|
|
|
return json;
|
|
|
logger.info(" query_day_detail_list json:"+xml);
|
|
|
return xml;
|
|
|
|
|
|
}
|
|
|
|
|
@ -2070,8 +2056,9 @@ public class DsyyEntranceService {
|
|
|
"<root> " +
|
|
|
" <serverName>"+api+"</serverName> " +
|
|
|
" <format>xml</format>" +
|
|
|
" <callOperator></callOperator> " +
|
|
|
" <callOperator>"+operate+"</callOperator> " +
|
|
|
" <certificate>"+key+"</certificate> " +
|
|
|
" <orgCode>01</orgCode> " +
|
|
|
"</root>";
|
|
|
String condition ="";
|
|
|
if (StringUtils.isNoneBlank(hISTradeNo)){
|
|
@ -2106,7 +2093,6 @@ public class DsyyEntranceService {
|
|
|
String json = xmlSerializer.read(xml).toString();
|
|
|
logger.info(" sendDispensingToHis json:"+json);
|
|
|
return json;
|
|
|
|
|
|
}
|
|
|
|
|
|
//=============his webservice 调用结束=========================
|
|
@ -2263,6 +2249,11 @@ public class DsyyEntranceService {
|
|
|
return json;
|
|
|
}
|
|
|
|
|
|
/* public String selectEmrByPatientId(String patientId,String visitId){
|
|
|
ServiceLocator locator = new ServiceLocator();
|
|
|
String returnStr = locator.getServiceSoap("http://10.95.8.41:80/csp/jhip/JHIPLIB.SOAP.BS.Service.cls?CfgItem=JH1221查询病历接口BS").send()
|
|
|
}*/
|
|
|
|
|
|
|
|
|
public void test1(){
|
|
|
try {
|
|
@ -2275,6 +2266,9 @@ public class DsyyEntranceService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//========================集成平台调用结束===========================
|
|
|
|
|
|
public String replaceHtml(String demoData,String oldChar,String newChar){
|
|
@ -2586,81 +2580,81 @@ public class DsyyEntranceService {
|
|
|
//基础标记
|
|
|
String base =
|
|
|
"<base> \n" +
|
|
|
" <hospital_code><![CDATA["+outpatientDO.getHospital()+"]]></hospital_code> \n" +
|
|
|
" <event_no><![CDATA["+outpatientDO.getAdmNo()+"]]></event_no> \n" +
|
|
|
" <patient_id><![CDATA["+patientMappingDO.getMappingCode()+"]]></patient_id> \n" +
|
|
|
" <source><![CDATA[门诊]]></source> \n" +
|
|
|
"</base> \n";
|
|
|
" <hospital_code><![CDATA["+outpatientDO.getHospital()+"]]></hospital_code> \n" +
|
|
|
" <event_no><![CDATA["+outpatientDO.getAdmNo()+"]]></event_no> \n" +
|
|
|
" <patient_id><![CDATA["+patientMappingDO.getMappingCode()+"]]></patient_id> \n" +
|
|
|
" <source><![CDATA[门诊]]></source> \n" +
|
|
|
"</base> \n";
|
|
|
//患者就诊
|
|
|
String optPatient =
|
|
|
"<opt_patient> \n" +
|
|
|
" <sex><![CDATA["+sex+"]]></sex> \n" +
|
|
|
" <name><![CDATA["+ patientDO.getName()+"]]></name> \n" +
|
|
|
" <id_type><![CDATA[身份证]]></id_type>\n" +
|
|
|
" <id_no><![CDATA["+ patientDO.getIdcard()+"]]></id_no> \n" +
|
|
|
" <birthday><![CDATA["+ patientDO.getBirthday()+"]]></birthday> \n" +
|
|
|
" <event_time><![CDATA["+eventTime+"]]></event_time> \n" +
|
|
|
" <dept_id><![CDATA["+outpatientDO.getDept()+"]]></dept_id> \n" +
|
|
|
" <dept_name><![CDATA["+outpatientDO.getDeptName()+"]]></dept_name> \n" +
|
|
|
" <pay_type><![CDATA["+("1".equalsIgnoreCase(payType) ? "医保" : "自费")+"]]></pay_type> \n" +
|
|
|
" <pregnancy><![CDATA[]]></pregnancy> \n" +
|
|
|
" <time_of_preg><![CDATA[]]></time_of_preg> \n" +
|
|
|
" <breast_feeding><![CDATA[]]></breast_feeding> \n" +
|
|
|
" <height><![CDATA[]]></height> \n" +
|
|
|
" <weight><![CDATA[]]></weight> \n" +
|
|
|
" <address><![CDATA["+ patientDO.getAddress()+"]]></address> \n" +
|
|
|
" <phone_no><![CDATA["+ patientDO.getMobile()+"]]></phone_no> \n" +
|
|
|
" <patient_condition><![CDATA[普通病人]]></patient_condition> \n" +
|
|
|
"</opt_patient>";
|
|
|
" <sex><![CDATA["+sex+"]]></sex> \n" +
|
|
|
" <name><![CDATA["+ patientDO.getName()+"]]></name> \n" +
|
|
|
" <id_type><![CDATA[身份证]]></id_type>\n" +
|
|
|
" <id_no><![CDATA["+ patientDO.getIdcard()+"]]></id_no> \n" +
|
|
|
" <birthday><![CDATA["+ patientDO.getBirthday()+"]]></birthday> \n" +
|
|
|
" <event_time><![CDATA["+eventTime+"]]></event_time> \n" +
|
|
|
" <dept_id><![CDATA["+outpatientDO.getDept()+"]]></dept_id> \n" +
|
|
|
" <dept_name><![CDATA["+outpatientDO.getDeptName()+"]]></dept_name> \n" +
|
|
|
" <pay_type><![CDATA["+("1".equalsIgnoreCase(payType) ? "医保" : "自费")+"]]></pay_type> \n" +
|
|
|
" <pregnancy><![CDATA[]]></pregnancy> \n" +
|
|
|
" <time_of_preg><![CDATA[]]></time_of_preg> \n" +
|
|
|
" <breast_feeding><![CDATA[]]></breast_feeding> \n" +
|
|
|
" <height><![CDATA[]]></height> \n" +
|
|
|
" <weight><![CDATA[]]></weight> \n" +
|
|
|
" <address><![CDATA["+ patientDO.getAddress()+"]]></address> \n" +
|
|
|
" <phone_no><![CDATA["+ patientDO.getMobile()+"]]></phone_no> \n" +
|
|
|
" <patient_condition><![CDATA[普通病人]]></patient_condition> \n" +
|
|
|
"</opt_patient>";
|
|
|
//处方单
|
|
|
String prescriptionInfo =
|
|
|
" <opt_prescription_info> \n" +
|
|
|
" <recipe_id><![CDATA["+hisId+"]]></recipe_id> \n" +
|
|
|
" <recipe_no><![CDATA["+hisId+"]]></recipe_no> \n" +
|
|
|
" <recipe_source><![CDATA[门诊]]></recipe_source> \n" +
|
|
|
" <recipe_type><![CDATA[西药方]]></recipe_type> \n" +
|
|
|
" <dept_id><![CDATA["+ baseDoctorHospitalDO.getDeptCode()+"]]></dept_id> \n" +
|
|
|
" <dept_name><![CDATA["+ baseDoctorHospitalDO.getDeptName()+"]]></dept_name> \n" +
|
|
|
" <recipe_doc_title><![CDATA["+baseDoctorDO.getJobTitleName()+"]]></recipe_doc_title> \n" +
|
|
|
" <recipe_doc_id><![CDATA["+doctorMappingDO.getMappingCode()+"]]></recipe_doc_id> \n" +
|
|
|
" <recipe_doc_name><![CDATA["+baseDoctorDO.getName()+"]]></recipe_doc_name> \n" +
|
|
|
" <recipe_time><![CDATA["+recipeTime+"]]></recipe_time> \n" +
|
|
|
" <recipe_fee_total><![CDATA["+recipeFeeTotal+"]]></recipe_fee_total> \n" +
|
|
|
" <herb_unit_price><![CDATA[]]></herb_unit_price> \n" +
|
|
|
" <herb_packet_count><![CDATA[]]></herb_packet_count> \n" +
|
|
|
" <recipe_status><![CDATA[0]]></recipe_status> \n" +
|
|
|
" <comments><![CDATA[]]></comments> \n" +
|
|
|
" <urgent_flag><![CDATA[0]]></urgent_flag> \n" +
|
|
|
" </opt_prescription_info>";
|
|
|
" <recipe_id><![CDATA["+hisId+"]]></recipe_id> \n" +
|
|
|
" <recipe_no><![CDATA["+hisId+"]]></recipe_no> \n" +
|
|
|
" <recipe_source><![CDATA[门诊]]></recipe_source> \n" +
|
|
|
" <recipe_type><![CDATA[西药方]]></recipe_type> \n" +
|
|
|
" <dept_id><![CDATA["+ baseDoctorHospitalDO.getDeptCode()+"]]></dept_id> \n" +
|
|
|
" <dept_name><![CDATA["+ baseDoctorHospitalDO.getDeptName()+"]]></dept_name> \n" +
|
|
|
" <recipe_doc_title><![CDATA["+baseDoctorDO.getJobTitleName()+"]]></recipe_doc_title> \n" +
|
|
|
" <recipe_doc_id><![CDATA["+doctorMappingDO.getMappingCode()+"]]></recipe_doc_id> \n" +
|
|
|
" <recipe_doc_name><![CDATA["+baseDoctorDO.getName()+"]]></recipe_doc_name> \n" +
|
|
|
" <recipe_time><![CDATA["+recipeTime+"]]></recipe_time> \n" +
|
|
|
" <recipe_fee_total><![CDATA["+recipeFeeTotal+"]]></recipe_fee_total> \n" +
|
|
|
" <herb_unit_price><![CDATA[]]></herb_unit_price> \n" +
|
|
|
" <herb_packet_count><![CDATA[]]></herb_packet_count> \n" +
|
|
|
" <recipe_status><![CDATA[0]]></recipe_status> \n" +
|
|
|
" <comments><![CDATA[]]></comments> \n" +
|
|
|
" <urgent_flag><![CDATA[0]]></urgent_flag> \n" +
|
|
|
" </opt_prescription_info>";
|
|
|
//处方明细
|
|
|
String prescriptionItems="";
|
|
|
for (int i = 0; i < infos.size(); i++) {
|
|
|
String prescriptionItem =
|
|
|
" <opt_prescription_item> \n" +
|
|
|
" <recipe_item_id><![CDATA["+hisId+"]]></recipe_item_id> \n" +
|
|
|
" <recipe_id><![CDATA["+infos.get(i).getId()+"]]></recipe_id> \n" +
|
|
|
" <group_no><![CDATA["+infos.get(i).getGroupNo()+"]]></group_no> \n" +
|
|
|
" <drug_id><![CDATA["+infos.get(i).getDrugNo()+"]]></drug_id> \n" +
|
|
|
" <drug_name><![CDATA["+infos.get(i).getDrugName()+"]]></drug_name> \n" +
|
|
|
" <specification><![CDATA["+infos.get(i).getSpecification()+"]]></specification> \n" +
|
|
|
" <manufacturer_name><![CDATA["+infos.get(i).getDrugPlace()+"]]></manufacturer_name> \n" +
|
|
|
" <drug_dose><![CDATA["+infos.get(i).getDosage() + infos.get(i).getUnitName()+"]]></drug_dose> \n" +
|
|
|
" <drug_admin_route_name><![CDATA["+infos.get(i).getSupplyName()+"]]></drug_admin_route_name> \n" +
|
|
|
" <drug_using_freq><![CDATA["+infos.get(i).getUsageCode()+"]]></drug_using_freq> \n" +
|
|
|
" <despensing_num><![CDATA["+infos.get(i).getQuantity()+"]]></despensing_num> \n" +
|
|
|
" <pack_unit><![CDATA["+infos.get(i).getPackUnitName()+"]]></pack_unit> \n" +
|
|
|
" <count_unit><![CDATA["+infos.get(i).getPackQuantity()+"]]></count_unit> \n" +
|
|
|
" <unit_price><![CDATA["+infos.get(i).getPackRetprice()+"]]></unit_price> \n" +
|
|
|
" <fee_total><![CDATA["+Integer.parseInt(infos.get(i).getQuantity()) * infos.get(i).getPackRetprice()+"]]></fee_total> \n" +
|
|
|
" <duration><![CDATA["+infos.get(i).getUsageName()+"]]></duration> \n" +
|
|
|
" <preparation><![CDATA["+infos.get(i).getUnitName()+"]]></preparation> \n" +
|
|
|
" <approve_no><![CDATA["+infos.get(i).getPzwh()+"]]></approve_no> \n" +
|
|
|
" <medicare_type><![CDATA[]]></medicare_type> \n" +
|
|
|
" <ouvas_flag><![CDATA[]]></ouvas_flag> \n" +
|
|
|
" <skin_test_flag><![CDATA[]]></skin_test_flag> \n" +
|
|
|
" <duration><![CDATA[]]></duration> \n" +
|
|
|
" <special_prompt><![CDATA[]]></special_prompt> \n" +
|
|
|
" </opt_prescription_item> ";
|
|
|
" <recipe_item_id><![CDATA["+hisId+"]]></recipe_item_id> \n" +
|
|
|
" <recipe_id><![CDATA["+infos.get(i).getId()+"]]></recipe_id> \n" +
|
|
|
" <group_no><![CDATA["+infos.get(i).getGroupNo()+"]]></group_no> \n" +
|
|
|
" <drug_id><![CDATA["+infos.get(i).getDrugNo()+"]]></drug_id> \n" +
|
|
|
" <drug_name><![CDATA["+infos.get(i).getDrugName()+"]]></drug_name> \n" +
|
|
|
" <specification><![CDATA["+infos.get(i).getSpecification()+"]]></specification> \n" +
|
|
|
" <manufacturer_name><![CDATA["+infos.get(i).getDrugPlace()+"]]></manufacturer_name> \n" +
|
|
|
" <drug_dose><![CDATA["+infos.get(i).getDosage() + infos.get(i).getUnitName()+"]]></drug_dose> \n" +
|
|
|
" <drug_admin_route_name><![CDATA["+infos.get(i).getSupplyName()+"]]></drug_admin_route_name> \n" +
|
|
|
" <drug_using_freq><![CDATA["+infos.get(i).getUsageCode()+"]]></drug_using_freq> \n" +
|
|
|
" <despensing_num><![CDATA["+infos.get(i).getQuantity()+"]]></despensing_num> \n" +
|
|
|
" <pack_unit><![CDATA["+infos.get(i).getPackUnitName()+"]]></pack_unit> \n" +
|
|
|
" <count_unit><![CDATA["+infos.get(i).getPackQuantity()+"]]></count_unit> \n" +
|
|
|
" <unit_price><![CDATA["+infos.get(i).getPackRetprice()+"]]></unit_price> \n" +
|
|
|
" <fee_total><![CDATA["+Integer.parseInt(infos.get(i).getQuantity()) * infos.get(i).getPackRetprice()+"]]></fee_total> \n" +
|
|
|
" <duration><![CDATA["+infos.get(i).getUsageName()+"]]></duration> \n" +
|
|
|
" <preparation><![CDATA["+infos.get(i).getUnitName()+"]]></preparation> \n" +
|
|
|
" <approve_no><![CDATA["+infos.get(i).getPzwh()+"]]></approve_no> \n" +
|
|
|
" <medicare_type><![CDATA[]]></medicare_type> \n" +
|
|
|
" <ouvas_flag><![CDATA[]]></ouvas_flag> \n" +
|
|
|
" <skin_test_flag><![CDATA[]]></skin_test_flag> \n" +
|
|
|
" <duration><![CDATA[]]></duration> \n" +
|
|
|
" <special_prompt><![CDATA[]]></special_prompt> \n" +
|
|
|
" </opt_prescription_item> ";
|
|
|
prescriptionItems += prescriptionItem;
|
|
|
}
|
|
|
//医生反馈信息
|
|
@ -2675,15 +2669,15 @@ public class DsyyEntranceService {
|
|
|
String diagDate = DateUtil.dateToStrLong(diagnosisDOS.get(i).getCreateTime());
|
|
|
String prescriptionDiagnose =
|
|
|
" <opt_diagnosis> \n" +
|
|
|
" <diag_id><![CDATA["+diagnosisDOS.get(i).getId()+"]]></diag_id> \n" +
|
|
|
" <diag_date><![CDATA["+diagDate+"]]></diag_date> \n" +
|
|
|
" <diag_name><![CDATA["+diagnosisDOS.get(i).getName()+"]]></diag_name> \n" +
|
|
|
" <diag_code><![CDATA["+diagnosisDOS.get(i).getCode()+"]]></diag_code> \n" +
|
|
|
" <diag_status><![CDATA[0]]></diag_status> \n" +
|
|
|
" <diag_doc_name><![CDATA["+baseDoctorDO.getName()+"]]></diag_doc_name> \n" +
|
|
|
" <diag_type><![CDATA[门诊诊断]]></diag_type> \n" +
|
|
|
" <diag_code_type><![CDATA[1]]></diag_code_type> \n" +
|
|
|
" </opt_diagnosis> ";
|
|
|
" <diag_id><![CDATA["+diagnosisDOS.get(i).getId()+"]]></diag_id> \n" +
|
|
|
" <diag_date><![CDATA["+diagDate+"]]></diag_date> \n" +
|
|
|
" <diag_name><![CDATA["+diagnosisDOS.get(i).getName()+"]]></diag_name> \n" +
|
|
|
" <diag_code><![CDATA["+diagnosisDOS.get(i).getCode()+"]]></diag_code> \n" +
|
|
|
" <diag_status><![CDATA[0]]></diag_status> \n" +
|
|
|
" <diag_doc_name><![CDATA["+baseDoctorDO.getName()+"]]></diag_doc_name> \n" +
|
|
|
" <diag_type><![CDATA[门诊诊断]]></diag_type> \n" +
|
|
|
" <diag_code_type><![CDATA[1]]></diag_code_type> \n" +
|
|
|
" </opt_diagnosis> ";
|
|
|
prescriptionDiagnoses += prescriptionDiagnose;
|
|
|
}
|
|
|
String cancelPrescription = "<opt_prescriptions> \n" +
|
|
@ -2704,11 +2698,11 @@ public class DsyyEntranceService {
|
|
|
|
|
|
String prescriptions =
|
|
|
"<opt_prescriptions>\n" +
|
|
|
"<opt_prescription>\n" +
|
|
|
"<opt_prescription>\n" +
|
|
|
prescriptionInfo +
|
|
|
prescriptionItems +
|
|
|
"</opt_prescription>\n" +
|
|
|
"</opt_prescriptions>";
|
|
|
"</opt_prescription>\n" +
|
|
|
"</opt_prescriptions>";
|
|
|
|
|
|
if (serviceCode.equals("GY_V4_FLEXIBLE") || serviceCode.equals("GY_SF_V4")){
|
|
|
xml = "<root>" + base + optPatient + prescriptions + diagnoses + "</root>";
|
|
@ -2763,9 +2757,9 @@ public class DsyyEntranceService {
|
|
|
if (diagnosisDOS == null || diagnosisDOS.size() == 0){
|
|
|
return "诊断信息为空";
|
|
|
}
|
|
|
String xml = "";
|
|
|
xml = initParams("GY_V4_FLEXIBLE", hisId, payType, patient, doctor, infos, diagnosisDOS,outpatient);
|
|
|
String response = checkPrescription("GY_V4_FLEXIBLE", xml, "合理用药审查");
|
|
|
String xml = "";
|
|
|
xml = initParams("GY_V4_FLEXIBLE", hisId, payType, patient, doctor, infos, diagnosisDOS,outpatient);
|
|
|
String response = checkPrescription("GY_V4_FLEXIBLE", xml, "合理用药审查");
|
|
|
|
|
|
return response;
|
|
|
}
|
|
@ -2778,14 +2772,14 @@ public class DsyyEntranceService {
|
|
|
if (diagnosisDOS == null || diagnosisDOS.size() == 0){
|
|
|
return "诊断信息为空";
|
|
|
}
|
|
|
String xml = null;
|
|
|
try {
|
|
|
xml = initParams("GY_SF_V4",hisId, payType, patient, doctor, infos, diagnosisDOS,outpatient);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
String response = checkPrescription("GY_SF_V4", xml, "处方成功保存后调用");
|
|
|
return response;
|
|
|
String xml = null;
|
|
|
try {
|
|
|
xml = initParams("GY_SF_V4",hisId, payType, patient, doctor, infos, diagnosisDOS,outpatient);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
String response = checkPrescription("GY_SF_V4", xml, "处方成功保存后调用");
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
//处方保存成功后,发送给审方系统进行人工审方
|
|
@ -2796,14 +2790,14 @@ public class DsyyEntranceService {
|
|
|
if (diagnosisDOS == null || diagnosisDOS.size() == 0){
|
|
|
return "诊断信息为空";
|
|
|
}
|
|
|
String xml = null;
|
|
|
try {
|
|
|
xml = initParams("SF_V4_VALID_FLAG", hisId, payType, patient, doctor, infos, diagnosisDOS,outpatient);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
String response = checkPrescription("SF_V4_VALID_FLAG", xml, "人工审方");
|
|
|
return response;
|
|
|
String xml = null;
|
|
|
try {
|
|
|
xml = initParams("SF_V4_VALID_FLAG", hisId, payType, patient, doctor, infos, diagnosisDOS,outpatient);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
String response = checkPrescription("SF_V4_VALID_FLAG", xml, "人工审方");
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
//删除已保存处方时调用
|
|
@ -2814,14 +2808,14 @@ public class DsyyEntranceService {
|
|
|
if (diagnosisDOS == null || diagnosisDOS.size() == 0){
|
|
|
return "诊断信息为空";
|
|
|
}
|
|
|
String xml = null;
|
|
|
try {
|
|
|
xml = initParams("CANCEL_GROUP_DRUG_V4", hisId, payType, patient, doctor, infos, diagnosisDOS,outpatient);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
String response = checkPrescription("CANCEL_GROUP_DRUG_V4", xml, "删除已保存处方时调用");
|
|
|
return response;
|
|
|
String xml = null;
|
|
|
try {
|
|
|
xml = initParams("CANCEL_GROUP_DRUG_V4", hisId, payType, patient, doctor, infos, diagnosisDOS,outpatient);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
String response = checkPrescription("CANCEL_GROUP_DRUG_V4", xml, "删除已保存处方时调用");
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
//医生在对药师打回的处方进行双签处理后,医生站将双签信息推送给审方系统
|
|
@ -2832,14 +2826,14 @@ public class DsyyEntranceService {
|
|
|
if (diagnosisDOS == null || diagnosisDOS.size() == 0){
|
|
|
return "诊断信息为空";
|
|
|
}
|
|
|
String xml = null;
|
|
|
try {
|
|
|
xml = initParams("SF_V4_DOUBLE_SIGN", hisId, payType, patient, doctor, infos, diagnosisDOS,outpatient);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
String response = checkPrescription("SF_V4_DOUBLE_SIGN", xml, "处方双签");
|
|
|
return response;
|
|
|
String xml = null;
|
|
|
try {
|
|
|
xml = initParams("SF_V4_DOUBLE_SIGN", hisId, payType, patient, doctor, infos, diagnosisDOS,outpatient);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
String response = checkPrescription("SF_V4_DOUBLE_SIGN", xml, "处方双签");
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
|
|
@ -3013,7 +3007,7 @@ public class DsyyEntranceService {
|
|
|
* 获取医生手写签名图片的base64编码
|
|
|
*
|
|
|
*
|
|
|
* @param docIdcard 医生身份证
|
|
|
* @param docIdcard 医生身份证
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
@ -3087,7 +3081,7 @@ public class DsyyEntranceService {
|
|
|
|
|
|
/**
|
|
|
* 电子票据开具
|
|
|
* @param ylzMedicalRelationDO
|
|
|
* @param
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|