6 Commits 9d51187c5e ... d8b45632d6

Author SHA1 Message Date
  wsl d8b45632d6 Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev 2 years ago
  wsl 1359bd1614 1 2 years ago
  wangzhinan fec05d677d Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev 2 years ago
  wangzhinan db704706bc 添加工具类判断节假日 2 years ago
  chinawu123 9bc8104164 Merge branch 'dev' of chinawu123/wlyy2.0 into dev 2 years ago
  wangzhinan 3f463d62cc 添加工具类判断节假日 2 years ago

+ 33 - 11
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/HcyyEntranceService.java

@ -130,6 +130,8 @@ public class HcyyEntranceService {
    private static String caKey = "bvvsf3JA0mUXMU+mVnMaOQ==";
    private static String checkKey = "ydxtMEQmPymRtfz15lW76Tne88pHcuAU8WygMu/TrTKPRY5G7jttcg==";
    //发送微信模板消息
    /*@Value("${wechat.url}")*/
    private String sendMessageUrl="http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage";
@ -2449,10 +2451,12 @@ public class HcyyEntranceService {
    public String initParams(String serviceCode,String payType,String patient,String doctor,List<WlyyPrescriptionInfoDO> infos,List<WlyyPrescriptionDiagnosisDO> diagnosisDOS,String outpatientId) throws Exception {
    public String initParams(String hisId,String serviceCode,String payType,String patient,String doctor,List<WlyyPrescriptionInfoDO> infos,List<WlyyPrescriptionDiagnosisDO> diagnosisDOS,String outpatientId) throws Exception {
        String xml ="";
        String hisId = UUID.randomUUID().toString();
        if (!StringUtils.isNoneBlank(hisId)){
            hisId = UUID.randomUUID().toString();
        }
        PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(patient);
        if (patientMappingDO == null){
            return "患者信息映射表为空";
@ -2605,7 +2609,7 @@ public class HcyyEntranceService {
                    "   </opt_diagnosis>  ";
            prescriptionDiagnoses += prescriptionDiagnose;
        }
        String cancelPrescription = "<opt_prescriptions>  \n" +
        String savePrescription = "<opt_prescriptions>  \n" +
                "       <opt_prescription>  \n" +
                "           <opt_prescription_info>  \n" +
                "               <recipe_id><![CDATA["+hisId+"]]></recipe_id>  \n" +
@ -2632,11 +2636,14 @@ public class HcyyEntranceService {
        if (serviceCode.equals("GY_V4_FLEXIBLE") || serviceCode.equals("GY_SF_V4")){
            xml = "<root>" + base + optPatient + prescriptions + diagnoses + "</root>";
        }
        if (serviceCode.equalsIgnoreCase("submitRecipe")){
            xml ="<root>"+ base+ savePrescription+" </root>";
        }
        else if (serviceCode.equals("SF_V4_VALID_FLAG")){
            xml = "<root>" + base + cancelPrescription + "</root>";
            xml = "<root>" + base + savePrescription + "</root>";
        }
        else if (serviceCode.equals("CANCEL_GROUP_DRUG_V4")){
            xml = "<root>" + base + doctors + cancelPrescription + "</root>";
            xml = "<root>" + base + doctors + savePrescription + "</root>";
        }
     /*   else if (serviceCode.equals("SF_V4_DOUBLE_SIGN")){
            xml = "<root>" + base + doctors + feedback + "</root>";
@ -2662,7 +2669,7 @@ public class HcyyEntranceService {
                "   <serverName>"+serviceCode+"</serverName>  " +
                "   <format>xml</format>" +
                "   <callOperator></callOperator> " +
                "   <certificate>"+caKey+"</certificate> " +
                "   <certificate>"+checkKey+"</certificate> " +
                "</root>";
        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                jsonData;
@ -2696,12 +2703,27 @@ public class HcyyEntranceService {
            return "诊断信息为空";
        }
            String xml = "";
            xml = initParams("GY_SF_V4",payType, patient, doctor, infos, diagnosisDOS,outpatientId);
            xml = initParams(hisId,"GY_SF_V4",payType, patient, doctor, infos, diagnosisDOS,outpatientId);
            String response = checkPrescription("GY_SF_V4", xml, "合理用药审查");
        return response;
    }
    public String saveCheckPrescriptions(String hisId, String payType, String patient, String doctor,List<WlyyPrescriptionInfoDO> infos, List<WlyyPrescriptionDiagnosisDO> diagnosisDOS,String outpatientId) throws Exception {
        if (null == infos || infos.size() == 0) {
            return "药品信息为空";
        }
        if (diagnosisDOS == null || diagnosisDOS.size() == 0){
            return "诊断信息为空";
        }
        String xml = "";
        xml = initParams(hisId,"submitRecipe",payType, patient, doctor, infos, diagnosisDOS,outpatientId);
        String response = checkPrescription("submitRecipe", xml, "合理用药审查");
        return response;
    }
    //处方在医生站系统成功保存后调用
    public String saveCheck(String outpatient, String hisId, String payType, String patient, String doctor,List<WlyyPrescriptionInfoDO> infos, List<WlyyPrescriptionDiagnosisDO> diagnosisDOS) throws Exception {
        if (infos == null || infos.size() == 0) {
@ -2712,7 +2734,7 @@ public class HcyyEntranceService {
        }
            String xml = null;
            try {
                xml = initParams("GY_SF_V4", payType, patient, doctor, infos, diagnosisDOS,outpatient);
                xml = initParams("","GY_SF_V4", payType, patient, doctor, infos, diagnosisDOS,outpatient);
            } catch (Exception e) {
                e.printStackTrace();
            }
@ -2730,7 +2752,7 @@ public class HcyyEntranceService {
        }
            String xml = null;
            try {
                xml = initParams("SF_V4_VALID_FLAG",payType, patient, doctor, infos, diagnosisDOS,outpatient);
                xml = initParams("","SF_V4_VALID_FLAG",payType, patient, doctor, infos, diagnosisDOS,outpatient);
            } catch (Exception e) {
                e.printStackTrace();
            }
@ -2748,7 +2770,7 @@ public class HcyyEntranceService {
        }
            String xml = null;
            try {
                xml = initParams("CANCEL_GROUP_DRUG_V4",payType, patient, doctor, infos, diagnosisDOS,outpatient);
                xml = initParams("","CANCEL_GROUP_DRUG_V4",payType, patient, doctor, infos, diagnosisDOS,outpatient);
            } catch (Exception e) {
                e.printStackTrace();
            }
@ -2766,7 +2788,7 @@ public class HcyyEntranceService {
        }
            String xml = null;
            try {
                xml = initParams("SF_V4_DOUBLE_SIGN",payType, patient, doctor, infos, diagnosisDOS,outpatient);
                xml = initParams("","SF_V4_DOUBLE_SIGN",payType, patient, doctor, infos, diagnosisDOS,outpatient);
            } catch (Exception e) {
                e.printStackTrace();
            }

+ 5 - 5
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/statistics/StatisticsService.java

@ -1413,10 +1413,10 @@ public class StatisticsService {
        String sql = " SELECT count(id) from base_life_care_order WHERE  `status` = 2 and  TIMESTAMPDIFF(SECOND,create_time,conclusion_time) < 43200";
        Integer integer = jdbcTemplate.queryForObject(sql, Integer.class);
        if (saveModel2.getResult2().longValue()==0) {
            if (Integer.parseInt(res.get("orderNum").toString())==0) {
            res.put("serviceRate",0);
        }else {
            res.put("serviceRate",integer/saveModel2.getResult2().longValue()*100);
            res.put("serviceRate",String.format("%.2f",Long.parseLong(integer.toString())/Long.parseLong(res.get("orderNum").toString())*100));
        }
        return res;
@ -2364,12 +2364,12 @@ public class StatisticsService {
        Integer integer = jdbcTemplate.queryForObject(sql, Integer.class);
        if (saveModel.getResult2().longValue()==0) {
        if (Integer.parseInt(res.get("emeWarnTotal").toString())==0) {
            res.put("serviceRate",0);
        }else {
            res.put("serviceRate",integer/saveModel.getResult2().longValue()*100);
            res.put("serviceRate", String.format("%.2f",(Double.parseDouble(integer.toString())/Double.parseDouble(res.get("emeWarnTotal").toString()))*100));
        }
        logger.info("二十四小时:"+integer +"  "+res.get("emeWarnTotal")+"  "+String.format("%.2f",(Double.parseDouble(integer.toString())/Double.parseDouble(res.get("emeWarnTotal").toString()))*100) );
        return res;
    }

+ 1 - 1
svr/svr-internet-hospital-entrance/pom.xml

@ -110,7 +110,7 @@
        </dependency>
        <!-- Jzkl Starter -->
        <dependency>
            <groupId>com.yihu</groupId>
            <groupId>com.yihu.jw</groupId>
            <artifactId>swagger-starter</artifactId>
            <version>2.0.0</version>
        </dependency>

+ 5 - 0
svr/svr-internet-hospital-entrance/src/main/resources/application.yml

@ -65,6 +65,11 @@ testPattern:
wlyy:
  url: http://www.xmtyw.cn/wlyytest/
swagger:
  basic:
    enable: true
    username: jw
    password: jkzl
---
spring:
  profiles: jwdev

+ 1 - 1
svr/svr-internet-hospital-job/pom.xml

@ -87,7 +87,7 @@
        </dependency>
        <!-- Jzkl Starter -->
        <dependency>
            <groupId>com.yihu</groupId>
            <groupId>com.yihu.jw</groupId>
            <artifactId>swagger-starter</artifactId>
            <version>2.0.0</version>
        </dependency>

+ 5 - 1
svr/svr-internet-hospital-job/src/main/resources/application.yml

@ -58,7 +58,11 @@ FileTempPath:
#  instance:
#    prefer-ip-address: false
#    instance-id: ${spring.cloud.client.ipAddress}:${server.port}
swagger:
  basic:
    enable: true
    username: jw
    password: jkzl
---
spring:
  profiles: jwdev

+ 44 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/HcyyPrescriptionCotroller.java

@ -646,8 +646,9 @@ public class HcyyPrescriptionCotroller extends EnvelopRestEndpoint {
        return success(hcyyEntranceService.checkPrescriptions(prescriptionOnly,payType,patient,doctor,wlyyPrescriptionInfoDOS,wlyyPrescriptionDiagnosisDOS,outpatientId));
    }
    /**
     * 处方在医生站系统成功保存后调用
     * 合理用药审核
     * @param patient 病人id
     * @param doctor 医生id
     * @param diagnosisDOS 诊断json
@ -655,6 +656,47 @@ public class HcyyPrescriptionCotroller extends EnvelopRestEndpoint {
     * @return
     * @throws Exception
     */
    @PostMapping(value = "/saveCheckPrescriptions")
    @ApiOperation(value = "合理用药审核")
    public Envelop saveCheckPrescriptions(
            @ApiParam(name = "prescriptionOnly", value = "处方唯一标识")
            @RequestParam(value = "prescriptionOnly", defaultValue = "") String prescriptionOnly,
            @ApiParam(name = "payType", value = "付款方式0自费;1医保")
            @RequestParam(value = "payType", defaultValue = "") String payType,
            @ApiParam(name = "doctor", value = "医生id")
            @RequestParam(value = "doctor", defaultValue = "") String doctor,
            @ApiParam(name = "patient", value = "病人id")
            @RequestParam(value = "patient", defaultValue = "") String patient,
            @ApiParam(name = "diagnosisDOS", value = "诊断json")
            @RequestParam(value = "diagnosisDOS", defaultValue = "") String diagnosisDOS,
            @ApiParam(name = "infos", value = "药品json")
            @RequestParam(value = "infos", defaultValue = "") String infos,
            @ApiParam(name = "outpatientId",value = "门诊id")
            @RequestParam(value = "outpatientId", defaultValue = "") String outpatientId) throws Exception {
        JSONArray druginfos = JSONArray.parseArray(infos);
        List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = new ArrayList<>();
        for (int i = 0; i < druginfos.size(); i++) {
            WlyyPrescriptionInfoDO wlyyPrescriptionInfo = toEntity(druginfos.get(i).toString(), WlyyPrescriptionInfoDO.class);
            wlyyPrescriptionInfoDOS.add(wlyyPrescriptionInfo);
        }
        JSONArray diagnosis = JSONArray.parseArray(diagnosisDOS);
        List<WlyyPrescriptionDiagnosisDO> wlyyPrescriptionDiagnosisDOS = new ArrayList<>();
        for (int i = 0; i < diagnosis.size(); i++) {
            WlyyPrescriptionDiagnosisDO wlyyPrescriptionDiagnosisDO = toEntity(diagnosis.get(i).toString(), WlyyPrescriptionDiagnosisDO.class);
            wlyyPrescriptionDiagnosisDOS.add(wlyyPrescriptionDiagnosisDO);
        }
        return success(hcyyEntranceService.saveCheckPrescriptions(prescriptionOnly,payType,patient,doctor,wlyyPrescriptionInfoDOS,wlyyPrescriptionDiagnosisDOS,outpatientId));
    }
   /* *//**
     * 处方在医生站系统成功保存后调用
     * @param patient 病人id
     * @param doctor 医生id
     * @param diagnosisDOS 诊断json
     * @param infos  药品json
     * @return
     * @throws Exception
     *//*
    @PostMapping(value = "/hcyySaveCheckInfo")
    @ApiOperation(value = "处方在医生站系统成功保存后调用")
    public Envelop hcyySaveCheckInfo(
@ -685,7 +727,7 @@ public class HcyyPrescriptionCotroller extends EnvelopRestEndpoint {
            wlyyPrescriptionDiagnosisDOS.add(wlyyPrescriptionDiagnosisDO);
        }
        return success(hcyyEntranceService.saveCheck(outpatient,prescriptionOnly,payType,patient,doctor,wlyyPrescriptionInfoDOS,wlyyPrescriptionDiagnosisDOS));
    }
    }*/
    /**
     * 处方保存成功后,发送给审方系统进行人工审方