Browse Source

慢病管理

trick9191 7 years ago
parent
commit
efdfe8f6fe

+ 51 - 0
common/common-entity/src/main/java/com/yihu/wlyy/entity/doctor/DoctorSwitch.java

@ -0,0 +1,51 @@
package com.yihu.wlyy.entity.doctor;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by Trick on 2018/1/4.
 */
@Entity
@Table(name = "wlyy_doctor_switch")
public class DoctorSwitch extends IdEntity{
    private String doctor;//关联医生
    private String alertPatientSwitch;//0不自动跟踪居民,1自动跟踪预警居民
    private Date createTime;//创建时间
    private Date updateTime;//更新时间
    public String getDoctor() {
        return doctor;
    }
    public void setDoctor(String doctor) {
        this.doctor = doctor;
    }
    public String getAlertPatientSwitch() {
        return alertPatientSwitch;
    }
    public void setAlertPatientSwitch(String alertPatientSwitch) {
        this.alertPatientSwitch = alertPatientSwitch;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}

+ 97 - 0
common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/TrackPatient.java

@ -0,0 +1,97 @@
package com.yihu.wlyy.entity.patient;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by Trick on 2018/1/4.
 */
@Entity
@Table(name = "wlyy_track_patient")
public class TrackPatient extends IdEntity {
    private String patientCode;//关联居民code,医生的重点关注对象
    private String patientName;//患者姓名
    private String doctorCode;//所属医生
    private String doctorName;//所属医生名
    private Integer teamCode;//居民签约团队
    private String idcard;//身份证号
    private String ssc;//社保卡号
    private Date createTime;//创建时间
    private Date updateTime;//更新时间
    public String getPatientCode() {
        return patientCode;
    }
    public void setPatientCode(String patientCode) {
        this.patientCode = patientCode;
    }
    public String getPatientName() {
        return patientName;
    }
    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }
    public String getDoctorCode() {
        return doctorCode;
    }
    public void setDoctorCode(String doctorCode) {
        this.doctorCode = doctorCode;
    }
    public String getDoctorName() {
        return doctorName;
    }
    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }
    public Integer getTeamCode() {
        return teamCode;
    }
    public void setTeamCode(Integer teamCode) {
        this.teamCode = teamCode;
    }
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
    public String getSsc() {
        return ssc;
    }
    public void setSsc(String ssc) {
        this.ssc = ssc;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/TrackPatientDao.java

@ -13,5 +13,5 @@ public interface TrackPatientDao extends PagingAndSortingRepository<TrackPatient
    public TrackPatient findByDoctorCodeAndPatientCode(String doctorCode,String patientCode);
    public List<TrackPatient> findByDoctorCodeAndTeamcode(String doctorCode,Integer teamCode);
    public List<TrackPatient> findByDoctorCodeAndTeamCode(String doctorCode,Integer teamCode);
}

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/scheme/DoctorSchemeService.java

@ -551,7 +551,7 @@ public class DoctorSchemeService {
        }
        //1.4.2 重点关注居民
        List<TrackPatient> list = trackPatientDao.findByDoctorCodeAndTeamcode(doctorcode,Integer.parseInt(teamCode));
        List<TrackPatient> list = trackPatientDao.findByDoctorCodeAndTeamCode(doctorcode,Integer.parseInt(teamCode));
        if(list!=null&&list.size()>0){
            result.put("trackPatientCount",list.size());
        }else{
@ -1053,7 +1053,7 @@ public class DoctorSchemeService {
    }
    public Map<String,Object> getTrackPatientCountTitle(Integer teamCode,String doctor,String startDate,String endDate){
        List<TrackPatient> trackPatients = trackPatientDao.findByDoctorCodeAndTeamcode(doctor,teamCode);
        List<TrackPatient> trackPatients = trackPatientDao.findByDoctorCodeAndTeamCode(doctor,teamCode);
        Map<String,Object> rs = new HashedMap();
        rs.put("trackPatientCount",trackPatients.size());
        String sql = "SELECT " +