|
@ -10145,14 +10145,18 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
Map<String, Object> map = sendHisDiagnosis(jsonData, outpatientDO, wlyyPrescriptionDO);
|
|
Map<String, Object> map = sendHisDiagnosis(jsonData, outpatientDO, wlyyPrescriptionDO);
|
|
//处方签名
|
|
//处方签名
|
|
logger.info("处方签名");
|
|
logger.info("处方签名");
|
|
SOF_SignDataWithExtraInfo(wlyyPrescriptionDO);
|
|
|
|
|
|
try {
|
|
|
|
SOF_SignDataWithExtraInfo(wlyyPrescriptionDO,outpatientDO);
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
//同步电子病历
|
|
//同步电子病历
|
|
WlyyPrescriptionEmrDO prescriptionEmrDO = prescriptionEmrDao.findEmrByPrescriptionId(prescriptionId);
|
|
WlyyPrescriptionEmrDO prescriptionEmrDO = prescriptionEmrDao.findEmrByPrescriptionId(prescriptionId);
|
|
if (prescriptionEmrDO != null) {
|
|
if (prescriptionEmrDO != null) {
|
|
String doctorId = doctorMappingDO.getMappingCode();
|
|
String doctorId = doctorMappingDO.getMappingCode();
|
|
String doctorName = doctorMappingDO.getDoctorName();
|
|
String doctorName = doctorMappingDO.getDoctorName();
|
|
logger.info("电子病历签名");
|
|
logger.info("电子病历签名");
|
|
SOF_SignDataWithExtraInfoEmr(prescriptionEmrDO);
|
|
|
|
|
|
SOF_SignDataWithExtraInfoEmr(prescriptionEmrDO,outpatientDO);
|
|
writeOutPatient(outpatientDO.getRegisterNo(), prescriptionEmrDO.getComplaint(), prescriptionEmrDO.getMedicalHistory(), prescriptionEmrDO.getPastHistory(), prescriptionEmrDO.getPhysicalExamination(), prescriptionEmrDO.getAssistExamination(), doctorId, doctorName);
|
|
writeOutPatient(outpatientDO.getRegisterNo(), prescriptionEmrDO.getComplaint(), prescriptionEmrDO.getMedicalHistory(), prescriptionEmrDO.getPastHistory(), prescriptionEmrDO.getPhysicalExamination(), prescriptionEmrDO.getAssistExamination(), doctorId, doctorName);
|
|
}
|
|
}
|
|
if (map.get("code").toString().equalsIgnoreCase("1")) {
|
|
if (map.get("code").toString().equalsIgnoreCase("1")) {
|
|
@ -10206,8 +10210,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, voucherNo, applyDepaName, applyDoctorName, recipeTime, free, "1","WX_PUB");
|
|
ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, voucherNo, applyDepaName, applyDoctorName, recipeTime, free, "1","WX_PUB");
|
|
}
|
|
}
|
|
if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)){
|
|
if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)){
|
|
String msgUrl="https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/prescriptionDetail?outpatientId="+outpatientDO.getId()+"&id="+prescriptionId;
|
|
|
|
sendZsMsgFlow("OL_JSTX",outpatientDO.getId(),prescriptionId,msgUrl,"结算提醒");
|
|
|
|
|
|
/* String msgUrl="https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/prescriptionDetail?outpatientId="+outpatientDO.getId()+"&id="+prescriptionId;
|
|
|
|
sendZsMsgFlow("OL_JSTX",outpatientDO.getId(),prescriptionId,msgUrl,"结算提醒");*/
|
|
}
|
|
}
|
|
}else {
|
|
}else {
|
|
throw new Exception(map.get("mes").toString());
|
|
throw new Exception(map.get("mes").toString());
|
|
@ -11581,15 +11585,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
* @param prescriptionDO
|
|
* @param prescriptionDO
|
|
* @throws Exception
|
|
* @throws Exception
|
|
*/
|
|
*/
|
|
public void SOF_SignDataWithExtraInfo(WlyyPrescriptionDO prescriptionDO) throws Exception {
|
|
|
|
|
|
public void SOF_SignDataWithExtraInfo(WlyyPrescriptionDO prescriptionDO,WlyyOutpatientDO outpatientDO) throws Exception {
|
|
DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(prescriptionDO.getDoctor());
|
|
DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(prescriptionDO.getDoctor());
|
|
BaseDoctorDO doctorDO = baseDoctorDao.findById(prescriptionDO.getDoctor());
|
|
BaseDoctorDO doctorDO = baseDoctorDao.findById(prescriptionDO.getDoctor());
|
|
BasePatientDO patientDO = basePatientDao.findById(prescriptionDO.getPatientCode());
|
|
BasePatientDO patientDO = basePatientDao.findById(prescriptionDO.getPatientCode());
|
|
WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
|
|
|
|
|
|
//WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
|
|
PKIService_ServiceLocator locator = new PKIService_ServiceLocator();
|
|
PKIService_ServiceLocator locator = new PKIService_ServiceLocator();
|
|
URL portAddress = new URL("http://192.0.33.91:8080/pkis/services/v1?wsdl");
|
|
URL portAddress = new URL("http://192.0.33.91:8080/pkis/services/v1?wsdl");
|
|
PKIService_PortType service = locator.getPKIServiceImplPort(portAddress);
|
|
PKIService_PortType service = locator.getPKIServiceImplPort(portAddress);
|
|
WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
|
|
|
|
List<WlyyPrescriptionInfoDO> infoDOS = prescriptionInfoDao.findByPrescriptionId(prescriptionDO.getId(), 1);
|
|
List<WlyyPrescriptionInfoDO> infoDOS = prescriptionInfoDao.findByPrescriptionId(prescriptionDO.getId(), 1);
|
|
List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(prescriptionDO.getId(), 1);
|
|
List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(prescriptionDO.getId(), 1);
|
|
|
|
|
|
@ -11616,9 +11619,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
extInfoMap.put("deptName", "部门");
|
|
extInfoMap.put("deptName", "部门");
|
|
extInfoMap.put("patientName", patientDO!=null?patientDO.getName():null);
|
|
extInfoMap.put("patientName", patientDO!=null?patientDO.getName():null);
|
|
extInfoMap.put("patientSex", patientDO!=null?IdCardUtil.getSexForIdcard(patientDO.getIdcard()):null);
|
|
extInfoMap.put("patientSex", patientDO!=null?IdCardUtil.getSexForIdcard(patientDO.getIdcard()):null);
|
|
extInfoMap.put("hospitalNo", wlyyOutpatientDO!=null?wlyyOutpatientDO.getOriginAdmNo():null);
|
|
|
|
extInfoMap.put("hospitalNumber", wlyyOutpatientDO!=null?wlyyOutpatientDO.getOriginConNo():null);
|
|
|
|
extInfoMap.put("diagnostic", wlyyOutpatientDO!=null?wlyyOutpatientDO.getIcd10Name():null);
|
|
|
|
|
|
extInfoMap.put("hospitalNo", outpatientDO!=null?outpatientDO.getOriginAdmNo():null);
|
|
|
|
extInfoMap.put("hospitalNumber", outpatientDO!=null?outpatientDO.getOriginConNo():null);
|
|
|
|
extInfoMap.put("diagnostic", outpatientDO!=null?outpatientDO.getIcd10Name():null);
|
|
String extInfo = org.apache.commons.codec.binary.Base64.encodeBase64String(JSON.toJSONString(extInfoMap).getBytes("GBK"));
|
|
String extInfo = org.apache.commons.codec.binary.Base64.encodeBase64String(JSON.toJSONString(extInfoMap).getBytes("GBK"));
|
|
String result = service.SOF_SignDataWithExtraInfo(idCardNo, inData, extInfo);
|
|
String result = service.SOF_SignDataWithExtraInfo(idCardNo, inData, extInfo);
|
|
logger.info("请求返参"+result);
|
|
logger.info("请求返参"+result);
|
|
@ -11649,12 +11652,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
* @param prescriptionEmrDO
|
|
* @param prescriptionEmrDO
|
|
* @throws Exception
|
|
* @throws Exception
|
|
*/
|
|
*/
|
|
public void SOF_SignDataWithExtraInfoEmr(WlyyPrescriptionEmrDO prescriptionEmrDO) throws Exception {
|
|
|
|
|
|
public void SOF_SignDataWithExtraInfoEmr(WlyyPrescriptionEmrDO prescriptionEmrDO,WlyyOutpatientDO wlyyOutpatientDO) throws Exception {
|
|
WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(prescriptionEmrDO.getPrescriptionId());
|
|
WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(prescriptionEmrDO.getPrescriptionId());
|
|
DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(prescriptionDO.getDoctor());
|
|
DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(prescriptionDO.getDoctor());
|
|
BaseDoctorDO doctorDO = baseDoctorDao.findById(prescriptionDO.getDoctor());
|
|
BaseDoctorDO doctorDO = baseDoctorDao.findById(prescriptionDO.getDoctor());
|
|
BasePatientDO patientDO = basePatientDao.findById(prescriptionDO.getPatientCode());
|
|
BasePatientDO patientDO = basePatientDao.findById(prescriptionDO.getPatientCode());
|
|
WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
|
|
|
|
PKIService_ServiceLocator locator = new PKIService_ServiceLocator();
|
|
PKIService_ServiceLocator locator = new PKIService_ServiceLocator();
|
|
URL portAddress = new URL("http://192.0.33.91:8080/pkis/services/v1?wsdl");
|
|
URL portAddress = new URL("http://192.0.33.91:8080/pkis/services/v1?wsdl");
|
|
PKIService_PortType service = locator.getPKIServiceImplPort(portAddress);
|
|
PKIService_PortType service = locator.getPKIServiceImplPort(portAddress);
|