瀏覽代碼

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

Conflicts:
	svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/DoorServiceApplicationService.java
	svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/WlyyDoorServiceOrderService.java
	svr/svr-door-serivce/src/main/java/com/yihu/jw/door/util/MessageUtil.java
	svr/svr-door-serivce/src/main/resources/application.yml
yeshijie 4 年之前
父節點
當前提交
30ed69c09a

+ 958 - 0
common/common-entity-es/src/main/java/com/yihu/jw/followup/FollowupContentESDO.java

@ -0,0 +1,958 @@
package com.yihu.jw.followup;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.searchbox.annotations.JestId;
import org.springframework.data.annotation.CreatedDate;
import java.util.Date;
/**
 * 随访详情ES实体类
 * @author huangwenjie
 * @date 2017/11/1 13:41
 */
public class FollowupContentESDO {
	
	@JestId
	private String id;
	private String followup_id;             //随访记录ID
	private String followup_project;        //随访详情分类ID
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyyMMdd'T'HHmmss.SSS'Z'")
	@CreatedDate
	private Date create_time;
	
    private String NO_SYMPTOM;//无症状【0.无 1.有】
    private String HEADACHE;//头痛头晕【0.无 1.有】
    private String NAUSEA;//恶心呕吐【0.无 1.有】
    private String VERTIGO_TINNITUS;//眼花耳鸣【0.无 1.有】
    private String DIFFICULTY_BREATHING;//呼吸困难【0.无 1.有】
    private String PALPITATIONS;//心悸胸闷【0.无 1.有】
    private String EPISTAXIS_BLEEDING;//鼻衄出血不止【0.无 1.有】
    private String LIMBS_NUMB;//四肢发麻【0.无 1.有】
    private String EXTREMITY_EDEMA;//下肢水肿【0.无 1.有】
    private String SYMPTOM_OTHER;//"其他症状"
    private String POLYDIPSIA;//多饮【0.无 1.有】
    private String MORE_FOOD;//多食【0.无 1.有】
    private String MORE_URINE;//多尿【0.无 1.有】
    private String BLURRED_VISION;//视力模糊【0.无 1.有】
    private String INFECTION;//感染【0.无 1.有】
    private String NUMB_HANDS;//手脚麻木【0.无 1.有】
    private String WEIGHT_LOSS;//体重明显下降【0.无 1.有】
    private String HYPOG_REACT_CODE;//低血糖反应【0.无;1.偶尔;2.频繁;】
	
	//体征信息
    private String HEIGHT;//身高
    private String HEIGHT_EXP;//期望身高
    private String WEIGHT;//体重
    private String WEIGHT_EXP;//期望体重
    private String BP_D;//舒张压
    private String BP_U;//收缩压
    private String BS_FPG;//空腹血糖
    private String NO_BS_FPG;//餐后血糖
    private String RANDOM_BLOOD_SUGAR;//随机血糖
    private String BMI;//体质指数
    private String BMI_EXP;//期望体质
    private String OTHER_POSITIVE_SIGNS;//体征其他
    private String POFDA_MARK;//足背动脉搏动【TOUCH_DICT】
    private String HEART_RATE;//心率
	private String BLOOD_SUGAR;//血糖
	private String BLOOD_SUGAR_TYPE;//血糖类
	
	//检查室检查
    private String GHB;//糖化血红蛋白
    private String RENAL_FUNCTION_CREATININE;//血清肌酐
    private String RENAL_FUNCTION_BUN;//血尿素氮
    private String MICROALBUMINURIA;//尿微量白蛋白
    private String EXAM_DATE;//检查日期
    private String BLOOD_FAT_TRIGLYCERIDE;//甘油三酯 V01
    private String BLOOD_FAT_TC;//总胆固醇 V02
    private String BLOOD_FAT_LDLC;//血清低密度脂蛋白胆固醇 V03
	
	//生活方式
    private String DAILY_SMOKING;//日吸烟量
    private String SOMKING_EXP;//日吸烟期望
    private String DAILY_DRINKING;//日饮酒量
    private String DRINK_EXP;//日饮酒期望
    private String EXERCISE_FREQ_CODE;//运动频率【HYGIENE_SPORT_FREQ_DICT】
    private String EXERCISE_FREQ_CODE_EXP;//运动频率期望【HYGIENE_SPORT_FREQ_DICT】
    private String EXERCISE_DURATION_MINS;//运动时长(min) 分钟/次
    private String EXERCISE_DURATION_MINS_EXP;//运动时长期望(min) 分钟/次期望
    private String SALT_TAKEN_LEVEL_CODE;//摄盐情况【LIGHT_WEIGHT_DICT】
    private String SALT_TAKEN_LEVEL_EXP;//摄盐情况期望【LIGHT_WEIGHT_DICT】
    private String PSY_ADJUST_RESULT_CODE;//心里调整【GOOD_FAIR_POOR_DICT】
    private String COMPLIANCE_RESULT_CODE;//遵医行为【GOOD_FAIR_POOR_DICT】
    private String DAILY_STAPLE;//主食(克/天)
	
	//随访评价
    private String HYP_FOLLOWUP_TYPE_CODE;//高血压随访分类【FOLLOW_TYPE_DICT】
    private String HYP_COMPLICATION_DETAIL;//高血压随访分类--详情
    private String DIA_FOLLOWUP_TYPE_CODE;//糖尿病随访分类【FOLLOW_TYPE_DICT】
    private String DIA_COMPLICATION_DETAIL;//糖尿病随访分类--详情
	
	//用药情况
	private String DRUG_COMPLIANCE_CODE;//服药依从性【DRUG_STATE_DICT】
	
	//控制目标
    private String CONTROL_DATE;//控制日期 V04
	private String CONTROL_CONSTITUTOR;//制定者姓名
	private String CONTROL_CONSTITUTOR_DOCTORCODE;//制定者本地CODE
	private String CONTROL_CONSTITUTOR_JWDOCTORCODE;//制定者本地CODE
                            
    private String CONTROL_BP_U;//血压收缩压 V06
    private String CONTROL_BP_D;//血压舒张压 V07
    private String CONTROL_BS_FPG;//空腹血糖 V08
    private String CONTROL_NO_BS_FPG;//餐后血糖 V09
    private String CONTROL_GHB;//糖化血红蛋白 V10
    private String CONTROL_TRIGLYCERIDE;//甘油三酯 V11
    private String CONTROL_TOTAL_CHOLESTEROL;//总胆固醇 V12
    private String CONTROL_LDL;//低密度脂蛋白 V13
    private String CONTROL_WEIGHT;//体重 V14
    private String CONTROL_EXERCISE_FREQ_CODE;//运动频率 V15
    private String CONTROL_EXERCISE_DURATION_MINS;//运动时长 V16
	
	//健康教育
    private String ARCHIVE_TIME;//健康教育日期 V17
    private String ARCHIVE_OPERATOR_NAME;//健康教育记录者 基卫系统医生【传中文名称】 V18
    private String HEALTH_EDUCATE;//健康教育【CHRO_HEALTH_EDUCATE_DICT】 V19
    private String EDUCATE_CONTENT;//健康教育内容 V20
	
	//转诊
    private String DRUG_ADVERSE_MARK;//药物不良反应【0.无;1.有;】
    private String ADR_REMARK;//药物不良反应【内容】
    private String TRANSFER_RESON;//转诊原因
    private String TRANSFER_ORG_DEPT;//转诊机构科室
    private String REFUSE_REFERRAL;//患者拒绝转诊【0 否 1 是】
    private String REFUSE_REFERRAL_WHY;//患者拒绝转诊内容
	
	//多余字段
    private String ARCHIVE_ID;//档案ID
    private String CHECK_FEE_TYPE;//检测费用类型
    private String FAMILY_FOLLOWUP_ID;//随访细表外键随访ID
	
	
	
	public String getId() {
		return id;
	}
	
	public void setId(String id) {
		this.id = id;
	}
	
	public String getFollowup_id() {
		return followup_id;
	}
	
	public void setFollowup_id(String followup_id) {
		this.followup_id = followup_id;
	}
	
	public String getFollowup_project() {
		return followup_project;
	}
	
	public void setFollowup_project(String followup_project) {
		this.followup_project = followup_project;
	}
	
	public Date getCreate_time() {
		return create_time;
	}
	
	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}
	
	@JSONField(name = "NO_SYMPTOM")
	public String getNO_SYMPTOM() {
		return NO_SYMPTOM;
	}
	
	public void setNO_SYMPTOM(String NO_SYMPTOM) {
		this.NO_SYMPTOM = NO_SYMPTOM;
	}
	
	@JSONField(name = "HEADACHE")
	public String getHEADACHE() {
		return HEADACHE;
	}
	
	public void setHEADACHE(String HEADACHE) {
		this.HEADACHE = HEADACHE;
	}
	
	@JSONField(name = "NAUSEA")
	public String getNAUSEA() {
		return NAUSEA;
	}
	
	public void setNAUSEA(String NAUSEA) {
		this.NAUSEA = NAUSEA;
	}
	
	@JSONField(name = "VERTIGO_TINNITUS")
	public String getVERTIGO_TINNITUS() {
		return VERTIGO_TINNITUS;
	}
	
	public void setVERTIGO_TINNITUS(String VERTIGO_TINNITUS) {
		this.VERTIGO_TINNITUS = VERTIGO_TINNITUS;
	}
	
	@JSONField(name = "DIFFICULTY_BREATHING")
	public String getDIFFICULTY_BREATHING() {
		return DIFFICULTY_BREATHING;
	}
	
	public void setDIFFICULTY_BREATHING(String DIFFICULTY_BREATHING) {
		this.DIFFICULTY_BREATHING = DIFFICULTY_BREATHING;
	}
	
	@JSONField(name = "PALPITATIONS")
	public String getPALPITATIONS() {
		return PALPITATIONS;
	}
	
	public void setPALPITATIONS(String PALPITATIONS) {
		this.PALPITATIONS = PALPITATIONS;
	}
	
	@JSONField(name = "EPISTAXIS_BLEEDING")
	public String getEPISTAXIS_BLEEDING() {
		return EPISTAXIS_BLEEDING;
	}
	
	public void setEPISTAXIS_BLEEDING(String EPISTAXIS_BLEEDING) {
		this.EPISTAXIS_BLEEDING = EPISTAXIS_BLEEDING;
	}
	
	@JSONField(name = "LIMBS_NUMB")
	public String getLIMBS_NUMB() {
		return LIMBS_NUMB;
	}
	
	public void setLIMBS_NUMB(String LIMBS_NUMB) {
		this.LIMBS_NUMB = LIMBS_NUMB;
	}
	
	@JSONField(name = "EXTREMITY_EDEMA")
	public String getEXTREMITY_EDEMA() {
		return EXTREMITY_EDEMA;
	}
	
	public void setEXTREMITY_EDEMA(String EXTREMITY_EDEMA) {
		this.EXTREMITY_EDEMA = EXTREMITY_EDEMA;
	}
	
	@JSONField(name = "SYMPTOM_OTHER")
	public String getSYMPTOM_OTHER() {
		return SYMPTOM_OTHER;
	}
	
	public void setSYMPTOM_OTHER(String SYMPTOM_OTHER) {
		this.SYMPTOM_OTHER = SYMPTOM_OTHER;
	}
	
	@JSONField(name = "POLYDIPSIA")
	public String getPOLYDIPSIA() {
		return POLYDIPSIA;
	}
	
	public void setPOLYDIPSIA(String POLYDIPSIA) {
		this.POLYDIPSIA = POLYDIPSIA;
	}
	
	@JSONField(name = "MORE_FOOD")
	public String getMORE_FOOD() {
		return MORE_FOOD;
	}
	
	public void setMORE_FOOD(String MORE_FOOD) {
		this.MORE_FOOD = MORE_FOOD;
	}
	
	@JSONField(name = "MORE_URINE")
	public String getMORE_URINE() {
		return MORE_URINE;
	}
	
	public void setMORE_URINE(String MORE_URINE) {
		this.MORE_URINE = MORE_URINE;
	}
	
	@JSONField(name = "BLURRED_VISION")
	public String getBLURRED_VISION() {
		return BLURRED_VISION;
	}
	
	public void setBLURRED_VISION(String BLURRED_VISION) {
		this.BLURRED_VISION = BLURRED_VISION;
	}
	
	@JSONField(name = "INFECTION")
	public String getINFECTION() {
		return INFECTION;
	}
	
	public void setINFECTION(String INFECTION) {
		this.INFECTION = INFECTION;
	}
	
	@JSONField(name = "NUMB_HANDS")
	public String getNUMB_HANDS() {
		return NUMB_HANDS;
	}
	
	public void setNUMB_HANDS(String NUMB_HANDS) {
		this.NUMB_HANDS = NUMB_HANDS;
	}
	
	@JSONField(name = "WEIGHT_LOSS")
	public String getWEIGHT_LOSS() {
		return WEIGHT_LOSS;
	}
	
	public void setWEIGHT_LOSS(String WEIGHT_LOSS) {
		this.WEIGHT_LOSS = WEIGHT_LOSS;
	}
	
	@JSONField(name = "HYPOG_REACT_CODE")
	public String getHYPOG_REACT_CODE() {
		return HYPOG_REACT_CODE;
	}
	
	public void setHYPOG_REACT_CODE(String HYPOG_REACT_CODE) {
		this.HYPOG_REACT_CODE = HYPOG_REACT_CODE;
	}
	
	@JSONField(name = "HEIGHT")
	public String getHEIGHT() {
		return HEIGHT;
	}
	
	public void setHEIGHT(String HEIGHT) {
		this.HEIGHT = HEIGHT;
	}
	
	@JSONField(name = "HEIGHT_EXP")
	public String getHEIGHT_EXP() {
		return HEIGHT_EXP;
	}
	
	public void setHEIGHT_EXP(String HEIGHT_EXP) {
		this.HEIGHT_EXP = HEIGHT_EXP;
	}
	
	@JSONField(name = "WEIGHT")
	public String getWEIGHT() {
		return WEIGHT;
	}
	
	public void setWEIGHT(String WEIGHT) {
		this.WEIGHT = WEIGHT;
	}
	
	@JSONField(name = "WEIGHT_EXP")
	public String getWEIGHT_EXP() {
		return WEIGHT_EXP;
	}
	
	public void setWEIGHT_EXP(String WEIGHT_EXP) {
		this.WEIGHT_EXP = WEIGHT_EXP;
	}
	
	@JSONField(name = "BP_D")
	public String getBP_D() {
		return BP_D;
	}
	
	public void setBP_D(String BP_D) {
		this.BP_D = BP_D;
	}
	
	@JSONField(name = "BP_U")
	public String getBP_U() {
		return BP_U;
	}
	
	public void setBP_U(String BP_U) {
		this.BP_U = BP_U;
	}
	
	@JSONField(name = "BS_FPG")
	public String getBS_FPG() {
		return BS_FPG;
	}
	
	public void setBS_FPG(String BS_FPG) {
		this.BS_FPG = BS_FPG;
	}
	
	@JSONField(name = "NO_BS_FPG")
	public String getNO_BS_FPG() {
		return NO_BS_FPG;
	}
	
	public void setNO_BS_FPG(String NO_BS_FPG) {
		this.NO_BS_FPG = NO_BS_FPG;
	}
	
	@JSONField(name = "RANDOM_BLOOD_SUGAR")
	public String getRANDOM_BLOOD_SUGAR() {
		return RANDOM_BLOOD_SUGAR;
	}
	
	public void setRANDOM_BLOOD_SUGAR(String RANDOM_BLOOD_SUGAR) {
		this.RANDOM_BLOOD_SUGAR = RANDOM_BLOOD_SUGAR;
	}
	
	@JSONField(name = "BMI")
	public String getBMI() {
		return BMI;
	}
	
	public void setBMI(String BMI) {
		this.BMI = BMI;
	}
	
	@JSONField(name = "BMI_EXP")
	public String getBMI_EXP() {
		return BMI_EXP;
	}
	
	public void setBMI_EXP(String BMI_EXP) {
		this.BMI_EXP = BMI_EXP;
	}
	
	@JSONField(name = "OTHER_POSITIVE_SIGNS")
	public String getOTHER_POSITIVE_SIGNS() {
		return OTHER_POSITIVE_SIGNS;
	}
	
	public void setOTHER_POSITIVE_SIGNS(String OTHER_POSITIVE_SIGNS) {
		this.OTHER_POSITIVE_SIGNS = OTHER_POSITIVE_SIGNS;
	}
	
	@JSONField(name = "POFDA_MARK")
	public String getPOFDA_MARK() {
		return POFDA_MARK;
	}
	
	public void setPOFDA_MARK(String POFDA_MARK) {
		this.POFDA_MARK = POFDA_MARK;
	}
	
	@JSONField(name = "HEART_RATE")
	public String getHEART_RATE() {
		return HEART_RATE;
	}
	
	public void setHEART_RATE(String HEART_RATE) {
		this.HEART_RATE = HEART_RATE;
	}
	@JSONField(name = "BLOOD_SUGAR")
	public String getBLOOD_SUGAR() {
		return BLOOD_SUGAR;
	}
	public void setBLOOD_SUGAR(String BLOOD_SUGAR) {
		this.BLOOD_SUGAR = BLOOD_SUGAR;
	}
	@JSONField(name = "BLOOD_SUGAR_TYPE")
	public String getBLOOD_SUGAR_TYPE() {
		return BLOOD_SUGAR_TYPE;
	}
	public void setBLOOD_SUGAR_TYPE(String BLOOD_SUGAR_TYPE) {
		this.BLOOD_SUGAR_TYPE = BLOOD_SUGAR_TYPE;
	}
	@JSONField(name = "GHB")
	public String getGHB() {
		return GHB;
	}
	
	public void setGHB(String GHB) {
		this.GHB = GHB;
	}
	
	@JSONField(name = "RENAL_FUNCTION_CREATININE")
	public String getRENAL_FUNCTION_CREATININE() {
		return RENAL_FUNCTION_CREATININE;
	}
	
	public void setRENAL_FUNCTION_CREATININE(String RENAL_FUNCTION_CREATININE) {
		this.RENAL_FUNCTION_CREATININE = RENAL_FUNCTION_CREATININE;
	}
	
	@JSONField(name = "RENAL_FUNCTION_BUN")
	public String getRENAL_FUNCTION_BUN() {
		return RENAL_FUNCTION_BUN;
	}
	
	public void setRENAL_FUNCTION_BUN(String RENAL_FUNCTION_BUN) {
		this.RENAL_FUNCTION_BUN = RENAL_FUNCTION_BUN;
	}
	
	@JSONField(name = "MICROALBUMINURIA")
	public String getMICROALBUMINURIA() {
		return MICROALBUMINURIA;
	}
	
	public void setMICROALBUMINURIA(String MICROALBUMINURIA) {
		this.MICROALBUMINURIA = MICROALBUMINURIA;
	}
	
	@JSONField(name = "EXAM_DATE")
	public String getEXAM_DATE() {
		return EXAM_DATE;
	}
	
	public void setEXAM_DATE(String EXAM_DATE) {
		this.EXAM_DATE = EXAM_DATE;
	}
	
	@JSONField(name = "BLOOD_FAT_TRIGLYCERIDE")
	public String getBLOOD_FAT_TRIGLYCERIDE() {
		return BLOOD_FAT_TRIGLYCERIDE;
	}
	
	public void setBLOOD_FAT_TRIGLYCERIDE(String BLOOD_FAT_TRIGLYCERIDE) {
		this.BLOOD_FAT_TRIGLYCERIDE = BLOOD_FAT_TRIGLYCERIDE;
	}
	
	@JSONField(name = "BLOOD_FAT_TC")
	public String getBLOOD_FAT_TC() {
		return BLOOD_FAT_TC;
	}
	
	public void setBLOOD_FAT_TC(String BLOOD_FAT_TC) {
		this.BLOOD_FAT_TC = BLOOD_FAT_TC;
	}
	
	@JSONField(name = "BLOOD_FAT_LDLC")
	public String getBLOOD_FAT_LDLC() {
		return BLOOD_FAT_LDLC;
	}
	
	public void setBLOOD_FAT_LDLC(String BLOOD_FAT_LDLC) {
		this.BLOOD_FAT_LDLC = BLOOD_FAT_LDLC;
	}
	
	@JSONField(name = "DAILY_SMOKING")
	public String getDAILY_SMOKING() {
		return DAILY_SMOKING;
	}
	
	public void setDAILY_SMOKING(String DAILY_SMOKING) {
		this.DAILY_SMOKING = DAILY_SMOKING;
	}
	
	@JSONField(name = "SOMKING_EXP")
	public String getSOMKING_EXP() {
		return SOMKING_EXP;
	}
	
	public void setSOMKING_EXP(String SOMKING_EXP) {
		this.SOMKING_EXP = SOMKING_EXP;
	}
	
	@JSONField(name = "DAILY_DRINKING")
	public String getDAILY_DRINKING() {
		return DAILY_DRINKING;
	}
	
	public void setDAILY_DRINKING(String DAILY_DRINKING) {
		this.DAILY_DRINKING = DAILY_DRINKING;
	}
	
	@JSONField(name = "DRINK_EXP")
	public String getDRINK_EXP() {
		return DRINK_EXP;
	}
	
	public void setDRINK_EXP(String DRINK_EXP) {
		this.DRINK_EXP = DRINK_EXP;
	}
	
	@JSONField(name = "EXERCISE_FREQ_CODE")
	public String getEXERCISE_FREQ_CODE() {
		return EXERCISE_FREQ_CODE;
	}
	
	public void setEXERCISE_FREQ_CODE(String EXERCISE_FREQ_CODE) {
		this.EXERCISE_FREQ_CODE = EXERCISE_FREQ_CODE;
	}
	
	@JSONField(name = "EXERCISE_FREQ_CODE_EXP")
	public String getEXERCISE_FREQ_CODE_EXP() {
		return EXERCISE_FREQ_CODE_EXP;
	}
	
	public void setEXERCISE_FREQ_CODE_EXP(String EXERCISE_FREQ_CODE_EXP) {
		this.EXERCISE_FREQ_CODE_EXP = EXERCISE_FREQ_CODE_EXP;
	}
	
	@JSONField(name = "EXERCISE_DURATION_MINS")
	public String getEXERCISE_DURATION_MINS() {
		return EXERCISE_DURATION_MINS;
	}
	
	public void setEXERCISE_DURATION_MINS(String EXERCISE_DURATION_MINS) {
		this.EXERCISE_DURATION_MINS = EXERCISE_DURATION_MINS;
	}
	
	@JSONField(name = "EXERCISE_DURATION_MINS_EXP")
	public String getEXERCISE_DURATION_MINS_EXP() {
		return EXERCISE_DURATION_MINS_EXP;
	}
	
	public void setEXERCISE_DURATION_MINS_EXP(String EXERCISE_DURATION_MINS_EXP) {
		this.EXERCISE_DURATION_MINS_EXP = EXERCISE_DURATION_MINS_EXP;
	}
	
	@JSONField(name = "SALT_TAKEN_LEVEL_CODE")
	public String getSALT_TAKEN_LEVEL_CODE() {
		return SALT_TAKEN_LEVEL_CODE;
	}
	
	public void setSALT_TAKEN_LEVEL_CODE(String SALT_TAKEN_LEVEL_CODE) {
		this.SALT_TAKEN_LEVEL_CODE = SALT_TAKEN_LEVEL_CODE;
	}
	
	@JSONField(name = "SALT_TAKEN_LEVEL_EXP")
	public String getSALT_TAKEN_LEVEL_EXP() {
		return SALT_TAKEN_LEVEL_EXP;
	}
	
	public void setSALT_TAKEN_LEVEL_EXP(String SALT_TAKEN_LEVEL_EXP) {
		this.SALT_TAKEN_LEVEL_EXP = SALT_TAKEN_LEVEL_EXP;
	}
	
	@JSONField(name = "PSY_ADJUST_RESULT_CODE")
	public String getPSY_ADJUST_RESULT_CODE() {
		return PSY_ADJUST_RESULT_CODE;
	}
	
	public void setPSY_ADJUST_RESULT_CODE(String PSY_ADJUST_RESULT_CODE) {
		this.PSY_ADJUST_RESULT_CODE = PSY_ADJUST_RESULT_CODE;
	}
	
	@JSONField(name = "COMPLIANCE_RESULT_CODE")
	public String getCOMPLIANCE_RESULT_CODE() {
		return COMPLIANCE_RESULT_CODE;
	}
	
	public void setCOMPLIANCE_RESULT_CODE(String COMPLIANCE_RESULT_CODE) {
		this.COMPLIANCE_RESULT_CODE = COMPLIANCE_RESULT_CODE;
	}
	
	@JSONField(name = "DAILY_STAPLE")
	public String getDAILY_STAPLE() {
		return DAILY_STAPLE;
	}
	
	public void setDAILY_STAPLE(String DAILY_STAPLE) {
		this.DAILY_STAPLE = DAILY_STAPLE;
	}
	
	@JSONField(name = "HYP_FOLLOWUP_TYPE_CODE")
	public String getHYP_FOLLOWUP_TYPE_CODE() {
		return HYP_FOLLOWUP_TYPE_CODE;
	}
	
	public void setHYP_FOLLOWUP_TYPE_CODE(String HYP_FOLLOWUP_TYPE_CODE) {
		this.HYP_FOLLOWUP_TYPE_CODE = HYP_FOLLOWUP_TYPE_CODE;
	}
	
	@JSONField(name = "HYP_COMPLICATION_DETAIL")
	public String getHYP_COMPLICATION_DETAIL() {
		return HYP_COMPLICATION_DETAIL;
	}
	
	public void setHYP_COMPLICATION_DETAIL(String HYP_COMPLICATION_DETAIL) {
		this.HYP_COMPLICATION_DETAIL = HYP_COMPLICATION_DETAIL;
	}
	
	@JSONField(name = "DIA_FOLLOWUP_TYPE_CODE")
	public String getDIA_FOLLOWUP_TYPE_CODE() {
		return DIA_FOLLOWUP_TYPE_CODE;
	}
	
	public void setDIA_FOLLOWUP_TYPE_CODE(String DIA_FOLLOWUP_TYPE_CODE) {
		this.DIA_FOLLOWUP_TYPE_CODE = DIA_FOLLOWUP_TYPE_CODE;
	}
	
	@JSONField(name = "DIA_COMPLICATION_DETAIL")
	public String getDIA_COMPLICATION_DETAIL() {
		return DIA_COMPLICATION_DETAIL;
	}
	
	public void setDIA_COMPLICATION_DETAIL(String DIA_COMPLICATION_DETAIL) {
		this.DIA_COMPLICATION_DETAIL = DIA_COMPLICATION_DETAIL;
	}
	
	@JSONField(name = "DRUG_COMPLIANCE_CODE")
	public String getDRUG_COMPLIANCE_CODE() {
		return DRUG_COMPLIANCE_CODE;
	}
	
	public void setDRUG_COMPLIANCE_CODE(String DRUG_COMPLIANCE_CODE) {
		this.DRUG_COMPLIANCE_CODE = DRUG_COMPLIANCE_CODE;
	}
	
	@JSONField(name = "CONTROL_DATE")
	public String getCONTROL_DATE() {
		return CONTROL_DATE;
	}
	
	public void setCONTROL_DATE(String CONTROL_DATE) {
		this.CONTROL_DATE = CONTROL_DATE;
	}
	
	@JSONField(name = "CONTROL_CONSTITUTOR")
	public String getCONTROL_CONSTITUTOR() {
		return CONTROL_CONSTITUTOR;
	}
	
	public void setCONTROL_CONSTITUTOR(String CONTROL_CONSTITUTOR) {
		this.CONTROL_CONSTITUTOR = CONTROL_CONSTITUTOR;
	}
	
	@JSONField(name = "CONTROL_CONSTITUTOR_DOCTORCODE")
	public String getCONTROL_CONSTITUTOR_DOCTORCODE() {
		return CONTROL_CONSTITUTOR_DOCTORCODE;
	}
	
	public void setCONTROL_CONSTITUTOR_DOCTORCODE(String CONTROL_CONSTITUTOR_DOCTORCODE) {
		this.CONTROL_CONSTITUTOR_DOCTORCODE = CONTROL_CONSTITUTOR_DOCTORCODE;
	}
	
	@JSONField(name = "CONTROL_CONSTITUTOR_JWDOCTORCODE")
	public String getCONTROL_CONSTITUTOR_JWDOCTORCODE() {
		return CONTROL_CONSTITUTOR_JWDOCTORCODE;
	}
	
	public void setCONTROL_CONSTITUTOR_JWDOCTORCODE(String CONTROL_CONSTITUTOR_JWDOCTORCODE) {
		this.CONTROL_CONSTITUTOR_JWDOCTORCODE = CONTROL_CONSTITUTOR_JWDOCTORCODE;
	}
	
	@JSONField(name = "CONTROL_BP_U")
	public String getCONTROL_BP_U() {
		return CONTROL_BP_U;
	}
	
	public void setCONTROL_BP_U(String CONTROL_BP_U) {
		this.CONTROL_BP_U = CONTROL_BP_U;
	}
	
	@JSONField(name = "CONTROL_BP_D")
	public String getCONTROL_BP_D() {
		return CONTROL_BP_D;
	}
	
	public void setCONTROL_BP_D(String CONTROL_BP_D) {
		this.CONTROL_BP_D = CONTROL_BP_D;
	}
	
	@JSONField(name = "CONTROL_BS_FPG")
	public String getCONTROL_BS_FPG() {
		return CONTROL_BS_FPG;
	}
	
	public void setCONTROL_BS_FPG(String CONTROL_BS_FPG) {
		this.CONTROL_BS_FPG = CONTROL_BS_FPG;
	}
	
	@JSONField(name = "CONTROL_NO_BS_FPG")
	public String getCONTROL_NO_BS_FPG() {
		return CONTROL_NO_BS_FPG;
	}
	
	public void setCONTROL_NO_BS_FPG(String CONTROL_NO_BS_FPG) {
		this.CONTROL_NO_BS_FPG = CONTROL_NO_BS_FPG;
	}
	
	@JSONField(name = "CONTROL_GHB")
	public String getCONTROL_GHB() {
		return CONTROL_GHB;
	}
	
	public void setCONTROL_GHB(String CONTROL_GHB) {
		this.CONTROL_GHB = CONTROL_GHB;
	}
	
	@JSONField(name = "CONTROL_TRIGLYCERIDE")
	public String getCONTROL_TRIGLYCERIDE() {
		return CONTROL_TRIGLYCERIDE;
	}
	
	public void setCONTROL_TRIGLYCERIDE(String CONTROL_TRIGLYCERIDE) {
		this.CONTROL_TRIGLYCERIDE = CONTROL_TRIGLYCERIDE;
	}
	
	@JSONField(name = "CONTROL_TOTAL_CHOLESTEROL")
	public String getCONTROL_TOTAL_CHOLESTEROL() {
		return CONTROL_TOTAL_CHOLESTEROL;
	}
	
	public void setCONTROL_TOTAL_CHOLESTEROL(String CONTROL_TOTAL_CHOLESTEROL) {
		this.CONTROL_TOTAL_CHOLESTEROL = CONTROL_TOTAL_CHOLESTEROL;
	}
	
	@JSONField(name = "CONTROL_LDL")
	public String getCONTROL_LDL() {
		return CONTROL_LDL;
	}
	
	public void setCONTROL_LDL(String CONTROL_LDL) {
		this.CONTROL_LDL = CONTROL_LDL;
	}
	
	@JSONField(name = "CONTROL_WEIGHT")
	public String getCONTROL_WEIGHT() {
		return CONTROL_WEIGHT;
	}
	
	public void setCONTROL_WEIGHT(String CONTROL_WEIGHT) {
		this.CONTROL_WEIGHT = CONTROL_WEIGHT;
	}
	
	@JSONField(name = "CONTROL_EXERCISE_FREQ_CODE")
	public String getCONTROL_EXERCISE_FREQ_CODE() {
		return CONTROL_EXERCISE_FREQ_CODE;
	}
	
	public void setCONTROL_EXERCISE_FREQ_CODE(String CONTROL_EXERCISE_FREQ_CODE) {
		this.CONTROL_EXERCISE_FREQ_CODE = CONTROL_EXERCISE_FREQ_CODE;
	}
	
	@JSONField(name = "CONTROL_EXERCISE_DURATION_MINS")
	public String getCONTROL_EXERCISE_DURATION_MINS() {
		return CONTROL_EXERCISE_DURATION_MINS;
	}
	
	public void setCONTROL_EXERCISE_DURATION_MINS(String CONTROL_EXERCISE_DURATION_MINS) {
		this.CONTROL_EXERCISE_DURATION_MINS = CONTROL_EXERCISE_DURATION_MINS;
	}
	
	@JSONField(name = "ARCHIVE_TIME")
	public String getARCHIVE_TIME() {
		return ARCHIVE_TIME;
	}
	
	public void setARCHIVE_TIME(String ARCHIVE_TIME) {
		this.ARCHIVE_TIME = ARCHIVE_TIME;
	}
	
	@JSONField(name = "ARCHIVE_OPERATOR_NAME")
	public String getARCHIVE_OPERATOR_NAME() {
		return ARCHIVE_OPERATOR_NAME;
	}
	
	public void setARCHIVE_OPERATOR_NAME(String ARCHIVE_OPERATOR_NAME) {
		this.ARCHIVE_OPERATOR_NAME = ARCHIVE_OPERATOR_NAME;
	}
	
	@JSONField(name = "HEALTH_EDUCATE")
	public String getHEALTH_EDUCATE() {
		return HEALTH_EDUCATE;
	}
	
	public void setHEALTH_EDUCATE(String HEALTH_EDUCATE) {
		this.HEALTH_EDUCATE = HEALTH_EDUCATE;
	}
	
	@JSONField(name = "EDUCATE_CONTENT")
	public String getEDUCATE_CONTENT() {
		return EDUCATE_CONTENT;
	}
	
	public void setEDUCATE_CONTENT(String EDUCATE_CONTENT) {
		this.EDUCATE_CONTENT = EDUCATE_CONTENT;
	}
	
	@JSONField(name = "DRUG_ADVERSE_MARK")
	public String getDRUG_ADVERSE_MARK() {
		return DRUG_ADVERSE_MARK;
	}
	
	public void setDRUG_ADVERSE_MARK(String DRUG_ADVERSE_MARK) {
		this.DRUG_ADVERSE_MARK = DRUG_ADVERSE_MARK;
	}
	
	@JSONField(name = "ADR_REMARK")
	public String getADR_REMARK() {
		return ADR_REMARK;
	}
	
	public void setADR_REMARK(String ADR_REMARK) {
		this.ADR_REMARK = ADR_REMARK;
	}
	
	@JSONField(name = "TRANSFER_RESON")
	public String getTRANSFER_RESON() {
		return TRANSFER_RESON;
	}
	
	public void setTRANSFER_RESON(String TRANSFER_RESON) {
		this.TRANSFER_RESON = TRANSFER_RESON;
	}
	
	@JSONField(name = "TRANSFER_ORG_DEPT")
	public String getTRANSFER_ORG_DEPT() {
		return TRANSFER_ORG_DEPT;
	}
	
	public void setTRANSFER_ORG_DEPT(String TRANSFER_ORG_DEPT) {
		this.TRANSFER_ORG_DEPT = TRANSFER_ORG_DEPT;
	}
	
	@JSONField(name = "REFUSE_REFERRAL")
	public String getREFUSE_REFERRAL() {
		return REFUSE_REFERRAL;
	}
	
	public void setREFUSE_REFERRAL(String REFUSE_REFERRAL) {
		this.REFUSE_REFERRAL = REFUSE_REFERRAL;
	}
	
	@JSONField(name = "REFUSE_REFERRAL_WHY")
	public String getREFUSE_REFERRAL_WHY() {
		return REFUSE_REFERRAL_WHY;
	}
	
	public void setREFUSE_REFERRAL_WHY(String REFUSE_REFERRAL_WHY) {
		this.REFUSE_REFERRAL_WHY = REFUSE_REFERRAL_WHY;
	}
	
	@JSONField(name = "ARCHIVE_ID")
	public String getARCHIVE_ID() {
		return ARCHIVE_ID;
	}
	
	public void setARCHIVE_ID(String ARCHIVE_ID) {
		this.ARCHIVE_ID = ARCHIVE_ID;
	}
	
	@JSONField(name = "CHECK_FEE_TYPE")
	public String getCHECK_FEE_TYPE() {
		return CHECK_FEE_TYPE;
	}
	
	public void setCHECK_FEE_TYPE(String CHECK_FEE_TYPE) {
		this.CHECK_FEE_TYPE = CHECK_FEE_TYPE;
	}
	
	@JSONField(name = "FAMILY_FOLLOWUP_ID")
	public String getFAMILY_FOLLOWUP_ID() {
		return FAMILY_FOLLOWUP_ID;
	}
	
	public void setFAMILY_FOLLOWUP_ID(String FAMILY_FOLLOWUP_ID) {
		this.FAMILY_FOLLOWUP_ID = FAMILY_FOLLOWUP_ID;
	}
}

+ 48 - 0
common/common-entity/sql记录

@ -0,0 +1,48 @@
DROP TABLE IF EXISTS `wlyy_followup`;
CREATE TABLE `wlyy_followup` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `followup_no` varchar(50) DEFAULT NULL,
  `followup_date` datetime NULL COMMENT '随访时间',
  `followup_plan_date` datetime DEFAULT NULL COMMENT '计划随访时间',
  `followup_next_date` datetime DEFAULT NULL COMMENT '计划下次随访时间',
  `followup_type` varchar(50) DEFAULT NULL COMMENT '随访方式【字典FOLLOWUP_WAY_DICT】',
  `followup_class` varchar(50) DEFAULT NULL COMMENT '随访类别,多类别“,”分割【1.高血压 2.糖尿病 3.肿瘤 4.精神分裂症 5.产后 6.新生儿 7.严重精神病 8.80岁以上老人 9.肺结核 11.冠心病日常随访 12.慢性妇科炎症 13.慢性前列腺疾病日常随访 14.慢性乳腺疾病日常随访 15慢性肾病日常随访 16慢性阻塞性肺病17脑卒中日常随访 18脂肪肝日常随访 ',
  `followup_manager_status` varchar(50) DEFAULT NULL COMMENT '随访管理状态【字典FOLLOWUP_MANAGER_STATUS】',
  `doctor_code` varchar(50) DEFAULT NULL COMMENT '随访医生code',
  `doctor_name` varchar(50) DEFAULT NULL COMMENT '随访医生name',
  `jwdoctor_code` varchar(50) DEFAULT NULL,
  `org_code` varchar(50) DEFAULT NULL COMMENT '随访机构code',
  `org_name` varchar(50) DEFAULT NULL COMMENT '随访机构名称',
  `jworg_code` varchar(20) DEFAULT NULL COMMENT '基卫机构编码',
  `patient_code` varchar(50) DEFAULT NULL,
  `patient_name` varchar(50) DEFAULT NULL,
  `idcard` varchar(50) DEFAULT NULL,
  `data_from` varchar(1) NOT NULL COMMENT '数据来源 1基卫 2APP',
  `status` varchar(1) NOT NULL COMMENT '状态 0取消 1已完成 2未开始 3进行中 4未审核',
  `followup_content_phone` varchar(1000) DEFAULT NULL COMMENT '电话随访内容',
  `creater` varchar(50) DEFAULT NULL COMMENT '创建者',
  `sign_type` int(11) DEFAULT NULL COMMENT '签约类型',
  `admin_team_code` int(11) DEFAULT NULL COMMENT '行政团队',
  `create_time` timestamp NULL DEFAULT NULL,
  `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `sign_code` varchar(200) DEFAULT NULL COMMENT '签约code',
  `prescription_code` varchar(50) DEFAULT NULL COMMENT '续方CODE或者康复计划ID',
  `age` varchar(100) DEFAULT NULL COMMENT '婴儿年龄',
  `sex` int(11) DEFAULT NULL COMMENT '性别',
  `mobile` varchar(255) DEFAULT NULL COMMENT '手机号',
  `idcard_encrypt` varchar(255) DEFAULT NULL COMMENT '妊娠编号',
  `type` int(2) DEFAULT NULL COMMENT '1新增随访2临时随访3入户访视',
  `jw_doctor_work_type` varchar(10) DEFAULT NULL COMMENT '随访角色【FAMILY_WORK_TYPE_DICT】【1. 专科医生 2. 全科医生 3. 健康管理师】',
  `jw_doctor_health` varchar(50) DEFAULT NULL COMMENT '基卫系统的随访健管师ID',
  `health_followup_type` varchar(50) DEFAULT NULL COMMENT '健管师随访方式【FOLLOWUP_WAY_DICT】',
  `health_followup_next_date` datetime DEFAULT NULL COMMENT '健管师下次随访日期',
  `rural_doctors_flag` varchar(10) DEFAULT NULL COMMENT '是否乡医【0.否;1.是;】',
  `patient_read_status` int(11) DEFAULT '0' COMMENT '专病档案功能是否未读,0-未读  1-已读',
  `doctor_read_status` int(11) DEFAULT '0' COMMENT '专病档案功能是否未读,0-未读  1-已读',
  PRIMARY KEY (`id`),
  KEY `idx_patient` (`patient_code`) USING BTREE,
  KEY `idx_doctorcode_followup_date` (`doctor_code`,`followup_date`) USING BTREE,
  KEY `idx_prescription_code` (`prescription_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1889415 DEFAULT CHARSET=utf8mb4 COMMENT='随访计划表';
ALTER TABLE wlyy_door_service_order ADD followup_date varchar(50) COMMENT '随访时间' ;

+ 22 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/door/WlyyDoorServiceOrderDO.java

@ -2,6 +2,7 @@ package com.yihu.jw.entity.door;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.followup.Followup;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDO;
import javax.persistence.Column;
@ -553,6 +554,9 @@ public class WlyyDoorServiceOrderDO extends UuidIdentityEntityWithOperator {
    private List<WlyyPrescriptionDO> prescriptionDOList;//上门前开的方
    private List<WlyyPrescriptionDO> afterPrescriptionList;//上门后开的方
    private List<Followup> followupList;//上门随访
    private String followupDate;//随访时间
    /**
     * 快捷类型,1是快捷类型,其他值不是
     */
@ -1100,6 +1104,15 @@ public class WlyyDoorServiceOrderDO extends UuidIdentityEntityWithOperator {
        this.sessionId = sessionId;
    }
    @Transient
    public List<Followup> getFollowupList() {
        return followupList;
    }
    public void setFollowupList(List<Followup> followupList) {
        this.followupList = followupList;
    }
    public Integer getConclusionStatus() {
        return conclusionStatus;
    }
@ -1192,4 +1205,13 @@ public class WlyyDoorServiceOrderDO extends UuidIdentityEntityWithOperator {
    public void setOutpatientId(String outpatientId) {
        this.outpatientId = outpatientId;
    }
    @Column(name = "followup_date")
    public String getFollowupDate() {
        return followupDate;
    }
    public void setFollowupDate(String followupDate) {
        this.followupDate = followupDate;
    }
}

+ 439 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/followup/Followup.java

@ -0,0 +1,439 @@
package com.yihu.jw.entity.followup;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.iot.gateway.IdEntity;
import javax.persistence.*;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * 随访记录表
 * @author hzp add 2016-12-07
 *
 */
@Entity
@Table(name = "wlyy_followup")
@SequenceGenerator(name="id_generated", sequenceName="wlyy_followup")
public class Followup extends IdEntity {
	//随访编号【基卫】
	private String followupNo;
	//随访时间
	private Date followupDate;
	//随访计划时间
	private Date followupPlanDate;
	//计划下次随访时间
	private Date followupNextDate;
	//随访方式【字典FOLLOWUP_WAY_DICT】
	private String followupType;
	//随访类别,多类别“,”分割【1.高血压 2.糖尿病 3.肿瘤 4.精神分裂症 5.产后 6.新生儿 7.严重精神病 8.80岁以上老人 9.肺结核 10异常体温随访
	// 11.冠心病日常随访 12.慢性妇科炎症13.慢性前列腺疾病日常随访 14.慢性乳腺疾病日常随访 15慢性肾病日常随访 16慢性阻塞性肺病 17脑卒中日常随访 18脂肪肝日常随访
	private String followupClass;
	//随访管理状态【字典FOLLOWUP_MANAGER_STATUS】
	private String followupManagerStatus;
	//医生代码
	private String doctorCode;
	//医生姓名
	private String doctorName;
	//基卫医生CODE
	private String jwdoctorCode;
	//社区代码
	private String orgCode;
	//社区名称
	private String orgName;
	//基卫机构编码
	private String jworgCode;
	//患者代码
	private String patientCode;
	//患者姓名
	private String patientName;
	//患者身份证
	private String idcard;
	//年龄
	private String age;
	//性别
	private Integer sex;
	//手机号
	private String mobile;
	//妊娠编号
	private String idcardEncrypt;
	//数据来源 1基卫 2APP
	private String dataFrom;
	//状态 0取消 1已完成 2未开始 3进行中 4待审核
	private String status;
	//电话随访内容
	private String followupContentPhone;
	//创建时间
	private Date createTime;
	//更新时间
	private Date updateTime;
	//创建者
	private String creater;
	// 签约类型 1三师 2家庭
	private Integer signType;
	// 行政团队
	private Long adminTeamCode;
	//签约表Code
	private String signCode;
	//关联的续方CODE
	private String prescriptionCode;
	//外部数据-居民数据
	private BasePatientDO patient;
	//外部数据-标签数据
	private List<Map<String,Object>> followupLabelPatient;
	//居民头像
	private String photo;
	//随访类型1、新增随访、2临时随访、3入户访视
	private Integer type;
	//随访角色【FAMILY_WORK_TYPE_DICT】【1. 专科医生 2. 全科医生 3. 健康管理师】
	private String jwDoctorWorkType;
	private String jwDoctorHealth;//基卫系统的随访健管师ID
	private String healthFollowupType;//健管师随访方式【FOLLOWUP_WAY_DICT】
	private Date healthFollowupNextDate;//健管师下次随访日期
	private String ruralDoctorsFlag;//是否乡医【0.否;1.是;】
	private Integer doctorReadStatus;
	private Integer patientReadStatus;
	@Column(name = "doctor_read_status")
	public Integer getDoctorReadStatus() {
		return doctorReadStatus;
	}
	public void setDoctorReadStatus(Integer doctorReadStatus) {
		this.doctorReadStatus = doctorReadStatus;
	}
	@Column(name = "patient_read_status")
	public Integer getPatientReadStatus() {
		return patientReadStatus;
	}
	public void setPatientReadStatus(Integer patientReadStatus) {
		this.patientReadStatus = patientReadStatus;
	}
	@Transient
	public BasePatientDO getPatient() {
		return patient;
	}
	public void setPatient(BasePatientDO patient) {
		this.patient = patient;
	}
	@Transient
	public List<Map<String, Object>> getFollowupLabelPatient() {
		return followupLabelPatient;
	}
	public void setFollowupLabelPatient(List<Map<String, Object>> followupLabelPatient) {
		this.followupLabelPatient = followupLabelPatient;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getFollowupPlanDate() {
		return followupPlanDate;
	}
	public void setFollowupPlanDate(Date followupPlanDate) {
		this.followupPlanDate = followupPlanDate;
	}
	public String getFollowupNo() {
		return followupNo;
	}
	public void setFollowupNo(String followupNo) {
		this.followupNo = followupNo;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getFollowupDate() {
		return followupDate;
	}
	public void setFollowupDate(Date followupDate) {
		this.followupDate = followupDate;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getFollowupNextDate() {
		return followupNextDate;
	}
	public void setFollowupNextDate(Date followupNextDate) {
		this.followupNextDate = followupNextDate;
	}
	public String getFollowupType() {
		return followupType;
	}
	public void setFollowupType(String followupType) {
		this.followupType = followupType;
	}
	public String getFollowupClass() {
		return followupClass;
	}
	public void setFollowupClass(String followupClass) {
		this.followupClass = followupClass;
	}
	public String getFollowupManagerStatus() {
		return followupManagerStatus;
	}
	public void setFollowupManagerStatus(String followupManagerStatus) {
		this.followupManagerStatus = followupManagerStatus;
	}
	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 String getOrgCode() {
		return orgCode;
	}
	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}
	public String getOrgName() {
		return orgName;
	}
	public void setOrgName(String orgName) {
		this.orgName = orgName;
	}
	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 getIdcard() {
		return idcard;
	}
	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}
	public String getDataFrom() {
		return dataFrom;
	}
	public void setDataFrom(String dataFrom) {
		this.dataFrom = dataFrom;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getFollowupContentPhone() {
		return followupContentPhone;
	}
	public void setFollowupContentPhone(String followupContentPhone) {
		this.followupContentPhone = followupContentPhone;
	}
	public String getCreater() {
		return creater;
	}
	public void setCreater(String creater) {
		this.creater = creater;
	}
	public Integer getSignType() {
		return signType;
	}
	public void setSignType(Integer signType) {
		this.signType = signType;
	}
	public Long getAdminTeamCode() {
		return adminTeamCode;
	}
	public void setAdminTeamCode(Long adminTeamCode) {
		this.adminTeamCode = adminTeamCode;
	}
	public String getSignCode() {
		return signCode;
	}
	public void setSignCode(String signCode) {
		this.signCode = signCode;
	}
	public String getJwdoctorCode() {
		return jwdoctorCode;
	}
	public void setJwdoctorCode(String jwdoctorCode) {
		this.jwdoctorCode = jwdoctorCode;
	}
	public String getJworgCode() {
		return jworgCode;
	}
	public void setJworgCode(String jworgCode) {
		this.jworgCode = jworgCode;
	}
	public String getPrescriptionCode() {
		return prescriptionCode;
	}
	public void setPrescriptionCode(String prescriptionCode) {
		this.prescriptionCode = prescriptionCode;
	}
	public String getAge() {
		return age;
	}
	public void setAge(String age) {
		this.age = age;
	}
	public Integer getSex() {
		return sex;
	}
	public void setSex(Integer sex) {
		this.sex = sex;
	}
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	public String getIdcardEncrypt() {
		return idcardEncrypt;
	}
	public void setIdcardEncrypt(String idcardEncrypt) {
		this.idcardEncrypt = idcardEncrypt;
	}
	@Transient
	public String getPhoto() {
		return photo;
	}
	public void setPhoto(String photo) {
		this.photo = photo;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	public String getJwDoctorWorkType() {
		return jwDoctorWorkType;
	}
	public void setJwDoctorWorkType(String jwDoctorWorkType) {
		this.jwDoctorWorkType = jwDoctorWorkType;
	}
	public String getJwDoctorHealth() {
		return jwDoctorHealth;
	}
	public void setJwDoctorHealth(String jwDoctorHealth) {
		this.jwDoctorHealth = jwDoctorHealth;
	}
	public String getHealthFollowupType() {
		return healthFollowupType;
	}
	public void setHealthFollowupType(String healthFollowupType) {
		this.healthFollowupType = healthFollowupType;
	}
	public Date getHealthFollowupNextDate() {
		return healthFollowupNextDate;
	}
	public void setHealthFollowupNextDate(Date healthFollowupNextDate) {
		this.healthFollowupNextDate = healthFollowupNextDate;
	}
	public String getRuralDoctorsFlag() {
		return ruralDoctorsFlag;
	}
	public void setRuralDoctorsFlag(String ruralDoctorsFlag) {
		this.ruralDoctorsFlag = ruralDoctorsFlag;
	}
}

+ 4 - 0
svr/svr-door-serivce/pom.xml

@ -69,6 +69,10 @@
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-entity</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-entity-es</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-request-mapping</artifactId>

File diff suppressed because it is too large
+ 67 - 43
svr/svr-door-serivce/sql/初始sql.sql


+ 393 - 0
svr/svr-door-serivce/sql/随访记录详情新增索引.txt

@ -0,0 +1,393 @@
创建索引
POST  http://172.19.103.68:9200/wlyy_followup
查询索引
GET http://172.19.103.68:9200/wlyy_followup/
给索引加mapping
POST http://172.19.103.68:9200/wlyy_followup/wlyy_followup_content/_mapping
{
    "wlyy_followup_content": {
        "properties": {
            "followup_id": {
                "type": "string",
                "index": "not_analyzed"
            },
            "followup_project": {
                "type": "string",
                "index": "not_analyzed"
            },
            "create_time": {
                "type": "string",
                "index": "not_analyzed"
            },
            "NO_SYMPTOM": {
                "type": "string",
                "index": "not_analyzed"
            },
            "HEADACHE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "NAUSEA": {
                "type": "string",
                "index": "not_analyzed"
            },
            "VERTIGO_TINNITUS": {
                "type": "string",
                "index": "not_analyzed"
            },
            "DIFFICULTY_BREATHING": {
                "type": "string",
                "index": "not_analyzed"
            },
            "PALPITATIONS": {
                "type": "string",
                "index": "not_analyzed"
            },
            "EPISTAXIS_BLEEDING": {
                "type": "string",
                "index": "not_analyzed"
            },
            "LIMBS_NUMB": {
                "type": "string",
                "index": "not_analyzed"
            },
            "EXTREMITY_EDEMA": {
                "type": "string",
                "index": "not_analyzed"
            },
            "SYMPTOM_OTHER": {
                "type": "string",
                "index": "not_analyzed"
            },
            "POLYDIPSIA": {
                "type": "string",
                "index": "not_analyzed"
            },
            "MORE_FOOD": {
                "type": "string",
                "index": "not_analyzed"
            },
            "MORE_URINE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "BLURRED_VISION": {
                "type": "string",
                "index": "not_analyzed"
            },
            "INFECTION": {
                "type": "string",
                "index": "not_analyzed"
            },
            "NUMB_HANDS": {
                "type": "string",
                "index": "not_analyzed"
            },
            "WEIGHT_LOSS": {
                "type": "string",
                "index": "not_analyzed"
            },
            "HYPOG_REACT_CODE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "HEIGHT": {
                "type": "string",
                "index": "not_analyzed"
            },
            "HEIGHT_EXP": {
                "type": "string",
                "index": "not_analyzed"
            },
            "WEIGHT": {
                "type": "string",
                "index": "not_analyzed"
            },
            "WEIGHT_EXP": {
                "type": "string",
                "index": "not_analyzed"
            },
            "BP_D": {
                "type": "string",
                "index": "not_analyzed"
            },
            "BP_U": {
                "type": "string",
                "index": "not_analyzed"
            },
            "BS_FPG": {
                "type": "string",
                "index": "not_analyzed"
            },
            "NO_BS_FPG": {
                "type": "string",
                "index": "not_analyzed"
            },
            "RANDOM_BLOOD_SUGAR": {
                "type": "string",
                "index": "not_analyzed"
            },
            "BMI": {
                "type": "string",
                "index": "not_analyzed"
            },
            "BMI_EXP": {
                "type": "string",
                "index": "not_analyzed"
            },
            "OTHER_POSITIVE_SIGNS": {
                "type": "string",
                "index": "not_analyzed"
            },
            "POFDA_MARK": {
                "type": "string",
                "index": "not_analyzed"
            },
            "HEART_RATE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "GHB": {
                "type": "string",
                "index": "not_analyzed"
            },
            "RENAL_FUNCTION_CREATININE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "RENAL_FUNCTION_BUN": {
                "type": "string",
                "index": "not_analyzed"
            },
            "MICROALBUMINURIA": {
                "type": "string",
                "index": "not_analyzed"
            },
            "EXAM_DATE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "BLOOD_FAT_TRIGLYCERIDE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "BLOOD_FAT_TC": {
                "type": "string",
                "index": "not_analyzed"
            },
            "BLOOD_FAT_LDLC": {
                "type": "string",
                "index": "not_analyzed"
            },
            "DAILY_SMOKING": {
                "type": "string",
                "index": "not_analyzed"
            },
            "SOMKING_EXP": {
                "type": "string",
                "index": "not_analyzed"
            },
            "DAILY_DRINKING": {
                "type": "string",
                "index": "not_analyzed"
            },
            "DRINK_EXP": {
                "type": "string",
                "index": "not_analyzed"
            },
            "EXERCISE_FREQ_CODE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "EXERCISE_FREQ_CODE_EXP": {
                "type": "string",
                "index": "not_analyzed"
            },
            "EXERCISE_DURATION_MINS": {
                "type": "string",
                "index": "not_analyzed"
            },
            "EXERCISE_DURATION_MINS_EXP": {
                "type": "string",
                "index": "not_analyzed"
            },
            "SALT_TAKEN_LEVEL_CODE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "SALT_TAKEN_LEVEL_EXP": {
                "type": "string",
                "index": "not_analyzed"
            },
            "PSY_ADJUST_RESULT_CODE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "COMPLIANCE_RESULT_CODE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "DAILY_STAPLE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "HYP_FOLLOWUP_TYPE_CODE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "HYP_COMPLICATION_DETAIL": {
                "type": "string",
                "index": "not_analyzed"
            },
            "DIA_FOLLOWUP_TYPE_CODE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "DIA_COMPLICATION_DETAIL": {
                "type": "string",
                "index": "not_analyzed"
            },
            "DRUG_COMPLIANCE_CODE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "CONTROL_DATE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "CONTROL_CONSTITUTOR": {
                "type": "string",
                "index": "not_analyzed"
            },
            "CONTROL_CONSTITUTOR_DOCTORCODE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "CONTROL_CONSTITUTOR_JWDOCTORCODE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "CONTROL_BP_U": {
                "type": "string",
                "index": "not_analyzed"
            },
            "CONTROL_BP_D": {
                "type": "string",
                "index": "not_analyzed"
            },
            "CONTROL_BS_FPG": {
                "type": "string",
                "index": "not_analyzed"
            },
            "CONTROL_NO_BS_FPG": {
                "type": "string",
                "index": "not_analyzed"
            },
            "CONTROL_GHB": {
                "type": "string",
                "index": "not_analyzed"
            },
            "CONTROL_TRIGLYCERIDE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "CONTROL_TOTAL_CHOLESTEROL": {
                "type": "string",
                "index": "not_analyzed"
            },
            "CONTROL_LDL": {
                "type": "string",
                "index": "not_analyzed"
            },
            "CONTROL_WEIGHT": {
                "type": "string",
                "index": "not_analyzed"
            },
            "CONTROL_EXERCISE_FREQ_CODE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "CONTROL_EXERCISE_DURATION_MINS": {
                "type": "string",
                "index": "not_analyzed"
            },
            "ARCHIVE_TIME": {
                "type": "string",
                "index": "not_analyzed"
            },
            "ARCHIVE_OPERATOR_NAME": {
                "type": "string",
                "index": "not_analyzed"
            },
            "HEALTH_EDUCATE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "EDUCATE_CONTENT": {
                "type": "string",
                "index": "not_analyzed"
            },
            "DRUG_ADVERSE_MARK": {
                "type": "string",
                "index": "not_analyzed"
            },
            "ADR_REMARK": {
                "type": "string",
                "index": "not_analyzed"
            },
            "TRANSFER_RESON": {
                "type": "string",
                "index": "not_analyzed"
            },
            "TRANSFER_ORG_DEPT": {
                "type": "string",
                "index": "not_analyzed"
            },
            "REFUSE_REFERRAL": {
                "type": "string",
                "index": "not_analyzed"
            },
            "REFUSE_REFERRAL_WHY": {
                "type": "string",
                "index": "not_analyzed"
            },
            "ARCHIVE_ID": {
                "type": "string",
                "index": "not_analyzed"
            },
            "CHECK_FEE_TYPE": {
                "type": "string",
                "index": "not_analyzed"
            },
            "FAMILY_FOLLOWUP_ID": {
                "type": "string",
                "index": "not_analyzed"
            }
        }
    }
}
增加索引搜索大小
PUT  http://172.19.103.68:9200/wlyy_followup/_settings
{
  "index": {
    "max_result_window": 500000
  }
}
续方完成之后的随访保存,BLOOD_SUGAR、BLOOD_SUGAR_TYPE
POST http://172.26.0.112:9200/wlyy_followup/wlyy_followup_content/_mapping
{
    "wlyy_followup_content": {
        "properties": {
            "BLOOD_SUGAR": {
                "type": "string",
                "index": "not_analyzed"
            },
            "BLOOD_SUGAR_TYPE": {
                "type": "string",
                "index": "not_analyzed"
            }
        }
    }
}

+ 157 - 0
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/controller/doctor/followup/DoctorFollowUpController.java

@ -0,0 +1,157 @@
package com.yihu.jw.door.controller.doctor.followup;
import com.alibaba.fastjson.JSON;
import com.yihu.jw.door.controller.BaseController;
import com.yihu.jw.door.service.DoorOrderService;
import com.yihu.jw.door.service.followup.FollowUpService;
import com.yihu.jw.followup.FollowupContentESDO;
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.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
 * Created by yeshijie on 2021/1/9.
 */
@RestController
@RequestMapping(value = "/doctor/followup", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "医生端-随访接口")
public class DoctorFollowUpController extends BaseController {
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Autowired
    private FollowUpService followUpService;
    @Autowired
    private DoorOrderService doorOrderService;
    @ApiOperation("暂不需要新增随访")
    @PostMapping(value = "/notAddFollowup")
    public String notAddFollowup(@ApiParam(name = "orderId", value = "订单id", defaultValue = "4")
                              @RequestParam(value = "orderId", required = true) String orderId) {
        try {
            doorOrderService.notAddFollowup(orderId);
            return write(200, "操作成功!");
        } catch (Exception e) {
            error(e);
            return error(-1, "操作失败!");
        }
    }
    @ApiOperation("新增临时随访记录(返回ID)")
    @PostMapping(value = "/addFollowup")
    public String addFollowup(@ApiParam(name = "patient", value = "患者代码", defaultValue = "443a196ef8744536a531260eb26c05d7")
                              @RequestParam(value = "patient", required = true) String patient,
                              @ApiParam(name = "date", value = "下次随访时间", defaultValue = "2016-12-15 20:00:00")
                              @RequestParam(value = "date", required = false) String date,
                              @ApiParam(name = "followupType", value = "随访方式【字典FOLLOWUP_WAY_DICT】", defaultValue = "25")
                              @RequestParam(value = "followupType", required = true) String followupType,
                              @ApiParam(name = "followupClass", value = "随访类别【1.高血压 2.糖尿病 3高糖】", defaultValue = "1")
                              @RequestParam(value = "followupClass", required = true) String followupClass,
                              @ApiParam(name = "followupManagerStatus", value = "随访管理状态【字典FOLLOWUP_MANAGER_STATUS】", defaultValue = "1")
                              @RequestParam(value = "followupManagerStatus", required = false) String followupManagerStatus,
                              @ApiParam(name = "plandate", value = "下次随访时间", defaultValue = "2016-12-14 20:00:00")
                              @RequestParam(value = "plandate", required = false) String plandate,
                              @ApiParam(name = "relateCode", value = "关联code", defaultValue = "关联code")
                              @RequestParam(value = "relateCode", required = false) String relateCode,
                              @ApiParam(name = "type", value = "随访类型", defaultValue = "0")
                              @RequestParam(value = "type", required = false) Integer type) {
        try {
            followUpService.addFollowup(getUID(), patient, date, followupType, followupClass, followupManagerStatus,plandate,relateCode,type);
            return write(200, "新增临时随访记录成功!");
        } catch (Exception e) {
            error(e);
            return invalidUserException(e, -1, "新增临时随访记录失败!" + e.getMessage());
        }
    }
    @ApiOperation("获取随访信息")
    @GetMapping(value = "/getFollowup")
    public String getFollowup(@ApiParam(name = "id", value = "随访记录ID", defaultValue = "4")
                              @RequestParam(value = "id", required = true) String id) {
        try {
            Map<String, String> response = followUpService.getFollowup(id);
            try {
                String sql = "UPDATE`wlyy_followup` SET `doctor_read_status`='1' WHERE (`id`='"+id+"') ";
                jdbcTemplate.update(sql);
            }catch (Exception e){
                e.printStackTrace();
            }
            return write(200, "获取随访信息成功!", "data", response);
        } catch (Exception e) {
            error(e);
            return invalidUserException(e, -1, "获取随访信息失败!" + e.getMessage());
        }
    }
    @ApiOperation("获取随访项目列表")
    @GetMapping(value = "/getFollowupProject")
    public String getFollowupProject(@ApiParam(name = "id", value = "随访记录ID", defaultValue = "4")
                                     @RequestParam(value = "id", required = true) String id) {
        try {
            List<Map<String, String>> list = followUpService.getFollowupProject(id);
            return write(200, "获取随访项目列表成功!", "data", list);
        } catch (Exception e) {
            error(e);
            return invalidUserException(e, -1, "获取随访项目列表失败!" + e.getMessage());
        }
    }
    @ApiOperation("获取随访项目数据")
    @GetMapping(value = "/getFollowupProjectData")
    public String getFollowupProjectData(@ApiParam(name = "id", value = "随访记录ID", defaultValue = "4")
                                         @RequestParam(value = "id", required = true) String id,
                                         @ApiParam(name = "followupProject", value = "随访项目")
                                         @RequestParam(value = "followupProject", required = false) String followupProject) {
        try {
            FollowupContentESDO followupContentESDO = followUpService.esGetFollowupProjectDataList(id, followupProject);
            String jsonString = JSON.toJSONString(followupContentESDO);
            Map maps = (Map)JSON.parse(jsonString);
            return write(200, "获取随访项目数据成功!", "data", maps);
        } catch (Exception e) {
            error(e);
            return invalidUserException(e, -1, "获取随访项目数据失败!" + e.getMessage());
        }
    }
    @ApiOperation("保存随访项目数据")
    @PostMapping(value = "/saveFollowupProjectData")
    public String saveFollowupProjectData(@ApiParam(name = "id", value = "随访记录ID", defaultValue = "4")
                                          @RequestParam(value = "id", required = true) String id,
                                          @ApiParam(name = "followupProject", value = "随访项目", defaultValue = "2")
                                          @RequestParam(value = "followupProject", required = false) String followupProject,
                                          @ApiParam(name = "followupProjectData", value = "随访项目数据", defaultValue = "{\"BLOOD_SUGAR\":\"33.3\",\"BLOOD_SUGAR_TYPE\":\"1\",\"WEIGHT\":\"76\",\"WEIGHT_EXP\":\"60\",\"BMI\":\"11\"}")
                                          @RequestParam(value = "followupProjectData", required = true) String followupProjectData) {
        try {
            followUpService.esSaveFollowupProjectData(id, followupProject, followupProjectData);
            return write(200, "保存随访项目数据成功!");
        } catch (Exception e) {
            error(e);
            return invalidUserException(e, -1, "保存随访项目数据失败!" + e.getMessage());
        }
    }
    @ApiOperation("完成随访记录")
    @PostMapping(value = "/finishFollowup")
    public String finishFollowup(@ApiParam(name = "id", value = "随访记录ID", defaultValue = "")
                                 @RequestParam(value = "id", required = true) String id) {
        try {
            followUpService.finishFollowup(id);
            return write(200, "完成随访记录成功!");
        } catch (Exception e) {
            error(e);
            return invalidUserException(e, -1, "完成随访记录失败!" + e.getMessage());
        }
    }
}

+ 87 - 0
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/dao/followup/FollowUpDao.java

@ -0,0 +1,87 @@
/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.yihu.jw.door.dao.followup;
import com.yihu.jw.entity.followup.Followup;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.Date;
import java.util.List;
import java.util.Set;
public interface FollowUpDao extends PagingAndSortingRepository<Followup, Long>, JpaSpecificationExecutor<Followup> {
    @Query("select a.followupDate from Followup a where a.doctorCode = ?1 and a.patientCode = ?2 and a.followupClass = '9'" )
    List<Date> findFollowupDateList(String doctor, String patientCode) throws Exception;
    @Query("select a.status from Followup a where a.doctorCode = ?1 and a.patientCode = ?2 and a.followupClass = '9'" )
    Set findStatusList(String doctor, String patientCode) throws Exception;
    @Query("select a from Followup a where a.doctorCode = ?1 and a.patientCode = ?2 and a.followupClass = '9' order by a.followupPlanDate asc")
    List<Followup> findFollowupList(String doctor, String patientCode) throws Exception;
    @Query("select a from Followup a where a.doctorCode = ?1 and a.patientCode = ?2 and a.followupDate = ?3 and a.followupClass = '9'")
    Followup findFollowupByDate(String doctor, String patientCode, Date followupDate) throws Exception;
    @Query("select a from Followup a where a.doctorCode = ?1 and a.followupDate between ?2 and ?3 and a.status <> '0'")
    List<Followup> findByDoctor(String doctor, Date begin, Date end) throws Exception;
    //查询未完成有效随访记录
    @Query("select a from Followup a where a.doctorCode = ?1 and a.followupDate between ?2 and ?3 and a.status NOT IN ('0', '1') ")
    List<Followup> getByDoctor(String doctor, Date begin, Date end) throws Exception;
    //查询未完成有效随访计划记录
    @Query("select a from Followup a where a.doctorCode = ?1 and a.followupPlanDate between ?2 and ?3 and a.status NOT IN ('0', '1') ")
    List<Followup> getByDoctorPlan(String doctor, Date begin, Date end) throws Exception;
    @Query("select a from Followup a where a.doctorCode = ?1 and a.followupPlanDate between ?2 and ?3 and a.status <> '0' and a.followupClass=?4 and a.patientName like ?5 order by a.followupPlanDate DESC")
    List<Followup> findAllDoctorPlan(String doctor, Date begin, Date end, String followupClass, String patientName) throws Exception;
    @Query("select a from Followup a where a.doctorCode = ?1 and a.followupPlanDate between ?2 and ?3 and a.status <> '0' and a.patientCode = ?4 and a.followupClass = ?5 and a.patientName like ?6 order by a.followupPlanDate DESC")
    List<Followup> findAllDoctorPlan(String doctor, Date begin, Date end, String patientCode, String followupClass, String patientName) throws Exception;
    @Query("select a from Followup a where a.doctorCode = ?1 and a.followupPlanDate between ?2 and ?3 and a.status <> '0' and a.patientCode = ?4 and a.followupClass = ?5 and a.patientName like ?6 and a.followupClass in(5,6,7,8,9) order by a.followupPlanDate DESC")
    List<Followup> findAllDoorDoctorPlan(String doctor, Date begin, Date end, String patientCode, String followupClass, String patientName) throws Exception;
    @Query("select a from Followup a where a.doctorCode = ?1 and a.followupPlanDate between ?2 and ?3 and a.status <> '0' and a.followupClass=?4 and a.patientName like ?5 and a.followupClass in(5,6,7,8,9) order by a.followupPlanDate DESC")
    List<Followup> findAllDoorDoctorPlan(String doctor, Date begin, Date end, String followupClass, String patientName) throws Exception;
    @Query("select a from Followup a where a.patientCode = ?1 and a.status <> '0' and a.doctorCode = ?2 order by a.followupPlanDate DESC")
    List<Followup> findAllPatientPlan(String patientCode, String doctorCode) throws Exception;
    @Query("select a from Followup a where a.creater = ?1 and a.followupDate between ?2 and ?3 and a.status <> '0'")
    List<Followup> findByCreater(String creater, Date begin, Date end, Pageable pageRequest) throws Exception;
    @Query(value = "select a.* from wlyy_followup a where a.doctor_code in ?1 and a.patient_code = ?2 and a.followup_class=?3 and a.status ='1' order by a.followup_date DESC limit 1",nativeQuery = true)
    Followup findLastFollowup(String[] doctors, String patientCode, String followClass) throws Exception;
    /**
     * 根据续方CODE获取随访记录
     * @param prescriptionCode
     * @return
     */
    @Query("select a from Followup a where a.prescriptionCode = ?1 and a.status <> '0'")
	Followup getFollowupByPrescriptionCode(String prescriptionCode);
    @Query("select a from Followup a where a.prescriptionCode = ?1 and a.followupType = ?2 and a.status <> '0'")
    Followup getFollowupByPrescriptionCode(String prescriptionCode,String followupType);
    @Query("select a from Followup a where a.prescriptionCode = ?1 and a.status <> '0'")
    List<Followup> getFollowupListByPrescriptionCode(String prescriptionCode);
    
    @Modifying
    @Query("update Followup a set a.status=?2 where a.prescriptionCode = ?1 ")
    void updateStatusByPrescriptionCode(String prescriptionCode, String status);
    @Query("select a from Followup a where a.patientCode = ?1 and a.followupClass = ?2 and a.status = 1 order by a.followupDate desc")
    List<Followup> findAllByPatientCodeAndClass(String patientCode, String followupClass);
}

+ 14 - 1
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/DoorOrderService.java

@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.door.dao.*;
import com.yihu.jw.door.dao.followup.FollowUpDao;
import com.yihu.jw.door.util.MessageUtil;
import com.yihu.jw.door.util.StreamUtil;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
@ -138,6 +139,8 @@ public class DoorOrderService {
    private PrescriptionDao prescriptionDao;
    @Autowired
    private PrescriptionDiagnosisDao prescriptionDiagnosisDao;
    @Autowired
    private FollowUpDao followupDao;
    /**
     * 互联网查询待服务工单数
@ -368,9 +371,19 @@ public class DoorOrderService {
        getPrescription(doorServiceOrder);
        doorServiceOrder.setFollowupList(followupDao.getFollowupListByPrescriptionCode(doorServiceOrder.getId()));
        return doorServiceOrder;
    }
    public void notAddFollowup(String orderId){
        WlyyDoorServiceOrderDO doorServiceOrder = this.doorServiceOrderDao.findOne(orderId);
        if(StringUtils.isEmpty(doorServiceOrder.getFollowupDate())){
            doorServiceOrder.setFollowupDate(DateUtil.getStringDate());
            doorServiceOrderDao.save(doorServiceOrder);
        }
    }
    /**
     *  //获取上门前后开方详情
     * @param doorServiceOrder
@ -798,7 +811,7 @@ public class DoorOrderService {
            //获取咨询
            ConsultDo consult = consultDao.queryByRelationCode(id);
            if (null != consult) {
                doorServiceOrder.setSessionId(doorServiceOrder.getProxyPatient() + "_" + consult.getId() + "_"  + doorServiceOrder.getNumber() +  "_" +  consult.getType());
                doorServiceOrder.setSessionId(doorServiceOrder.getPatient() + "_" + consult.getId() + "_"  + doorServiceOrder.getNumber() +  "_" +  consult.getType());
            }
            object.put("sessionId",doorServiceOrder.getSessionId());

+ 2 - 4
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/WlyyDoorPrescriptionService.java

@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.netflix.discovery.converters.Auto;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.door.dao.DoorServiceOrderDao;
import com.yihu.jw.door.dao.WlyyDoorPrescriptionDao;
@ -19,7 +18,6 @@ import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.door.WlyyDoorPrescriptionDO;
import com.yihu.jw.entity.door.WlyyDoorPrescriptionDrugDO;
import com.yihu.jw.entity.door.WlyyDoorServiceOrderDO;
import com.yihu.jw.entity.patient.Patient;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.im.dao.ConsultDao;
import com.yihu.jw.im.util.ImUtil;
@ -108,7 +106,7 @@ public class WlyyDoorPrescriptionService  extends BaseJpaService<WlyyDoorPrescri
     */
    public JSONArray getPrescription(String doctor, String patient, String visitDept, String visitTimeFrom, String visitTimeEnd) throws Exception {
        JSONArray array = new JSONArray();
        if (StringUtils.isEmpty(visitTimeFrom)) {
/*        if (StringUtils.isEmpty(visitTimeFrom)) {
            visitTimeEnd = DateUtil.getStringDateShort();
            Calendar c = Calendar.getInstance();
            c.setTime(new Date());
@ -121,7 +119,7 @@ public class WlyyDoorPrescriptionService  extends BaseJpaService<WlyyDoorPrescri
        array = JSONObject.parseObject(re).getJSONArray("returnData");
        if(array.size() > 0) {
            array.getJSONArray(0).sort(Comparator.comparing(obj -> ((JSONObject) obj).getInteger("VISIT_NO")).reversed());
        }
        }*/
//        String jsonString = "[]";
        /*String jsonString = "[{\"RECIPE_NO\": \"123456\",\"DIAGNOSE_NAME\": \"高血压\",\"DIAGNOSE_CODE\":\"1\",\"TOTAL_FEE\":\"125\",\"APPLY_TIME\": \"2019-04-24 09:15:00\", \"RECIPE_DETAIL\":[{\"ITEM_CODE\": \"12\",\"ITEM_NAME\": \"尿液分析\",\"ITEM_PRICE\": \"25.00\",\"ITEM_QUANTITY\": \"1\",\"COST\": \"25\"}," +
                "{\"ITEM_CODE\": \"13\",\"ITEM_NAME\": \"出诊费\",\"ITEM_PRICE\": \"50\",\"ITEM_QUANTITY\": \"2\",\"COST\": \"100\"}]},{\"RECIPE_NO\": \"23333\",\"DIAGNOSE_NAME\": \"高血压,糖尿病\",\"DIAGNOSE_CODE\":\"2\",\"TOTAL_FEE\":\"125\",\"APPLY_TIME\": \"2019-04-23 09:15:00\", " +

+ 46 - 0
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/common/WlyySystemDictService.java

@ -0,0 +1,46 @@
package com.yihu.jw.door.service.common;
import com.yihu.jw.entity.base.system.SystemDictEntryDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
 * Created by yeshijie on 2021/1/9.
 */
@Service
@Transactional
public class WlyySystemDictService {
    @Autowired
    private JdbcTemplate jdbcTemplate;
    public List<SystemDictEntryDO> getDictByDictName(String dictCode) {
        String sql = "select d.* from base_system_dict_entry d where d.dict_code = '"+dictCode+"'";
        return jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(SystemDictEntryDO.class));
    }
    /**
     * 查找字典项
     * @param dictCode
     * @param code
     * @return
     */
    public String getDictValue(String dictCode, String code) {
        String re = null;
        try {
            String sql = "select d.value from base_system_dict_entry d where d.dict_code = '"+dictCode+"' and d.code = '"+code+"'";
            re = jdbcTemplate.queryForObject(sql,String.class);
        }catch (Exception e){
            e.printStackTrace();
        }
        return re;
    }
}

+ 444 - 0
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/followup/FollowUpService.java

@ -0,0 +1,444 @@
package com.yihu.jw.door.service.followup;
import com.alibaba.fastjson.JSON;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.door.dao.followup.FollowUpDao;
import com.yihu.jw.door.service.common.WlyySystemDictService;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.system.SystemDictEntryDO;
import com.yihu.jw.entity.followup.Followup;
import com.yihu.jw.es.es.ElasticFactory;
import com.yihu.jw.es.es.ElastricSearchSave;
import com.yihu.jw.followup.FollowupContentESDO;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.util.date.DateUtil;
import io.searchbox.client.JestClient;
import io.searchbox.core.*;
import org.apache.commons.lang3.StringUtils;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import javax.transaction.Transactional;
import java.util.*;
/**
 * Created by yeshijie on 2021/1/9.
 */
@Component
@Transactional(rollbackOn = Exception.class)
public class FollowUpService {
    private static Logger logger = LoggerFactory.getLogger(FollowUpService.class);
    @Autowired
    private FollowUpDao followupDao;
    @Autowired
    private WlyySystemDictService systemDictService;
    @Value("${es.type.FollowUpContent}")
    private String esType;
    @Value("${es.index.FollowUp}")
    private String esIndex;
    @Autowired
    private ElasticFactory elasticFactory;
    @Autowired
    private ElastricSearchSave elastricSearchSave;
    @Autowired
    private BaseDoctorDao doctorDao;
    @Autowired
    private BasePatientDao patientDao;
    /**
     * 新增临时随访记录(返回ID)
     */
    public void addFollowup(String doctorCode, String patientCode, String date, String followupType, String followupClass, String followupManagerStatus, String plandate, String relateCode,Integer type) throws Exception {
        //获取医生信息
        BaseDoctorDO doctor = doctorDao.findById(doctorCode);
        if (doctor == null) {
            throw new Exception("not exit doctor:" + doctorCode + ".\r\n");
        }
        //获取患者信息
        BasePatientDO patient = patientDao.findById(patientCode);
        if (patient == null) {
            throw new Exception("not exit patient:" + patientCode + ".\r\n");
        }
        String followupClasss[] = followupClass.split(",");
        for (String followupClassTemp:followupClasss){
            Followup followupTemp = followupDao.getFollowupByPrescriptionCode(relateCode,followupClassTemp);
            if(followupTemp != null){
                continue;
            }
            Followup followup = new Followup();
            if(StringUtils.isNoneBlank(date)){
                Date followDate = DateUtil.strToDate(date);
                followup.setFollowupDate(followDate);
                followup.setFollowupPlanDate(followDate);
            }
            followup.setDoctorCode(doctorCode);
            followup.setDoctorName(doctor.getName());
//        followup.setOrgCode(doctor.getHospital());
//        followup.setOrgName(doctor.getHospitalName());
            followup.setPatientCode(patientCode);
            followup.setPatientName(patient.getName());
            followup.setIdcard(patient.getIdcard());
            followup.setFollowupType(followupType);
            followup.setFollowupClass(followupClassTemp);
            followup.setFollowupManagerStatus(followupManagerStatus);
            followup.setDataFrom("2");//数据来源 1基卫 2APP
            followup.setStatus("2");     //状态 0取消 1已完成 2未开始 3进行中
            followup.setCreateTime(new Date());
            followup.setCreater(doctorCode);
            followup.setSignType(2);
            if (type!=null&&type!=0){
                followup.setType(type);
            }
            //如果有填入续方CODE,则添加续方关联--huangwenjie.2017.11.02
            if (StringUtils.isNotBlank(relateCode)) {
                followup.setPrescriptionCode(relateCode);
            }
            //计划下次随访时间--ysj.2017.10.26
            if (StringUtils.isNoneBlank(plandate)) {
                followup.setFollowupNextDate(DateUtil.strToDate(plandate));
                Followup nextFollowup = new Followup();
                nextFollowup.setDataFrom(followup.getDataFrom());
                nextFollowup.setStatus("2");
                nextFollowup.setFollowupType(followupType);
                nextFollowup.setFollowupNo(followup.getFollowupNo());
                nextFollowup.setFollowupDate(DateUtil.strToDate(plandate));
                nextFollowup.setFollowupPlanDate(DateUtil.strToDate(plandate));
                nextFollowup.setJwdoctorCode(followup.getJwdoctorCode());
                nextFollowup.setJworgCode(followup.getJworgCode());
                nextFollowup.setOrgCode(followup.getOrgCode());
                nextFollowup.setOrgName(followup.getOrgName());
                nextFollowup.setCreater(followup.getCreater());
                nextFollowup.setSignCode(followup.getSignCode());
                nextFollowup.setAdminTeamCode(followup.getAdminTeamCode());
                nextFollowup.setFollowupClass(followupClassTemp);
                nextFollowup.setFollowupManagerStatus(followupManagerStatus);
                nextFollowup.setPatientName(followup.getPatientName());
                nextFollowup.setPatientCode(followup.getPatientCode());
                nextFollowup.setCreateTime(new Date());
                nextFollowup.setUpdateTime(new Date());
                nextFollowup.setDoctorCode(followup.getDoctorCode());
                nextFollowup.setDoctorName(followup.getDoctorName());
                nextFollowup.setIdcard(followup.getIdcard());
                nextFollowup.setSignType(followup.getSignType());
                nextFollowup.setType(type);
                followupDao.save(nextFollowup);
            }
            followupDao.save(followup);
        }
    }
    /**
     * 完成随访记录,并上传随访记录
     */
    public void finishFollowup(String id) throws Exception {
        Followup followup = followupDao.findOne(Long.valueOf(id));
        if (followup != null) {
            followup.setStatus("1");  //状态 0取消 1已完成 2未开始 3进行中
            followupDao.save(followup);
        } else {
            throw new Exception("not exit follow:" + id + ".\r\n");
        }
    }
    /**
     * ES 保存随访记录详情
     *
     * @author huangwenjie
     * @date 2017/11/1 14:57
     */
    @Transactional
    public void esSaveFollowupProjectData(String id, String followupProject, String followupProjectData) throws Exception {
        JestClient jestClient = null;
        try {
            jestClient = elasticFactory.getJestClient();
            //先根据条件查找出来
            SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
            searchSourceBuilder.query(
                    new BoolQueryBuilder()
                            .must(QueryBuilders.matchQuery("followup_id", id))
                            .must(QueryBuilders.matchQuery("followup_project", followupProject))
            );
            Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
                    .build();
            SearchResult result = jestClient.execute(search);
            FollowupContentESDO followupContentESDO = result.getSourceAsObject(FollowupContentESDO.class);
            List<FollowupContentESDO> dataList = new ArrayList<>();
            if(followupContentESDO != null){
                dataList.add(followupContentESDO);
                //删除原有记录
                this.esDeleteFollowUpContent(dataList);
            }
            //保存新的随访详情信息
            List<FollowupContentESDO> newdatalist = new ArrayList<>();
            followupContentESDO = JSON.parseObject(followupProjectData, FollowupContentESDO.class);
            followupContentESDO.setFollowup_id(id);
            followupContentESDO.setFollowup_project(followupProject);
            followupContentESDO.setCreate_time(new Date());
            newdatalist.add(followupContentESDO);
            elastricSearchSave.save(newdatalist, esIndex, esType);
        } finally {
            if (jestClient != null) {
                jestClient.shutdownClient();
            }
        }
    }
    /**
     * ES 删除随访详情信息
     *
     * @author huangwenjie
     * @date 2017/11/1 15:17
     */
    public void esDeleteFollowUpContent(List<FollowupContentESDO> datalist) throws Exception {
        JestClient jestClient = null;
        try {
            jestClient = elasticFactory.getJestClient();
            //根据id批量删除
            Bulk.Builder bulk = new Bulk.Builder().defaultIndex(esIndex).defaultType(esType);
            for (FollowupContentESDO obj : datalist) {
                Delete index = new Delete.Builder(obj.getId()).build();
                bulk.addAction(index);
            }
            BulkResult br = jestClient.execute(bulk.build());
            logger.info("delete data count:" + datalist.size());
            logger.info("delete flag:" + br.isSucceeded());
            jestClient.shutdownClient();
        } finally {
            if (jestClient != null) {
                jestClient.shutdownClient();
            }
        }
    }
    /**
     * ES获取表单项目数据
     */
    public FollowupContentESDO esGetFollowupProjectDataList(String id, String followupProject) throws Exception {
        JestClient jestClient = null;
        FollowupContentESDO followupContentESDO = null;
        try {
            //根据随访ID、分类ID获取随访记录详情
            jestClient = elasticFactory.getJestClient();
            //先根据条件查找出来
            SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
            if(StringUtils.isNotBlank(followupProject)) {
                searchSourceBuilder.query(
                        new BoolQueryBuilder()
                                .must(QueryBuilders.matchQuery("followup_id", id))
                                .must(QueryBuilders.matchQuery("followup_project", followupProject))
                );
            }else {
                searchSourceBuilder.query(
                        new BoolQueryBuilder()
                                .must(QueryBuilders.matchQuery("followup_id", id))
                                .mustNot(QueryBuilders.existsQuery("followup_project"))
                );
            }
            Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
                    .build();
            SearchResult result = jestClient.execute(search);
            followupContentESDO = result.getSourceAsObject(FollowupContentESDO.class);
        } finally {
            if (jestClient != null) {
                jestClient.shutdownClient();
            }
        }
        return followupContentESDO;
    }
    /**
     * 获取面访项目列表
     */
    public List<Map<String, String>> getFollowupProject(String id) throws Exception {
        List<Map<String, String>> re = new ArrayList<>();
        //获取已填写的面访项目
        List<String> project = esfindProjectByFollowupId(id);
        //获取所有面访项目
        List<SystemDictEntryDO> dictList = systemDictService.getDictByDictName("FOLLOWUP_PROJECT");
        if (dictList != null && dictList.size() > 0) {
            for (SystemDictEntryDO dict : dictList) {
                Map<String, String> map = new HashMap<>();
                String code = dict.getCode();
                map.put("projectCode", code);
                map.put("projectName", dict.getValue());
                if (project != null && project.contains(code)) {
                    map.put("status", "1"); //已填写
                } else {
                    map.put("status", "0");//未填写
                }
                re.add(map);
            }
        }
        return re;
    }
    /**
     * 获取面访项目列表
     */
    public Map<String, String> getFollowup(String id) throws Exception {
        Map<String, String> re = new HashMap<>();
        Followup followup = followupDao.findOne(Long.valueOf(id));
        if (followup != null) {
            re = getFollowupDetail(followup);
        } else {
            throw new Exception("not exit follow:" + id + ".\r\n");
        }
        return re;
    }
    /**
     * 转译随访信息
     */
    private Map<String, String> getFollowupDetail(Followup followup) throws Exception {
        Map<String, String> re = new HashMap<>();
        //患者信息
        String patientCode = followup.getPatientCode();
        BasePatientDO patient = patientDao.findById(patientCode);
        if (patient != null) {
            re.put("patientCode", patientCode);
            re.put("patientName", patient.getName());
            re.put("idcard", patient.getIdcard());
            String mobile = patient.getMobile();
            if (StringUtils.isEmpty(mobile)) {
                mobile = patient.getMobileRemarks();
            }
            re.put("mobile", mobile);
            re.put("sex", String.valueOf(patient.getSex()));
            re.put("birthday", DateUtil.dateToStrLong(patient.getBirthday()));
            re.put("photo", patient.getPhoto());
        } else {
            throw new Exception("not exit patient:" + patientCode);
        }
        re.put("id", String.valueOf(followup.getId()));
        re.put("followupNo", followup.getFollowupNo());
        re.put("followupDate", DateUtil.dateToStrLong(followup.getFollowupDate()));
        re.put("followupNextDate", DateUtil.dateToStrLong(followup.getFollowupNextDate()));
        //随访方式转译
        re.put("followupType", followup.getFollowupType());
        String followupTypeName = systemDictService.getDictValue("FOLLOWUP_WAY_DICT", followup.getFollowupType());
        re.put("followupTypeName", followupTypeName);
        //随访类别转译
        String followupClass = followup.getFollowupClass();
        re.put("followupClass", followupClass);
        String followupClassName = systemDictService.getDictValue("FOLLOWUP_CLASS_DICT", followup.getFollowupClass());
        if (StringUtils.isNoneBlank(followupClass) && followupClass.contains(",")) {
            String[] followupClassArray = followupClass.split(",");
            followupClassName = "";
            for (int i = 0; i < followupClassArray.length; i++) {
                followupClassName += systemDictService.getDictValue("FOLLOWUP_CLASS_DICT", followupClassArray[i]);
                if (i != followupClassArray.length - 1) {
                    followupClassName += ",";
                }
            }
        }
        re.put("followupClassName", followupClassName);
        //随访管理状态转译
        re.put("followupManagerStatus", followup.getFollowupManagerStatus());
        String followupManagerStatusName = systemDictService.getDictValue("FOLLOWUP_MANAGER_STATUS", followup.getFollowupManagerStatus());
        re.put("followupManagerStatusName", followupManagerStatusName);
        re.put("doctorCode", followup.getDoctorCode());
        re.put("doctorName", followup.getDoctorName());
        re.put("orgCode", followup.getOrgCode());
        re.put("orgName", followup.getOrgName());
        re.put("dataFrom", followup.getDataFrom());
        re.put("status", followup.getStatus());
        re.put("followupContentPhone", followup.getFollowupContentPhone());
        re.put("createTime", DateUtil.dateToStrLong(followup.getCreateTime()));
        re.put("creater", followup.getCreater());
        re.put("prescriptionCode",followup.getPrescriptionCode());
        return re;
    }
    /**
     * ES获取面访项目数据列表
     *
     * @author huangwenjie
     * @date 2017/11/1 19:41
     */
    public List<String> esfindProjectByFollowupId(String id) throws Exception {
        JestClient jestClient = null;
        List<String> resultList = new ArrayList<>();
        try {
            //根据随访ID、分类ID获取随访记录详情
            jestClient = elasticFactory.getJestClient();
            //先根据条件查找出来
            SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
            searchSourceBuilder.query(
                    new BoolQueryBuilder()
                            .must(QueryBuilders.matchQuery("followup_id", id))
            );
            Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType)
                    .build();
            SearchResult result = jestClient.execute(search);
            List<FollowupContentESDO> followupContentESDOList = new ArrayList<>();
            followupContentESDOList = result.getSourceAsObjectList(FollowupContentESDO.class);
            if (!followupContentESDOList.isEmpty()) {
                for (FollowupContentESDO followupContentESDO : followupContentESDOList) {
                    if("2".equals(followupContentESDO.getFollowup_project())){
                        //判断血压必填
                        if(StringUtils.isNotBlank(followupContentESDO.getBP_D()) && StringUtils.isNotBlank(followupContentESDO.getBP_U())){
                            resultList.add(followupContentESDO.getFollowup_project());
                        }
                        if(StringUtils.isNotBlank(followupContentESDO.getBLOOD_SUGAR()) && StringUtils.isNotBlank(followupContentESDO.getBLOOD_SUGAR_TYPE())){
                            resultList.add(followupContentESDO.getFollowup_project());
                        }
                    }else if("3".equals(followupContentESDO.getFollowup_project())){
                        //判断血糖必填
                        if(StringUtils.isNotBlank(followupContentESDO.getBS_FPG()) ||
                                StringUtils.isNotBlank(followupContentESDO.getNO_BS_FPG())||
                                StringUtils.isNotBlank(followupContentESDO.getRANDOM_BLOOD_SUGAR())){
                            resultList.add(followupContentESDO.getFollowup_project());
                        }
                    }else{
                        resultList.add(followupContentESDO.getFollowup_project());
                    }
                }
            }
            jestClient.shutdownClient();
        } finally {
            if (jestClient != null) {
                jestClient.shutdownClient();
            }
        }
        return resultList;
    }
}

+ 8 - 19
svr/svr-door-serivce/src/main/resources/application.yml

@ -24,25 +24,6 @@ spring:
    min-evictable-idle-time-millis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
    time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
  data:
    elasticsearch: #ElasticsearchProperties
      cluster-name: jkzl #默认即为elasticsearch  集群名
      cluster-nodes: 172.26.0.115:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
      local: false #是否本地连接
      properties: # Additional properties used to configure the client.
        enable: true
  # JEST (Elasticsearch HTTP client) (JestProperties)
  elasticsearch:
    jest:
      uris: http://172.26.0.112:9200
#      uris: http://172.19.103.68:9200
      connection-timeout: 60000 # Connection timeout in milliseconds.
      multi-threaded: true # Enable connection requests from multiple execution threads.
#      username: # Login user.
#      password: # Login password.
#      proxy.port:  # Proxy port the HTTP client should use.
#      proxy.host:  # Proxy host the HTTP client should use.
#hibernate 配置
hibernate:
  dialect: org.hibernate.dialect.MySQL5Dialect
@ -111,8 +92,10 @@ es:
  pwflag: 1 # 1需要密码,2不需要密码
  index:
    Statistics: hlw_quota_test
    FollowUp: wlyy_followup
  type:
    Statistics: hlw_quota_test
    FollowUpContent: wlyy_followup_content
  host:  http://172.26.0.55:9000
  tHost: 172.26.0.55:9300
  clusterName: jkzl
@ -192,8 +175,10 @@ es:
  pwflag: 1 # 1需要密码,2不需要密码
  index:
    Statistics: hlw_quota_test
    FollowUp: wlyy_followup
  type:
    Statistics: hlw_quota_test
    FollowUpContent: wlyy_followup_content
  host:  http://172.26.0.55:9000
  tHost: 172.26.0.55:9300
  clusterName: jkzl
@ -270,8 +255,10 @@ es:
  pwflag: 1 # 1需要密码,2不需要密码
  index:
    Statistics: hlw_quota_test
    FollowUp: wlyy_followup
  type:
    Statistics: hlw_quota_test
    FollowUpContent: wlyy_followup_content
  host:  http://172.26.0.55:9000
  tHost: 172.26.0.55:9300
  clusterName: jkzl
@ -349,8 +336,10 @@ es:
  pwflag: 1 # 1需要密码,2不需要密码
  index:
    Statistics: hlw_quota_prod
    FollowUp: wlyy_followup
  type:
    Statistics: hlw_quota_prod
    FollowUpContent: wlyy_followup_content
  host:  http://10.9.1.247:9200
  tHost: 10.9.1.247:9300
  clusterName: jkzl