瀏覽代碼

随访改造ES代码提交

huangwenjie 7 年之前
父節點
當前提交
73ad5dc7c6
共有 16 個文件被更改,包括 1584 次插入25 次删除
  1. 938 0
      common/common-entity/src/main/java/com/yihu/es/entity/FollowupContentESDO.java
  2. 10 1
      common/common-entity/src/main/java/com/yihu/wlyy/entity/followup/Followup.java
  3. 94 0
      common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionFollowupContent.java
  4. 342 4
      patient-co/patient-co-wlyy/doc/技术文档/es/随访记录详情新增索引.txt
  5. 2 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/es/ElastricSearchSave.java
  6. 0 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/logs/BusinessLogs.java
  7. 0 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/archives/PatientEventService.java
  8. 162 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/followup/FollowUpService.java
  9. 12 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/followup/DoctorFollowUpController.java
  10. 2 0
      patient-co/patient-co-wlyy/src/main/resources/application-dev.yml
  11. 2 0
      patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml
  12. 2 0
      patient-co/patient-co-wlyy/src/main/resources/application-local.yml
  13. 2 0
      patient-co/patient-co-wlyy/src/main/resources/application-localtest.yml
  14. 2 0
      patient-co/patient-co-wlyy/src/main/resources/application-prod.yml
  15. 2 0
      patient-co/patient-co-wlyy/src/main/resources/application-test.yml
  16. 12 12
      patient-co/patient-co-wlyy/src/main/resources/logback.xml

+ 938 - 0
common/common-entity/src/main/java/com/yihu/es/entity/FollowupContentESDO.java

@ -0,0 +1,938 @@
package com.yihu.es.entity;
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 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 = "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;
	}
}

+ 10 - 1
common/common-entity/src/main/java/com/yihu/wlyy/entity/followup/Followup.java

@ -65,9 +65,10 @@ public class Followup extends IdEntity {
	private Integer signType;
	// 行政团队
	private Long adminTeamCode;
	//签约表Code
	private String signCode;
	//关联的续方CODE
	private String prescriptionCode;
	public Date getFollowupPlanDate() {
		return followupPlanDate;
@ -272,4 +273,12 @@ public class Followup extends IdEntity {
	public void setJworgCode(String jworgCode) {
		this.jworgCode = jworgCode;
	}
	
	public String getPrescriptionCode() {
		return prescriptionCode;
	}
	
	public void setPrescriptionCode(String prescriptionCode) {
		this.prescriptionCode = prescriptionCode;
	}
}

+ 94 - 0
common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionFollowupContent.java

@ -0,0 +1,94 @@
package com.yihu.wlyy.entity.patient.prescription;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.*;
import java.sql.Date;
import java.sql.Timestamp;
/**
 * 续方咨询随访问卷表
 * @author huangwenjie
 * @date 2017/11/1 12:05
 */
@Entity
@Table(name = "wlyy_prescription_followup_content")
public class PrescriptionFollowupContent extends IdEntity {
	private String code;
	private String prescriptionCode;  //续方COE
	private String followupId;        //随访记录ID
	private String followupProject;   //随访问卷详情类型ID(目前有1-10,和随访信息详情分类一致)
	private String followupKey;       //随访问卷详情指标KEY(和随访记录一致)
	private String followupValue;     //随访问卷详情指标值(和随访记录一致)
	private Date createTime;
	
	@Basic
	@Column(name = "code")
	public String getCode() {
		return code;
	}
	
	public void setCode(String code) {
		this.code = code;
	}
	
	@Basic
	@Column(name = "prescription_code")
	public String getPrescriptionCode() {
		return prescriptionCode;
	}
	
	public void setPrescriptionCode(String prescriptionCode) {
		this.prescriptionCode = prescriptionCode;
	}
	
	@Basic
	@Column(name = "followup_id")
	public String getFollowupId() {
		return followupId;
	}
	
	public void setFollowupId(String followupId) {
		this.followupId = followupId;
	}
	
	@Basic
	@Column(name = "followup_project")
	public String getFollowupProject() {
		return followupProject;
	}
	
	public void setFollowupProject(String followupProject) {
		this.followupProject = followupProject;
	}
	
	@Basic
	@Column(name = "followup_key")
	public String getFollowupKey() {
		return followupKey;
	}
	
	public void setFollowupKey(String followupKey) {
		this.followupKey = followupKey;
	}
	
	@Basic
	@Column(name = "followup_value")
	public String getFollowupValue() {
		return followupValue;
	}
	
	public void setFollowupValue(String followupValue) {
		this.followupValue = followupValue;
	}
	
	@Basic
	@Column(name = "create_time")
	public Date getCreateTime() {
		return createTime;
	}
	
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
}

+ 342 - 4
patient-co/patient-co-wlyy/doc/技术文档/es/随访记录详情新增索引.txt

@ -15,15 +15,351 @@ POST http://172.19.103.68:9200/wlyy_followup/wlyy_followup_content/_mapping
                "type": "string",
                "index": "not_analyzed"
            },
            "followup_key": {
            "create_time": {
                "type": "string",
                "index": "not_analyzed"
            },
            "followup_value": {
            "NO_SYMPTOM": {
                "type": "string",
                "index": "not_analyzed"
            },
            "create_time": {
            "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"
            }
@ -37,4 +373,6 @@ PUT  http://172.19.103.68:9200/wlyy_followup/_settings
  "index": {
    "max_result_window": 500000
  }
}
}

+ 2 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/es/ElastricSearchSave.java

@ -1,9 +1,11 @@
package com.yihu.wlyy.config.es;
import com.alibaba.fastjson.JSONObject;
import io.searchbox.client.JestClient;
import io.searchbox.core.Bulk;
import io.searchbox.core.BulkResult;
import io.searchbox.core.Index;
import io.searchbox.core.Update;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

+ 0 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/logs/BusinessLogs.java

@ -1,6 +1,5 @@
package com.yihu.wlyy.logs;
import com.yihu.wlyy.util.DateUtil;
import org.json.JSONArray;
import org.json.JSONObject;
import org.slf4j.Logger;

+ 0 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/archives/PatientEventService.java

@ -1,6 +1,5 @@
package com.yihu.wlyy.service.app.archives;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.wlyy.entity.patient.PatientEvent;
import com.yihu.wlyy.entity.patient.PatientEventImg;
import com.yihu.wlyy.logs.BusinessLogs;

+ 162 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/followup/FollowUpService.java

@ -2,6 +2,9 @@ package com.yihu.wlyy.service.app.followup;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.es.entity.FollowupContentESDO;
import com.yihu.wlyy.config.es.ElasticFactory;
import com.yihu.wlyy.config.es.ElastricSearchSave;
import com.yihu.wlyy.entity.dict.SystemDict;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.followup.Followup;
@ -23,16 +26,26 @@ import com.yihu.wlyy.service.common.account.PatientService;
import com.yihu.wlyy.service.system.SystemDictService;
import com.yihu.wlyy.task.PushMsgTask;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.ElasticsearchUtil;
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.json.JSONArray;
import org.json.JSONObject;
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.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import com.alibaba.fastjson.JSON;
import javax.transaction.Transactional;
import java.util.*;
@ -45,6 +58,8 @@ import java.util.*;
@Component
@Transactional(rollbackOn = Exception.class)
public class FollowUpService extends BaseService {
    
    private static Logger logger = LoggerFactory.getLogger(FollowUpService.class);
    @Autowired
    private DoctorDao doctorDao;
@ -85,7 +100,17 @@ public class FollowUpService extends BaseService {
    private PushMsgTask pushMsgTask;
    @Autowired
    private FollowUpMappingDao followUpMappingDao;
    
    @Value("${es.type.FollowUpContent}")
    private String esType;
    @Value("${es.index.FollowUp}")
    private String esIndex;
    @Autowired
    private ElasticFactory elasticFactory;
    @Autowired
    private ElasticsearchUtil elasticsearchUtil;
    @Autowired
    private ElastricSearchSave elastricSearchSave;
    /**
     * 转译随访信息
@ -594,8 +619,11 @@ public class FollowUpService extends BaseService {
    public List<Map<String, String>> getFollowupProject(String id) throws Exception {
        List<Map<String, String>> re = new ArrayList<>();
        //获取已填写的面访项目
        List<String> project = followupContentDao.findProjectByFollowupId(Long.valueOf(id));
//        List<String> project = followupContentDao.findProjectByFollowupId(Long.valueOf(id));
        //修改为通过ES查询---2017.11.01--huangwenjie
        List<String> project = esfindProjectByFollowupId(id);
        //获取所有面访项目
        
        List<SystemDict> dictList = systemDictService.getDictByDictName("FOLLOWUP_PROJECT");
        if (dictList != null && dictList.size() > 0) {
            for (SystemDict dict : dictList) {
@ -826,5 +854,137 @@ public class FollowUpService extends BaseService {
            e.printStackTrace();
        }
    }
    
    /**
     *ES 保存随访记录详情
     *@author huangwenjie
     *@date 2017/11/1 14:57
     */
    @Transactional
    public void esSaveFollowupProjectData(String id, String followupProject, String followupProjectData) throws Exception {
        
        JestClient 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);
        List<FollowupContentESDO> dataList = result.getSourceAsObjectList(FollowupContentESDO.class);
        
        //删除原有记录
        this.esDeleteFollowUpContent(dataList);
        
        //保存新的随访详情信息
        List<FollowupContentESDO> newdatalist = new ArrayList<>();
        FollowupContentESDO followupContentESDO = new FollowupContentESDO();
    
        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);
        
        
        //如果该随访是已完成的,则添加随访信息上传映射,上传到基卫
        Followup followup = followupDao.findOne(Long.valueOf(id));
        if("1".equals(followup.getStatus())){
            FollowupMapping followupMapping = followUpMappingDao.findByFollowupId(Integer.parseInt(id));
            if(followupMapping == null){
                followupMapping = new FollowupMapping();
                followupMapping.setCode(UUID.randomUUID().toString());
                followupMapping.setFollowupId(Integer.parseInt(id));
                followupMapping.setUpdateTime(DateUtil.getNowTimestamp());
                followupMapping.setCreateTime(DateUtil.getNowTimestamp());
            }
            followupMapping.setNeedUpload(1);
            followUpMappingDao.save(followupMapping);
        }
    }
    
    /**
     * 获取面访项目数据
     */
    public FollowupContentESDO esGetFollowupProjectData(String id, String followupProject) throws Exception {
        //根据随访ID、分类ID获取随访记录详情
    
        JestClient 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);
        return followupContentESDO;
    }
    
    /**
     *ES 删除随访详情信息
     *@author huangwenjie
     *@date 2017/11/1 15:17
     */
    public void esDeleteFollowUpContent(List<FollowupContentESDO> datalist) throws Exception{
        try {
            JestClient 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());
        }catch (Exception e){
            e.printStackTrace();
        }
    }
    
    /**
     * 获取面访项目数据
     */
    public List<String>  esfindProjectByFollowupId(String id) throws Exception {
        //根据随访ID、分类ID获取随访记录详情
        
        List<String> resultList = new ArrayList<>();
        
        JestClient 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) {
                resultList.add(followupContentESDO.getFollowup_project());
            }
        }
        
        return resultList;
    }
}

+ 12 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/followup/DoctorFollowUpController.java

@ -1,5 +1,7 @@
package com.yihu.wlyy.web.doctor.followup;
import com.alibaba.fastjson.JSON;
import com.yihu.es.entity.FollowupContentESDO;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.entity.followup.Followup;
import com.yihu.wlyy.logs.BusinessLogs;
@ -8,6 +10,7 @@ import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import jdk.nashorn.internal.parser.JSONParser;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
@ -276,9 +279,12 @@ public class DoctorFollowUpController extends BaseController {
                                         @ApiParam(name = "followupProject", value = "随访项目", defaultValue = "2")
                                         @RequestParam(value = "followupProject", required = true) String followupProject) {
        try {
            Map<String, String> response = followUpService.getFollowupProjectData(id, followupProject);
            return write(200, "获取随访项目数据成功!", "data", response);
//            Map<String, String> response = followUpService.getFollowupProjectData(id, followupProject);
            //修改为通过ES查询---2017.11.01--huangwenjie
            FollowupContentESDO followupContentESDO = followUpService.esGetFollowupProjectData(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());
@ -296,7 +302,9 @@ public class DoctorFollowUpController extends BaseController {
                                          @ApiParam(name = "followupProjectData", value = "随访项目数据", defaultValue = "{\"WEIGHT\":\"76\",\"WEIGHT_EXP\":\"60\",\"BMI\":\"11\"}")
                                          @RequestParam(value = "followupProjectData", required = true) String followupProjectData) {
        try {
            followUpService.saveFollowupProjectData(id, followupProject, followupProjectData);
//            followUpService.saveFollowupProjectData(id, followupProject, followupProjectData);
            //修改为通过ES查询---2017.11.01--huangwenjie
            followUpService.esSaveFollowupProjectData(id, followupProject, followupProjectData);
            return write(200, "保存随访项目数据成功!");
        } catch (Exception e) {

+ 2 - 0
patient-co/patient-co-wlyy/src/main/resources/application-dev.yml

@ -96,8 +96,10 @@ pushMes:
es:
  index:
    HealthEduArticlePatient: health_edu_article_patient_dev
    FollowUp: wlyy_followup
  type:
    HealthEduArticlePatient: health_edu_article_patient_dev
    FollowUpContent: wlyy_followup_content
  host: 172.19.103.68
  port: 9200
  tPort: 9300

+ 2 - 0
patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml

@ -94,8 +94,10 @@ pushMes:
es:
  index:
    HealthEduArticlePatient: wlyy_quota_test
    FollowUp: wlyy_followup
  type:
    HealthEduArticlePatient: wlyy_quota_test
    FollowUpContent: wlyy_followup_content
  host: 172.19.103.68
  port: 9200
  tPort: 9300

+ 2 - 0
patient-co/patient-co-wlyy/src/main/resources/application-local.yml

@ -92,8 +92,10 @@ pushMes:
es:
  index:
    HealthEduArticlePatient: health_edu_article_patient_test
    FollowUp: wlyy_followup
  type:
    HealthEduArticlePatient: health_edu_article_patient_test
    FollowUpContent: wlyy_followup_content
  host: 172.19.103.68
  port: 9200
  tPort: 9300

+ 2 - 0
patient-co/patient-co-wlyy/src/main/resources/application-localtest.yml

@ -93,8 +93,10 @@ pushMes:
es:
  index:
    HealthEduArticlePatient: health_edu_article_patient_test
    FollowUp: wlyy_followup
  type:
    HealthEduArticlePatient: health_edu_article_patient_test
    FollowUpContent: wlyy_followup_content
  host: 172.19.103.68
  port: 9200
  tPort: 9300

+ 2 - 0
patient-co/patient-co-wlyy/src/main/resources/application-prod.yml

@ -94,8 +94,10 @@ pushMes:
es:
  index:
    HealthEduArticlePatient: health_edu_article_patient_prod
    FollowUp: wlyy_followup
  type:
    HealthEduArticlePatient: health_edu_article_patient_prod
    FollowUpContent: wlyy_followup_content
  host: 59.61.92.90
  port: 9065
  tPort: 9066

+ 2 - 0
patient-co/patient-co-wlyy/src/main/resources/application-test.yml

@ -91,8 +91,10 @@ pushMes:
es:
  index:
    HealthEduArticlePatient: health_edu_article_patient_test
    FollowUp: wlyy_followup
  type:
    HealthEduArticlePatient: health_edu_article_patient_test
    FollowUpContent: wlyy_followup_content
  host: 172.19.103.68
  port: 9200
  tPort: 9300

+ 12 - 12
patient-co/patient-co-wlyy/src/main/resources/logback.xml

@ -11,9 +11,9 @@
    </appender>
    <appender name="rollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>/tmp/logs/wlyy.log</file>
        <file>/Users/Mewtwo/ideaSpace/log/tmp/logs/wlyy.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>/tmp/logs/wlyy.%d{yyyy-MM-dd}.log</fileNamePattern>
            <fileNamePattern>/Users/Mewtwo/ideaSpace/log/tmp/logs/wlyy.%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>15</maxHistory>
        </rollingPolicy>
        <encoder>
@ -23,9 +23,9 @@
    </appender>
    <appender name="business_m" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>/datadisk/wlyy_logs/business_m.log</file>
        <file>/Users/Mewtwo/ideaSpace/log/wlyy_logs/business_m.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>/datadisk/wlyy_logs/rolling/business_m.%d{yyyy-MM-dd_HH-mm}.log</fileNamePattern>
            <fileNamePattern>/Users/Mewtwo/ideaSpace/log/wlyy_logs/rolling/business_m.%d{yyyy-MM-dd_HH-mm}.log</fileNamePattern>
            <maxHistory>15</maxHistory>
        </rollingPolicy>
        <encoder>
@ -34,9 +34,9 @@
        </encoder>
    </appender>
    <appender name="business_d" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>/datadisk/wlyy_logs/business.log</file>
        <file>/Users/Mewtwo/ideaSpace/log/wlyy_logs/business.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>/datadisk/wlyy_logs/dayLogs/business.%d{yyyy-MM-dd}.log</fileNamePattern>
            <fileNamePattern>/Users/Mewtwo/ideaSpace/log/wlyy_logs/dayLogs/business.%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>15</maxHistory>
        </rollingPolicy>
        <encoder>
@ -45,9 +45,9 @@
        </encoder>
    </appender>
    <appender name="interface_call_m" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>/datadisk/wlyy_logs/interface_call_m.log</file>
        <file>/Users/Mewtwo/ideaSpace/log/wlyy_logs/interface_call_m.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>/datadisk/wlyy_logs/rolling/interface_call_m.%d{yyyy-MM-dd_HH-mm}.log</fileNamePattern>
            <fileNamePattern>/Users/Mewtwo/ideaSpace/log/wlyy_logs/rolling/interface_call_m.%d{yyyy-MM-dd_HH-mm}.log</fileNamePattern>
            <maxHistory>15</maxHistory>
        </rollingPolicy>
        <encoder>
@ -56,9 +56,9 @@
        </encoder>
    </appender>
    <appender name="interface_call_d" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>/datadisk/wlyy_logs/interface_call.log</file>
        <file>/Users/Mewtwo/ideaSpace/log/wlyy_logs/interface_call.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>/datadisk/wlyy_logs/dayLogs/interface_call.%d{yyyy-MM-dd}.log</fileNamePattern>
            <fileNamePattern>/Users/Mewtwo/ideaSpace/log/wlyy_logs/dayLogs/interface_call.%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>15</maxHistory>
        </rollingPolicy>
        <encoder>
@ -90,10 +90,10 @@
    <!--处方支付日志 start-->
    <!-- 演示按时间滚动的策略 -->
    <appender name="dailyRollingFileAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <File>/tmp/logs/wlyy_prescription_pay.log</File>
        <File>/Users/Mewtwo/ideaSpace/log/tmp/logs/wlyy_prescription_pay.log</File>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <!-- daily rollover -->
            <FileNamePattern>/tmp/logs/wlyy_prescription_pay.%d{yyyy-MM-dd}.log</FileNamePattern>
            <FileNamePattern>/Users/Mewtwo/ideaSpace/log/tmp/logs/wlyy_prescription_pay.%d{yyyy-MM-dd}.log</FileNamePattern>
            <!-- 保留 15天数据,默认无限
            <maxHistory>15</maxHistory>-->
        </rollingPolicy>