Forráskód Böngészése

海沧医保接口

wangzhinan 2 éve
szülő
commit
b62b711c05

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

@ -136,6 +136,7 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
                baseUserMessageDO.setStatus(Integer.valueOf(1));
                baseUserMessageDO.setDel(Integer.valueOf(1));
                baseUserMessageDO.setType(type);
                baseUserMessageDO.setIsShow(1);
                baseUserMessageDO.setIsRead(Integer.valueOf(0));
                this.baseUserMessageDao.save(baseUserMessageDO);
                objEnvelop.setStatus(Integer.valueOf(200));

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

@ -108,6 +108,8 @@ public class HcyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
    public PrescriptionLogDao prescriptionLogDao;
    @Autowired
    public PrescriptionService prescriptionService;
    @Autowired
    public PrescriptionDiagnosisDao prescriptionDiagnosisDao;
@ -809,6 +811,18 @@ public class HcyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            paramRequest.put("catalogid","74");
            paramRequest.put("emrtype","93");
            paramRequest.put("emrtitle","互联网医院");
            String str = "";
            List<WlyyPrescriptionDiagnosisDO> diagnosisDOS = prescriptionDiagnosisDao.findByPrescriptionId(prescriptionId,1);
            if (diagnosisDOS!=null&&diagnosisDOS.size()!=0){
                for (WlyyPrescriptionDiagnosisDO diagnosisDO:diagnosisDOS){
                    str+=diagnosisDO.getName()+",";
                }
            }
            if (StringUtils.isNoneBlank(str)&&str.length()>1){
                str = str.substring(0,str.length()-1);
            }
            paramRequest.put("diseaseName",str);
            if (StringUtils.isNoneBlank(baseSign)){
                JSONObject object = hcyyEntranceService.getSignPicture(doctorDO.getId());

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

@ -562,6 +562,12 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
        DefaultTransactionDefinition def = new DefaultTransactionDefinition();
        def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW); // 事务隔离级别,开启新事务
        TransactionStatus status = transactionManager.getTransaction(def); // 获得事务状态
        for (WlyyPrescriptionDO wlyyPrescriptionDO:sfprescription){
            if (wlyyPrescriptionDO.getStatus()<32&&wlyyPrescriptionDO.getStatus()>=30){
                wlyyPrescriptionDO.setStatus(32);
                prescriptionDao.save(wlyyPrescriptionDO);
            }
        }
        try {
            //用于判断新节点是否包含了"已收件"的节点
@ -626,12 +632,9 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
                    }
                }
                //保存配送成功的日志
                WlyyOutpatientExpressageLogDO outpatiExpressLog = new WlyyOutpatientExpressageLogDO();
                outpatiExpressLog.setOutpatientId(sfexpress.getOutpatientId());
                outpatiExpressLog.setId(UUID.randomUUID().toString());
                outpatiExpressLog.setType(8);
                outpatiExpressLog.setCreateTime(new Date());
                outpatiExpressLog.setFlag(1);

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

@ -748,7 +748,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        rs.put("sex", basePatientDO.getSex());
        PatientMedicareCardDO cardDO = basePatientMedicareCardDao.findByCodeAndPatientCodeAndDel(outpatientDO.getCardNo(), outpatientDO.getPatient());
        rs.put("ssc", cardDO);
        rs.put("age", IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard()));
        rs.put("age", IdCardUtil.getAgeByBirthday(basePatientDO.getBirthday()));
        rs.put("address", basePatientDO.getAddress());
        rs.put("mobile", basePatientDO.getMobile());
        rs.put("birthday", DateUtil.dateToStr(basePatientDO.getBirthday(), "yyyy-MM-dd"));
@ -7704,7 +7704,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        rs.put("townCode", basePatientDO.getTownCode());
        rs.put("townName", basePatientDO.getTownName());
        rs.put("idcard", basePatientDO.getIdcard());
        rs.put("age", IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard()));
        rs.put("age", IdCardUtil.getAgeByBirthday(basePatientDO.getBirthday()));
        rs.put("mobile", basePatientDO.getMobile());
        rs.put("photo", basePatientDO.getPhoto());
        rs.put("address", basePatientDO.getAddress());
@ -8331,7 +8331,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                }
                for (WlyyPrescriptionDO prescriptionDO:wlyyPrescriptionDOList){
                    prescriptionDO.setStatus(32);
                    prescriptionDO.setStatus(31);
                    prescriptionDao.save(prescriptionDO);
                }
                if (sfexpress_obj != null && StringUtils.isNoneBlank(sfexpress_obj.getMailno())) {
@ -8443,7 +8443,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                            System.out.println("获取顺丰物流面单信息:6");
                        }
                        wlyyPrescriptionDOS.setStatus(32);
                        wlyyPrescriptionDOS.setStatus(31);
                        prescriptionDao.save(wlyyPrescriptionDOS);
                        if (sfexpress_obj != null && StringUtils.isNoneBlank(sfexpress_obj.getMailno())) {
                            com.alibaba.fastjson.JSONObject object = sfexpressService.postSFOrderQueryService(sfexpress_obj);

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

@ -1762,6 +1762,7 @@ public class HcyyEntranceService {
                SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                htmlDeo = replaceHtml(htmlDeo,"@createTime@",sf.format(prescriptionEmrDO.getCreateTime()));
                htmlDeo = replaceHtml(htmlDeo,"@complaint@",prescriptionEmrDO.getComplaint());
                htmlDeo = replaceHtml(htmlDeo,"@diseaseName@",jsonObject.getString("diseaseName"));
                htmlDeo = replaceHtml(htmlDeo,"@medicalHistory@",prescriptionEmrDO.getMedicalHistory());
                htmlDeo = replaceHtml(htmlDeo,"@popularHistory@",prescriptionEmrDO.getPopularHistory());
                htmlDeo = replaceHtml(htmlDeo,"@pastHistory@",prescriptionEmrDO.getPastHistory());

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

@ -2125,6 +2125,7 @@ public class ImService {
                if ("4".equalsIgnoreCase(baseEvaluateDO.getScoreType())) {
                    BaseUserMessageDO baseUserMessageDO = new BaseUserMessageDO();
                    baseUserMessageDO.setCreateTime(new Date());
                    baseUserMessageDO.setIsShow(1);
                    baseUserMessageDO.setReceiver(consultTeamDo.getDoctor());
                    BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(consultTeamDo.getDoctor());
                    if (baseDoctorDO != null) {
@ -4065,13 +4066,16 @@ public class ImService {
            if (flag) {
                sql = sql + "date_format(op.create_time,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
                sql = sql + "date_format(op.end_time,'%Y-%m-%d %H:%i:%S' )  AS \"endTime\", ";
                sql = sql + "date_format(d.birthday,'%Y-%m-%d' )  AS \"birthday\",";
            } else {
                sql = sql + "to_char(op.create_time,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\",";
                sql = sql + "to_char(op.end_time,'YYYY-MM-DD hh24:mi:ss')  AS \"endTime\",";
                sql = sql + "to_char(d.birthday,'YYYY-MM-DD')  AS \"birthday\",";
            }
        } else {
            sql = sql + "date_format(op.create_time,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
            sql = sql + "date_format(op.end_time,'%Y-%m-%d %H:%i:%S' )  AS \"endTime\",";
            sql = sql + "date_format(d.birthday,'%Y-%m-%d' )  AS \"birthday\",";
        }
        sql = sql + "op.status AS \"status\"," +
                "b.evaluate AS \"evaluate\"," +
@ -4172,9 +4176,10 @@ public class ImService {
        sql += " ORDER BY op.create_time desc ";
        List<Map<String, Object>> mapList = hibenateUtils.createSQLQuery(sql, page, pagesize);
        for (Map<String, Object> map : mapList) {
            if (map.get("patientIdcard") != null) {
                String idcard = map.get("patientIdcard").toString();
                Integer age = IdCardUtil.getAgeForIdcard(idcard);
            if (map.get("birthday") != null) {
                String birthday = map.get("birthday").toString();
                Date birDate = DateUtil.strToDateShort(birthday);
                Integer age = IdCardUtil.getAgeByBirthday(birDate);
                map.put("patientAge", age);
            } else {
                map.put("patientAge", null);

+ 2 - 2
svr/svr-internet-hospital/pom.xml

@ -11,7 +11,7 @@
    </parent>
    <groupId>com.yihu.jw</groupId>
    <artifactId>svr-internet-hospital</artifactId>
    <artifactId>svr-internet-hospital-test</artifactId>
    <packaging>jar</packaging>
    <version>${parent.version}</version>
@ -267,7 +267,7 @@
    </dependencies>
    <build>
        <finalName>svr-internet-hospital</finalName>
        <finalName>svr-internet-hospital-test</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>

+ 1 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java

@ -672,7 +672,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
		try {
			BasePatientDO result = basePatientService.findByIdAndDel(patient);
			//---居民性别取身份证字段--
			result.setSex(Integer.parseInt(IdCardUtil.getSexForIdcard_new(result.getIdcard())));
			/*result.setSex(Integer.parseInt(IdCardUtil.getSexForIdcard_new(result.getIdcard())));*/
			if (wxId.equalsIgnoreCase("xm_ykyy_wx")){
				familyMemberService.saveYktFamily(patient);
			}

+ 3 - 8
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -415,20 +415,15 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    @GetMapping(value = BaseHospitalRequestMapping.PatientNoLogin.findDoctorInfo)
    @ApiOperation(value = "获取医生信息", notes = "获取医生信息")
    public Envelop findDoctorInfo(@ApiParam(name = "doctor", value = "医生code")
    public Envelop findDoctorInfo(@ApiParam(name = "doctor", value = "医生code",required = false)
                                     @RequestParam(value = "doctor", required = false)String doctor,
                                  @ApiParam(name = "idcard", value = "医生身份证")
                                  @ApiParam(name = "idcard", value = "医生身份证",required = false)
                                  @RequestParam(value = "idcard", required = false)String idcard,
                                     @ApiParam(name = "withWork", value = "传1带排班,其他不带")
                                     @ApiParam(name = "withWork", value = "传1带排班,其他不带",required = false)
                                     @RequestParam(value = "withWork", required = false)String withWork,
                                     @ApiParam(name = "patient", value = "患者code")
                                         @RequestParam(value = "patient", required = false)String patient)throws Exception{
        try {
            return success(prescriptionService.findDoctorInfo(doctor,idcard,withWork,patient));
        }catch (Exception e){
            return  failedException(e);
        }
    }

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

@ -1103,13 +1103,15 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findDoctorInfo)
    @ApiOperation(value = "获取医生信息", notes = "获取医生信息")
    public ObjEnvelop findDoctorInfo(@ApiParam(name = "doctor", value = "医生code")
                                     @RequestParam(value = "doctor", required = true) String doctor,
                                     @RequestParam(value = "doctor", required = false) String doctor,
                                     @ApiParam(name = "idcard", value = "医生身份证")
                                     @RequestParam(value = "idcard", required = false)String idcard,
                                     @ApiParam(name = "withWork", value = "传1带排班,其他不带")
                                     @RequestParam(value = "withWork", required = false) String withWork,
                                     @ApiParam(name = "patient", value = "患者code")
                                     @RequestParam(value = "patient", required = false) String patient) {
        try {
            return success(prescriptionService.findDoctorInfo(doctor,null, withWork, patient));
            return success(prescriptionService.findDoctorInfo(doctor,idcard, withWork, patient));
        } catch (Exception e) {
            return failedObjEnvelopException(e);
        }

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

@ -99,6 +99,8 @@ public class QrcodeService {
        }else if("xm_xzzx_wx".equals(wxId)){
            token = xzzxEntranceService.getXzToken();
        }else if("xm_hcyy_wx".equals(wxId)){
            token = hcyyEntranceService.getHcToken();
        }else{
            token = wxAccessTokenService.getWxAccessTokenById(wxId).getAccessToken();
        }
@ -146,6 +148,8 @@ public class QrcodeService {
        }else if("xm_xzzx_wx".equals(wxId)){
            token = xzzxEntranceService.getXzToken();
        }else if("xm_hcyy_wx".equals(wxId)){
            token = hcyyEntranceService.getHcToken();
        }else{
            token = wxAccessTokenService.getWxAccessTokenById(wxId).getAccessToken();
        }
@ -257,6 +261,8 @@ public class QrcodeService {
        }else if("xm_xzzx_wx".equals(wxId)){
            token = xzzxEntranceService.getXzToken();
        }else if("xm_hcyy_wx".equals(wxId)){
            token = hcyyEntranceService.getHcToken();
        }else{
            token = wxAccessTokenService.getWxAccessTokenById(wxId).getAccessToken();
        }