|
@ -113,7 +113,7 @@ public class XzzxEntranceService{
|
|
|
@Autowired
|
|
|
private BasePatientDao basePatientDao;
|
|
|
@Autowired
|
|
|
private PrescriptionCheckDao prescriptionCheckDao;
|
|
|
private BaseDoctorHospitalDao baseDoctorHospitalDao;
|
|
|
|
|
|
|
|
|
|
|
@ -1258,7 +1258,7 @@ public class XzzxEntranceService{
|
|
|
condition1 += "<DayCount>"+prescriptionInfoDO.getDays()+"</DayCount>";
|
|
|
condition1 += "<Usage>"+prescriptionInfoDO.getSupplyCode()+"</Usage>";
|
|
|
condition1 += "<TotalDoseage>"+prescriptionInfoDO.getQuantity()+"</TotalDoseage>";
|
|
|
condition1 += "<TotalUnit>"+prescriptionInfoDO.getPackQuantity()+prescriptionInfoDO.getUnitName()+"/"+prescriptionInfoDO.getPackUnit()+"</TotalUnit>";
|
|
|
condition1 += "<TotalUnit>"+prescriptionInfoDO.getPackUnit()+"</TotalUnit>";
|
|
|
condition1 += "<PrescribeMemo>"+"</PrescribeMemo>";
|
|
|
condition1 += "<FryMode>"+"</FryMode>";
|
|
|
condition1 += "<HerbalTakeMethodClass>"+"</HerbalTakeMethodClass>";
|
|
@ -1281,6 +1281,152 @@ public class XzzxEntranceService{
|
|
|
return json;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 互联网医院删除处方信息更新到his
|
|
|
* @param IoFlag 门诊住院标志
|
|
|
* @param PayCardNo 就诊卡号
|
|
|
* @param NullahNumber 挂号流水号
|
|
|
* @param ApplyDept 执行科室
|
|
|
* @param ApplyDoctor 开单医生
|
|
|
* @param ExecuteDept 执行科室(药房)
|
|
|
* @param PresNo 必填,医嘱号
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public String delHisPrescriptionByHisNo(String IoFlag,String PayCardNo,String NullahNumber,
|
|
|
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> " +
|
|
|
" <certificate>"+key+"</certificate> " +
|
|
|
"</root>";
|
|
|
String condition ="";
|
|
|
if (!StringUtils.isEmpty(IoFlag)){
|
|
|
condition += "<IoFlag>"+IoFlag+"</IoFlag>";
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(PayCardNo)){
|
|
|
condition += "<PayCardNo>"+PayCardNo+"</PayCardNo>";
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(NullahNumber)){
|
|
|
condition += "<NullahNumber>"+NullahNumber+"</NullahNumber>";
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(ApplyDept)){
|
|
|
condition += "<ApplyDept>"+ApplyDept+"</ApplyDept>";
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(ApplyDoctor)){
|
|
|
condition += "<ApplyDoctor>"+ApplyDoctor+"</ApplyDoctor>";
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(ExecuteDept)){
|
|
|
condition += "<ExecuteDept>"+ExecuteDept+"</ExecuteDept>";
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(PresNo)){
|
|
|
condition += "<PresNo>"+PresNo+"</PresNo>";
|
|
|
}
|
|
|
String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
|
|
"<root>"+condition+"</root>";
|
|
|
|
|
|
Map<String,String> params = new HashedMap();
|
|
|
params.put("msgHeader",msgHeader);
|
|
|
params.put("msgBody",msgBody);
|
|
|
logger.info("delHisPrescriptionByHisNo params:"+params.toString());
|
|
|
String xml = getXzzxWebServiceInfo("CallInterface",params,getOperateUrl());
|
|
|
XMLSerializer xmlSerializer = new XMLSerializer();
|
|
|
String json = xmlSerializer.read(xml).toString();
|
|
|
logger.info("delHisPrescriptionByHisNo json:"+json);
|
|
|
return json;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 保存入门诊断信息到his
|
|
|
* @param ApplyNo
|
|
|
* @param DiagnosisName
|
|
|
* @param DiagnosisCode
|
|
|
* @param ChnSymPtomsCode
|
|
|
* @param ChnSymPtomsName
|
|
|
* @param ChnDiagnosisCode
|
|
|
* @param ChnDiagnosisName
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public String saveDiagnosis(String ApplyNo,String DiagnosisName,String DiagnosisCode,
|
|
|
String ChnSymPtomsCode,String ChnSymPtomsName,String ChnDiagnosisCode,String ChnDiagnosisName)throws Exception{
|
|
|
String api = "saveDiagnosis";
|
|
|
String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
|
|
|
"<root> " +
|
|
|
" <serverName>"+api+"</serverName> " +
|
|
|
" <format>xml</format>" +
|
|
|
" <callOperator></callOperator> " +
|
|
|
" <certificate>"+key+"</certificate> " +
|
|
|
"</root>";
|
|
|
String condition ="";
|
|
|
if (!StringUtils.isEmpty(ApplyNo)){
|
|
|
condition += "<ApplyNo>"+ApplyNo+"</ApplyNo>";
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(DiagnosisName)){
|
|
|
condition += "<DiagnosisName>"+DiagnosisName+"</DiagnosisName>";
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(DiagnosisCode)){
|
|
|
condition += "<DiagnosisCode>"+DiagnosisCode+"</DiagnosisCode>";
|
|
|
}
|
|
|
condition+="<ChnSymPtomsCode>"+"</ChnSymPtomsCode>";
|
|
|
condition+="<ChnSymPtomsName>"+"</ChnSymPtomsName>";
|
|
|
condition+="<ChnDiagnosisCode>"+"</ChnDiagnosisCode>";
|
|
|
condition+="<ChnDiagnosisName>"+"</ChnDiagnosisName>";
|
|
|
String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
|
|
"<root>"+condition+"</root>";
|
|
|
|
|
|
Map<String,String> params = new HashedMap();
|
|
|
params.put("msgHeader",msgHeader);
|
|
|
params.put("msgBody",msgBody);
|
|
|
logger.info("saveDiagnosis params:"+params.toString());
|
|
|
String xml = getXzzxWebServiceInfo("CallInterface",params,getOperateUrl());
|
|
|
XMLSerializer xmlSerializer = new XMLSerializer();
|
|
|
String json = xmlSerializer.read(xml).toString();
|
|
|
logger.info(" saveDiagnosis json:"+json);
|
|
|
return json;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 发送退号信息到his
|
|
|
* @param ApplyNo
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public String refundConsultation(String ApplyNo,String PayCardNo)throws Exception{
|
|
|
String api = "refundConsultation";
|
|
|
String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
|
|
|
"<root> " +
|
|
|
" <serverName>"+api+"</serverName> " +
|
|
|
" <format>xml</format>" +
|
|
|
" <callOperator></callOperator> " +
|
|
|
" <certificate>"+key+"</certificate> " +
|
|
|
"</root>";
|
|
|
String condition ="";
|
|
|
if (!StringUtils.isEmpty(ApplyNo)){
|
|
|
condition += "<ApplyNo>"+ApplyNo+"</ApplyNo>";
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(PayCardNo)){
|
|
|
condition += "<PayCardNo>"+PayCardNo+"</PayCardNo>";
|
|
|
}
|
|
|
String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
|
|
"<root>"+condition+"</root>";
|
|
|
|
|
|
Map<String,String> params = new HashedMap();
|
|
|
params.put("msgHeader",msgHeader);
|
|
|
params.put("msgBody",msgBody);
|
|
|
logger.info("refundConsultation params:"+params.toString());
|
|
|
String xml = getXzzxWebServiceInfo("CallInterface",params,getOperateUrl());
|
|
|
XMLSerializer xmlSerializer = new XMLSerializer();
|
|
|
String json = xmlSerializer.read(xml).toString();
|
|
|
logger.info("refundConsultation json:"+json);
|
|
|
return json;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 组装检查检验项目参数
|
|
@ -1362,13 +1508,12 @@ public class XzzxEntranceService{
|
|
|
for (WlyyPrescriptionInfoDO wlyyPrescriptionInfoDO:infos){
|
|
|
int i = 1;
|
|
|
stringBuffer.append("<Advice REPEAT=\"1\" DRUG_LO_NAME=\""+wlyyPrescriptionInfoDO.getDrugName()+
|
|
|
"\" DRUG_LO_ID=\""+wlyyPrescriptionInfoDO.getHisCode()+
|
|
|
"\" ADMINISTRATION=\""+wlyyPrescriptionInfoDO.getSupplyName()+
|
|
|
"\" DRUG_LO_ID=\""+wlyyPrescriptionInfoDO.getHisCode()+"\" ADMINISTRATION=\""+wlyyPrescriptionInfoDO.getSupplyName()+
|
|
|
"\" DOSAGE=\""+wlyyPrescriptionInfoDO.getDosage()+
|
|
|
"\" DOSAGE_UNIT=\""+wlyyPrescriptionInfoDO.getUnitName()+
|
|
|
"\" FREQ_COUNT=\""+wlyyPrescriptionInfoDO.getUsageCode()+
|
|
|
"\" FREQ_INTERVAL=\"\" FREQ_INTERVAL_UNIT=\"\" START_DAY=\""+patientAndDoctor.getString("CREATE_DATE")+"\" END_DAY=\"\" DEPT_CODE=\""+patientAndDoctor.getString("DEPT_CODE")+
|
|
|
"\" DOCTOR_NAME=\""+patientAndDoctor.getString("DOCTOR_NAME")+
|
|
|
"\" FREQ_INTERVAL=\"\" FREQ_INTERVAL_UNIT=\"\" START_DAY=\""+patientAndDoctor.getString("CREATE_DATE")+"\" END_DAY=\"\"" +
|
|
|
" DEPT_CODE=\""+patientAndDoctor.getString("DEPT_CODE")+"\" DOCTOR_NAME=\""+patientAndDoctor.getString("DOCTOR_NAME")+
|
|
|
"\" ORDER_NO=\""+i+
|
|
|
"\" ORDER_SUB_NO=\""+1+"\" AUTHORITY_LEVELS=\"\" ALERT_LEVELS=\"\" TITLE=\""+patientAndDoctor.getString("POSITION") +
|
|
|
"\" GROUP_ID=\""+wlyyPrescriptionInfoDO.getFrequency()+"\" USER_ID=\""+patientAndDoctor.getString("doctorId")+
|
|
@ -2716,7 +2861,7 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
|
|
|
|
|
|
/**
|
|
|
*
|
|
|
* 保存处方到entrance
|
|
|
* @param ioFlag 门诊住院标志
|
|
|
* @param payCardNo 就诊卡号
|
|
|
* @param nullahNumber 挂号流水号
|
|
@ -2754,6 +2899,94 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 保存诊断到entrance
|
|
|
* @param applyNo 必填,流水号
|
|
|
* @param diagnosisName 必填,诊断名称
|
|
|
* @param diagnosisCode 诊断代码
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public JSONObject saveDiagnosisToEntrance(String applyNo,String diagnosisName,String diagnosisCode) throws Exception {
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
String response = "";
|
|
|
String url = entranceUrl+"saveDiagnosis";
|
|
|
ObjectMapper mapper = new ObjectMapper();
|
|
|
Map<String,String> params = new HashedMap();
|
|
|
params.put("ApplyNo",applyNo);
|
|
|
params.put("DiagnosisName",diagnosisName);
|
|
|
params.put("DiagnosisCode",diagnosisCode);
|
|
|
logger.info("params"+params.toString());
|
|
|
response = httpClientUtil.httpPost(url,params);
|
|
|
logger.info("诊断同步"+response);
|
|
|
JSONObject object = JSONObject.parseObject(response);
|
|
|
if(object.getInteger("status")==200){
|
|
|
jsonObject = object.getJSONObject("obj");
|
|
|
}
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 发送退号信息到entrance
|
|
|
* @param applyNo 必填,流水号
|
|
|
* @param payCardNo 必填,卡号
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public JSONObject refundConsultationToEntrance(String applyNo,String payCardNo) throws Exception {
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
String response = "";
|
|
|
String url = entranceUrl+"refundConsultation";
|
|
|
ObjectMapper mapper = new ObjectMapper();
|
|
|
Map<String,String> params = new HashedMap();
|
|
|
params.put("ApplyNo",applyNo);
|
|
|
params.put("PayCardNo",payCardNo);
|
|
|
logger.info("params"+params.toString());
|
|
|
response = httpClientUtil.httpPost(url,params);
|
|
|
logger.info("诊断同步"+response);
|
|
|
JSONObject object = JSONObject.parseObject(response);
|
|
|
if(object.getInteger("status")==200){
|
|
|
jsonObject = object.getJSONObject("obj");
|
|
|
}
|
|
|
return jsonObject;
|
|
|
}
|
|
|
/**
|
|
|
* 删除处方信息
|
|
|
* @param realOrder his处方号
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public JSONObject deletePrescriptionToEntrance(String realOrder) throws Exception {
|
|
|
Map<String,String> params = new HashedMap();
|
|
|
WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findByRealOrder(realOrder);
|
|
|
if (null!=wlyyPrescriptionDO){
|
|
|
params.put("IoFlag","0");
|
|
|
WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(wlyyPrescriptionDO.getOutpatientId());
|
|
|
if (null!=wlyyOutpatientDO){
|
|
|
params.put("PayCardNo",wlyyOutpatientDO.getCardNo());
|
|
|
params.put("NullahNumber",wlyyOutpatientDO.getRegisterNo());
|
|
|
params.put("ApplyDept",wlyyOutpatientDO.getDept());
|
|
|
}
|
|
|
DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(wlyyPrescriptionDO.getDoctor());
|
|
|
if (null!=doctorMappingDO){
|
|
|
params.put("ApplyDoctor",doctorMappingDO.getMappingCode());
|
|
|
}
|
|
|
params.put("ExecuteDept","50100");
|
|
|
params.put("PresNo",realOrder);
|
|
|
}
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
String response = "";
|
|
|
String url = entranceUrl+"delHisPrescriptionByHisNo";
|
|
|
logger.info("params"+params.toString());
|
|
|
response = httpClientUtil.httpPost(url,params);
|
|
|
logger.info("删除处方信息"+response);
|
|
|
JSONObject object = JSONObject.parseObject(response);
|
|
|
if(object.getInteger("status")==200){
|
|
|
jsonObject = object.getJSONObject("obj");
|
|
|
}
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
//=====================hospital应用调用entrance应用============end=================
|
|
|
|
|
|
|
|
@ -2947,26 +3180,16 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
return map;
|
|
|
}
|
|
|
//组装审药参数并发送到entrance
|
|
|
public String checkInputInfo(String prescriptionId,String payType,String doctor,String patient,List<WlyyPrescriptionDiagnosisDO> diagnosisDOS,List<WlyyPrescriptionInfoDO> infos) throws Exception{
|
|
|
public String checkInputInfo(String hisId,String payType,String doctor,String patient,List<WlyyPrescriptionDiagnosisDO> diagnosisDOS,List<WlyyPrescriptionInfoDO> infos) throws Exception{
|
|
|
JSONObject jsonObject = initEntranceParam(payType,doctor,patient,diagnosisDOS);
|
|
|
String tjPrescriptionId = "";
|
|
|
WlyyPrescriptionCheckDO wlyyPrescriptionCheckDO;
|
|
|
//如果重新审核药品 一定要把返回的orderNo的值拿到赋值到prescriptionId里
|
|
|
if (StringUtils.isNotEmpty(prescriptionId)){
|
|
|
tjPrescriptionId = prescriptionId;
|
|
|
jsonObject.put("PATIENT_PRES_ID",tjPrescriptionId);
|
|
|
wlyyPrescriptionCheckDO = prescriptionCheckDao.findOne(tjPrescriptionId);
|
|
|
if (StringUtils.isNotEmpty(hisId)){
|
|
|
jsonObject.put("PATIENT_PRES_ID",hisId);
|
|
|
|
|
|
}else {
|
|
|
wlyyPrescriptionCheckDO = new WlyyPrescriptionCheckDO();
|
|
|
tjPrescriptionId = UUID.randomUUID().toString();
|
|
|
wlyyPrescriptionCheckDO.setId(tjPrescriptionId);
|
|
|
jsonObject.put("PATIENT_PRES_ID",tjPrescriptionId);
|
|
|
hisId = UUID.randomUUID().toString();
|
|
|
jsonObject.put("PATIENT_PRES_ID",hisId);
|
|
|
}
|
|
|
wlyyPrescriptionCheckDO.setCreateUser(doctor);
|
|
|
wlyyPrescriptionCheckDO.setCreateUserName(null==jsonObject.get("DOCTOR_NAME")?"":jsonObject.get("DOCTOR_NAME").toString());
|
|
|
wlyyPrescriptionCheckDO.setDept(null==jsonObject.get("DEPT_CODE")?"":jsonObject.get("DEPT_CODE").toString());
|
|
|
wlyyPrescriptionCheckDO.setDeptName(null==jsonObject.get("DEPT_NAME")?"":jsonObject.get("DEPT_NAME").toString());
|
|
|
if (null!=infos&&infos.size()>0) {
|
|
|
String response = "";
|
|
|
String returnJson = "";
|
|
@ -2990,10 +3213,9 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
if (StringUtils.isNotBlank(obj)) {
|
|
|
List<Map<String,Object>> returnList = transXmlCommen(obj);
|
|
|
Map<String,Object> checkIdMap = new HashMap<>();
|
|
|
checkIdMap.put("prescriptionOnly",tjPrescriptionId);
|
|
|
checkIdMap.put("prescriptionOnly",hisId);
|
|
|
returnList.add(checkIdMap);
|
|
|
returnJson = JSONArray.toJSONString(returnList);
|
|
|
wlyyPrescriptionCheckDO.setReason(returnJson);
|
|
|
logger.info("返回到互联网医院的解析后的结果:"+returnJson);
|
|
|
wlyyHttpLogDO.setDoctor(doctor);
|
|
|
wlyyHttpLogDO.setCreateTime(new Date());
|
|
@ -3002,7 +3224,6 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
wlyyHttpLogDO.setName("checkPrescription");
|
|
|
} else {
|
|
|
returnJson = "审方返回接口为空请检查参数是否正确";
|
|
|
wlyyPrescriptionCheckDO.setStatus(1);
|
|
|
logger.info(returnJson);
|
|
|
wlyyHttpLogDO.setCode("error");
|
|
|
wlyyHttpLogDO.setDoctor(doctor);
|
|
@ -3013,7 +3234,6 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
}
|
|
|
} else {
|
|
|
returnJson = "entranceUrl接口调用失败";
|
|
|
wlyyPrescriptionCheckDO.setStatus(1);
|
|
|
wlyyHttpLogDO.setCode("error");
|
|
|
wlyyHttpLogDO.setDoctor(doctor);
|
|
|
wlyyHttpLogDO.setCreateTime(new Date());
|
|
@ -3022,9 +3242,6 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
wlyyHttpLogDO.setName("checkPrescription");
|
|
|
}
|
|
|
wlyyHttpLogDao.save(wlyyHttpLogDO);
|
|
|
wlyyPrescriptionCheckDO.setStatus(1);
|
|
|
prescriptionCheckDao.save(wlyyPrescriptionCheckDO);
|
|
|
wlyyPrescriptionCheckDO.setReason(returnJson);
|
|
|
return returnJson;
|
|
|
}else {
|
|
|
return "药品信息为空";
|
|
@ -3034,12 +3251,10 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
public String saveCheckInputInfo(String prescriptionId,String payType,String doctor,String patient,List<WlyyPrescriptionDiagnosisDO> diagnosisDOS,List<WlyyPrescriptionInfoDO> infos) throws Exception{
|
|
|
JSONObject jsonObject = initEntranceParam(payType,doctor,patient,diagnosisDOS);
|
|
|
String tjPrescriptionId = "";
|
|
|
WlyyPrescriptionCheckDO wlyyPrescriptionCheckDO = new WlyyPrescriptionCheckDO();
|
|
|
//如果重新审核药品 一定要把返回的orderNo的值拿到赋值到prescriptionId里
|
|
|
if (StringUtils.isNotEmpty(prescriptionId)) {
|
|
|
tjPrescriptionId = prescriptionId;
|
|
|
jsonObject.put("PATIENT_PRES_ID",tjPrescriptionId);
|
|
|
wlyyPrescriptionCheckDO = prescriptionCheckDao.findOne(prescriptionId);
|
|
|
}
|
|
|
if (null!=infos&&infos.size()>0) {
|
|
|
String response = "";
|
|
@ -3063,7 +3278,6 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
System.out.println("obj:"+obj);
|
|
|
if (StringUtils.isNotBlank(obj)) {
|
|
|
returnJson = obj;
|
|
|
wlyyPrescriptionCheckDO.setStatus(9);
|
|
|
logger.info("返回到互联网医院的解析后的结果:"+returnJson);
|
|
|
wlyyHttpLogDO.setDoctor(doctor);
|
|
|
wlyyHttpLogDO.setCreateTime(new Date());
|
|
@ -3071,10 +3285,9 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
wlyyHttpLogDO.setResponse(returnJson);
|
|
|
wlyyHttpLogDO.setName("saveCheckPrescription");
|
|
|
} else {
|
|
|
returnJson = "保存成功";
|
|
|
wlyyPrescriptionCheckDO.setStatus(10);
|
|
|
returnJson = "保存失败";
|
|
|
logger.info(returnJson);
|
|
|
wlyyHttpLogDO.setCode("success");
|
|
|
wlyyHttpLogDO.setCode("failed");
|
|
|
wlyyHttpLogDO.setDoctor(doctor);
|
|
|
wlyyHttpLogDO.setCreateTime(new Date());
|
|
|
wlyyHttpLogDO.setRequest(infos + jsonObject.toString());
|
|
@ -3100,11 +3313,9 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
public String deleteCheckInputInfo(String prescriptionId,String payType,String doctor,String patient,List<WlyyPrescriptionDiagnosisDO> diagnosisDOS) throws Exception{
|
|
|
JSONObject jsonObject = initEntranceParam(payType,doctor,patient,diagnosisDOS);
|
|
|
String tjPrescriptionId = "";
|
|
|
WlyyPrescriptionCheckDO wlyyPrescriptionCheckDO = new WlyyPrescriptionCheckDO();
|
|
|
//如果重新审核药品 一定要把返回的orderNo的值拿到赋值到prescriptionId里
|
|
|
if (StringUtils.isNotEmpty(prescriptionId)){
|
|
|
tjPrescriptionId = prescriptionId;
|
|
|
wlyyPrescriptionCheckDO = prescriptionCheckDao.findOne(tjPrescriptionId);
|
|
|
jsonObject.put("PATIENT_PRES_ID",tjPrescriptionId);
|
|
|
}
|
|
|
String response = "";
|
|
@ -3123,7 +3334,6 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
String obj = object.getString("obj");
|
|
|
System.out.println("obj:"+obj);
|
|
|
if (StringUtils.isNotBlank(obj)) { ;
|
|
|
wlyyPrescriptionCheckDO.setStatus(11);
|
|
|
returnJson = obj;
|
|
|
logger.info("返回到互联网医院的解析后的结果:"+returnJson);
|
|
|
wlyyHttpLogDO.setDoctor(doctor);
|
|
@ -3134,7 +3344,6 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
} else {
|
|
|
returnJson = "删除成功";
|
|
|
logger.info(returnJson);
|
|
|
wlyyPrescriptionCheckDO.setStatus(12);
|
|
|
wlyyHttpLogDO.setCode("删除成功");
|
|
|
wlyyHttpLogDO.setDoctor(doctor);
|
|
|
wlyyHttpLogDO.setCreateTime(new Date());
|
|
@ -3144,7 +3353,6 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
}
|
|
|
} else {
|
|
|
returnJson = "entranceUrl接口调用失败";
|
|
|
wlyyPrescriptionCheckDO.setStatus(11);
|
|
|
wlyyHttpLogDO.setCode("error");
|
|
|
wlyyHttpLogDO.setDoctor(doctor);
|
|
|
wlyyHttpLogDO.setCreateTime(new Date());
|
|
@ -3153,8 +3361,6 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
wlyyHttpLogDO.setName("deleteCheckPrescription");
|
|
|
}
|
|
|
wlyyHttpLogDao.save(wlyyHttpLogDO);
|
|
|
prescriptionCheckDao.save(wlyyPrescriptionCheckDO);
|
|
|
wlyyPrescriptionCheckDO.setReason(returnJson);
|
|
|
return returnJson;
|
|
|
|
|
|
}
|
|
@ -3163,13 +3369,16 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
//先查询处方获得支付方式
|
|
|
DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(doctor);
|
|
|
List<BaseDoctorHospitalDO> baseDoctorHospitalDO = baseDoctorHospitalDao.findByDoctorCode(doctor);
|
|
|
BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(doctor);
|
|
|
if (null != doctorMappingDO && null != baseDoctorDO) {
|
|
|
jsonObject.put("DOCTOR_ID", doctorMappingDO.getMappingCode());
|
|
|
jsonObject.put("POSITION", baseDoctorDO.getJobTitleName());
|
|
|
jsonObject.put("DOCTOR_NAME", baseDoctorDO.getName());
|
|
|
jsonObject.put("DEPT_CODE", baseDoctorDO.getVisitDept());
|
|
|
jsonObject.put("DEPT_NAME", baseDoctorDO.getVisitDeptName());
|
|
|
if (null!=baseDoctorHospitalDO&&baseDoctorHospitalDO.size()>0){
|
|
|
jsonObject.put("DEPT_CODE", baseDoctorHospitalDO.get(0).getDeptCode());
|
|
|
jsonObject.put("DEPT_NAME", baseDoctorHospitalDO.get(0).getDeptName());
|
|
|
}
|
|
|
}
|
|
|
PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(patient);
|
|
|
BasePatientDO basePatientDO = patientDao.findById(patient);
|