Pārlūkot izejas kodu

互联网医院

Trick 5 gadi atpakaļ
vecāks
revīzija
3005d65338

+ 7 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/mapping/service/PatientMappingService.java

@ -1,12 +1,15 @@
package com.yihu.jw.hospital.mapping.service;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
import com.yihu.jw.patient.dao.BasePatientDao;
import net.sf.json.JSONArray;
import com.yihu.jw.entity.hospital.mapping.PatientMappingDO;
import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
import net.sf.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@ -20,6 +23,8 @@ import java.util.Date;
@Service
public class PatientMappingService {
    private static final Logger logger = LoggerFactory.getLogger(PatientMappingService.class);
    @Autowired
    private PatientMappingDao patientMappingDao;
    @Autowired
@ -61,8 +66,9 @@ public class PatientMappingService {
    }
    public String findHisPatNoByPatient(String patient)throws Exception{
        logger.info("findHisPatNoByPatient:"+patient);
        BasePatientDO patientDO = basePatientDao.findById(patient);
        logger.info("patientDO:"+patientDO.toString());
        PatientMappingDO patientMappingDO = patientMappingDao.findByIdcardAndSource(patientDO.getIdcard(),"1");
        if(patientMappingDO!=null){

+ 9 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -61,6 +61,8 @@ import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
@ -83,6 +85,8 @@ import java.util.*;
@Transactional
public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, PrescriptionDao> {
    private static final Logger logger = LoggerFactory.getLogger(PrescriptionService.class);
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Autowired
@ -149,7 +153,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @throws Exception
     */
    public  List<WlyyOutpatientVO> findOutpatientList(String patient, String startTime, String endTime, boolean demoFlag)throws Exception{
        logger.info("findOutpatientList patient:"+patient);
        String patNo =patientMappingService.findHisPatNoByPatient(patient);
        logger.info("findOutpatientList patNo "+patNo);
        return entranceService.BS30025(patNo,null,startTime,endTime,demoFlag);
    }
@ -160,7 +166,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @return
     */
    public WlyyOutpatientVO findOutpatientInfo(String patient,String conNo)throws Exception{
        logger.info("findOutpatientList patient:"+patient);
        String patNo =patientMappingService.findHisPatNoByPatient(patient);
        logger.info("findOutpatientList patNo:"+patNo);
        List<WlyyOutpatientVO> list = entranceService.BS30025(patNo,conNo,null,null,demoFlag);
        if(list!=null&&list.size()>0){
@ -1056,6 +1064,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            prescriptionDO = new WlyyPrescriptionDO();
            prescriptionDO.setOutpatientId(outPatientId);
        }
        prescriptionDO.setCreateTime(new Date());
        prescriptionDO.setStatus(10);
        prescriptionDO.setPatientCode(outpatientDO.getPatient());
        prescriptionDO.setPatientName(outpatientDO.getPatientName());

+ 2 - 2
business/base-service/src/mqConfig/mqdata/BS15018.json

@ -1,7 +1,7 @@
{
	"code": "1",
	"MsgInfo": [{
		"PAT_NO": "P5616242-0  ",
		"PAT_NO": "P5616242-0",
		"CARD_NO": "D40136791",
		"CARD_STAT": "旧卡停用",
		"OP_DATE": "2011-09-27 15:35:57",
@ -10,7 +10,7 @@
		"social_no": "350211198411053024"
	},
	{
		"PAT_NO": "P5616242-0  ",
		"PAT_NO": "P5616242-0",
		"CARD_NO": "DA1872143",
		"CARD_STAT": "激活",
		"OP_DATE": "2014-07-25 08:46:40",

+ 1 - 1
business/base-service/src/mqConfig/mqdata/BS30025.json

@ -7,7 +7,7 @@
			"SEX": "2",
			"BIRTH_DATE": "1959/01/01 00:00:00",
			"ID_CARD": [],
			"PAT_NO": "P11160895-0   ",
			"PAT_NO": "P11160895-0",
			"ADM_DAT": "2019/06/03 01:37:52",
			"ADM_SPEC": "1190007",
			"ADM_SPEC_NAME": "急诊外科",

+ 11 - 2
server/svr-authentication/src/main/java/com/yihu/jw/security/service/OauthYlzConfigService.java

@ -14,6 +14,8 @@ import com.ylzinfo.ehc.common.utils.DateUtils;
import com.ylzinfo.ehc.trans.TransRequest;
import com.ylzinfo.ehc.trans.TransResponse;
import org.apache.commons.collections.map.HashedMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@ -31,6 +33,8 @@ import java.util.UUID;
@Transactional
public class OauthYlzConfigService {
    private static final Logger logger = LoggerFactory.getLogger(OauthYlzConfigService.class);
    @Autowired
    private OauthYlzConfigDao oauthYlzConfigDao;
    @Autowired
@ -42,9 +46,9 @@ public class OauthYlzConfigService {
    private String fastdfs_file_url;
    public Map<String,Object> getOauthQRCode(){
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findOne("ylz_config");
        try {
            OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findOne("ylz_config");
            logger.info("getOauthQRCode:",oauthYlzConfigDO.toString());
            TransRequest e = new TransRequest();
            e.setMethod("ehc.ehealthcard.authurl");
            e.setApp_id(oauthYlzConfigDO.getAppId());
@ -60,10 +64,13 @@ public class OauthYlzConfigService {
            e.setBiz_content(JSON.toJSONString(bizContent));
            EhcHandler ehcHandler = new EhcHandler(oauthYlzConfigDO.getUrl(), oauthYlzConfigDO.getAppId(), oauthYlzConfigDO.getTermId(), oauthYlzConfigDO.getAppKey());
            TransResponse re = ehcHandler.execute(e);
            String rs = com.alibaba.fastjson.JSONObject.toJSONString(re);
            logger.info("TransResponse:"+rs);
            com.alibaba.fastjson.JSONObject json = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.parse(rs);
            com.alibaba.fastjson.JSONObject biz = json.getJSONObject("biz_content");
            InputStream qrcode = QrcodeUtil.createQrcode(biz.getString("ehealth_authurl"),300,"jpg");
            logger.info("fastdfs_file_url:"+fastdfs_file_url);
            UploadVO uploadVO = fileUploadService.uploadStream(qrcode,"qrcode.jpg",fastdfs_file_url);
            Map<String,Object> map = new HashedMap();
            map.put("fileName",uploadVO.getFileName());
@ -71,6 +78,8 @@ public class OauthYlzConfigService {
            map.put("fullUrl",uploadVO.getFullUrl());
            map.put("fullUri",uploadVO.getFullUri());
            map.put("out_authorize_no",no);
            logger.info("fileUploadService:"+map.toString());
            return map;
        } catch (Exception var5) {
            var5.printStackTrace();