Browse Source

专病启动包配置

trick9191 6 years ago
parent
commit
8ade561b5f

+ 10 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/specialist/PatientLabelVO.java

@ -25,6 +25,8 @@ public class PatientLabelVO {
    private String health;
    @ApiModelProperty("居民健康情况code")
    private String healthcode;
    @ApiModelProperty("性别")
    private String sex;
    public String getCode() {
        return code;
@ -97,4 +99,12 @@ public class PatientLabelVO {
    public void setHealthcode(String healthcode) {
        this.healthcode = healthcode;
    }
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
}

+ 20 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/specialist/PatientRelationVO.java

@ -23,6 +23,10 @@ public class PatientRelationVO {
    private String photo;
    @ApiModelProperty("出院时间")
    private String createTime;
    @ApiModelProperty("居民健康情况")
    private String health;
    @ApiModelProperty("居民健康情况code")
    private String healthcode;
    public String getPatient() {
        return patient;
@ -71,4 +75,20 @@ public class PatientRelationVO {
    public void setSex(String sex) {
        this.sex = sex;
    }
    public String getHealth() {
        return health;
    }
    public void setHealth(String health) {
        this.health = health;
    }
    public String getHealthcode() {
        return healthcode;
    }
    public void setHealthcode(String healthcode) {
        this.healthcode = healthcode;
    }
}

+ 1 - 1
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/SpecialistController.java

@ -164,7 +164,7 @@ public class SpecialistController extends EnvelopRestController {
    @GetMapping(value = SpecialistMapping.specialist.getDoctorPatientByName)
    @ApiOperation(value = "搜索专科医生居民")
    public Envelop<PatientRelationVO> getDoctorPatientByName(@ApiParam(name = "doctor", value = "医生code") @RequestParam(required = true)String doctor,
                                                             @ApiParam(name = "name", value = "居民姓名模糊") @RequestParam(required = false)String nameKey,
                                                             @ApiParam(name = "nameKey", value = "居民姓名模糊") @RequestParam(required = false)String nameKey,
                                                             @ApiParam(name = "page", value = "第几页,1开始") @RequestParam(required = true)Integer page,
                                                             @ApiParam(name = "size", value = "每页大小") @RequestParam(required = true)Integer size) {
        try {

+ 44 - 3
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistService.java

@ -149,9 +149,23 @@ public class SpecialistService{
                " r.patient, " +
                " r.patient_name AS patientName, " +
                " IFNULL(year( from_days( datediff( now(), p.birthday))),'未知') age, " +
                " p.photo " +
                " p.photo ," +
                " p.sex," +
                " h.label_name as health, " +
                " h.label AS healthcode " +
                " FROM " +
                " wlyy_specialist_patient_relation r JOIN "+basedb+".wlyy_patient p ON p.`code` = r.patient " +
                " LEFT JOIN ( " +
                " SELECT " +
                "  t.label, " +
                "  t.label_name, " +
                "  t.patient " +
                " FROM " +
                "  "+basedb+".wlyy_sign_patient_label_info t " +
                " WHERE " +
                "  t.label_type = '8' " +
                " AND t.`status` = '1' " +
                " ) h ON h.patient = r.patient " +
                " WHERE " +
                " r.health_assistant = '"+assistant+"' LIMIT "+(page-1)*size+","+size;
@ -165,6 +179,7 @@ public class SpecialistService{
        String sql="SELECT " +
                " p. NAME, " +
                " p. CODE, " +
                " p.sex," +
                " IFNULL( " +
                "  YEAR ( " +
                "   from_days(datediff(now(), p.birthday)) " +
@ -258,10 +273,23 @@ public class SpecialistService{
                " p.`name` AS patientName, " +
                " p.photo, " +
                " IFNULL(year( from_days( datediff( now(), p.birthday))),'未知') age, " +
                " p.sex " +
                " p.sex ," +
                " h.label_name as health, " +
                " h.label AS healthcode " +
                " FROM " +
                " wlyy_specialist_patient_relation r " +
                " JOIN "+basedb+".wlyy_patient p ON r.patient = p.`code` " +
                " LEFT JOIN ( " +
                " SELECT " +
                "  t.label, " +
                "  t.label_name, " +
                "  t.patient " +
                " FROM " +
                "  "+basedb+".wlyy_sign_patient_label_info t " +
                " WHERE " +
                "  t.label_type = '8' " +
                " AND t.`status` = '1' " +
                " ) h ON h.patient = r.patient " +
                " WHERE " +
                " r.doctor='"+doctor+"' " +
                " AND r.`status`<>'-1'" +
@ -295,10 +323,23 @@ public class SpecialistService{
                " p.`name` AS patientName, " +
                " p.photo, " +
                " IFNULL(year( from_days( datediff( now(), p.birthday))),'未知') age, " +
                " p.sex " +
                " p.sex, " +
                " h.label_name as health, " +
                " h.label AS healthcode " +
                " FROM " +
                " wlyy_specialist_patient_relation r " +
                " JOIN "+basedb+".wlyy_patient p ON r.patient = p.`code` " +
                " LEFT JOIN ( " +
                " SELECT " +
                "  t.label, " +
                "  t.label_name, " +
                "  t.patient " +
                " FROM " +
                "  "+basedb+".wlyy_sign_patient_label_info t " +
                " WHERE " +
                "  t.label_type = '8' " +
                " AND t.`status` = '1' " +
                " ) h ON h.patient = r.patient " +
                " WHERE " +
                " r.doctor='"+doctor+"' " +
                " AND r.`status`<>'-1'" +