基于javaweb+mysql的springboothis智能医院管理系统(java+springboot+vue+maven+mybatis+mysql)

运行环境

Java≥8、MySQL≥5.7、Node.js≥10

开发工具

后端:eclipse/idea/myeclipse/sts等均可配置运行

前端:WebStorm/VSCode/HBuilderX等均可

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

基于javaweb+mysql的SpringBoothis智能医院管理系统(java+springboot+vue+maven+mybatis+mysql)

一、项目运行 环境配置:

Jdk1.8 + Tomcat8.5 + Mysql + HBuilderX(Webstorm也行)+ Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。

项目技术:

Spring + SpringBoot+ mybatis + Maven + Vue 等等组成,B/S模式 + Maven管理等等。

    public Map<String,Object> getAllInsXZ(){
        Map<String,Object> res=inspectionService.getAllInsXZ();
        return res;
    }

    @PostMapping("/getallxm")
    public Map<String,Object> getAllInsXM(@RequestBody Map<String,Object> map){
        String techExeOff=(String)map.get("depart_id");
        Map<String,Object> res=inspectionService.getAllInsXM(techExeOff);
        return res;
    }

    @PostMapping("/getform")
    public Map<String,Object> getTech(@RequestBody Map<String,Object> map){
        String techMum=(String)map.get("tech_id");
        Map<String,Object> res=inspectionService.getTech(techMum);
        return res;
    }

    @PostMapping("/addtech")
    public Map<String,Object> addTech(@RequestBody Map<String,Object> map){
        String comTechNum=(String)map.get("comTechNum");
        String check_RegID=(String)map.get("check_RegID");
        //System.out.println("add+"+comTechNum+"+"+check_RegID);
        Map<String,Object> res=inspectionService.addIns(comTechNum,check_RegID);
        return res;
    }

    @PostMapping("/addcomItem")
    public Map<String,Object> allCom(@RequestBody CommonInsShow commonInsShow){
        //System.out.println(commonInsShow);
        Map<String,Object> res=inspectionService.allCom(commonInsShow);
        return res;
    }

    @PostMapping("/delectItem")
    public Map<String,Object> deleteInsp(@RequestBody Map<String,Object> map){
        List<Map<String,Object>> maps=(List<Map<String,Object>>) map.get("mult");
        String check_RegID= (String) map.get("check_RegID");
        //System.out.println(maps);
        //System.out.println(check_RegID);

@CrossOrigin
@RestController
public class DiagnoseController {
    @Autowired
    DiagnoseService diagnoseService;

    @RequestMapping("/outdepart/dia/quezhen")
    public Map<String,Object> quezhen(@RequestBody Map<String,Object> map){
        String regID=(String)map.get("regID");
        int i = diagnoseService.zhenbi(regID);
        Map<String,Object> res=new HashMap<>();
        if(i>0){
            res.put("flag","true");
        }
        return res;
    }

    /**
     * 确诊界面的初始化,当换人是(点击选择时)
     * 返回检查项,西医/中医诊断,诊断结果,处理意见以及两个ICD编码的所有信息,以供医生添加使用
     * @param map
     * @return
     */
    @RequestMapping("/outdepart/dia/getQueZhenDate")
    public Map<String,Object> loading(@RequestBody Map<String,Object> map){
        String reg_ID=(String) map.get("patient_reg_id");
        Map<String,Object> res=new HashMap<>();
        Map<String, Object> icd1 = diagnoseService.getICD();
        res.put("childtable1",icd1.get("childtable1"));
        res.put("childtable2",icd1.get("childtable2"));
        if(reg_ID.length()!=14){//检查是不是真的挂号单号
            return res;
        }
        //根据挂号单号就去查找
        List<CheckItem> inspection = diagnoseService.getInspection(reg_ID);//获取检查项
        Map<String, Object> icd = diagnoseService.getICD(reg_ID);
        PatientMessage message = diagnoseService.getMessage(reg_ID);

        ZDMessage zdMessage=new ZDMessage(message);

        res.put("table",inspection);
        return res;
    }

    @PostMapping("/addIns")
    public Map<String,Object> addIns(@RequestBody Map<String,Object> map){
        String comTechNum=(String)map.get("comTechNum");
        String check_RegID=(String)map.get("check_RegID");
        //System.out.println("add+"+comTechNum+"+"+check_RegID);
        Map<String,Object> res=inspectionService.addIns(comTechNum,check_RegID);
        return res;
    }

    @PostMapping("/deleteById")
    public Map<String,Object> deleteById(@RequestBody CommonInsShow commonInsShow){
        String comTechNum=commonInsShow.getComTechNum();
        Map<String,Object> res=inspectionService.deleteByID(comTechNum);
        return res;
    }

    @RequestMapping("/getallxz")
    public Map<String,Object> getAllInsXZ(){
        Map<String,Object> res=inspectionService.getAllInsXZ();
        return res;
    }

    @PostMapping("/getallxm")
    public Map<String,Object> getAllInsXM(@RequestBody Map<String,Object> map){
        String techExeOff=(String)map.get("depart_id");
        Map<String,Object> res=inspectionService.getAllInsXM(techExeOff);
        return res;
    }

    @PostMapping("/getform")
    public Map<String,Object> getTech(@RequestBody Map<String,Object> map){
        String techMum=(String)map.get("tech_id");
        Map<String,Object> res=inspectionService.getTech(techMum);
        return res;
    }

    @PostMapping("/addtech")
    public Map<String,Object> addTech(@RequestBody Map<String,Object> map){
        String comTechNum=(String)map.get("comTechNum");
        String check_RegID=(String)map.get("check_RegID");
        //System.out.println("add+"+comTechNum+"+"+check_RegID);
        Map<String,Object> res=inspectionService.addIns(comTechNum,check_RegID);
        String check_RegID=(String)map.get("check_RegID");
        //System.out.println("add+"+comTechNum+"+"+check_RegID);
        Map<String,Object> res=inspectionService.addIns(comTechNum,check_RegID);
        return res;
    }

    @PostMapping("/deleteById")
    public Map<String,Object> deleteById(@RequestBody CommonInsShow commonInsShow){
        String comTechNum=commonInsShow.getComTechNum();
        Map<String,Object> res=inspectionService.deleteByID(comTechNum);
        return res;
    }

    @RequestMapping("/getallxz")
    public Map<String,Object> getAllInsXZ(){
        Map<String,Object> res=inspectionService.getAllInsXZ();
        return res;
    }

    @PostMapping("/getallxm")
    public Map<String,Object> getAllInsXM(@RequestBody Map<String,Object> map){
        String techExeOff=(String)map.get("depart_id");
        Map<String,Object> res=inspectionService.getAllInsXM(techExeOff);
        return res;
    }

    @PostMapping("/getform")
    public Map<String,Object> getTech(@RequestBody Map<String,Object> map){
        String techMum=(String)map.get("tech_id");
        Map<String,Object> res=inspectionService.getTech(techMum);
        return res;
    }

    @PostMapping("/addtech")
    public Map<String,Object> addTech(@RequestBody Map<String,Object> map){
        String comTechNum=(String)map.get("comTechNum");
        String check_RegID=(String)map.get("check_RegID");
        //System.out.println("add+"+comTechNum+"+"+check_RegID);
        Map<String,Object> res=inspectionService.addIns(comTechNum,check_RegID);
        return res;
    }

    @PostMapping("/addcomItem")
    public Map<String,Object> allCom(@RequestBody CommonInsShow commonInsShow){
        //System.out.println(commonInsShow);
        Map<String,Object> res=inspectionService.allCom(commonInsShow);
        return res;
    }

    @PostMapping("/delectItem")
    public Map<String,Object> deleteInsp(@RequestBody Map<String,Object> map){
        List<Map<String,Object>> maps=(List<Map<String,Object>>) map.get("mult");
        Map<String,Object> map1=new HashMap<>();
        map1.put("table",listTableData);
        map1.put("flag","yes");
        return map1;
    }

    @PostMapping("/keepdata")
    public Map<String,Object> update(@RequestBody ListTableData list){
        Map<String,Object> map=new HashMap<>();
        List<DocTableData> DocTableDatas = list.getList();
        boolean isupdate = docschMagService.update(list);
        if(isupdate){
            map.put("flag","yes");
        }
        return map;
    }

}

@CrossOrigin
@RestController
public class DepController {

    @Autowired
    DepService depService;

    @RequestMapping("/addDep")//添加科室
        return withdnumService.searchBy(medRecNum,name,idNum);

    }

    @PostMapping("/reception/czwith")
    public Map<String,Object> czwith(@RequestBody WithShow withShow){
        int i = withdnumService.backH(withShow.getRegID());
        String s="true";
        if(i==0){
            s="false";
        }
        Map<String,Object> map= new HashMap<>();
        map.put("flag",s);
        return map;
    }
}

/*
* @CrossOrigin:跨域
* @RestController:标识只返回字符串,而不是视图解析
* */

@CrossOrigin
@RestController
public class LoginController {
    @Autowired
    UserServiceImpl userService;

    @RequestMapping("/login")//登录功能的实现
    public Map<String,Object> login(@RequestBody User user){
        User user2 = userService.getUserByID(user.getId());
        HashMap<String,Object> res=new HashMap<>();
        String flag="no";
        if(user2==null){//无效用户
            res.put("flag",flag);
            return res;
        }
        /*数据库中有此id*/
        if(user.getPassword().equals(user2.getPassword())){//验证成功
            flag="yes";
            res.put("user",user2);
        }
        res.put("flag",flag);
        return res;

        Map<String,Object> res=medPatService.getAllmedpat();
        return res;
    }

    @PostMapping("/outpart/getUserTable")
    public Map<String,Object> getmedpatByName(@RequestBody Map<String,Object> map){
        String patient_Name=(String)map.get("patname");
        Map<String,Object> res=medPatService.getmedpatByName(patient_Name);
        return res;
    }

    @PostMapping("/outpart/selectuser")
    public Map<String,Object> getAllMedicine(@RequestBody Map<String,Object> map){
        String pre_RegID=(String) map.get("regid");
        Map<String,Object> res=medPatService.getAllMedicine(pre_RegID);
        return res;
    }

    @PostMapping("/outpart/opendrug")
    public Map<String,Object> kaiyap(@RequestBody Map<String,Object> map){
        Map<String,Object> res=new HashMap<>();
        List<Map<String,Object>> maps=(List<Map<String,Object>>)map.get("med");
        for(Map<String,Object> m:maps){
            String pm_PreID=(String) m.get("cid");
            String pm_MedID=(String) m.get("mid");
            res=medPatService.UpdateMedicine(pm_PreID,pm_MedID);
        }
        return res;
    }
}

@CrossOrigin
@RestController
public class WithdnumController {
    @Autowired
    WithdnumService withdnumService;
        return res;
    }

    /*
    * 获取并加载当前科室和号别的医生(有余号的)
    * */
    @RequestMapping("/reception/selbydoc")
    public Map<String,Object> SelBydoc(@RequestBody RegDepart regDepart){
        Map<String,Object> res=new HashMap<>();
        if(regDepart.getValue()==null||regDepart.getRegType()==null){//如果没有科室或号别就直接返回null
            return res;
        }
        //根据科室和号别获取医生(有问题,需要动态查询挂号信息,目前是静态)
        List<User> list = regService.getByDeReg(regDepart.getValue(), regDepart.getRegType());

        List<SelectK> list2= new ArrayList<>();
        for(User user1:list){
            list2.add(new SelectK(user1.getName(),user1.getId()));
        }
        res.put("doc",list2);
        if(regDepart.getRegType().equals("专家号")){
            res.put("type","50");
        }else if(regDepart.getRegType().equals("普通号")){
            res.put("type","20");
        }else res.put("type","");
        return res;

    }

    /**
     * 获取当前医生的余号,已经是实时的,已经判断了上下午
     * @param regDepart
     * @return
     */
    @PostMapping("/reception/getRgeNumber")
    public int getNumber(@RequestBody RegDepart regDepart){
        String docID=regDepart.getOptDoc();
        return regService.getRegNumber(docID)-regService.getNowNum(docID);
    }

    /**
     * 获取medRecNum病历号 billNum发票号   regFormNum挂单单号   seqNum序号   regTime(时间非日期)
     */
    @PostMapping("/reception/fetchdate")
    public Map<String,Object> getFetchdate(@RequestBody Map<String,Object> map){
        String optDoc =(String)map.get("optDoc");
        String idNum =(String)map.get("idNum");
        Map<String,Object> res=regService.getFetchdate(optDoc,idNum);
        return res;
    }

}

@CrossOrigin
@RestController
public class FirstPageController {

    @Autowired
    FirstpageService firstpageService;

    @PostMapping("/addbingli")
    public Map<String,Object> getFpage(@RequestBody Map<String,Object> map){
        String ft_ID=(String) map.get("patient_reg_id");

        Map<String,Object> res=firstpageService.getFirstpage(ft_ID);
        return res;
    }

    @PostMapping("/addfpage")
    public Map<String,Object> addFirstpage(@RequestBody FirstPage firstPage){
        Map<String,Object> res=firstpageService.addFirstpage(firstPage);
        return res;
    }
}


    @RequestMapping("/getAllMedicine")
    public Map<String,Object> getAllMedicine(){
        Map<String,Object> res=medicineService.getAllMedicine();
        return res;
    }

    @RequestMapping("/getMedicineBy")
    public Map<String,Object> getMedicineBy(@RequestBody Medicine medicine){
        Map<String, Object> res = medicineService.getMedicineBy(medicine);
        return res;
    }

    @RequestMapping("/deleteMedicineByID")
    public Map<String,Object> deleteMedicineByID(@RequestBody MedicineShow medicineShow){

        Map<String,Object> res=medicineService.deleteByID(medicineShow);
        return res;
    }

    @RequestMapping("/updateMedicine")
    public Map<String,Object> updateMedicine(@RequestBody MedicineShow medicineShow){
        Map<String,Object> res=medicineService.updateMedicine(medicineShow);
        return res;
    }
}

            String check_TechID=(String) map1.get("techNum");
            //System.out.println(check_TechID);
            res=inspectionService.deleteInsp(check_RegID,check_TechID);
        }
        return res;
    }

    @PostMapping("/update")
    public Map<String,Object> updateInspection(@RequestBody Map<String,Object> map){
        List<Map<String,Object>> maps=(List<Map<String,Object>>) map.get("mult");
        String check_RegID= (String) map.get("check_RegID");
        Map<String,Object> res=new HashMap<>();
        for(Map<String,Object> map1:maps){
            String check_TechID=(String) map1.get("techNum");
            res=inspectionService.updateInspection(check_RegID,check_TechID);
        }
        return res;
    }
}

@CrossOrigin
@RestController
public class SiteRegController {

    @Autowired
        int addicd = diagnoseService.addicd(regID, icdID);

        Map<String,Object> res=new HashMap<>();
        if(addicd==0){
            res.put("flag","false");
        }else {
            res.put("flag","true");
        }

        return res;

    }

    @PostMapping("/outdepart/dia/addeicd")
    public Map<String,Object> addEicd(@RequestBody Map<String,Object> map){//添加中医诊断
        String regID=(String) map.get("regID");
        String icdID=(String) map.get("icdID");
        int addicd = diagnoseService.addicd(regID, icdID);

        Map<String,Object> res=new HashMap<>();
        if(addicd==0){
            res.put("flag","false");
        }else {
            res.put("flag","true");
        }

        return res;

    }
    @RequestMapping("/outdepart/dia/update")
    public Map<String,Object> update(@RequestBody Map<String,Object> map){
        String regID=(String)map.get("regID");
        Map<String,Object> map1=(Map<String,Object>)map.get("form");
        PatientMessage patientMessage=new PatientMessage();
        patientMessage.setPm_ID(regID);
        patientMessage.setPm_Jieguo((String)map1.get("disrsu"));
        patientMessage.setPm_Yijian((String)map1.get("dissug"));
        int i = diagnoseService.updateMessage(patientMessage);
        /*--------*/
        Map<String,Object> res=new HashMap<>();
        if(i==0){
            res.put("flag","false");
        }else {
            res.put("flag","true");
        }

        return res;
    }
        return res;
    }

    @PostMapping("delectdrug")
    public Map<String,Object> deletePremedByNum(@RequestBody Map<String,Object> map){
        List<Map<String,Object>> med=(List<Map<String, Object>>)map.get("med");
        String pm_PreID=(String) map.get("cfid");
        Map<String,Object> res=new HashMap<>();
        for(Map<String,Object> m:med){
            String pm_MedID=(String)m.get("id");
            res=premedService.deletePremedByNum(pm_PreID,pm_MedID);
        }
        return res;
    }
}

@CrossOrigin
@RestController
public class PrescriptionController {

    @Autowired
    PrescriptionService prescriptionService;

    @PostMapping("/addchufang")
    public Map<String,Object> addPrescription(@RequestBody Map<String,Object> map){
        String pre_RegID=(String)map.get("regID");
        String pre_Name=(String)map.get("name");
        Map<String,Object> res=prescriptionService.addPrescription(pre_RegID,pre_Name);
        return res;
    }

    /*
    * 获取并加载当前科室和号别的医生(有余号的)
    * */
    @RequestMapping("/reception/selbydoc")
    public Map<String,Object> SelBydoc(@RequestBody RegDepart regDepart){
        Map<String,Object> res=new HashMap<>();
        if(regDepart.getValue()==null||regDepart.getRegType()==null){//如果没有科室或号别就直接返回null
            return res;
        }
        //根据科室和号别获取医生(有问题,需要动态查询挂号信息,目前是静态)
        List<User> list = regService.getByDeReg(regDepart.getValue(), regDepart.getRegType());

        List<SelectK> list2= new ArrayList<>();
        for(User user1:list){
            list2.add(new SelectK(user1.getName(),user1.getId()));
        }
        res.put("doc",list2);
        if(regDepart.getRegType().equals("专家号")){
            res.put("type","50");
        }else if(regDepart.getRegType().equals("普通号")){
            res.put("type","20");
        }else res.put("type","");
        return res;

    }

    /**
     * 获取当前医生的余号,已经是实时的,已经判断了上下午
     * @param regDepart
     * @return
     */
    @PostMapping("/reception/getRgeNumber")
    public int getNumber(@RequestBody RegDepart regDepart){
        String docID=regDepart.getOptDoc();
        return regService.getRegNumber(docID)-regService.getNowNum(docID);
    }
    LoadingS loadingS;
    @Autowired
    DocschMagService docschMagService;

    @RequestMapping("/getdocsch")
    public List<SelectK> getAllDeps(){
        List<SelectK> depManas = loadingS.getDepManas();
        return depManas;
    }

    @PostMapping("/searchdata")
    public Map<String,Object> searchdata(@RequestBody Map<String,Object> map){
        String departID=(String)map.get("depart");
        List<DocTableData> byDep = docschMagService.getByDep(departID);
        ListTableData listTableData= new ListTableData();
        listTableData.setDepID(departID);
        listTableData.setList(byDep);
        Map<String,Object> map1=new HashMap<>();
        map1.put("table",listTableData);
        map1.put("flag","yes");
        return map1;
    }

    @PostMapping("/keepdata")
    public Map<String,Object> update(@RequestBody ListTableData list){
        Map<String,Object> map=new HashMap<>();
        List<DocTableData> DocTableDatas = list.getList();
        boolean isupdate = docschMagService.update(list);
        if(isupdate){
            map.put("flag","yes");
        }
        return map;
    }

}

        HashMap<String,Object> res=new HashMap<>();
        List<User> users = userService.getUsersBy(user);
       //System.out.println(users);
        List<UserShow> allUserShow=new ArrayList<>();
        for(User userw: users){
            allUserShow.add(new UserShow(userw));
        }
        if(users.size()!=0){
            flag="yes";
        }
        res.put("flag",flag);
        res.put("users",allUserShow);
        return res;
    }

    @RequestMapping("/deleteById")
    public Map<String ,Object> deleteById(@RequestBody UserShow user){
        String id=user.getId();
        HashMap<String,Object> res=new HashMap<>();
        String flag="yes";
        userService.deleteById(id);

        res.put("flag",flag);
        return res;
    }

    @RequestMapping("/updateUser")
    public Map<String ,Object> updataUser(@RequestBody UserShow user){
        User user1=new User(user);
        boolean isupdate = userService.updateUser(user1);
        HashMap<String,Object> res=new HashMap<>();
        String flag="yes";

        return res;
    }

    @RequestMapping("/userloading")
    public Map<String,Object> loading(){
        Map<String, Object> loading = userService.loading();
        return loading;
    }

    @PostMapping("/addtech")
    public Map<String,Object> addTech(@RequestBody Map<String,Object> map){
        String comTechNum=(String)map.get("comTechNum");
        String check_RegID=(String)map.get("check_RegID");
        //System.out.println("add+"+comTechNum+"+"+check_RegID);
        Map<String,Object> res=inspectionService.addIns(comTechNum,check_RegID);
        return res;
    }

    @PostMapping("/addcomItem")
    public Map<String,Object> allCom(@RequestBody CommonInsShow commonInsShow){
        //System.out.println(commonInsShow);
        Map<String,Object> res=inspectionService.allCom(commonInsShow);
        return res;
    }

    @PostMapping("/delectItem")
    public Map<String,Object> deleteInsp(@RequestBody Map<String,Object> map){
        List<Map<String,Object>> maps=(List<Map<String,Object>>) map.get("mult");
        String check_RegID= (String) map.get("check_RegID");
        //System.out.println(maps);
        //System.out.println(check_RegID);
        Map<String,Object> res=new HashMap<>();
        for(Map<String,Object> map1:maps){
            String check_TechID=(String) map1.get("techNum");
            //System.out.println(check_TechID);
            res=inspectionService.deleteInsp(check_RegID,check_TechID);
        }
        return res;
    }

    @PostMapping("/update")
    public Map<String,Object> updateInspection(@RequestBody Map<String,Object> map){
        List<Map<String,Object>> maps=(List<Map<String,Object>>) map.get("mult");
        String check_RegID= (String) map.get("check_RegID");
        Map<String,Object> res=new HashMap<>();
        for(Map<String,Object> map1:maps){
            String check_TechID=(String) map1.get("techNum");
            res=inspectionService.updateInspection(check_RegID,check_TechID);
        }
    public Map<String,Object> loading(){
        Map<String,Object> res=new HashMap<>();
        List<Departoptions> list = loadingS.sitRegDep();
        res.put("deps",list);
        return res;
    }

    /*
    * 获取并加载当前科室和号别的医生(有余号的)
    * */
    @RequestMapping("/reception/selbydoc")
    public Map<String,Object> SelBydoc(@RequestBody RegDepart regDepart){
        Map<String,Object> res=new HashMap<>();
        if(regDepart.getValue()==null||regDepart.getRegType()==null){//如果没有科室或号别就直接返回null
            return res;
        }
        //根据科室和号别获取医生(有问题,需要动态查询挂号信息,目前是静态)
        List<User> list = regService.getByDeReg(regDepart.getValue(), regDepart.getRegType());

        List<SelectK> list2= new ArrayList<>();
        for(User user1:list){
            list2.add(new SelectK(user1.getName(),user1.getId()));
        }
        res.put("doc",list2);
        if(regDepart.getRegType().equals("专家号")){
            res.put("type","50");
        }else if(regDepart.getRegType().equals("普通号")){
            res.put("type","20");
        }else res.put("type","");
        return res;

    }

    /**
     * 获取当前医生的余号,已经是实时的,已经判断了上下午
     * @param regDepart
     * @return
     */
    @PostMapping("/reception/getRgeNumber")
    public int getNumber(@RequestBody RegDepart regDepart){
        String docID=regDepart.getOptDoc();
        return regService.getRegNumber(docID)-regService.getNowNum(docID);
    }

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐