4 کامیت‌ها 8c0c698e8d ... 6dab61d4d7

نویسنده SHA1 پیام تاریخ
  zdm 6dab61d4d7 处方状态变更 5 سال پیش
  zdm 587b49a8c5 处方状态变更job 5 سال پیش
  zdm 1f2d0e58d1 Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev 5 سال پیش
  zdm 1011fe39d8 处方变更job 5 سال پیش

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

@ -18,6 +18,7 @@ public interface OutpatientDao extends PagingAndSortingRepository<WlyyOutpatient
    List<WlyyOutpatientDO> findByDoctorAndStatus(String doctor,String status);
    
    List<WlyyOutpatientDO> findByDoctor(String doctor);
    
    WlyyOutpatientDO findById(String id);
    List<WlyyOutpatientDO> findByAdmNo(String admNo);
}

+ 3 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/PrescriptionDao.java

@ -28,4 +28,7 @@ public interface PrescriptionDao extends PagingAndSortingRepository<WlyyPrescrip
    List<WlyyPrescriptionDO> findByOutpatientId(String outpatientId);
    List<WlyyPrescriptionDO> findById(String id);
    WlyyPrescriptionDO findByRealOrder(String realOrder);
}

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

@ -608,6 +608,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            outPatientSql="UPDATE base.wlyy_outpatient p SET p.`status`='2' WHERE p.adm_no='" + admNo + "'";
            jdbcTemplate.execute(outPatientSql);
        } else if ("3".equals(status)) {
            //自取处方结束
            sql = "UPDATE base.wlyy_prescription p SET p.`status`='100',p.pay_status='1' WHERE p.adm_no='" + admNo + "' AND p.real_order='" + realOrder + "' ";
        }
        jdbcTemplate.execute(sql);

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

@ -12,9 +12,11 @@ import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.hospital.dict.WlyyChargeDictDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.mapping.PatientMappingDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDO;
import com.yihu.jw.hospital.dict.WlyyChargeDictDao;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionDao;
import com.yihu.jw.hospital.prescription.service.entrance.util.ConvertUtil;
import com.yihu.jw.hospital.prescription.service.entrance.util.MqSdkUtil;
import com.yihu.jw.hospital.prescription.service.entrance.util.WebserviceUtil;
@ -78,6 +80,7 @@ public class EntranceService {
    private static String MS02013="MS02013";
    //医院频次字典表
    private static String MS30012="MS30012";
    private String orgCode="350211A1002";
    @Value("${hospital.mqUser}")
    private String mqUser;
    @Value("${hospital.mqPwd}")
@ -102,6 +105,8 @@ public class EntranceService {
    private BaseDoctorHospitalDao baseDoctorHospitalDao;
    @Autowired
    private HttpClientUtil httpClientUtil;
    @Autowired
    private PrescriptionDao prescriptionDao;
    /**
     * 获取本地示例返参
@ -380,28 +385,84 @@ public class EntranceService {
     * @param realOrder
     * @return
     */
    public WlyyPrescriptionVO initWlyyPrescriptionVo(WlyyPrescriptionVO wlyyPrescriptionVO , net.sf.json.JSONObject jsonObjectBody,String realOrder){
    public WlyyPrescriptionVO initWlyyPrescriptionVo(WlyyPrescriptionVO wlyyPrescriptionVO , net.sf.json.JSONObject jsonObjectBody,String realOrder) {
        wlyyPrescriptionVO.setAdmNo(null != jsonObjectBody.get("ADM_NO") ? jsonObjectBody.get("ADM_NO").toString() : "");
        wlyyPrescriptionVO.setRealOrder(realOrder);
        wlyyPrescriptionVO.setSerialNo(null != jsonObjectBody.get("REGISTER_SN") ? jsonObjectBody.get("REGISTER_SN").toString() : "");
        wlyyPrescriptionVO.setType(1);
        String patNo=null != jsonObjectBody.get("PAT_NO") ? jsonObjectBody.get("PAT_NO").toString() : "";
        String patientName=null != jsonObjectBody.get("UOM") ? jsonObjectBody.get("UOM").toString() : "";
        PatientMappingDO patientMappingDo=new PatientMappingDO();
        if(StringUtils.isNotBlank(patNo)){
            patientMappingDo=  patientMappingDao.findByMappingCodeAndSource(patNo.trim(),"1");
            patNo=null==patientMappingDo?null:patientMappingDo.getPatient();
            patientName=null==patientMappingDo?null:patientMappingDo.getPatientName();
        String patNo = null != jsonObjectBody.get("PAT_NO") ? jsonObjectBody.get("PAT_NO").toString() : "";
        String patientName = null != jsonObjectBody.get("UOM") ? jsonObjectBody.get("UOM").toString() : "";
        PatientMappingDO patientMappingDo = new PatientMappingDO();
        if (StringUtils.isNotBlank(patNo)) {
            patientMappingDo = patientMappingDao.findByMappingCodeAndSource(patNo.trim(), "1");
            patNo = null == patientMappingDo ? null : patientMappingDo.getPatient();
            patientName = null == patientMappingDo ? null : patientMappingDo.getPatientName();
        }
        wlyyPrescriptionVO.setPatientCode(patNo);
        wlyyPrescriptionVO.setPatientName(patientName);
        wlyyPrescriptionVO.setIdcard(null==patientMappingDo?null:patientMappingDo.getIdcard());
        //TODO 社保卡号
        wlyyPrescriptionVO.setIdcard(null == patientMappingDo ? null : patientMappingDo.getIdcard());
        wlyyPrescriptionVO.setSsc("");
        wlyyPrescriptionVO.setHisDoctorCode(null != jsonObjectBody.get("PRESC_DOC") ? jsonObjectBody.get("PRESC_DOC").toString() : "");
        wlyyPrescriptionVO.setHisDeptCode(null != jsonObjectBody.get("PRESC_SPEC") ? jsonObjectBody.get("PRESC_SPEC").toString() : "");
        return  wlyyPrescriptionVO;
        //中山医院处方状态
        String status = null != jsonObjectBody.get("PAY_MARK") ? jsonObjectBody.get("PAY_MARK").toString() : "";
        /**互联网医院处方状态字典:
         续方取消:-3 支付过期取消,-2 患者自己取消 ,-1 医生取消
         候诊中:0 候诊中
         就诊中:10 诊断中,11 药师审核失败 / 调整中,12  药师审核完成,13  开方失败/调整中
         开方成功:20 诊断完成/开方成功/待支付,21 支付失败/待支付中
         待取药:30 支付成功/等待配药,31 配药成功/等待取药,32 配送中
         已完成:100 已完成
         中山医院处方状态字典:0-正常已收费 1-退费 5-正常未收费 a-皮试后用药 c-作废处方
         */
        //互联网医院处方状态
        Integer hlwyyStatus = 10;
        switch (status) {
            case "0":
                hlwyyStatus = 30;
                break;
            case "1":
                hlwyyStatus = 13;
                break;
            case "5":
                hlwyyStatus = 20;
                break;
            case "a":
                hlwyyStatus = 100;
                break;
            case "c":
                hlwyyStatus = 13;
                break;
        }
        //发药时间
        String dispDate = null != jsonObjectBody.get("DISP_DATE") ? jsonObjectBody.get("DISP_DATE").toString() : "";
        if(StringUtils.isNotBlank(dispDate)){
            //根据处方号获取处方
            WlyyPrescriptionDO wlyyPrescriptionDO=prescriptionDao.findByRealOrder(realOrder);
            if(null!=wlyyPrescriptionDO&&1==wlyyPrescriptionDO.getDispensaryType()){
                //自取
                hlwyyStatus=31;
            }else {
                //快递配送
                hlwyyStatus=32;
            }
            //发药医生编码-中山医院
            String dispUser = null != jsonObjectBody.get("DISP_USER") ? jsonObjectBody.get("DISP_USER").toString() : "";
            wlyyPrescriptionVO.setDispDate(DateUtil.strToDate(dispDate));
            //转换为本地医生编码
            List<DoctorMappingDO> mappingDOs = doctorMappingDao.findByOrgCodeAndMappingCode(orgCode, dispUser);
            String dispUserName = "";
            if (mappingDOs != null && mappingDOs.size() > 0) {
                dispUser = mappingDOs.get(0).getDoctor();
                dispUserName = mappingDOs.get(0).getDoctorName();
            }
            wlyyPrescriptionVO.setDispUser(dispUser);
            wlyyPrescriptionVO.setDispUserName(dispUserName);
        }
        wlyyPrescriptionVO.setStatus(hlwyyStatus);
        return wlyyPrescriptionVO;
    }
    /**
@ -419,6 +480,7 @@ public class EntranceService {
        wlyyPrescriptionDiagnosisVO.setName(icdName);
        wlyyPrescriptionDiagnosisVO.setCreateTime(new Date());
        wlyyPrescriptionDiagnosisVO.setType(type);
       return wlyyPrescriptionDiagnosisVO;
    }

+ 1 - 1
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/MqSdkController.java

@ -253,7 +253,7 @@ public class MqSdkController extends EnvelopRestEndpoint {
    }
    @GetMapping(value = "/guahao")
    @ApiOperation(value = " 查询某个时间段的患者门诊就诊记录 V1.00")
    @ApiOperation(value = " 查询挂号是否失效")
    public ObjEnvelop guahao(@ApiParam(name = "patNo", value = "居民id")
                         @RequestParam(value = "patNo",required = false) String patNo,
                         @ApiParam(name = "dept", value = "挂号科室")

+ 9 - 0
svr/svr-internet-hospital-job/pom.xml

@ -71,6 +71,15 @@
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-entity</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-rest-model</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>base-service</artifactId>
            <version>${parent.version}</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-exception</artifactId>

+ 1 - 1
svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/event/ApplicationEvent.java

@ -13,7 +13,7 @@ import org.springframework.stereotype.Service;
import java.util.HashMap;
/**
 * Created by lyr-pc on 2017/3/10.
 * Created by zdm on 2017/3/10.
 */
@Service
public class ApplicationEvent implements ApplicationListener<ContextRefreshedEvent> {

+ 5 - 0
svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/job/PrescriptionStatusUpdateJob.java

@ -11,6 +11,11 @@ import org.springframework.beans.factory.annotation.Autowired;
/**
 * 处方状态更新job
 * Created by zdm on 2019/2/20.
 * 互联网医院线上下处方之后保存到中山医院的临时表-(中山医院正式下处方,审核成功之后保存,审核失败不保存)-审核成功之后药房发药,回调互联网医院。
 * 在正式下处方的时候,互联网医院每两分钟到中山医院获取处方详情:
 * 1、若是可以正常查询且状态为审方成功,则只需要变更状态,调用im消息通知居民
 * 2、若可以正常查询处方,状态为失败,则需要将状态改为失败,并根据处方号重新获取新的处方直到成功为止。
 * 3、若根据处方号查询不到处方,则需要根据门诊就诊记录获取处方号,再获取处方状态重复1、2
 */
public class PrescriptionStatusUpdateJob implements Job {
    private static final Logger logger = LoggerFactory.getLogger(PrescriptionStatusUpdateJob.class);

+ 189 - 42
svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/service/channel/PrescriptionStatusUpdateService.java

@ -1,18 +1,39 @@
package com.yihu.jw.service.channel;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDiagnosisDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionInfoDO;
import com.yihu.jw.hospital.prescription.dao.*;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionDiagnosisVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionInfoVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.status.EnvelopStatus;
import com.yihu.jw.util.http.HttpUtils;
import io.swagger.annotations.ApiParam;
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.JdbcTemplate;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;
import java.text.SimpleDateFormat;
import java.util.*;
/**
 * 处方状态变更
 * 处方状态更新job
 * Created by zdm on 2019/7/20.
 * 互联网医院线上下处方之后保存到中山医院的临时表-(中山医院正式下处方,审核成功之后保存,审核失败不保存)-审核成功之后药房发药,回调互联网医院。
 * 在正式下处方的时候,互联网医院每两分钟到中山医院获取处方详情:
 * 1、若是可以正常查询且状态为审方成功,则只需要变更状态,调用im消息通知居民
 * 2、若可以正常查询处方,状态为失败,则需要将状态改为失败,并根据处方号重新获取新的处方直到成功为止。
 * 3、若根据处方号查询不到处方,则需要根据门诊就诊记录(有就诊次数的数据)获取处方号,再获取处方状态重复1、2
 */
@Component
@Transactional
@ -20,50 +41,176 @@ public class PrescriptionStatusUpdateService {
    private static Logger logger = LoggerFactory.getLogger(PrescriptionStatusUpdateService.class);
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Value("${hlwyyEntrance.url}")
    private String hlwyyEntranceUrl;
    @Autowired
    private PrescriptionDao prescriptionDao;
    @Autowired
    private PrescriptionDiagnosisDao prescriptionDiagnosisDao;
    @Autowired
    private PrescriptionInfoDao prescriptionInfoDao;
    @Autowired
    private OutpatientDao outpatientDao;
    public void autoPush() throws Exception{
        logger.info("job执行中++++++++++++++++++++++++");
        //获取所有未结束处方
        String sql = "SELECT a.id ,a.start_time,a.end_time FROM wlyy.wlyy_channel_recommend_article a WHERE a.del_flag>0 AND a.type=2";
        //获取所有就诊中已挂号、已下临时处方、并且未结束的处方
        String sql = "SELECT o.id,o.con_no,o.register_no,p.mapping_code,pre.adm_no,pre.real_order,pre.id preId,pre.dispensary_type,pre.status FROM base.wlyy_outpatient o LEFT JOIN base.wlyy_patient_mapping p ON o.patient=p.patient " +
                "LEFT JOIN base.wlyy_prescription pre on o.id=pre.outpatient_id WHERE o.status=1 AND o.con_no IS NOT NULL  AND pre.real_order IS NOT NULL  ";
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        for (Map<String, Object> map : list) {
            //处方号
            String realOrder=String.valueOf(map.get("real_order"));
            //门诊就诊唯一号
            String admNo=String.valueOf(map.get("adm_no"));
            //第三方居民唯一号
            String patientMappingCode=String.valueOf(map.get("mapping_code"));
            //中山医院居民就诊次数
            String conNo=String.valueOf(map.get("con_no"));
            //处方原状态
            String status=String.valueOf(map.get("status"));
            //处方Id
            String preId=String.valueOf(map.get("preId"));
            //门诊记录Id
            String outPatientId=String.valueOf(map.get("id"));
//        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//        //获取当前时间
//        String dateString = format.format(new Date());
//        Date now = DateUtil.strToDate(dateString,"yyyy-MM-dd HH:mm:ss");
//        //获取自动推送的时间列表
//        String sql = "SELECT a.id ,a.start_time,a.end_time FROM wlyy.wlyy_channel_recommend_article a WHERE a.del_flag>0 AND a.type=2";
//        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
//        for (Map<String, Object> map : list) {
//            String id=String.valueOf(map.get("id"));
//            if(map.get("start_time") !=null && map.get("end_time")!=null) {
//                //开始时间
//                Date startTime = DateUtil.strToDate(map.get("start_time") + "", "yyyy-MM-dd HH:mm:ss");
//                //结束时间
//                Date endTime = DateUtil.strToDate(map.get("end_time") + "", "yyyy-MM-dd HH:mm:ss");
//
//                int startEqual = now.compareTo(startTime);
//                int endEqual = now.compareTo(endTime);
//
//                if (endEqual >= 0) {
//                    //当前时间>=结束时间  状态变更为失效
//                    updateChannelStatusById(id, 0);
//                }else if (startEqual == 2 ) {
//                    //-1删除,0失效,1生效,2未生效
//                    //当前时间>=起始时间  状态变更为生效
//                    updateChannelStatusById(id, 1);
//                }
//
//            }
//        }
    }
   /* public void updateChannelStatusById(String id,Integer status){
        String countSql = "update  wlyy.wlyy_channel_recommend_article wp SET wp.del_flag="+status+" ,wp.last_update_time=NOW() WHERE wp.id='"+id+"'";
        jdbcTemplate.update(countSql);
    }*/
            //根据处方号获取处方状态
            Map<String, Object> params =new HashMap<>();
            params.put("registerSn",null);
            params.put("patNo",patientMappingCode);
            params.put("admNo",admNo);
            params.put("realOrder",realOrder);
            //判断处方是否存在
            boolean preExistFlag=true;
            List<WlyyPrescriptionVO> wlyyPrescriptionVOS= getWlyyPrescriptionVO(params);
            //若用处方号获取处方为空,则需要使用居民编号及门诊就诊唯一号查询
            if(null==wlyyPrescriptionVOS){
                preExistFlag=false;
                params.remove("realOrder");
                wlyyPrescriptionVOS= getWlyyPrescriptionVO(params);
            }
            //根据处方id获取处方详情
            WlyyPrescriptionDO wlyyPrescriptionDO=prescriptionDao.findOne(preId);
            //根据门诊id获取门诊记录:如果处方状态为已完成,需要将门诊状态改为已诊
            WlyyOutpatientDO wlyyOutpatientDO=outpatientDao.findById(outPatientId);
            if(null!=wlyyPrescriptionVOS){
                //如果状态为100,门诊记录需要变更为结束
                WlyyPrescriptionVO wlyyPrescriptionVO=wlyyPrescriptionVOS.get(0);
                wlyyPrescriptionDO.setStatus(wlyyPrescriptionVO.getStatus());
                //用处方号获取不到处方时,重新更新处方到本地
                if(!preExistFlag){
                    //删除原有药品信息
                    List<WlyyPrescriptionInfoDO> oldInfos = prescriptionInfoDao.findByPrescriptionId(preId);
                    if(oldInfos!=null&&oldInfos.size()>0){
                        prescriptionInfoDao.delete(oldInfos);
                    }
                    //删除之前诊断
                    List<WlyyPrescriptionDiagnosisDO> ds = prescriptionDiagnosisDao.findByPrescriptionId(preId);
                    if(ds!=null&&ds.size()>0){
                        prescriptionDiagnosisDao.delete(ds);
                    }
                    String Icd10 = "";
                    String Icd10Name = "";
                    List<WlyyPrescriptionDiagnosisDO> wlyyPrescriptionDiagnosisDOS=new ArrayList<>();
                    for(WlyyPrescriptionDiagnosisVO diagnosisVO:wlyyPrescriptionVO.getDiagnosisVOs()){
                        WlyyPrescriptionDiagnosisDO diagnosisDO=new WlyyPrescriptionDiagnosisDO();
                        //将诊断拼接放到门诊记录中
                        if("1".equals(diagnosisVO.getType())){
                            Icd10 = diagnosisVO.getCode()+","+Icd10;
                            Icd10Name+=diagnosisVO.getName()+","+Icd10Name;
                        }else {
                            Icd10+=diagnosisVO.getCode()+",";
                            Icd10Name+=diagnosisVO.getName()+",";
                        }
                        diagnosisDO.setCode(diagnosisVO.getCode());
                        diagnosisDO.setName(diagnosisVO.getName());
                        diagnosisDO.setType(diagnosisVO.getType());
                        diagnosisDO.setPrescriptionId(preId);
                        diagnosisDO.setCreateTime(new Date());
                        wlyyPrescriptionDiagnosisDOS.add(diagnosisDO);
                    }
                    //重新保存诊断
                    prescriptionDiagnosisDao.save(wlyyPrescriptionDiagnosisDOS);
                    //药品更新
                    List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS=new ArrayList<>();
                    for(WlyyPrescriptionInfoVO infoVO:wlyyPrescriptionVO.getInfoVOs()){
                        WlyyPrescriptionInfoDO infoDO=new WlyyPrescriptionInfoDO();
                        //处方code 关联表wlyy_prescription code
                        infoDO.setPrescriptionId(preId);
                        //药品编号
                        infoDO.setDrugNo(infoVO.getDrugNo());
                        //药品名称
                        infoDO.setDrugName(infoVO.getDrugName());
                        //库房号
                        infoDO.setDispDeposite(infoVO.getDispDeposite());
                        // 药量
                        infoDO.setDosage(infoVO.getDosage());
                        //数量
                        infoDO.setQuantity(infoVO.getQuantity());
                        //单位
                        infoDO.setUnit(infoVO.getUnit());
                        //單位名稱
                        infoDO.setUnitName(infoVO.getUnitName());
                        //包装单位
                        infoDO.setPackUnit(infoVO.getPackUnit());
                        //包装单位名称
                        infoDO.setPackUnitName(infoVO.getPackUnitName());
                        // 用法
                        infoDO.setSupplyCode(infoVO.getSupplyCode());
                        //用法名稱
                        infoDO.setSupplyName(infoVO.getSupplyName());
                        //天数
                        infoDO.setDays(infoVO.getDays());
                        //组号
                        infoDO.setFrequency(infoVO.getFrequency());
                        //药品收费码
                        infoDO.setSerial(infoVO.getSerial());
                        //库房号
                        infoDO.setGroupNo(infoVO.getGroupNo());
                        //规格
                        infoDO.setSpecification(infoVO.getSpecification());
                        // 1可用 0删除
                        infoDO.setDel(1);
                        //频率
                        infoDO.setUsageCode(infoVO.getUsageCode());
                        //頻率名稱
                        infoDO.setUsageName(infoVO.getUsageName());
                        //包装价格
                        infoDO.setPackRetprice(infoVO.getPackRetprice());
                        wlyyPrescriptionInfoDOS.add(infoDO);
                    }
                    prescriptionInfoDao.save(wlyyPrescriptionInfoDOS);
                    Icd10 = Icd10.substring(0,Icd10.length()-1);
                    Icd10Name = Icd10Name.substring(0,Icd10Name.length()-1);
                    wlyyOutpatientDO.setIcd10(Icd10);
                    wlyyOutpatientDO.setIcd10Name(Icd10Name);
                }
                if(100==wlyyPrescriptionVO.getStatus()){
                    wlyyOutpatientDO.setStatus("2");
                }
                outpatientDao.save(wlyyOutpatientDO);
                prescriptionDao.save(wlyyPrescriptionDO);
            }
            }
        }
    /**
     * 获取处方详情
     * @param params
     * @return
     * @throws Exception
     */
        public  List<WlyyPrescriptionVO> getWlyyPrescriptionVO(Map<String, Object> params)throws Exception{
            //根据处方号获取处方状态
            String result=  HttpUtils.doGet(hlwyyEntranceUrl+"/mqsdk/BS16017",params).getContent();
            ObjectMapper objectMapper=new ObjectMapper();
            ListEnvelop listEnvelop=objectMapper.readValue(result,ListEnvelop.class);
            if(null!=listEnvelop&& EnvelopStatus.success.code.equals(listEnvelop.getStatus())&&null!=listEnvelop.getDetailModelList()&&listEnvelop.getDetailModelList().size()>0){
                logger.info("result:"+listEnvelop.getDetailModelList());
                List<WlyyPrescriptionVO> wlyyPrescriptionVOS=listEnvelop.getDetailModelList();
                return wlyyPrescriptionVOS;
            }
            return null;
        }
}

+ 37 - 0
svr/svr-internet-hospital-job/src/main/resources/application.yml

@ -54,6 +54,19 @@ spring:
    username: ssgg
    password: ssgg@jkzl2019
hlwyyEntrance:
  url: http://localhost:10023
# mq 是否获取his数据,flag代表获取演示数据,false代表获取his真实数据
demo:
  flag: true
hospital:
  url: https://wx.xmzsh.com
  mqUser: JKZL
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
---
spring:
  profiles: jwtest
@ -62,6 +75,18 @@ spring:
    username: ssgg
    password: ssgg@jkzl2019
hlwyyEntrance:
  url: http://localhost:10023
# mq 是否获取his数据,flag代表获取演示数据,false代表获取his真实数据
demo:
  flag: true
hospital:
  url: https://wx.xmzsh.com
  mqUser: JKZL
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
---
spring:
  profiles: jwprod
@ -69,3 +94,15 @@ spring:
    url: jdbc:mysql://192.0.33.27:3306/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: im
    password: 2oEq3Kf7
hlwyyEntrance:
  url: http://172.16.1.42:10023
# mq 是否获取his数据,flag代表获取演示数据,false代表获取his真实数据
demo:
  flag: false
hospital:
  url: https://172.16.1.34
  mqUser: JKZL
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01

+ 1 - 1
svr/svr-internet-hospital-job/src/main/resources/system.properties

@ -1,4 +1,4 @@
#-------------------------共同配置-----------------------------#
# 健康频道状态
channel_update_job=0 * * * * ?
prescriptionStatus_update_job=* 2/* * * * ?