Browse Source

第三医院版本开发

wangzhinan 1 year ago
parent
commit
a3c6326cce

+ 1 - 0
business/base-service/src/main/java/com/yihu/jw/complaint/BaseComplaintService.java

@ -234,6 +234,7 @@ public class BaseComplaintService {
                " t.create_time as \"createTime\"," +
                " t.update_time as \"updateTime\"," +
                " d.photo as \"photo\"," +
                " t.complaint_id as \"complaintId\"," +
                " group_concat(b.name)  as \"name\" " +
                " from base_complaint_doctor t " +
                " INNER join base_complaint_dict b on t.complaint_id=b.id " +

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

@ -393,7 +393,7 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
     *
     * @return
     */
    public JSONObject register(String doctor,String dept,String sickId,String clinicclass,String courierflag) throws Exception {
    public JSONObject register(String doctor,String dept,String sickId,String clinicclass,String courierflag,String flag) throws Exception {
        String url = entranceUrl +"registered";
        JSONObject object = new JSONObject();
        Map<String,Object> params = new HashedMap();
@ -402,6 +402,7 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        params.put("sickId",sickId);
        params.put("clinicclass",clinicclass);
        params.put("courierflag",courierflag);
        params.put("flag",flag);
        HttpResponse response = HttpUtils.doPost(url,params);
        String content = response.getContent();
        logger.info("response:"+content);
@ -1344,7 +1345,13 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        }
        JSONObject res = null;
        try {
            res = register(doctorFlag,outpatientDO.getDept(),patientMappingDO.getMappingCode(),chargeType,courierflag);
            String flag = "";
            if (!StringUtils.isNoneBlank(outpatientDO.getMedicalState())) {
                flag = "0";
            }else {
                flag = outpatientDO.getMedicalState();
            }
            res = register(doctorFlag,outpatientDO.getDept(),patientMappingDO.getMappingCode(),chargeType,courierflag,flag);
        } catch (Exception e) {
            e.printStackTrace();
        }

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

@ -11998,11 +11998,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            }else if("xm_dsyy_wx".equalsIgnoreCase(wechatId)){
                logger.info("第三医院删除处方");
                WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId()).get();
                DoctorMappingDO doctorMappingDO = doctorMappingDao.findById(outpatientDO.getDoctor()).get();
                DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(outpatientDO.getDoctor());
                if (StringUtils.isNotBlank(prescriptionDO.getRealOrder())){
                    String applyDoctor = doctorMappingDO.getDoctorName()+"/"+doctorMappingDO.getMappingCode();
                    dsyyPrescriptionService.delHisPrescriptionByHisNo("0",outpatientDO.getCardNo(),outpatientDO.getRegisterNo(),outpatientDO.getDept(),applyDoctor,"50105",prescriptionDO.getRealOrder());
                }
                prescriptionDO.setStatus(-4);
                prescriptionDO.setDisableTime(new Date());
                prescriptionDO.setCheckStatus(5);
                prescriptionDO.setCheckReason("已作废");
                prescriptionDao.save(prescriptionDO);
                return "已作废";
            }
            prescriptionDO.setStatus(-4);

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

@ -976,9 +976,9 @@ public class DsyyEntranceService {
                "\tORIGINSERIALNO as \"ORIGINSERIALNO\",\n" +
                "\tTYPE as \"TYPE\",\n" +
                "\tPATIENTCODE as \"PATIENTCODE\",\n" +
                "\tPATEINTNAME as \"PATEINTNAME\",\n" +
                "\tPATIENTNAME as \"PATEINTNAME\",\n" +
                "\tIDCARD as \"IDCARD\",\n" +
                "\tCARDNO as \"CARDNO\",\n" +
                "\tSSC as \"CARDNO\",\n" +
                "\tSSC as \"SSC\",\n" +
                "\tDOCTOR as \"DOCTOR\",\n" +
                "\tDOCTORNAME as \"DOCTORNAME\",\n" +
@ -999,15 +999,10 @@ public class DsyyEntranceService {
                "\tCANCELREASON as \"CANCELREASON\",\n" +
                "\tCACERTDATA as \"CACERTDATA\",\n" +
                "\tCAMESSAGE as \"CAMESSAGE\",\n" +
                "\tDIGITALSIGNNO as \"DIGITALSIGNNO\",\n" +
                "\tORIGINALDATAABSTRACT as \"ORIGINALDATAABSTRACT\",\n" +
                "\tSTRORIGINALDATA as \"STRORIGINALDATA\",\n" +
                "\tHISDEPTCODE as \"HISDEPTCODE\",\n" +
                "\tHISDOCTORCODE as \"HISDOCTORCODE\",\n" +
                "\tHISGISTERTYPECODE as \"HISGISTERTYPECODE\",\n" +
                "\tHISRATETYPECODE as \"HISRATETYPECODE\",\n" +
                "\tHISHOSPITAL as \"HISHOSPITAL\",\n" +
                "\tHISREGISTERFEE as \"HISREGISTERFEE\",\n" +
                "\tPAYSTATUS as \"PAYSTATUS\",\n" +
                "  DISPUSER as \"DISPUSER\",\n" +
                "\tDISPUSERNAME as \"DISPUSERNAME\",\n" +
@ -1016,16 +1011,16 @@ public class DsyyEntranceService {
                "\tv_internet_prescrip_master where 1=1 ";
        JSONArray array = new JSONArray();
        if (StringUtils.isNoneBlank(registerSn)){
            sql +=" and REGISTERNO = '"+registerSn+"' ";
            sql +=" and OUTPATIENTID = '"+registerSn+"' ";
        }
        if (StringUtils.isNoneBlank(patNo)){
            sql +=" and patient = '"+patNo+"' ";
            sql +=" and PATIENTCODE = '"+patNo+"' ";
        }
        if (StringUtils.isNoneBlank(patNo)){
            sql +=" and admNo = '"+admNo+"' ";
        if (StringUtils.isNoneBlank(admNo)){
            sql +=" and ADMNO = '"+admNo+"' ";
        }
        if (StringUtils.isNoneBlank(realOrder)){
            sql+=" and realOrder ='"+realOrder+"' ";
            sql+=" and REALORDER ='"+realOrder+"' ";
        }
        if (StringUtils.isNoneBlank(startTime)){
            sql +=" and CREATETIME >= to_date('"+startTime+"','yyyy-MM-dd HH24:mi:ss') ";
@ -1498,7 +1493,7 @@ public class DsyyEntranceService {
     * @throws Exception
     */
    //挂号(调his后台包)
    public String registered(String doctor,String dept,String sickId,String clinicclass,String courierflag)throws Exception{
    public String registered(String doctor,String dept,String sickId,String clinicclass,String courierflag,String flag)throws Exception{
        String api = "Registered";
        String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
                "<root> " +
@ -1527,6 +1522,9 @@ public class DsyyEntranceService {
        if (!StringUtils.isEmpty(courierflag)&&!courierflag.equalsIgnoreCase("null")){
            condition +="<courierflag>"+courierflag+"</courierflag>";
        }
        if (!StringUtils.isEmpty(flag)&&!flag.equalsIgnoreCase("null")){
            condition +="<flag>"+flag+"</flag>";
        }
        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<root>"+condition+"</root>";
        Map<String,String> params = new HashedMap();
@ -1908,6 +1906,7 @@ public class DsyyEntranceService {
        if (StringUtils.isNoneBlank(hismzlsh)){
            object.put("hismzlsh",hismzlsh);
        }
        object.put("trade_type","5");
        object.put("accountType","01");
        object.put("sfxsjs","Y");
        condition = object.toJSONString();
@ -1976,6 +1975,7 @@ public class DsyyEntranceService {
        if (StringUtils.isNoneBlank(outChargeNo)){
            object.put("outChargeNo",outChargeNo);
        }
        object.put("trade_type","5");
        object.put("iszyyjs","Y");
        condition = object.toJSONString();
        String msgBody =condition;
@ -2082,6 +2082,9 @@ public class DsyyEntranceService {
        if (StringUtils.isNoneBlank(phone)){
            object.put("phone",phone);
        }
        if (!StringUtils.isNoneBlank(cardNo)){
            object.put("certType","6");
        }
        condition = object.toJSONString();
        String msgBody =condition;
        Map<String,String> params = new HashedMap();

+ 4 - 2
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/DsyyController.java

@ -65,8 +65,10 @@ public class DsyyController extends EnvelopRestEndpoint {
                                 @ApiParam(name = "clinicclass", value = "挂号类别(必填)", required = false)
                                        @RequestParam(value = "clinicclass",required = false)String clinicclass,
                                 @ApiParam(name = "courierflag", value = "courierflag", required = false)
                                        @RequestParam(value = "courierflag",required = false)String courierflag) throws Exception {
        return success("请求成功",dsyyEntranceService.registered( doctor,dept,sickId,clinicclass,courierflag));
                                     @RequestParam(value = "courierflag",required = false)String courierflag,
                                 @ApiParam(name = "flag", value = "flag", required = false)
                                     @RequestParam(value = "flag",required = false)String flag) throws Exception {
        return success("请求成功",dsyyEntranceService.registered( doctor,dept,sickId,clinicclass,courierflag,flag));
    }
    @PostMapping(value = "/refundConsultation")