Bläddra i källkod

中山医院配置

Trick 5 år sedan
förälder
incheckning
1ddde069bd

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

@ -4054,14 +4054,57 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @return
     * @throws Exception
     */
    public net.sf.json.JSONObject setRecord(String json)throws Exception{
    public net.sf.json.JSONObject setRecord(String json,String type)throws Exception{
        ArchiveVO archiveVO = objectMapper.readValue(json,ArchiveVO.class);
        if(archiveVO!=null){
           return entranceService.BS16018(archiveVO,demoFlag);
            if(StringUtils.isNotBlank(archiveVO.getBrnl00())){
               archiveVO.setBrnl00(IdCardUtil.getAgeForIdcard(archiveVO.getSfzhao())+"");
            }
            if(StringUtils.isNotBlank(archiveVO.getCsrq00())){
               archiveVO.setCsrq00(DateUtil.dateToStr(IdCardUtil.getBirthdayForIdcard(archiveVO.getSfzhao()),"yyyyMMddHHmmss"));
            }
            //保存互联网医院居民账户
            savePatient(archiveVO);
            //1为需要同步建档
            if("1".equals(type)){
                return entranceService.BS16018(archiveVO,demoFlag);
            }
        }
        return null;
    }
    /**
     * 存储居民
     * @param archiveVO
     * @return
     */
    public Boolean savePatient(ArchiveVO archiveVO)throws Exception{
        BasePatientDO patientDO =  basePatientDao.findByIdcardAndDel(archiveVO.getSfzhao(),"1");
        if(patientDO == null) {
            BasePatientDO patient = new BasePatientDO();
            String salt = UUID.randomUUID().toString().substring(0, 5);
            String mobile = archiveVO.getYytel0();
            String pw = mobile.substring(mobile.length() - 6);
            patient.setIdcard(archiveVO.getSfzhao());
            patient.setName(archiveVO.getXming0());
            patient.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
            patient.setSalt(salt);
            patient.setMobile(mobile);
            patient.setDel("1");
            patient.setEnabled(1);
            patient.setLocked(0);
            patient.setCreateTime(new Date());
            patient.setUpdateTime(new Date());
            patient.setBirthday(IdCardUtil.getBirthdayForIdcard(archiveVO.getSfzhao()));
            basePatientDao.save(patient);
        }
        return true;
    }
    /**
     * 获取HIIS居民档案信息
     * @param idcard

+ 3 - 0
business/base-service/src/mqConfig/esbmq-config.xml

@ -69,6 +69,9 @@
				<!--建立档案-->
				<BS16018_0>EwellQ.S60.BS16018.PUT</BS16018_0>
				<BS16018_1>EwellQ.S60.BS16018.GET</BS16018_1>
				<!--档案查询-->
				<BS10008_0>EwellQ.S60.BS10008.PUT</BS10008_0>
				<BS10008_1>EwellQ.S60.BS10008.GET</BS10008_1>
				<!--检查检验start-->
				<BS20030_0>EwellQ.S60.BS20030.PUT</BS20030_0>

+ 7 - 0
svr/svr-internet-hospital-entrance/src/mqConfig/esbmq-config.xml

@ -72,6 +72,13 @@
				<MS02017_0>EwellQ.S60.MS02017.PUT</MS02017_0>
				<MS02017_1>EwellQ.S60.MS02017.GET</MS02017_1>
				<!--建立档案-->
				<BS16018_0>EwellQ.S60.BS16018.PUT</BS16018_0>
				<BS16018_1>EwellQ.S60.BS16018.GET</BS16018_1>
				<!--档案查询-->
				<BS10008_0>EwellQ.S60.BS10008.PUT</BS10008_0>
				<BS10008_1>EwellQ.S60.BS10008.GET</BS10008_1>
				<!--检查检验start-->
				<BS20030_0>EwellQ.S60.BS20030.PUT</BS20030_0>
				<BS20030_1>EwellQ.S60.BS20030.GET</BS20030_1>

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

@ -906,10 +906,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    }
    @PostMapping(value = BaseHospitalRequestMapping.Prescription.setRecord)
    @ApiOperation(value = "建立档案")
    @ApiOperation(value = "his建立档案与互联网医院账户同步")
    public Envelop setRecord(@ApiParam(name = "json", value = "档案实体json")
                             @RequestParam(value = "json",required = true) String json)throws Exception{
        return success(prescriptionService.setRecord(json));
                             @RequestParam(value = "json",required = true) String json,
                             @ApiParam(name = "type", value = "1.需要his建档,2.仅同步互联网医院账户")
                             @RequestParam(value = "type",required = true)String type)throws Exception{
        return success(prescriptionService.setRecord(json,type));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findPatientRecord)