4 Commits 841c57911e ... 34796c20b2

Author SHA1 Message Date
  wangzhinan 34796c20b2 三院问题处理 2 months ago
  wangzhinan 2beae3d3fc Merge branch '2.0' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into 2.0 2 months ago
  wangzhinan 44aaa37357 Merge branch '2.0' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into 2.0 2 months ago
  wangzhinan df413e8d80 三院问题处理 2 months ago

+ 23 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/DsyyPrescriptionService.java

@ -258,6 +258,22 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                wlyyPrescriptionVO.setInfoVOs(wlyyPrescriptionInfoVOList);
            }
            //病历
            JSONArray emrArray = dsyyEntranceService.selectHistoryEmrFromEntrance(patNo,registerSn);
            for (int z=0;z<emrArray.size();z++){
                JSONObject object = emrArray.getJSONObject(i);
                String PATIENT = object.getString("PATIENT");
                String OPID = object.getString("OPID");
                String res = selectHistoryEmrRecord(PATIENT,OPID);
                JSONArray emrList = JSONArray.parseArray(res);
                if (emrList!=null&&emrList.size()!=0){
                    JSONObject emrJson = emrList.getJSONObject(0);
                    WlyyPrescriptionEmrDO prescriptionEmrDO = new WlyyPrescriptionEmrDO();
                    wlyyPrescriptionVO.setWlyyPrescriptionEmrDO(prescriptionEmrDO);
                }
            }
            //检查检验内容
           /* String inspectObj = hcyyEntranceService.getOutpatientCheckTestInfo(registerSn,patNo,admNo,realOrder,null,null);
@ -283,6 +299,7 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            wlyyPrescriptionVO.setInspectionVOs(wlyyInspectionVOList);*/
            prescriptionVOList.add(wlyyPrescriptionVO);
        }
        return prescriptionVOList;
    }
@ -1136,14 +1153,17 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
           JSONObject object = array.getJSONObject(i);
           String PATIENT = object.getString("PATIENT");
           String OPID = object.getString("OPID");
           String res = selectHistoryEmrRecordJcpt(PATIENT,OPID);
           if (StringUtils.isNoneBlank(res)){
           String res = selectHistoryEmrRecord(PATIENT,OPID);
           if (StringUtils.isNoneBlank(res)&&!res.equalsIgnoreCase("[]")){
               jsonArray.add(object);
           }
       }
        return jsonArray;
       return jsonArray;
    }
    /**
     * 查询历次就诊门诊病历文书集成平台
     * @param patientId 病人id

+ 31 - 25
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/DsyyEntranceService.java

@ -675,7 +675,7 @@ public class DsyyEntranceService {
     * @return
     * @throws Exception
     */
    public JSONArray selectHistoryEmrFromEntrance(String patientId,String eventNo) throws Exception {
    public JSONArray selectHistoryEmrFromEntrance(String patientId,String registerNo) throws Exception {
        PatientMappingDO mappingDO = patientMappingDao.findByPatient(patientId);
        String patient = null;
        if (mappingDO!=null){
@ -712,6 +712,9 @@ public class DsyyEntranceService {
        if (StringUtils.isNoneBlank(patient)){
            sql +=" and PATIENT ='"+patient+"' ";
        }
        if (StringUtils.isNoneBlank(registerNo)){
            sql +=" and REGISTERNO ='"+registerNo+"' ";
        }
        sql +=" order BY createTime desc ";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
@ -2993,30 +2996,33 @@ public class DsyyEntranceService {
    }
    public JSONArray selectEmrInfoIdAndVisitNo(String patientId,String visitNo) throws Exception {
        String url = "HTTP://10.95.8.41:51221";
        String xml = "{\n" +
                "    \"serverCode\": \"JHIDS-USD-HLWMZBL-012\",\n" +
                "    \"sysCode\": \"HLW\",\n" +
                "    \"pageSize\": \"10\",\n" +
                "    \"pageNo\": \"1\",\n" +
                "  \t\"orders\": [\n" +
                "\t\n" +
                "\t],\n" +
                "\t\"condition\": [\n" +
                "\t\t{\n" +
                "\t\t\t\"column\": \"PATIENT_ID\",\n" +
                "\t\t\t\"type\": \"eq\",\n" +
                "\t\t\t\"value\": \""+patientId+"\"\n" +
                "\t\t},\n" +
                "        \t{\n" +
                "\t\t\t\"column\": \"VISIT_ID\",\n" +
                "\t\t\t\"type\": \"eq\",\n" +
                "\t\t\t\"value\": \""+visitNo+"\"\n" +
                "\t\t}\n" +
                "\t]\n" +
                "}";
        String url = "http://10.95.8.41:51225";
        JSONObject data = new JSONObject();
        JSONArray orders = new JSONArray();
        JSONArray condition = new JSONArray();
        data.put("serverCode","JHIDS-USD-HLWMZBL-014");
        data.put("sysCode","HLW");
        data.put("pageSize",1);
        data.put("pageNo",1);
        data.put("orders",orders);
        if (StringUtils.isNoneBlank(patientId)){
            JSONObject item = new JSONObject();
            item.put("column","PATIENT_ID");
            item.put("type","eq");
            item.put("value",patientId);
            condition.add(item);
        }
        if (StringUtils.isNoneBlank(visitNo)){
            JSONObject item = new JSONObject();
            item.put("column","VISIT_ID");
            item.put("type","eq");
            item.put("value",visitNo);
            condition.add(item);
        }
        data.put("condition",condition);
        String xml = data.toJSONString();
        logger.info("xml"+xml);
        String response = httpClientUtil.postHeadBodyText(url,xml);
        String response = httpClientUtil.postHeadBodyText2(url,xml);
        logger.info("response===="+response);
        JSONArray jsonArray =new JSONArray();
        Object json = JSON.parse(response);
@ -3077,7 +3083,7 @@ public class DsyyEntranceService {
        }
        if (StringUtils.isNoneBlank(visitNo)){
            JSONObject item = new JSONObject();
            item.put("column","VISIT_NO");
            item.put("column","VISIT_ID");
            item.put("type","eq");
            item.put("value",visitNo);
            condition.add(item);

+ 1 - 0
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -1492,6 +1492,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                                }
                            }
                        }
                        wlyyOutpatientDO = outpatientDao.findById(ylzMedicalRelationDO.getRelationCode()).orElse(null);
                    }
                    if (wlyyOutpatientDO!=null){
                        String msg = "";