|
@ -22,6 +22,7 @@ import com.yihu.jw.entity.hospital.httplog.WlyyHttpLogDO;
|
|
|
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
|
|
|
import com.yihu.jw.entity.hospital.mapping.PatientMappingDO;
|
|
|
import com.yihu.jw.entity.hospital.prescription.*;
|
|
|
import com.yihu.jw.entity.third.ylzinfo.OauthYlzConfigDO;
|
|
|
import com.yihu.jw.hospital.dict.WlyyChargeDictDao;
|
|
|
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
|
|
|
import com.yihu.jw.hospital.healthCare.YlzMedicailIcdDao;
|
|
@ -49,6 +50,10 @@ import com.yihu.jw.utils.dsyyUtil.WritebackCvalueInterfaceLocator;
|
|
|
import com.yihu.jw.utils.dsyyUtil.ZoesoftHipServiceLocator;
|
|
|
import com.yihu.jw.utils.hibernate.HibenateUtils;
|
|
|
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
|
|
|
import com.ylzinfo.ehc.EhcHandler;
|
|
|
import com.ylzinfo.ehc.common.utils.DateUtils;
|
|
|
import com.ylzinfo.ehc.trans.TransRequest;
|
|
|
import com.ylzinfo.ehc.trans.TransResponse;
|
|
|
import net.sf.json.xml.XMLSerializer;
|
|
|
import org.apache.commons.codec.binary.Base64;
|
|
|
import org.apache.commons.collections.map.HashedMap;
|
|
@ -85,20 +90,11 @@ public class DsyyEntranceService {
|
|
|
@Autowired
|
|
|
private DictHospitalDeptDao dictHospitalDeptDao;
|
|
|
@Autowired
|
|
|
private DictDoctorDutyDao dictDoctorDutyDao;
|
|
|
@Autowired
|
|
|
private WlyyChargeDictDao chargeDictDao;
|
|
|
@Autowired
|
|
|
private BaseDoctorDao doctorDao;
|
|
|
@Autowired
|
|
|
private BaseDoctorHospitalDao doctorHospitalDao;
|
|
|
@Autowired
|
|
|
private BaseDoctorRoleDao doctorRoleDao;
|
|
|
@Autowired
|
|
|
private DoctorMappingDao doctorMappingDao;
|
|
|
|
|
|
@Autowired
|
|
|
private BasePatientWechatDao basePatientWechatDao;
|
|
|
@Autowired
|
|
|
private HttpClientUtil httpClientUtil;
|
|
|
@Autowired
|
|
@ -116,10 +112,6 @@ public class DsyyEntranceService {
|
|
|
@Autowired
|
|
|
private PrescriptionInfoDao prescriptionInfoDao;
|
|
|
@Autowired
|
|
|
private WlyyInspectionDao wlyyInspectionDao;
|
|
|
@Autowired
|
|
|
private PrescriptionDiagnosisDao prescriptionDiagnosisDao;
|
|
|
@Autowired
|
|
|
private BaseDoctorDao baseDoctorDao;
|
|
|
@Autowired
|
|
|
private BasePatientDao basePatientDao;
|
|
@ -142,9 +134,9 @@ public class DsyyEntranceService {
|
|
|
@Autowired
|
|
|
private YlzMedicailMxDao ylzMedicailMxDao;
|
|
|
@Autowired
|
|
|
private YlzMedicailRelationInvoiceDao invoiceDao;
|
|
|
@Autowired
|
|
|
private YlzMedicailRelationDao ylzMedicailRelationDao;
|
|
|
@Autowired
|
|
|
private OauthYlzConfigDao oauthYlzConfigDao;
|
|
|
|
|
|
private static String key="5aKX8TLoagFbQiQFFEfRbxr5ClB3P/HG";
|
|
|
|
|
@ -671,7 +663,6 @@ public class DsyyEntranceService {
|
|
|
/**
|
|
|
* 获取历史病历
|
|
|
* @param patientId
|
|
|
* @param eventNo
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
@ -4121,4 +4112,34 @@ public class DsyyEntranceService {
|
|
|
|
|
|
|
|
|
//=============================电子发票结束===================================
|
|
|
|
|
|
|
|
|
//==============================易联众扫码====================================
|
|
|
public String getPersonInfoByCode(String ehealthCode) throws Exception {
|
|
|
OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_dzjkk_config").orElse(null);
|
|
|
TransRequest request = new TransRequest();
|
|
|
request.setMethod("ehc.ehealthcode.verify");
|
|
|
request.setApp_id(oauthYlzConfigDO.getAppId());
|
|
|
request.setTerm_id(oauthYlzConfigDO.getTermId());
|
|
|
request.setVersion("X.M.0.1");
|
|
|
request.setTimestamp(DateUtils.getOutTradeTime());
|
|
|
request.setSign_type(oauthYlzConfigDO.getSignType());
|
|
|
request.setEnc_type(oauthYlzConfigDO.getEncType());
|
|
|
JSONObject bizContent = new JSONObject();
|
|
|
bizContent.put("ehealth_code",ehealthCode);
|
|
|
bizContent.put("out_verify_time", DateUtils.getOutTradeTime());
|
|
|
bizContent.put("out_verify_no", DateUtils.getOutTradeTime());
|
|
|
bizContent.put("operator_id", "001");
|
|
|
bizContent.put("operator_name", "测试员");
|
|
|
bizContent.put("treatment_code", "030201");
|
|
|
bizContent.put("business_type","01103");
|
|
|
request.setBiz_content(JSONObject.toJSONString(bizContent));
|
|
|
EhcHandler ehcHandler = new EhcHandler(oauthYlzConfigDO.getUrl(), oauthYlzConfigDO.getAppId(), oauthYlzConfigDO.getTermId(), oauthYlzConfigDO.getAppKey());
|
|
|
TransResponse re = ehcHandler.execute(request);
|
|
|
String rs = com.alibaba.fastjson.JSONObject.toJSONString(re);
|
|
|
logger.info("checkOauthQRCode TransResponse :"+DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss:SSS")+" "+rs);
|
|
|
|
|
|
com.alibaba.fastjson.JSONObject json = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.parse(rs);
|
|
|
return rs;
|
|
|
}
|
|
|
}
|