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

基于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管理等等。

        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;
    }

}

@CrossOrigin
@RestController
public class PatientregController {

    @Autowired
    PatientregService patientregService;
        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;

    @RequestMapping("/reception/loadingwith")
    public Map<String,Object> loadingreg(){//退号页面加载信息

        return withdnumService.loading();
    }

    @RequestMapping("/reception/withby")
    public Map<String,Object> searchby(@RequestBody Map<String,Object> map){
        String medRecNum=(String)map.get("medRecNum");
        String name=(String)map.get("name");
        String idNum=(String)map.get("idNum");
        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
public class DocschMagController {

    @Autowired
    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;
    }

}

        String pm_Num=(String)med.get("num");
        String pm_Frequency=(String)med.get("fre");
        Map<String,Object> res=premedService.addPremed(pm_PreID,pm_MedID,pm_Num,pm_Frequency);
        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){

@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;
    }

    @PostMapping("/delectchufang")
    public Map<String,Object> deletePrescriptionByNum(@RequestBody Map<String,Object> map){
        Map<String,Object> res=new HashMap<>();
        String pre_RegID=(String)map.get("regID");
        List<Map<String,Object>> maps=(List<Map<String,Object>>) map.get("table");
        for(Map<String,Object> m:maps){
            String pre_ID=(String)m.get("id");
            res=prescriptionService.deletePrescriptionByNum(pre_ID,pre_RegID);
        }
        return res;
    }

    @PostMapping("/openchufang")
    public Map<String,Object> updatePrescription(@RequestBody Map<String,Object> map){
        Map<String,Object> res=new HashMap<>();
        String pre_RegID=(String)map.get("regID");
        List<Map<String,Object>> maps=(List<Map<String,Object>>) map.get("table");
        for(Map<String,Object> m:maps){
            String pre_ID=(String) m.get("id");
            String pre_Name=(String)m.get("name");
            res=prescriptionService.updatePrescription(pre_ID,pre_RegID,pre_Name);
        }
        return res;
    }
}

    @Autowired
    UserService userService;
    @Autowired
    RegService regService;

    /*
    * 加载挂号科室的信息*/
    @RequestMapping("/reception/regloaddep")
    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

@CrossOrigin
@RestController
public class PatientregController {

    @Autowired
    PatientregService patientregService;

    @PostMapping("/loading")
    public Map<String,Object> getPatient(@RequestBody Map<String,Object> map){

        HashMap<String,Object> res=new HashMap<>();
        String reg_optDoc=(String)map.get("docid");
        String reg_State1="已挂号";
        List<PatientShow> patientShow1 =patientregService.getPatient(reg_optDoc,reg_State1);

        res.put("patiswz",patientShow1);
        String reg_State2="已就诊";
        List<PatientShow> patientShow2=patientregService.getPatient(reg_optDoc,reg_State2);
        System.out.println(patientShow2);
        res.put("patisyz",patientShow2);
        return res;
    }

    @PostMapping("/getUserTable")
    public Map<String,Object> getPatientByDP(@RequestBody Map<String,Object> map){
        HashMap<String,Object> res=new HashMap<>();
        String reg_optDoc=(String)map.get("docid");
        String patient_Name=(String)map.get("patname");
        //System.out.println(reg_optDoc);
        //System.out.println(patient_Name);
        String reg_State1="已挂号";
        List<PatientShow> patientShows1=patientregService.getPatientByDP(reg_optDoc,patient_Name,reg_State1);
        res.put("patisbydpwz",patientShows1);
        String reg_State2="已就诊";
        List<PatientShow> patientShows2=patientregService.getPatientByDP(reg_optDoc,patient_Name,reg_State2);
        res.put("patisbydpyz",patientShows2);
        return res;
    }
}

    @Autowired
    RegService regService;

    /*
    * 加载挂号科室的信息*/
    @RequestMapping("/reception/regloaddep")
    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);
    }

    /**
     * 获取medRecNum病历号 billNum发票号   regFormNum挂单单号   seqNum序号   regTime(时间非日期)
        Map<String,Object> res=depService.deleteByNum(dep);
        return res;
    }

    @RequestMapping("/updateDep")
    public Map<String,Object> updateDep(@RequestBody DepShow dep){

        Map<String,Object> res=depService.updateDep(dep);
        return res;
    }
}

@CrossOrigin
@RestController
public class TechPatController {

    @Autowired
    TechPatService techPatService;

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

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

    @PostMapping("selecttechpat")
    public Map<String,Object> getAllTech(@RequestBody Map<String,Object> map){
        String check_RegID=(String) map.get("reg_ID");
        Map<String,Object> res=techPatService.getAllTech(check_RegID);
    @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);
        }
        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;
    }

    /**
     * 根据身份证号查询是否存在这个病人,并返回其基本的数据
     */
    @PostMapping("/reception/getPatient")
    public Map<String,Object> getPatient(@RequestBody Map<String,Object> map){
        String idNum =(String)map.get("idNum");
        Map<String, Object> patient = regService.getPatient(idNum);
        return patient;
    }

    /**
     * 真正实现了挂号的功能
     * @param regForm
     * @return
     */
    @PostMapping("/reception/addReg")
    public Map<String,Object> addReg(@RequestBody RegForm regForm){

        regService.add(regForm);
    @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;
    }

    /**
     * 根据身份证号查询是否存在这个病人,并返回其基本的数据
     */
    @PostMapping("/reception/getPatient")
    public Map<String,Object> getPatient(@RequestBody Map<String,Object> map){
        String idNum =(String)map.get("idNum");
        Map<String, Object> patient = regService.getPatient(idNum);
    }

    @RequestMapping("/outdepart/addwicd")
    public Map<String,Object> addWicd(@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;

    }

    @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);
        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;
    }

}

@CrossOrigin
@RestController
public class DepController {

    @Autowired
    DepService depService;

    @RequestMapping("/addDep")//添加科室
    public Map<String,Object> addDep(@RequestBody DepMana depMana) {
        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;
    }

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

}

        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);
        Map<String,Object> res=new HashMap<>();
        for(Map<String,Object> map1:maps){
    }

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

@CrossOrigin
@RestController
public class DocschMagController {

    @Autowired
    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);

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值