Explorar o código

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

Shi Kejing %!s(int64=4) %!d(string=hai) anos
pai
achega
be1253a9a5

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

@ -7530,6 +7530,108 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        return wlyyPrescriptionEmrDO;
    }
    /**
     * 门诊病历列表信息
     *
     * @param patient
     * @return
     * @throws Exception
     */
    public com.alibaba.fastjson.JSONObject outpatient(String patient) throws Exception {
        PatientMappingDO mappingDO = patientMappingDao.findByPatient(patient);
        String url = "";
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("HAI_TAI_OUTPATIENT_URL");
        if (wlyyHospitalSysDictDO != null) {
            url = wlyyHospitalSysDictDO.getDictCode();
        }
        String patNo = null;
        if (mappingDO!=null){
            patNo = mappingDO.getMappingCode();
        }
        String returnValue = "";
        Map<String, String> params = new HashedMap();
        params.put("type", "Outpatient");
        params.put("xmlStr", patNo);
        returnValue = com.yihu.jw.utils.WebserviceUtil.post(url,
                "http://business.htemr.haitaiinc.com",
                "manageDataAll",
                params);
        logger.info("门诊病历列表信息,返回值xmlstr:" + returnValue);
        XMLSerializer xmlSerializer = new XMLSerializer();
        net.sf.json.JSON json = xmlSerializer.read(returnValue);
        logger.info("返回json" + json);
        com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(json.toString());
        return object;
    }
    /**
     * 医疗文书列表信息
     * @param patient
     * @return
     * @throws Exception
     */
    public com.alibaba.fastjson.JSONObject outpmedicaldoc(String patient) throws Exception {
        PatientMappingDO mappingDO = patientMappingDao.findByPatient(patient);
        String url = "";
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("HAI_TAI_OUTPATIENT_URL");
        if (wlyyHospitalSysDictDO != null) {
            url = wlyyHospitalSysDictDO.getDictCode();
        }
        String patNo = null;
        if (mappingDO!=null){
            patNo = mappingDO.getMappingCode();
        }
        String returnValue = "";
        Map<String, String> params = new HashedMap();
        params.put("type", "Outpmedicaldoc");
        params.put("xmlStr", patNo);
        returnValue = com.yihu.jw.utils.WebserviceUtil.post(url,
                "http://business.htemr.haitaiinc.com",
                "manageDataAll",
                params);
        logger.info("门诊病历列表信息,返回值xmlstr:" + returnValue);
        XMLSerializer xmlSerializer = new XMLSerializer();
        net.sf.json.JSON json = xmlSerializer.read(returnValue);
        logger.info("返回json" + json);
        com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(json.toString());
        return object;
    }
    public com.alibaba.fastjson.JSONObject getPatInfoDataXml(String opid,String recSn) throws Exception {
        String url = "";
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("HAI_TAI_OUTPATIENT_URL");
        if (wlyyHospitalSysDictDO != null) {
            url = wlyyHospitalSysDictDO.getDictCode();
        }
        String data = null;
        if (StringUtils.isNoneBlank(opid)){
            data = "Outpatient_"+opid;
        }else if (StringUtils.isNoneBlank(recSn)){
            data = "Outpmedicaldoc_"+recSn;
        }
        String returnValue = "";
        Map<String, String> params = new HashedMap();
        params.put("type", "getPatInfoDataXml");
        params.put("data", data);
        returnValue = com.yihu.jw.utils.WebserviceUtil.post(url,
                "http://business.htemr.haitaiinc.com",
                "manageDataAll",
                params);
        logger.info("门诊病历列表信息,返回值xmlstr:" + returnValue);
        XMLSerializer xmlSerializer = new XMLSerializer();
        net.sf.json.JSON json = xmlSerializer.read(returnValue);
        logger.info("返回json" + json);
        com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(json.toString());
        return object;
    }
    public String writeOutPatient(String registerSn, String chiefComplaint, String hpi, String elapsemhis, String bodycheck, String assistanTcheck, String doctorId, String doctorName) throws Exception {
        String url = "";
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("HAI_TAI_URL");

+ 2 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java

@ -1296,6 +1296,7 @@ public class XzzxEntranceService{
                outpatientVO.setCreateTime(DateUtil.strToDate(object.getString("CREATETIME")));
                outpatientVO.setStatus(isEmty(object.getString("STATUS")));
                outpatientVO.setConNo(isEmty(object.getString("VISITNUM")));
                outpatientVO.setPatient(patient);
                wlyyOutpatientVOList.add(outpatientVO);
            }
        }
@ -1333,7 +1334,6 @@ public class XzzxEntranceService{
                outpatientVO.setOriginRegisterNo(isEmty(object.getString("ORIGINREGISTERNO")));
                outpatientVO.setDept(isEmty(object.getString("DEPT")));
                outpatientVO.setDeptName(isEmty(object.getString("DEPTNAME")));
                outpatientVO.setPatient(isEmty(object.getString("PATIENT")));
                outpatientVO.setPatientName(isEmty(object.getString("PATIENTNAME")));
                outpatientVO.setDoctor(isEmty(object.getString("DOCTOR")));
                outpatientVO.setDoctorName(isEmty(object.getString("DOCTORNAME")));
@ -1351,6 +1351,7 @@ public class XzzxEntranceService{
                outpatientVO.setHospitalName("厦门大学附属心血管病医院");
                outpatientVO.setHospital("350211A5010");
                outpatientVO.setSex(patientDO.getSex()+"");
                outpatientVO.setPatient(patient);
                outpatientVO.setBirthday(patientDO.getBirthday());
            }
        }

+ 3 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/survey/service/SurveyService.java

@ -154,7 +154,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
        }
        sql += " ORDER BY q.create_time DESC  ";
        if ("xm_ykyy_wx".equals(wxId)) {
            if (flag){
            if (!flag){
                sql ="SELECT * FROM\n" +
                        "( SELECT A.*, ROWNUM RN FROM\n" +
                        "    ("+sql+") A \n" +
@ -867,7 +867,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
        }
        sql += " ORDER BY t.create_time DESC  ";
        if ("xm_ykyy_wx".equals(wxId)) {
            if (flag){
            if (!flag){
                sql ="SELECT * FROM\n" +
                        "( SELECT A.*, ROWNUM RN FROM\n" +
                        "    ("+sql+") A \n" +
@ -954,7 +954,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
        sql += " ORDER BY t.create_time DESC " ;
        if ("xm_ykyy_wx".equals(wxId)) {
            if (flag){
            if (!flag){
                sql ="SELECT * FROM\n" +
                        "( SELECT A.*, ROWNUM RN FROM\n" +
                        "    ("+sql+") A \n" +

+ 3 - 3
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -2242,9 +2242,9 @@ public class ImService {
			if (map.get("patientIdcard")!=null){
				String idcard = map.get("patientIdcard").toString();
				Integer age = IdCardUtil.getAgeForIdcard(idcard);
				map.put("age",age);
				map.put("patientAge",age);
			}else {
				map.put("age",null);
				map.put("patientAge",null);
			}
		}
		return mapList;
@ -2921,7 +2921,7 @@ public class ImService {
					"wlyy_consult_team b," +
					"base_patient d  " +
					" WHERE a.id=b.consult " +
					" AND b.patient=d.id AND b.doctor='" + doctorCode + "' AND b.type in (1,15) and b.status = 0 and a.pay_status=1 " +
					" AND b.patient=d.id AND b.doctor='" + doctorCode + "' AND b.type in (1,15,17) and b.status = 0 and a.pay_status=1 " +
					" ORDER BY a.czrq desc ";
		List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(sql);
		Long consultCount = 0l;

+ 3 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -474,6 +474,9 @@ public class BaseHospitalRequestMapping {
        public static final String findAllAttentionDoctor="/findAllAttentionDoctor";
        public static final String findHisEmr="/findHisEmr";
        public static final String findHisEmrXml= "/findHisEmrXml";
        public static final String outpatient="/outpatient";
        public static final String outpmedicaldoc="/outpmedicaldoc";
        public static final String getPatInfoDataXml="/getPatInfoDataXml";
        public static final String findTown="/findTown";

+ 1 - 1
server/svr-authentication/src/main/resources/bootstrap.yml

@ -82,7 +82,7 @@ spring:
  profiles: jwOracleProd
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://192.168.33.197:1221}
      uri: ${wlyy.spring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:

+ 1 - 1
server/svr-configuration/src/main/resources/bootstrap.yml

@ -96,7 +96,7 @@ spring:
      failFast: true #启动快速失败 即链接不到配置服务就启动失败
      server:
        git:
          uri: ${wlyy.spring.config.git.uri:http://192.168.33.197:3001/jkzl/ehr.config.git}
          uri: ${wlyy.spring.config.git.uri:http://127.0.0.1:3001/jkzl/ehr.config.git}
          basedir: /usr/local/wlyy2.0-config
        default-label: ${wlyy.spring.config.git.label:master}
---

+ 1 - 1
svr/svr-base/src/main/resources/bootstrap.yml

@ -55,7 +55,7 @@ spring:
  profiles: jwOracleProd
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://192.168.33.197:1221}
      uri: ${wlyy.spring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:

+ 38 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -1790,6 +1790,44 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
        }
    }
    @GetMapping(value= BaseHospitalRequestMapping.Prescription.outpatient)
    @ApiOperation("门诊病历列表信息")
    public ObjEnvelop outpatient(
            @ApiParam(name = "patient", value = "patient", required = true)
            @RequestParam(required = true)String patient) throws Exception {
        try {
            return ObjEnvelop.getSuccess("ok",prescriptionService.outpatient(patient));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value= BaseHospitalRequestMapping.Prescription.outpmedicaldoc)
    @ApiOperation("医疗文书列表信息")
    public ObjEnvelop outpmedicaldoc(
            @ApiParam(name = "patient", value = "patient", required = true)
            @RequestParam(required = true)String patient) throws Exception {
        try {
            return ObjEnvelop.getSuccess("ok",prescriptionService.outpmedicaldoc(patient));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value= BaseHospitalRequestMapping.Prescription.getPatInfoDataXml)
    @ApiOperation("获取病历的PDF流")
    public ObjEnvelop getPatInfoDataXml(
            @ApiParam(name = "opid", value = "门诊病历", required = false)
            @RequestParam(required = false)String opid,
            @ApiParam(name = "recSn", value = "医疗文书", required = false)
            @RequestParam(required = false)String recSn) throws Exception {
        try {
            return ObjEnvelop.getSuccess("ok",prescriptionService.getPatInfoDataXml(opid,recSn));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value= BaseHospitalRequestMapping.Prescription.saveEmr)
    @ApiOperation("写入his电子病历")
    public ObjEnvelop findHisEmr(

+ 7 - 5
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/QrcodeService.java

@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import sun.plugin2.message.Message;
import javax.transaction.Transactional;
import java.io.InputStream;
@ -161,7 +162,7 @@ public class QrcodeService {
     * @param token
     * @throws
     */
    public String makeQrcodeFromWeiXin(String content, String fileName, String token) throws Exception {
    public String makeQrcodeFromWeiXin(String content, String fileName, String token)  {
        try {
            String token_url = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=" + token;
            String params = "{\"action_name\": \"QR_LIMIT_STR_SCENE\", \"action_info\": {\"scene\": {\"scene_str\": \"" + content + "\"}}}";
@ -204,15 +205,16 @@ public class QrcodeService {
                    return uploadVO.getFullUri();
                } else {
                    throw new Exception("请求微信生成二维码失败!");
            }
                    System.out.println("请求微信生成二维码失败!");
                }
            } else {
                throw new Exception("请求微信生成二维码失败!");
                System.out.println("请求微信生成二维码失败!");
            }
        } catch (Exception e) {
            e.printStackTrace();
            throw new Exception(e.getMessage());
            System.out.println(e.getMessage());
        }
        return content;
    }
}

+ 1 - 1
svr/svr-internet-hospital/src/main/resources/bootstrap.yml

@ -65,7 +65,7 @@ spring:
  profiles: jwOracleProd
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://192.168.33.197:1221}
      uri: ${wlyy.spring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---
spring: