Sfoglia il codice sorgente

Merge branch '2.0' of http://27.154.233.186:10080/Amoy2/wlyy2.0 into 2.0

wangzhinan 1 anno fa
parent
commit
2309dbbaba
14 ha cambiato i file con 905 aggiunte e 319 eliminazioni
  1. 14 1
      common/common-entity/src/db/2023.sql
  2. 47 0
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/RehabilitationPatientInfoDO.java
  3. 23 23
      starter/swagger-starter/pom.xml
  4. 3 3
      starter/swagger-starter/src/main/java/com/yihu/jw/SwaggerConfig.java
  5. 46 0
      svr/svr-manage/src/main/java/com/yihu/customer/entity/RehabilitationPatientInfoDO.java
  6. 7 7
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/DiagnosisInformationController.java
  7. 81 0
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/DoctorDiagnosisInformationController.java
  8. 232 0
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/DoctorRehabilitaionInfoController.java
  9. 14 20
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/RehabilitationManageController.java
  10. 1 3
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/RehabilitationPlanController.java
  11. 20 0
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/dao/RehabilitationAdviceDao.java
  12. 28 0
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/service/DiagnosisInformationService.java
  13. 388 261
      svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/service/RehabilitationInfoService.java
  14. 1 1
      svr/svr-visit-behind/src/main/resources/bootstrap.yml

+ 14 - 1
common/common-entity/src/db/2023.sql

@ -220,4 +220,17 @@ ELSE
    SET result = CONCAT(ROUND((numerator / denominator) * 100, 2), '%');
END IF;
RETURN result;
END;
END;
=========================== 康复模块[开始]=================================
ALTER TABLE `base`.`wlyy_rehabilitation_patient_info`
ADD COLUMN `type` tinyint(10) NULL COMMENT '1患者家签列表 2康复下转列表' AFTER `dept_name`,
ADD COLUMN `sign_status` tinyint(10) ZEROFILL NULL COMMENT '签约状态(1已家签 0 待家签)' AFTER `type`,
ADD COLUMN `patient` varchar(50) NULL COMMENT '居民code' AFTER `code`,
ADD COLUMN `create_user` varchar(100) NULL COMMENT '创建人' AFTER `sign_status`,
ADD COLUMN `create_user_name` varchar(50) NULL COMMENT '创建人姓名' AFTER `create_user`;
ALTER TABLE `base`.`wlyy_patient_rehabilitation_plan`
ADD COLUMN `patient_info_code` varchar(255) NULL AFTER `plan_doctor_name`;
=========================== 康复模块[结束]=================================

+ 47 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/RehabilitationPatientInfoDO.java

@ -54,6 +54,53 @@ public class RehabilitationPatientInfoDO extends IdEntity {
    private Integer archiveStatus;//档案状态
    private String archiveStatusName;//档案状态
    private String patient;    //居民code
    private Integer type;//1患者家签列表 2康复下转列表
    private Integer signStatus;//签约状态(1已家签 0 待家签)
    private String createUser;//创建code
    private String createUserName;//创建者
    public String getPatient() {
        return patient;
    }
    public void setPatient(String patient) {
        this.patient = patient;
    }
    public Integer getType() {
        return type;
    }
    public void setType(Integer type) {
        this.type = type;
    }
    public Integer getSignStatus() {
        return signStatus;
    }
    public void setSignStatus(Integer signStatus) {
        this.signStatus = signStatus;
    }
    public String getCreateUser() {
        return createUser;
    }
    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }
    public String getCreateUserName() {
        return createUserName;
    }
    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }
    public String getCode() {
        return code;
    }

+ 23 - 23
starter/swagger-starter/pom.xml

@ -12,32 +12,32 @@
    <artifactId>swagger-starter</artifactId>
    <dependencies>
        <dependency>
            <groupId>com.github.xiaoymin</groupId>
            <artifactId>knife4j-spring-boot-starter</artifactId>
            <version>2.0.2</version>
        </dependency>
<!--        <dependency>-->
<!--            <groupId>com.github.xiaoymin</groupId>-->
<!--            <artifactId>swagger-bootstrap-ui</artifactId>-->
<!--            <version>1.9.3</version>-->
<!--        </dependency>-->
<!--        <dependency>-->
<!--            <groupId>io.springfox</groupId>-->
<!--            <artifactId>springfox-swagger2</artifactId>-->
<!--            <version>${version.swagger}</version>-->
<!--        </dependency>-->
<!--        <dependency>-->
<!--            <groupId>io.springfox</groupId>-->
<!--            <artifactId>springfox-swagger-ui</artifactId>-->
<!--            <version>${version.swagger-ui}</version>-->
<!--        </dependency>-->
<!--        <dependency>-->
<!--            <groupId>io.springfox</groupId>-->
<!--            <artifactId>springfox-staticdocs</artifactId>-->
<!--            <version>${version.springfox-staticdocs}</version>-->
<!--            <artifactId>knife4j-spring-boot-starter</artifactId>-->
<!--            <version>2.0.2</version>-->
<!--        </dependency>-->
        <dependency>
            <groupId>com.github.xiaoymin</groupId>
            <artifactId>swagger-bootstrap-ui</artifactId>
            <version>1.9.3</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>${version.swagger}</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>${version.swagger-ui}</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-staticdocs</artifactId>
            <version>${version.springfox-staticdocs}</version>
        </dependency>
        <dependency>
            <groupId>io.github.swagger2markup</groupId>
            <artifactId>swagger2markup</artifactId>

+ 3 - 3
starter/swagger-starter/src/main/java/com/yihu/jw/SwaggerConfig.java

@ -1,6 +1,6 @@
package com.yihu.jw;
import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
@ -21,10 +21,10 @@ import java.util.List;
import static com.google.common.base.Predicates.or;
import static springfox.documentation.builders.PathSelectors.regex;
@EnableKnife4j
//@EnableKnife4j
@Configuration
@EnableSwagger2
//@EnableSwaggerBootstrapUI
@EnableSwaggerBootstrapUI
public class SwaggerConfig {
    public static final String API_VERSION = "v1.0";

+ 46 - 0
svr/svr-manage/src/main/java/com/yihu/customer/entity/RehabilitationPatientInfoDO.java

@ -36,6 +36,52 @@ public class RehabilitationPatientInfoDO extends IdEntity {
    private Date createTime;//请求时间
    private Integer status;//是否分配 0未分配 1已分配
    private String patient;    //居民code
    private Integer type;//1患者家签列表 2康复下转列表
    private Integer signStatus;//签约状态(1已家签 0 待家签)
    private String createUser;//创建code
    private String createUserName;//创建者
    public String getPatient() {
        return patient;
    }
    public void setPatient(String patient) {
        this.patient = patient;
    }
    public Integer getType() {
        return type;
    }
    public void setType(Integer type) {
        this.type = type;
    }
    public Integer getSignStatus() {
        return signStatus;
    }
    public void setSignStatus(Integer signStatus) {
        this.signStatus = signStatus;
    }
    public String getCreateUser() {
        return createUser;
    }
    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }
    public String getCreateUserName() {
        return createUserName;
    }
    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }
    public String getCode() {
        return code;
    }

+ 7 - 7
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/DiagnosisInformationController.java

@ -31,13 +31,13 @@ public class DiagnosisInformationController extends EnvelopRestEndpoint {
    @PostMapping(value = SpecialistMapping.diagnosisInformation.createDiagnosisInformation)
    @ApiOperation(value = "诊疗信息创建")
    public Envelop createDiagnosisInformation(@ApiParam(name = "diagnosisInformationJson", value = "实体JSON")
                                                       @RequestParam(value = "diagnosisInformationJson")String diagnosisInformationJson){
                                              @RequestParam(value = "diagnosisInformationJson") String diagnosisInformationJson) {
        try {
            ObjectMapper objectMapper = new ObjectMapper();
            objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
            PatientDiagnosisInformationDO diagnosisInformationDO = objectMapper.readValue(diagnosisInformationJson, PatientDiagnosisInformationDO.class);
            return diagnosisInformationService.createDiagnosisInformation(diagnosisInformationDO);
        }catch (Exception e){
        } catch (Exception e) {
            e.printStackTrace();
            // tracer.getCurrentSpan().logEvent(e.getMessage())
            return ObjEnvelop.getError(e.getMessage());
@ -47,10 +47,10 @@ public class DiagnosisInformationController extends EnvelopRestEndpoint {
    @GetMapping(value = SpecialistMapping.diagnosisInformation.findDiagnosisInformationByPlanId)
    @ApiOperation(value = "根据康复计划id查找诊疗信息")
    public Envelop findDiagnosisInformationByPlanId(@ApiParam(name = "planId", value = "康复计划id")
                                              @RequestParam(value = "planId") String planId){
                                                    @RequestParam(value = "planId") String planId) {
        try {
            return diagnosisInformationService.findDiagnosisInformationByPlanId(planId);
        }catch (Exception e){
        } catch (Exception e) {
            e.printStackTrace();
            // tracer.getCurrentSpan().logEvent(e.getMessage())
            return ObjEnvelop.getError(e.getMessage());
@ -60,14 +60,14 @@ public class DiagnosisInformationController extends EnvelopRestEndpoint {
    @GetMapping(value = SpecialistMapping.diagnosisInformation.findDiagnosisInformationByPatient)
    @ApiOperation(value = "查找居民诊疗信息记录")
    public Envelop findDiagnosisInformationByPatient(@ApiParam(name = "patient", value = "居民code")
                                                    @RequestParam(value = "patient") String patient,
                                                     @RequestParam(value = "patient") String patient,
                                                     @ApiParam(name = "page", value = "第几页")
                                                     @RequestParam(value = "page") Integer page,
                                                     @ApiParam(name = "size", value = "行数")
                                                         @RequestParam(value = "size") Integer size){
                                                     @RequestParam(value = "size") Integer size) {
        try {
            return diagnosisInformationService.findDiagnosisInformationByPatient(patient, page, size);
        }catch (Exception e){
        } catch (Exception e) {
            e.printStackTrace();
            // tracer.getCurrentSpan().logEvent(e.getMessage())
            return ObjEnvelop.getError(e.getMessage());

+ 81 - 0
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/DoctorDiagnosisInformationController.java

@ -0,0 +1,81 @@
package com.yihu.jw.hospital.module.rehabilitation.controller;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.doctor.service.BaseDoctorInfoService;
import com.yihu.jw.hospital.module.rehabilitation.service.DiagnosisInformationService;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * Created by humingfen on 2019/2/11.
 */
@RestController
@RequestMapping(value = "/doctor/specialist/diagnosisInformation", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "医生端-诊疗信息管理")
public class DoctorDiagnosisInformationController extends EnvelopRestEndpoint {
    @Autowired
    private BaseDoctorInfoService doctorService;
    @Autowired
    private BaseDoctorDao doctorDao;
    @Autowired
    private DiagnosisInformationService diagnosisInformationService;
//    @RequestMapping(value = "/createDiagnosisInformation", method = RequestMethod.POST)
//    @ApiOperation(value = "创建诊疗信息")
//    public String createDiagnosisInformation(
//            @ApiParam(name = "patient", value = "居民code") @RequestParam String patient,
//            @ApiParam(name = "patientName", value = "居民姓名") @RequestParam String patientName,
//            @ApiParam(name = "planId", value = "康复计划id") @RequestParam String planId,
//            @ApiParam(name = "hospital", value = "诊疗医院code") @RequestParam(required = false) String hospital,
//            @ApiParam(name = "hospitalName", value = "诊疗医院名称") @RequestParam String hospitalName,
//            @ApiParam(name = "department", value = "入院科室") @RequestParam String department,
//            @ApiParam(name = "attendingDoctorName", value = "主治医生名称") @RequestParam String attendingDoctorName,
//            @ApiParam(name = "admittingDiagnosis", value = "入院诊断") @RequestParam String admittingDiagnosis,
//            @ApiParam(name = "dischargeDiagnosis", value = "出院诊断") @RequestParam String dischargeDiagnosis,
//            @ApiParam(name = "advice", value = "医嘱小结") @RequestParam String advice,
//            @ApiParam(name = "dischargeTime", value = "出院时间") @RequestParam String dischargeTime) {
//        try {
//            BaseDoctorDO d = doctorDao.findById(getUID()).orElse(null);
//            //i健康调用2.0
//            Envelop information = diagnosisInformationService.createDiagnosisInformation(patient, patientName, planId, hospital, hospitalName, department,
//                    attendingDoctorName, admittingDiagnosis, dischargeDiagnosis, advice, dischargeTime, d);
//            return write(200, "保存成功", "data",information);
//        } catch (Exception e) {
//            return error(-1,e.getMessage());
//        }
//    }
    @RequestMapping(value = "/findDiagnosisInformationByPlanId", method = RequestMethod.GET)
    @ApiOperation(value = "根据康复计划id获取诊疗信息")
    public String findDiagnosisInformationByPlanId(
            @ApiParam(name = "planId", value = "康复计划id") @RequestParam String planId) {
        try {
            return write(200, "获取成功", "data", diagnosisInformationService.findDiagnosisInformationByPlanId(planId));
        } catch (Exception e) {
            return error(-1, e.getMessage());
        }
    }
    @RequestMapping(value = "/findDiagnosisInformationByPatient", method = RequestMethod.GET)
    @ApiOperation(value = "根据居民获取诊疗信息")
    public String findDiagnosisInformationByPatient(
            @ApiParam(name = "patient", value = "居民code") @RequestParam(value = "patient") String patient,
            @ApiParam(name = "page", value = "第几页,page从0开始") @RequestParam(value = "page") Integer page,
            @ApiParam(name = "size", value = "行数") @RequestParam(value = "size") Integer size) {
        try {
            return write(200, "获取成功", "data", diagnosisInformationService.findDiagnosisInformationByPatient(patient, page, size));
        } catch (Exception e) {
            return error(-1, e.getMessage());
        }
    }
}

+ 232 - 0
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/DoctorRehabilitaionInfoController.java

@ -0,0 +1,232 @@
package com.yihu.jw.hospital.module.rehabilitation.controller;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.entity.specialist.rehabilitation.PatientMedicalRecordsDO;
import com.yihu.jw.entity.specialist.rehabilitation.RehabilitationAdviceDO;
import com.yihu.jw.hospital.module.rehabilitation.service.RehabilitationInfoService;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping(value = "/doctor/rehabilitation", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "医生端-康复下转管理")
public class DoctorRehabilitaionInfoController extends EnvelopRestEndpoint {
    @Autowired
    private RehabilitationInfoService rehabilitationInfoService;
    @Autowired
    private ObjectMapper objectMapper;
    @RequestMapping(value = "getRehabilitationPatientList", method = RequestMethod.GET)
    @ApiOperation("获取康复下转居民列表")
    public String getRehabilitationPatientList(
            @ApiParam(name = "doctorId", value = "医生id", required = false) @RequestParam(value = "doctorId", required = false) String doctorId,
            @ApiParam(name = "idcard", value = "身份证", required = false) @RequestParam(value = "idcard", required = false) String idcard,
            @ApiParam(name = "isTurnDown", value = "是否已下转 -2:未下转未家签,-1未下转 0未下转全部,;1已下转(未接收);2已下转(已接收);3已下转全部;03已下转全部+未下转全部", defaultValue = "0", required = false) @RequestParam(value = "isTurnDown", required = false, defaultValue = "3") String isTurnDown,
            @ApiParam(name = "page", value = "起始页", required = false) @RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
            @ApiParam(name = "pagesize", value = "每页显示数据条数", required = false) @RequestParam(value = "pagesize", required = false, defaultValue = "10") Integer pagesize
    ) {
        try {
            if (page == null) {
                page = 1;
            }
            if (pagesize == null) {
                pagesize = 10;
            }
            if (StringUtils.isBlank(doctorId)) {
                doctorId = getUID();
                System.out.println("获取康复下转居民列表--医生id==>getUID()==>" + getUID());
            }
            JSONObject result = rehabilitationInfoService.getRehabilitationPatientList(idcard, doctorId, isTurnDown, page, pagesize);
            return write(200, "请求成功", "data", result);
        } catch (Exception e) {
            return error(-1, e.getMessage());
        }
    }
    @RequestMapping(value = "getDeorsumvergenceCount", method = RequestMethod.GET)
    @ApiOperation("康复下转已下转顶头数据")
    public String getDeorsumvergenceCount() {
        try {
            JSONObject result = rehabilitationInfoService.getDeorsumvergenceCount(getUID());
            return write(200, "请求成功", "data", result);
        } catch (Exception e) {
            return error(-1, e.getMessage());
        }
    }
    @RequestMapping(value = "createAdvice", method = RequestMethod.POST)
    @ApiOperation("创建/编辑康复建议模板")
    public String createAdvice(
            @ApiParam(name = "doctorCode", value = "医生code", required = false) @RequestParam(value = "doctorCode", required = false) String doctorCode,
            @ApiParam(name = "code", value = "模板code") @RequestParam(value = "code", required = false) String code,
            @ApiParam(name = "name", value = "模板名称", required = true) @RequestParam(value = "name", required = true) String name,
            @ApiParam(name = "content", value = "模板内容", required = true) @RequestParam(value = "content", required = true) String content
    ) {
        try {
            if (StringUtils.isBlank(doctorCode)) {
                doctorCode = getUID();
            }
            rehabilitationInfoService.createAdvice(doctorCode, code, name, content);
            return write(200, "更新成功");
        } catch (Exception e) {
            return error(-1, e.getMessage());
        }
    }
    @RequestMapping(value = "deleteAdvice", method = RequestMethod.POST)
    @ApiOperation("删除康复建议模板")
    public String deleteAdvice(
            @ApiParam(name = "id", value = "模板id") @RequestParam(value = "id", required = false) Long id) {
        try {
            rehabilitationInfoService.deleteAdvice(id);
            return write(200, "删除成功");
        } catch (Exception e) {
            return error(-1, e.getMessage());
        }
    }
    @RequestMapping(value = "getAdviceListByDoctor", method = RequestMethod.GET)
    @ApiOperation("获取医生创建康复建议模板及系统模板")
    public String getAdviceListByDoctor(
            @ApiParam(name = "doctorCode", value = "医生code", required = false) @RequestParam(value = "doctorCode", required = false) String doctorCode) {
        try {
            if (StringUtils.isBlank(doctorCode)) {
                doctorCode = getUID();
            }
            List<RehabilitationAdviceDO> list = rehabilitationInfoService.getAdviceListByDoctor(doctorCode);
            return write(200, "请求成功", "data", list);
        } catch (Exception e) {
            return error(-1, e.getMessage());
        }
    }
    @RequestMapping(value = "createMedicalRecords", method = RequestMethod.POST)
    @ApiOperation("添加编辑住院病历")
    public String createMedicalRecords(
            @ApiParam(name = "doctorCode", value = "医生code", required = false) @RequestParam(value = "doctorCode", required = false) String doctorCode,
            @ApiParam(name = "patient", value = "居民code") @RequestParam String patient,
            @ApiParam(name = "patientName", value = "居民姓名") @RequestParam String patientName,
            @ApiParam(name = "jsonData", value = "住院病历相关数据") @RequestParam(value = "jsonData", required = true) String jsonData,
            @ApiParam(name = "id", value = "模板id,编辑时传入") @RequestParam(value = "id", required = false) Long id
    ) {
        try {
            if (StringUtils.isBlank(doctorCode)) {
                doctorCode = getUID();
            }
            objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
            PatientMedicalRecordsDO patientMedicalRecordsDO = objectMapper.readValue(jsonData, PatientMedicalRecordsDO.class);
            return write(200, "添加成功", "data", rehabilitationInfoService.createMedicalRecords(doctorCode, patient, patientName, patientMedicalRecordsDO, id));
        } catch (Exception e) {
            return error(-1, e.getMessage());
        }
    }
//    @RequestMapping(value = "getMedicalHistoryDetail", method = RequestMethod.GET)
//    @ApiOperation("出院就诊详情")
//    public String getMedicalHistoryDetail(@ApiParam(name = "code", value = "code", required = true)
//                                          @RequestParam(value = "code", required = true) String code) {
//
//        try {
//            XxzxMedicalHistory history = rehabilitationInfoService.getMedicalHistoryDetail(code);
//            return write(200, "请求成功", "data", history);
//        } catch (Exception e) {
//            return error(-1,e.getMessage());
//        }
//    }
    @RequestMapping(value = "getMedicalHistoryList", method = RequestMethod.GET)
    @ApiOperation("获取厦心出院就诊记录信息")
    public String getMedicalHistoryList(
            @ApiParam(name = "code", value = "居民code", required = true) @RequestParam(value = "code", required = true) String code,
            @ApiParam(name = "page", value = "page", required = true) @RequestParam(value = "page", required = true) Integer page,
            @ApiParam(name = "size", value = "size", required = true) @RequestParam(value = "size", required = true) Integer size) {
        try {
            List<Map<String, Object>> list = rehabilitationInfoService.getMedicalHistoryList(code, page, size);
            return write(200, "请求成功", "data", list);
        } catch (Exception e) {
            return error(-1, e.getMessage());
        }
    }
    @RequestMapping(value = "getDischargePatientList", method = RequestMethod.GET)
    @ApiOperation("获取即将出院居民列表,区分家签非家签")
    public String getDischargePatientList(@ApiParam(name = "hospital", value = "机构code", required = false)
                                          @RequestParam(value = "hospital", required = true) String hospital) {
        try {
            JSONObject result = rehabilitationInfoService.getDischargePatientList(hospital, getUID());
            return write(200, "请求成功", "data", result);
        } catch (Exception e) {
            return error(-1, e.getMessage());
        }
    }
//    @RequestMapping(value = "remindDoctorReceive", method = RequestMethod.POST)
//    @ApiOperation("提醒家医接收")
//    public String remindDoctorReceive(@ApiParam(name = "diseaseName", value = "疾病名称", required = true)
//                                      @RequestParam(value = "diseaseName", required = true) String diseaseName,
//                                      @ApiParam(name = "doctorCode", value = "全科医生", required = true)
//                                      @RequestParam(value = "doctorCode", required = true) String doctorCode){
//        try {
//            rehabilitationInfoService.remindDoctorReceive(diseaseName,getUID() , doctorCode);
//            return success("请求成功");
//        } catch (Exception e) {
//            return error(-1,e.getMessage());
//        }
//    }
//    @RequestMapping(value = "sendWxMsgRemindSign", method = RequestMethod.POST)
//    @ApiOperation("发送微信模板提醒签约消息")
//    public String sendWxTemplate(
//            @ApiParam(name = "patient", value = "居民code", required = false)
//            @RequestParam(value = "patient", required = false)String patient)
//    {
//        try {
//            rehabilitationInfoService.sendWxMsgRemindSign(patient);
//            return write(200, "发送成功!");
//        } catch (Exception e) {
//            return error(-1,e.getMessage());
//        }
//    }
//    @RequestMapping(value = "getPatientByIdcardOrSsc", method = RequestMethod.POST)
//    @ApiOperation("根据患者身份证或社保卡号进行搜索添加出院记录")
//    public String getPatientByIdcardOrSsc(
//            @ApiParam(name = "patientInfo", value = "居民身份证或者社保卡", required = true) @RequestParam(value = "patientInfo")String patientInfo,
//            @ApiParam(name = "type", value = "1患者家签列表 2康复下转列表", required = true) @RequestParam(value = "type") Integer type) {
//        try {
//            JSONObject object = rehabilitationInfoService.getPatientByIdcardOrSsc(patientInfo, type, getUID());
//            if(object.getInteger("status") == 200) {
//                return write(200, "添加成功!", "data", object.get("data"));
//            }else {
//                return write(-1, "添加失败!", "data", object.getString("msg"));
//            }
//        } catch (Exception e) {
//            return error(-1,e.getMessage());
//        }
//    }
}

+ 14 - 20
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/RehabilitationManageController.java

@ -60,22 +60,16 @@ public class RehabilitationManageController {
    @GetMapping(value = SpecialistMapping.rehabilitation.findRehabilitationPlanList)
    @ApiOperation(value = "康复管理-康复计划列表")
    public MixEnvelop findRehabilitationPlan(@ApiParam(name = "doctorType", value = "医生类型(1、专科医生,2、家庭医生)", required = true)
                                             @RequestParam(value = "doctorType", required = true) Integer doctorType,
                                             @ApiParam(name = "doctorCode", value = "医生code", required = true)
                                             @RequestParam(value = "doctorCode", required = true) String doctorCode,
                                             @ApiParam(name = "patientCondition", value = "居民条件,可以按身份证或者居民名称模糊匹配", required = false)
                                             @RequestParam(value = "patientCondition", required = false) String patientCondition,
                                             @ApiParam(name = "diseaseCode", value = "疾病类型code", required = false)
                                             @RequestParam(value = "diseaseCode", required = false) String diseaseCode,
                                             @ApiParam(name = "planType", value = "安排类型(1康复计划,2转社区医院,3转家庭病床)", required = false)
                                             @RequestParam(value = "planType", required = false) Integer planType,
                                             @ApiParam(name = "todaybacklog", value = "今日待办(1、今日待办,2、全部)", required = false)
                                             @RequestParam(value = "todaybacklog", required = false, defaultValue = "1") Integer todaybacklog,
                                             @ApiParam(name = "page", value = "第几页,从1开始", required = false)
                                             @RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
                                             @ApiParam(name = "pageSize", value = "每页分页大小", required = false)
                                             @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) {
    public MixEnvelop findRehabilitationPlan(
            @ApiParam(name = "doctorType", value = "医生类型(1、专科医生,2、家庭医生)", required = true) @RequestParam(value = "doctorType", required = true) Integer doctorType,
            @ApiParam(name = "doctorCode", value = "医生code", required = true) @RequestParam(value = "doctorCode", required = true) String doctorCode,
            @ApiParam(name = "patientCondition", value = "居民条件,可以按身份证或者居民名称模糊匹配", required = false) @RequestParam(value = "patientCondition", required = false) String patientCondition,
            @ApiParam(name = "diseaseCode", value = "疾病类型code", required = false) @RequestParam(value = "diseaseCode", required = false) String diseaseCode,
            @ApiParam(name = "planType", value = "安排类型(1康复计划,2转社区医院,3转家庭病床)", required = false) @RequestParam(value = "planType", required = false) Integer planType,
            @ApiParam(name = "todaybacklog", value = "今日待办(1、今日待办,2、全部)", required = false) @RequestParam(value = "todaybacklog", required = false, defaultValue = "1") Integer todaybacklog,
            @ApiParam(name = "page", value = "第几页,从1开始", required = false) @RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
            @ApiParam(name = "pageSize", value = "每页分页大小", required = false) @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize
    ) {
        try {
            return rehabilitationManageService.findRehabilitationPlan(doctorType, doctorCode, diseaseCode, planType, todaybacklog, patientCondition, page, pageSize);
        } catch (Exception e) {
@ -87,10 +81,10 @@ public class RehabilitationManageController {
    @GetMapping(value = SpecialistMapping.rehabilitation.findRehabilitationPlanDetailList)
    @ApiOperation(value = "康复管理-康复计划详情列表")
    public ObjEnvelop findRehabilitationPlanDetailList(@ApiParam(name = "doctorCode", value = "医生code", required = true)
                                                       @RequestParam(value = "doctorCode", required = true) String doctorCode,
                                                       @ApiParam(name = "patientCode", value = "居民code", required = true)
                                                       @RequestParam(value = "patientCode", required = true) String patientCode) {
    public ObjEnvelop findRehabilitationPlanDetailList(
            @ApiParam(name = "doctorCode", value = "医生code", required = true) @RequestParam(value = "doctorCode", required = true) String doctorCode,
            @ApiParam(name = "patientCode", value = "居民code", required = true) @RequestParam(value = "patientCode", required = true) String patientCode
    ) {
        try {
            return rehabilitationManageService.findRehabilitationPlanDetailList(doctorCode, patientCode);
        } catch (Exception e) {

+ 1 - 3
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/RehabilitationPlanController.java

@ -3,7 +3,6 @@ package com.yihu.jw.hospital.module.rehabilitation.controller;
import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.entity.specialist.rehabilitation.*;
import com.yihu.jw.hospital.module.rehabilitation.dao.RehabilitationOperateRecordsDao;
import com.yihu.jw.hospital.module.rehabilitation.service.RehabilitationPlanService;
@ -42,8 +41,7 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
    @Autowired
    private RehabilitationPlanService rehabilitationPlanService;
    //    @Autowired
//    private Tracer tracer;
    @Autowired
    private RehabilitationOperateRecordsDao rehabilitationOperateRecordsDao;
    @Autowired

+ 20 - 0
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/dao/RehabilitationAdviceDao.java

@ -0,0 +1,20 @@
package com.yihu.jw.hospital.module.rehabilitation.dao;
import com.yihu.jw.entity.specialist.rehabilitation.RehabilitationAdviceDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
// create by hmf on 2020/02/27
public interface RehabilitationAdviceDao extends
        PagingAndSortingRepository<RehabilitationAdviceDO, Long>,
        JpaSpecificationExecutor<RehabilitationAdviceDO> {
    RehabilitationAdviceDO findByCode(String code);
    @Query("select a from RehabilitationAdviceDO a where a.createUser = ?1 or a.createUser is null order by a.createUser, a.createTime desc")
    List<RehabilitationAdviceDO> findByDoctor(String doctorCode);
}

+ 28 - 0
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/service/DiagnosisInformationService.java

@ -9,6 +9,8 @@ import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.rm.specialist.SpecialistMapping;
import org.apache.commons.collections.map.HashedMap;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
@ -16,6 +18,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * Created by humingfen on 2019/1/11.
@ -33,6 +37,30 @@ public class DiagnosisInformationService extends BaseJpaService<PatientDiagnosis
     * @return
     */
    public Envelop createDiagnosisInformation(PatientDiagnosisInformationDO diagnosisInformationDO) {
//        JSONObject json = new JSONObject();
//        json.put("patient", patient);
//        json.put("patientName", patientName);
//        json.put("hospital", hospital);
//        json.put("hospitalName", hospitalName);
//        json.put("planId", planId);
//        json.put("department", department);
//        json.put("attendingDoctorName", attendingDoctorName);
//        List<Doctor> d = doctorDao.findDoctorByName(attendingDoctorName);
//        if(d != null && d.size() == 1){
//            json.put("attendingDoctorCode", d.get(0).getCode());
//        }
//        json.put("admittingDiagnosis", admittingDiagnosis);
//        json.put("dischargeDiagnosis", dischargeDiagnosis);
//        json.put("advice", advice);
//        json.put("createUser", doctor.getCode());
//        json.put("createUserName", doctor.getName());
//        json.put("dischargeTime", dischargeTime);
//        Map<String, Object> param = new HashedMap();
//        param.put("diagnosisInformationJson", json.toString());
//        PatientDiagnosisInformationDO diagnosisInformationDO = objectMapper.readValue(diagnosisInformationJson, PatientDiagnosisInformationDO.class);
        Date date = new Date();
        diagnosisInformationDO.setCreateTime(date);
        diagnosisInformationDao.save(diagnosisInformationDO);

File diff suppressed because it is too large
+ 388 - 261
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/service/RehabilitationInfoService.java


+ 1 - 1
svr/svr-visit-behind/src/main/resources/bootstrap.yml

@ -1,6 +1,6 @@
spring:
  application:
    name:  svr-visit-behind
    name:  svr-visit-behind --
  cloud:
    config:
      failFast: true