Sfoglia il codice sorgente

调整为多数据源;编写数据一致性业务代码

liuqq 3 anni fa
parent
commit
b2b2f2e8ea
32 ha cambiato i file con 2199 aggiunte e 45 eliminazioni
  1. 7 0
      pom.xml
  2. 2 1
      src/main/java/com/diagbot/MrqcSysApplication.java
  3. 406 0
      src/main/java/com/diagbot/entity/his/HisBehospitalInfo.java
  4. 170 0
      src/main/java/com/diagbot/entity/his/HisDoctorAdvice.java
  5. 56 0
      src/main/java/com/diagbot/entity/his/HisHomeDiagnoseInfo.java
  6. 101 0
      src/main/java/com/diagbot/entity/his/HisHomeOperationInfo.java
  7. 751 0
      src/main/java/com/diagbot/entity/his/HisHomePage.java
  8. 58 0
      src/main/java/com/diagbot/entity/his/HisMedicalRecord.java
  9. 52 0
      src/main/java/com/diagbot/entity/his/HisMedicalRecordContent.java
  10. 10 0
      src/main/java/com/diagbot/facade/his/HisHomeDiagnoseInfoFacade.java
  11. 34 0
      src/main/java/com/diagbot/facade/his/HisHomePageFacade.java
  12. 16 0
      src/main/java/com/diagbot/mapper/HisBehospitalInfoMapper.java
  13. 15 0
      src/main/java/com/diagbot/mapper/HisDoctorAdviceMapper.java
  14. 16 0
      src/main/java/com/diagbot/mapper/HisHomeDiagnoseInfoMapper.java
  15. 16 0
      src/main/java/com/diagbot/mapper/HisHomeOperationInfoMapper.java
  16. 15 0
      src/main/java/com/diagbot/mapper/HisHomePageMapper.java
  17. 16 0
      src/main/java/com/diagbot/mapper/HisMedicalRecordContentMapper.java
  18. 16 0
      src/main/java/com/diagbot/mapper/HisMedicalRecordMapper.java
  19. 16 0
      src/main/java/com/diagbot/service/his/HisHomeDiagnoseInfoService.java
  20. 16 0
      src/main/java/com/diagbot/service/his/HisHomeOperationInfoService.java
  21. 16 0
      src/main/java/com/diagbot/service/his/HisHomePageService.java
  22. 13 0
      src/main/java/com/diagbot/service/impl/his/HisHomeDiagnoseInfoServiceImpl.java
  23. 13 0
      src/main/java/com/diagbot/service/impl/his/HisHomeOperationInfoServiceImpl.java
  24. 24 0
      src/main/java/com/diagbot/service/impl/his/HisHomePageServiceImpl.java
  25. 60 44
      src/main/resources/application-local.yml
  26. 36 0
      src/main/resources/mapper/HisBehospitalInfoMapper.xml
  27. 33 0
      src/main/resources/mapper/HisDoctorAdviceMapper.xml
  28. 18 0
      src/main/resources/mapper/HisHomeDiagnoseInfoMapper.xml
  29. 22 0
      src/main/resources/mapper/HisHomeOperationInfoMapper.xml
  30. 149 0
      src/main/resources/mapper/HisHomePageMapper.xml
  31. 12 0
      src/main/resources/mapper/HisMedicalRecordContentMapper.xml
  32. 14 0
      src/main/resources/mapper/HisMedicalRecordMapper.xml

+ 7 - 0
pom.xml

@@ -196,7 +196,14 @@
             <artifactId>easypoi-spring-boot-starter</artifactId>
             <version>${easypoi.version}</version>
         </dependency>
+        <!--多数据源-->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
+            <version>3.3.1</version>
+        </dependency>
 
+        <!--oracle-database-->
         <dependency>
             <groupId>com.oracle</groupId>
             <artifactId>ojdbc6</artifactId>

+ 2 - 1
src/main/java/com/diagbot/MrqcSysApplication.java

@@ -1,5 +1,6 @@
 package com.diagbot;
 
+import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
@@ -19,7 +20,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
  * @time: 2018/8/7 9:26
  */
 @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class,
-        JmxAutoConfiguration.class, ThymeleafAutoConfiguration.class })
+        JmxAutoConfiguration.class, ThymeleafAutoConfiguration.class, DruidDataSourceAutoConfigure.class })
 @EnableFeignClients({ "com.diagbot.client" })
 @EnableHystrixDashboard
 @EnableHystrix

+ 406 - 0
src/main/java/com/diagbot/entity/his/HisBehospitalInfo.java

@@ -0,0 +1,406 @@
+package com.diagbot.entity.his;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 住院病历信息
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+@TableName("his_behospital_info")
+@Data
+public class HisBehospitalInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 病人住院ID
+     */
+    private String behospitalCode;
+
+    /**
+     * 医院ID
+     */
+    private Long hospitalId;
+
+    /**
+     * 姓名
+     */
+    private String name;
+
+    /**
+     * 性别(男,女)
+     */
+    private String sex;
+
+    /**
+     * 出生日期
+     */
+    private Date birthday;
+
+    /**
+     * 档案号
+     */
+    private String fileCode;
+
+    /**
+     * 质控类型
+     */
+    private Long qcTypeId;
+
+    /**
+     * 病区编码
+     */
+    private String wardCode;
+
+    /**
+     * 病区名称
+     */
+    private String wardName;
+
+    /**
+     * 住院科室ID
+     */
+    private String behDeptId;
+
+    /**
+     * 住院科室名称
+     */
+    private String behDeptName;
+
+    /**
+     * 床位号
+     */
+    private String bedCode;
+
+    /**
+     * 床位名称
+     */
+    private String bedName;
+
+    /**
+     * 医保类别
+     */
+    private String insuranceName;
+
+    /**
+     * 职业
+     */
+    private String jobType;
+
+    /**
+     * 入院时间
+     */
+    private Date behospitalDate;
+
+    /**
+     * 出院时间
+     */
+    private Date leaveHospitalDate;
+
+    /**
+     * 疾病ICD编码
+     */
+    private String diagnoseIcd;
+
+    /**
+     * 疾病名称
+     */
+    private String diagnose;
+
+    /**
+     * 住院医生ID
+     */
+    private String behDoctorId;
+
+    /**
+     * 住院医生姓名
+     */
+    private String behDoctorName;
+
+    /**
+     * 主治医生ID
+     */
+    private String doctorId;
+
+    /**
+     * 主治医生姓名
+     */
+    private String doctorName;
+
+    /**
+     * 主任医生ID
+     */
+    private String directorDoctorId;
+
+    /**
+     * 主任医生姓名
+     */
+    private String directorDoctorName;
+
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile;
+
+    /**
+     * 归档时间
+     */
+    private Date placefileDate;
+
+    public String getBehospitalCode() {
+        return behospitalCode;
+    }
+
+    public void setBehospitalCode(String behospitalCode) {
+        this.behospitalCode = behospitalCode;
+    }
+
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getSex() {
+        return sex;
+    }
+
+    public void setSex(String sex) {
+        this.sex = sex;
+    }
+
+    public Date getBirthday() {
+        return birthday;
+    }
+
+    public void setBirthday(Date birthday) {
+        this.birthday = birthday;
+    }
+
+    public String getFileCode() {
+        return fileCode;
+    }
+
+    public void setFileCode(String fileCode) {
+        this.fileCode = fileCode;
+    }
+
+    public Long getQcTypeId() {
+        return qcTypeId;
+    }
+
+    public void setQcTypeId(Long qcTypeId) {
+        this.qcTypeId = qcTypeId;
+    }
+
+    public String getWardCode() {
+        return wardCode;
+    }
+
+    public void setWardCode(String wardCode) {
+        this.wardCode = wardCode;
+    }
+
+    public String getWardName() {
+        return wardName;
+    }
+
+    public void setWardName(String wardName) {
+        this.wardName = wardName;
+    }
+
+    public String getBehDeptId() {
+        return behDeptId;
+    }
+
+    public void setBehDeptId(String behDeptId) {
+        this.behDeptId = behDeptId;
+    }
+
+    public String getBehDeptName() {
+        return behDeptName;
+    }
+
+    public void setBehDeptName(String behDeptName) {
+        this.behDeptName = behDeptName;
+    }
+
+    public String getBedCode() {
+        return bedCode;
+    }
+
+    public void setBedCode(String bedCode) {
+        this.bedCode = bedCode;
+    }
+
+    public String getBedName() {
+        return bedName;
+    }
+
+    public void setBedName(String bedName) {
+        this.bedName = bedName;
+    }
+
+    public String getInsuranceName() {
+        return insuranceName;
+    }
+
+    public void setInsuranceName(String insuranceName) {
+        this.insuranceName = insuranceName;
+    }
+
+    public String getJobType() {
+        return jobType;
+    }
+
+    public void setJobType(String jobType) {
+        this.jobType = jobType;
+    }
+
+    public Date getBehospitalDate() {
+        return behospitalDate;
+    }
+
+    public void setBehospitalDate(Date behospitalDate) {
+        this.behospitalDate = behospitalDate;
+    }
+
+    public Date getLeaveHospitalDate() {
+        return leaveHospitalDate;
+    }
+
+    public void setLeaveHospitalDate(Date leaveHospitalDate) {
+        this.leaveHospitalDate = leaveHospitalDate;
+    }
+
+    public String getDiagnoseIcd() {
+        return diagnoseIcd;
+    }
+
+    public void setDiagnoseIcd(String diagnoseIcd) {
+        this.diagnoseIcd = diagnoseIcd;
+    }
+
+    public String getDiagnose() {
+        return diagnose;
+    }
+
+    public void setDiagnose(String diagnose) {
+        this.diagnose = diagnose;
+    }
+
+    public String getBehDoctorId() {
+        return behDoctorId;
+    }
+
+    public void setBehDoctorId(String behDoctorId) {
+        this.behDoctorId = behDoctorId;
+    }
+
+    public String getBehDoctorName() {
+        return behDoctorName;
+    }
+
+    public void setBehDoctorName(String behDoctorName) {
+        this.behDoctorName = behDoctorName;
+    }
+
+    public String getDoctorId() {
+        return doctorId;
+    }
+
+    public void setDoctorId(String doctorId) {
+        this.doctorId = doctorId;
+    }
+
+    public String getDoctorName() {
+        return doctorName;
+    }
+
+    public void setDoctorName(String doctorName) {
+        this.doctorName = doctorName;
+    }
+
+    public String getDirectorDoctorId() {
+        return directorDoctorId;
+    }
+
+    public void setDirectorDoctorId(String directorDoctorId) {
+        this.directorDoctorId = directorDoctorId;
+    }
+
+    public String getDirectorDoctorName() {
+        return directorDoctorName;
+    }
+
+    public void setDirectorDoctorName(String directorDoctorName) {
+        this.directorDoctorName = directorDoctorName;
+    }
+
+    public String getIsPlacefile() {
+        return isPlacefile;
+    }
+
+    public void setIsPlacefile(String isPlacefile) {
+        this.isPlacefile = isPlacefile;
+    }
+
+    public Date getPlacefileDate() {
+        return placefileDate;
+    }
+
+    public void setPlacefileDate(Date placefileDate) {
+        this.placefileDate = placefileDate;
+    }
+
+    @Override
+    public String toString() {
+        return "MedBehospitalInfo{" +
+                "behospitalCode=" + behospitalCode +
+                ", hospitalId=" + hospitalId +
+                ", name=" + name +
+                ", sex=" + sex +
+                ", birthday=" + birthday +
+                ", fileCode=" + fileCode +
+                ", qcTypeId=" + qcTypeId +
+                ", wardCode=" + wardCode +
+                ", wardName=" + wardName +
+                ", behDeptId=" + behDeptId +
+                ", behDeptName=" + behDeptName +
+                ", bedCode=" + bedCode +
+                ", bedName=" + bedName +
+                ", insuranceName=" + insuranceName +
+                ", jobType=" + jobType +
+                ", behospitalDate=" + behospitalDate +
+                ", leaveHospitalDate=" + leaveHospitalDate +
+                ", diagnoseIcd=" + diagnoseIcd +
+                ", diagnose=" + diagnose +
+                ", behDoctorId=" + behDoctorId +
+                ", behDoctorName=" + behDoctorName +
+                ", doctorId=" + doctorId +
+                ", doctorName=" + doctorName +
+                ", directorDoctorId=" + directorDoctorId +
+                ", directorDoctorName=" + directorDoctorName +
+                "}";
+    }
+}

+ 170 - 0
src/main/java/com/diagbot/entity/his/HisDoctorAdvice.java

@@ -0,0 +1,170 @@
+package com.diagbot.entity.his;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 病人医嘱
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+@TableName("his_doctor_advice")
+@Data
+public class HisDoctorAdvice implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 病人医嘱ID
+     */
+    @TableId(value = "doctor_advice_id",type = IdType.INPUT)
+    private String doctorAdviceId;
+
+    /**
+     * 病人ID
+     */
+    private String behospitalCode;
+
+    /**
+     * 医生开单判别
+     */
+    private String orderDoctorName;
+
+    /**
+     * 医嘱频率判别
+     */
+    private String frequency;
+
+    /**
+     * 父类医嘱ID
+     */
+    private String parentTypeId;
+
+    /**
+     * 医嘱类型判别(嘱托长嘱、长期医嘱等)
+     */
+    private String doctorAdviceType;
+
+    /**
+     * 一次使用数量
+     */
+    private String usageNum;
+
+    /**
+     * 一次用量单位
+     */
+    private String usageUnit;
+
+    /**
+     * 医嘱单次剂量
+     */
+    private String dose;
+
+    /**
+     * 单次剂量单位
+     */
+    private String doseUnit;
+
+    /**
+     * 给药方式
+     */
+    private String medModeType;
+
+    /**
+     * 医嘱频率
+     */
+    private String daFrequency;
+
+    /**
+     * 医嘱处理类型
+     */
+    private String daDealType;
+
+    /**
+     * 医嘱开始时间
+     */
+    private Date daStartDate;
+
+    /**
+     * 医嘱项目名称
+     */
+    private String daItemName;
+
+    /**
+     * 医嘱状态判别
+     */
+    private String daStatus;
+
+    /**
+     * 医嘱结束时间
+     */
+    private Date daStopDate;
+
+    /**
+     * 医嘱同组序号
+     */
+    private String daGroupNo;
+
+    /**
+     * 医嘱处方类型(检验、描述医嘱、膳食、西药、护理等)
+     */
+    private String daPrescriptionType;
+
+    /**
+     * 药品类型(0.普药 1.抗生素 2.激素)
+     */
+    private String medicineType;
+
+    /**
+     * 医嘱领药类型
+     */
+    private String daMedType;
+
+    /**
+     * 医生嘱托
+     */
+    private String doctorNotice;
+
+    /**
+     * 开单医生ID
+     */
+    private String doctorId;
+
+    /**
+     * 开单医生姓名
+     */
+    private String doctorName;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+}

+ 56 - 0
src/main/java/com/diagbot/entity/his/HisHomeDiagnoseInfo.java

@@ -0,0 +1,56 @@
+package com.diagbot.entity.his;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+@TableName("his_home_diagnose_info")
+@Data
+public class HisHomeDiagnoseInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 病案首页ID
+     */
+    @TableId(value = "home_page_id",type = IdType.INPUT)
+    private String homePageId;
+
+    /**
+     * 诊断序号
+     */
+    private String diagnoseOrderNo;
+
+    /**
+     * 诊断类别(主要诊断、其他诊断)
+     */
+    private String diagnoseType;
+
+    /**
+     * 诊断判别(主、次)
+     */
+    private String diagnoseTypeShort;
+
+    private String diagnoseName;
+
+    private String behospitalType;
+
+    private String leaveHospitalType;
+
+    private String pathologyDiagnose;
+
+    private String icdCode;
+
+}

+ 101 - 0
src/main/java/com/diagbot/entity/his/HisHomeOperationInfo.java

@@ -0,0 +1,101 @@
+package com.diagbot.entity.his;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+@TableName("his_home_operation_info")
+@Data
+public class HisHomeOperationInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 病案首页ID
+     */
+    @TableId(value = "home_page_id",type = IdType.INPUT)
+    private String homePageId;
+
+    /**
+     * 医院ID
+     */
+    private Long hospitalId;
+
+    /**
+     * 手术序号
+     */
+    private String operationOrderNo;
+
+    /**
+     * 手术日期
+     */
+    private Date operationDate;
+
+    /**
+     * 手术编码
+     */
+    private String operationCode;
+
+    /**
+     * 手术医生ID
+     */
+    private String operationDoctorId;
+
+    /**
+     * 一助医生ID
+     */
+    private String firstAssistantId;
+
+    /**
+     * 二助医生ID
+     */
+    private String secondAssistantId;
+
+    /**
+     * 切口等级
+     */
+    private String cutLevel;
+
+    /**
+     * 愈合等级
+     */
+    private String healingLevel;
+
+    /**
+     * 手术名称
+     */
+    private String operationName;
+
+    /**
+     * 手术级别
+     */
+    private String operationLevel;
+
+    /**
+     * 麻醉方式(全麻、局麻、静脉麻醉)
+     */
+    private String anaesthesiaName;
+
+    /**
+     * 拟手术名称
+     */
+    private String shamOperationName;
+
+    /**
+     * 麻醉医师
+     */
+    private String anaesthesiaDoctor;
+
+}

+ 751 - 0
src/main/java/com/diagbot/entity/his/HisHomePage.java

@@ -0,0 +1,751 @@
+package com.diagbot.entity.his;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+@TableName("his_home_page")
+@Data
+public class HisHomePage implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 病案首页编号
+     */
+    @TableId(value = "home_page_id",type = IdType.INPUT)
+    private String homePageId;
+
+    /**
+     * 医院ID
+     */
+    private Long hospitalId;
+
+    /**
+     * 病人住院序号
+     */
+    private String behospitalCode;
+
+    /**
+     * 组织机构id
+     */
+    private String hospitalCode;
+
+    /**
+     * 医疗机构名称
+     */
+    private String hospitalName;
+
+    /**
+     * 医疗机构代码
+     */
+    private String orgCode;
+
+    /**
+     * 医疗付费方式
+     */
+    private String payType;
+
+    /**
+     * 健康卡号
+     */
+    private String healthCard;
+
+    /**
+     * 住院次数
+     */
+    private String behospitalNum;
+
+    /**
+     * 病案号
+     */
+    private String fileCode;
+
+    /**
+     * 姓名
+     */
+    private String name;
+
+    /**
+     * 性别
+     */
+    private String sex;
+
+    /**
+     * 出生日期
+     */
+    private Date birthday;
+
+    /**
+     * 年龄(拼接年龄单位)
+     */
+    private String age;
+
+    /**
+     * 年龄单位
+     */
+    private String ageUnit;
+
+    /**
+     * 国籍
+     */
+    private String nationality;
+
+    /**
+     * 新生儿出生月数
+     */
+    private String newbornMonth;
+
+    /**
+     * 新生儿出生天数
+     */
+    private String newbornDay;
+
+    /**
+     * 新生儿出生体重
+     */
+    private String newbornWeight;
+
+    /**
+     * 新生儿入院体重
+     */
+    private String newbornBehospitalWeight;
+
+    /**
+     * 出生地
+     */
+    private String bornAddress;
+
+    /**
+     * 籍贯
+     */
+    private String bornPlace;
+
+    /**
+     * 民族
+     */
+    private String nation;
+
+    /**
+     * 身份证号
+     */
+    private String identityCardNo;
+
+    /**
+     * 职业
+     */
+    private String jobType;
+
+    /**
+     * 婚姻
+     */
+    private String marriage;
+
+    /**
+     * 现住址
+     */
+    private String curAddress;
+
+    /**
+     * 现住址电话
+     */
+    private String curPhone;
+
+    /**
+     * 现住址邮编
+     */
+    private String curPostCode;
+
+    /**
+     * 户口地址
+     */
+    private String residenceAddress;
+
+    /**
+     * 户口地址邮编
+     */
+    private String residencePostCode;
+
+    /**
+     * 工作单位
+     */
+    private String workAddress;
+
+    /**
+     * 工作单位电话
+     */
+    private String workPhone;
+
+    /**
+     * 工作单位邮编
+     */
+    private String workPostCode;
+
+    /**
+     * 联系人姓名
+     */
+    private String contactName;
+
+    /**
+     * 联系人关系
+     */
+    private String contactRelation;
+
+    /**
+     * 联系人地址
+     */
+    private String contactAddress;
+
+    /**
+     * 联系人电话
+     */
+    private String contactPhone;
+
+    /**
+     * 入院途径
+     */
+    private String behospitalWay;
+
+    /**
+     * 入院时间
+     */
+    private Date behospitalDate;
+
+    /**
+     * 入院科别
+     */
+    private String behospitalDept;
+
+    /**
+     * 入院病房
+     */
+    private String behospitalWard;
+
+    /**
+     * 入院床位序号
+     */
+    private String behospitalBedId;
+
+    /**
+     * 入院床位号码
+     */
+    private String behospitalBedCode;
+
+    /**
+     * 转科科别
+     */
+    private String changeDept;
+
+    /**
+     * 出院时间
+     */
+    private Date leaveHospitalDate;
+
+    /**
+     * 出院科别
+     */
+    private String leaveHospitalDept;
+
+    /**
+     * 出院病房
+     */
+    private String leaveHospitalWard;
+
+    /**
+     * 出院床位序号
+     */
+    private String leaveHospitalBedId;
+
+    /**
+     * 出院床位号码
+     */
+    private String leaveHospitalBedCode;
+
+    /**
+     * 实际住院天数
+     */
+    private String behospitalDayNum;
+
+    /**
+     * 门急诊诊断
+     */
+    private String outpatientEmrDiagnose;
+
+    /**
+     * 门急诊诊断编码
+     */
+    private String outpatientEmrDiagnoseCode;
+
+    /**
+     * 损伤中毒因素
+     */
+    private String poisonFactor;
+
+    /**
+     * 损伤中毒因素编码
+     */
+    private String poisonFactorCode;
+
+    /**
+     * 病理诊断
+     */
+    private String pathologyDiagnose;
+
+    /**
+     * 病理诊断编码
+     */
+    private String pathologyDiagnoseCode;
+
+    /**
+     * 病理诊断编号
+     */
+    private String pathologyDiagnoseId;
+
+    /**
+     * 药物过敏
+     */
+    private String isMedAllergy;
+
+    /**
+     * 过敏药物
+     */
+    private String medAllergyName;
+
+    /**
+     * 死亡患者尸检
+     */
+    private String autopsy;
+
+    /**
+     * 血型
+     */
+    private String bloodType;
+
+    /**
+     * Rh
+     */
+    private String rh;
+
+    /**
+     * 科主任
+     */
+    private String deptDirector;
+
+    /**
+     * 主任医师
+     */
+    private String directorDoctor;
+
+    /**
+     * 主治医师
+     */
+    private String attendingDoctor;
+
+    /**
+     * 住院医师
+     */
+    private String behospitalDoctor;
+
+    /**
+     * 责任护士
+     */
+    private String responseNurse;
+
+    /**
+     * 进修医师
+     */
+    private String studyDoctor;
+
+    /**
+     * 实习医师
+     */
+    private String practiceDoctor;
+
+    /**
+     * 编码员
+     */
+    private String encodeMan;
+
+    /**
+     * 病案质量
+     */
+    private String homePageQuality;
+
+    /**
+     * 质控医师
+     */
+    private String qcDoctor;
+
+    /**
+     * 质控护士
+     */
+    private String qcNurse;
+
+    /**
+     * 质控日期
+     */
+    private Date qcDate;
+
+    /**
+     * 离院方式
+     */
+    private String leaveHospitalType;
+
+    /**
+     * 接收机构名称
+     */
+    private String acceptOrgCode;
+
+    /**
+     * 31天内再住院计划
+     */
+    private String againBehospitalPlan;
+
+    /**
+     * 再住院目的
+     */
+    private String againBehospitalGoal;
+
+    /**
+     * 颅脑损伤患者昏迷前天数
+     */
+    private String tbiBeforeDay;
+
+    /**
+     * 颅脑损伤患者昏迷前小时
+     */
+    private String tbiBeforeHour;
+
+    /**
+     * 颅脑损伤患者昏迷前分钟
+     */
+    private String tbiBeforeMinute;
+
+    /**
+     * 颅脑损伤患者昏迷后天数
+     */
+    private String tbiAfterDay;
+
+    /**
+     * 颅脑损伤患者昏迷后小时
+     */
+    private String tbiAfterHour;
+
+    /**
+     * 颅脑损伤患者昏迷后分钟
+     */
+    private String tbiAfterMinute;
+
+    /**
+     * 总费用
+     */
+    private String totalFee;
+
+    /**
+     * 自付金额
+     */
+    private String ownFee;
+
+    /**
+     * 一般医疗服务费
+     */
+    private String generalFee;
+
+    /**
+     * 一般治疗服务费
+     */
+    private String serviceFee;
+
+    /**
+     * 护理费
+     */
+    private String nurseFee;
+
+    /**
+     * 其他费用
+     */
+    private String otherFee;
+
+    /**
+     * 病理诊断费
+     */
+    private String pathologyFee;
+
+    /**
+     * 实验室诊断费
+     */
+    private String labFee;
+
+    /**
+     * 影像学诊断费
+     */
+    private String pacsFee;
+
+    /**
+     * 临床诊断项目费
+     */
+    private String clinicDiagnoseFee;
+
+    /**
+     * 非手术治疗项目费
+     */
+    private String notOperationFee;
+
+    /**
+     * 临床物理治疗费
+     */
+    private String clinicPhysicFee;
+
+    /**
+     * 手术治疗费
+     */
+    private String operationTreatFee;
+
+    /**
+     * 麻醉费
+     */
+    private String anaesthesiaFee;
+
+    /**
+     * 手术费
+     */
+    private String operationFee;
+
+    /**
+     * 康复类
+     */
+    private String healthTypeFee;
+
+    /**
+     * 中医治疗费
+     */
+    private String chnTreatFee;
+
+    /**
+     * 西药费
+     */
+    private String westernMedFee;
+
+    /**
+     * 抗菌药物费用
+     */
+    private String antibiosisFee;
+
+    /**
+     * 中成药费
+     */
+    private String chnMedFee;
+
+    /**
+     * 中草药费
+     */
+    private String chnHerbFee;
+
+    /**
+     * 血费
+     */
+    private String bloodFee;
+
+    /**
+     * 白蛋白类制品费
+     */
+    private String albumenFee;
+
+    /**
+     * 球蛋白类制品费
+     */
+    private String globulinFee;
+
+    /**
+     * 凝血因子类制品费
+     */
+    private String bloodFactorFee;
+
+    /**
+     * 细胞因子类制品费
+     */
+    private String cellFactorFee;
+
+    /**
+     * 检查用一次性医用材料费
+     */
+    private String checkMaterialFee;
+
+    /**
+     * 治疗用一次性医用材料费
+     */
+    private String treatMaterialFee;
+
+    /**
+     * 手术用一次性医用材料费
+     */
+    private String operationMaterialFee;
+
+    /**
+     * 其他类其他费
+     */
+    private String otherTypeFee;
+
+    /**
+     * 单病种管理
+     */
+    private String singleDiagManage;
+
+    /**
+     * 临床路径管理
+     */
+    private String clinicPathwayManage;
+
+    /**
+     * 门诊与住院
+     */
+    private String isOutpatientBehospital;
+
+    /**
+     * 入院与出院
+     */
+    private String isLeaveBehospital;
+
+    /**
+     * 术前与术后
+     */
+    private String isOperationBeforeAfter;
+
+    /**
+     * 临床与病理
+     */
+    private String isClinicPathology;
+
+    /**
+     * 放射与病理
+     */
+    private String isRadiatePathology;
+
+    /**
+     * 病人抢救次数
+     */
+    private String rescueNum;
+
+    /**
+     * 病人抢救成功次数
+     */
+    private String rescueSuccessNum;
+
+    /**
+     * 是否为自动出院
+     */
+    private String isAutoLeavehospital;
+
+    /**
+     * 转归情况
+     */
+    private String returnToType;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 住院期间身体约束
+     */
+    private String isPhysicalRestraint;
+
+    /**
+     * 颅脑损伤患者昏迷时间(入院前)
+     */
+    private String tbiBehospitalBeforeTime;
+
+    /**
+     * 颅脑损伤患者昏迷时间(入院后)
+     */
+    private String tbiBehospitalAfterTime;
+
+    /**
+     * 住院期间是否发生跌倒或坠床
+     */
+    private String isFallBed;
+
+    /**
+     * 医院感染
+     */
+    private String isNosocomialInfection;
+
+    /**
+     * 入住ICU情况
+     */
+    private String isIntoIcu;
+
+    /**
+     * 并发症情况
+     */
+    private String isComplications;
+
+    /**
+     * 是否发生压疮
+     */
+    private String isPressureSore;
+
+    /**
+     * 是否住院期间发生压疮
+     */
+    private String isBehospitalPressureSore;
+
+    /**
+     * 非计划再次手术
+     */
+    private String isUnplannedReoperation;
+
+    /**
+     * 治疗结果
+     */
+    private String treatmentResults;
+
+    /**
+     * 并发症
+     */
+    private String complicationsResults;
+
+    /**
+     * 感染部位
+     */
+    private String infectionSite;
+
+    /**
+     * 住院期间有无告病危
+     */
+    private String isBeInDanger;
+
+}

+ 58 - 0
src/main/java/com/diagbot/entity/his/HisMedicalRecord.java

@@ -0,0 +1,58 @@
+package com.diagbot.entity.his;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+@TableName("his_medical_record")
+@Data
+public class HisMedicalRecord implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "rec_id",type = IdType.INPUT)
+    private String recId;
+
+    /**
+     * 病人住院ID
+     */
+    private String behospitalCode;
+
+    /**
+     * 组织机构代码
+     */
+    private String orgCode;
+
+    /**
+     * 病历类别编号
+     */
+    private String recTypeId;
+
+    /**
+     * 病历日期
+     */
+    private Date recDate;
+
+    /**
+     * 病历标题
+     */
+    private String recTitle;
+
+    /**
+     * 模板处理状态(0:未处理,1:已处理)
+     */
+    private Integer status;
+
+}

+ 52 - 0
src/main/java/com/diagbot/entity/his/HisMedicalRecordContent.java

@@ -0,0 +1,52 @@
+package com.diagbot.entity.his;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.sql.Blob;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+@TableName("his_medical_record_content")
+@Data
+public class HisMedicalRecordContent implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 病历ID
+     */
+    @TableId(value = "rec_id",type = IdType.INPUT)
+    private String recId;
+
+    /**
+     * 文书内容(blob)
+     */
+    private Blob contentBlob;
+
+    /**
+     * 病历文本(文本)
+     */
+    private String contentText;
+
+    /**
+     * html文本信息
+     */
+    private String htmlText;
+
+    /**
+     * xml文本信息
+     */
+    private String xmlText;
+
+}

+ 10 - 0
src/main/java/com/diagbot/facade/his/HisHomeDiagnoseInfoFacade.java

@@ -0,0 +1,10 @@
+package com.diagbot.facade.his;
+
+import com.diagbot.service.impl.his.HisHomeDiagnoseInfoServiceImpl;
+import org.springframework.stereotype.Component;
+
+@Component
+public class HisHomeDiagnoseInfoFacade extends HisHomeDiagnoseInfoServiceImpl {
+
+
+}

+ 34 - 0
src/main/java/com/diagbot/facade/his/HisHomePageFacade.java

@@ -0,0 +1,34 @@
+package com.diagbot.facade.his;
+
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.diagbot.dto.AnalyzeRunDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.data.AHomePageDTO;
+import com.diagbot.entity.HomePage;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.facade.BehospitalInfoFacade;
+import com.diagbot.facade.data.AHomeDiagnoseInfoFacade;
+import com.diagbot.facade.data.AHomeOperationInfoFacade;
+import com.diagbot.facade.data.AMedAbnormalInfoFacade;
+import com.diagbot.service.impl.HomePageServiceImpl;
+import com.diagbot.service.impl.his.HisHomePageServiceImpl;
+import com.diagbot.util.*;
+import com.diagbot.vo.AnalyzeRunVO;
+import com.diagbot.vo.data.*;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Component
+public class HisHomePageFacade extends HisHomePageServiceImpl {
+
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/HisBehospitalInfoMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.his.HisBehospitalInfo;
+
+/**
+ * <p>
+ * 住院病历信息 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface HisBehospitalInfoMapper extends BaseMapper<HisBehospitalInfo> {
+
+}

+ 15 - 0
src/main/java/com/diagbot/mapper/HisDoctorAdviceMapper.java

@@ -0,0 +1,15 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.his.HisDoctorAdvice;
+
+/**
+ * <p>
+ * 病人医嘱 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface HisDoctorAdviceMapper extends BaseMapper<HisDoctorAdvice> {
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/HisHomeDiagnoseInfoMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.his.HisHomeDiagnoseInfo;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface HisHomeDiagnoseInfoMapper extends BaseMapper<HisHomeDiagnoseInfo> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/HisHomeOperationInfoMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.his.HisHomeOperationInfo;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface HisHomeOperationInfoMapper extends BaseMapper<HisHomeOperationInfo> {
+
+}

+ 15 - 0
src/main/java/com/diagbot/mapper/HisHomePageMapper.java

@@ -0,0 +1,15 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.his.HisHomePage;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface HisHomePageMapper extends BaseMapper<HisHomePage> {
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/HisMedicalRecordContentMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.his.HisMedicalRecordContent;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface HisMedicalRecordContentMapper extends BaseMapper<HisMedicalRecordContent> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/HisMedicalRecordMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.his.HisMedicalRecord;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface HisMedicalRecordMapper extends BaseMapper<HisMedicalRecord> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/service/his/HisHomeDiagnoseInfoService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service.his;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.his.HisHomeDiagnoseInfo;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface HisHomeDiagnoseInfoService extends IService<HisHomeDiagnoseInfo> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/service/his/HisHomeOperationInfoService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service.his;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.his.HisHomeOperationInfo;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface HisHomeOperationInfoService extends IService<HisHomeOperationInfo> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/service/his/HisHomePageService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service.his;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.his.HisHomePage;
+
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+public interface HisHomePageService extends IService<HisHomePage> {
+}

+ 13 - 0
src/main/java/com/diagbot/service/impl/his/HisHomeDiagnoseInfoServiceImpl.java

@@ -0,0 +1,13 @@
+package com.diagbot.service.impl.his;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.his.HisHomeDiagnoseInfo;
+import com.diagbot.mapper.HisHomeDiagnoseInfoMapper;
+import com.diagbot.service.his.HisHomeDiagnoseInfoService;
+import org.springframework.stereotype.Service;
+
+@Service
+@DS("slave")
+public class HisHomeDiagnoseInfoServiceImpl extends ServiceImpl<HisHomeDiagnoseInfoMapper, HisHomeDiagnoseInfo> implements HisHomeDiagnoseInfoService {
+}

+ 13 - 0
src/main/java/com/diagbot/service/impl/his/HisHomeOperationInfoServiceImpl.java

@@ -0,0 +1,13 @@
+package com.diagbot.service.impl.his;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.his.HisHomeOperationInfo;
+import com.diagbot.mapper.HisHomeOperationInfoMapper;
+import com.diagbot.service.his.HisHomeOperationInfoService;
+import org.springframework.stereotype.Service;
+
+@Service
+@DS("slave")
+public class HisHomeOperationInfoServiceImpl extends ServiceImpl<HisHomeOperationInfoMapper, HisHomeOperationInfo> implements HisHomeOperationInfoService {
+}

+ 24 - 0
src/main/java/com/diagbot/service/impl/his/HisHomePageServiceImpl.java

@@ -0,0 +1,24 @@
+package com.diagbot.service.impl.his;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.his.HisHomePage;
+import com.diagbot.mapper.HisHomePageMapper;
+import com.diagbot.service.his.HisHomePageService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+@Service
+@DS("slave")
+public class HisHomePageServiceImpl extends ServiceImpl<HisHomePageMapper, HisHomePage> implements HisHomePageService {
+
+}

+ 60 - 44
src/main/resources/application-local.yml

@@ -56,51 +56,67 @@ management:
 # 驱动配置信息
 spring:
   datasource:
-    druid:
-      driver-class-name: com.mysql.cj.jdbc.Driver
-      platform: mysql
-      url: jdbc:mysql://192.168.2.236:3306/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
-      username: root
-      password: lantone
-      # 连接池的配置信息
-      # 初始化大小,最小,最大
-      initialSize: 5
-      minIdle: 5
-      maxActive: 20
-      # 配置获取连接等待超时的时间
-      maxWait: 60000
-      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-      timeBetweenEvictionRunsMillis: 60000
-      # 配置一个连接在池中最小生存的时间,单位是毫秒
-      minEvictableIdleTimeMillis: 300000
-      validationQuery: SELECT 1 FROM DUAL
-      testWhileIdle: true
-      testOnBorrow: false
-      testOnReturn: false
-      # 打开PSCache,并且指定每个连接上PSCache的大小
-      poolPreparedStatements: true
-      maxPoolPreparedStatementPerConnectionSize: 20
-      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
-      filters.commons-log.connection-logger-name: wall,log4j
-      filter:
-        stat:
+    dynamic:
+      primary: master
+      druid:
+        # 连接池的配置信息
+        # 初始化大小,最小,最大
+        initialSize: 5
+        minIdle: 5
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        maxWait: 60000
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+        timeBetweenEvictionRunsMillis: 60000
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
+        minEvictableIdleTimeMillis: 300000
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        # 打开PSCache,并且指定每个连接上PSCache的大小
+        poolPreparedStatements: false
+        maxPoolPreparedStatementPerConnectionSize: 20
+        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+        filters.commons-log.connection-logger-name: wall,log4j
+        share-prepared-statements: false
+        filter:
+          stat:
+            enabled: true
+            mergeSql: true
+            log-slow-sql: true
+            slow-sql-millis: 2000
+        #监控配置
+        web-stat-filter:
           enabled: true
-          mergeSql: true
-          log-slow-sql: true
-          slow-sql-millis: 2000
-      #监控配置
-      web-stat-filter:
-        enabled: true
-        url-pattern: /*
-        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
-
-      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
-      stat-view-servlet:
-        enabled: true
-        url-pattern: /druid/*
-        reset-enable: false
-        login-username: root
-        login-password: root
+          url-pattern: /*
+          exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+
+        # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+        stat-view-servlet:
+          enabled: true
+          url-pattern: /druid/*
+          reset-enable: false
+          login-username: root
+          login-password: root
+      # 数据库配置
+      datasource:
+        master:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.121:3306/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: teamback
+          password: goTulmLeon
+          druid:
+            initial-size: 5
+        slave:
+          driver-class-name: oracle.jdbc.driver.OracleDriver
+          platform: oracle
+          url: jdbc:oracle:thin:@192.168.2.102:1521/orcl
+          username: lqq_test
+          password: oracle
+          druid:
+            initial-size: 5
 
   jackson:
     date-format: yyyy-MM-dd HH:mm:ss

+ 36 - 0
src/main/resources/mapper/HisBehospitalInfoMapper.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.HisBehospitalInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.his.HisBehospitalInfo">
+        <id column="behospital_code" property="behospitalCode"/>
+        <result column="name" property="name"/>
+        <result column="sex" property="sex"/>
+        <result column="birthday" property="birthday"/>
+        <result column="file_code" property="fileCode"/>
+        <result column="ward_code" property="wardCode"/>
+        <result column="ward_name" property="wardName"/>
+        <result column="beh_dept_id" property="behDeptId"/>
+        <result column="beh_dept_name" property="behDeptName"/>
+        <result column="bed_code" property="bedCode"/>
+        <result column="bed_name" property="bedName"/>
+        <result column="insurance_name" property="insuranceName"/>
+        <result column="job_type" property="jobType"/>
+        <result column="behospital_date" property="behospitalDate"/>
+        <result column="leave_hospital_date" property="leaveHospitalDate"/>
+        <result column="diagnose_icd" property="diagnoseIcd"/>
+        <result column="diagnose" property="diagnose"/>
+        <result column="beh_doctor_id" property="behDoctorId"/>
+        <result column="beh_doctor_name" property="behDoctorName"/>
+        <result column="doctor_id" property="doctorId"/>
+        <result column="doctor_name" property="doctorName"/>
+        <result column="director_doctor_id" property="directorDoctorId"/>
+        <result column="director_doctor_name" property="directorDoctorName"/>
+        <result column="is_placefile" property="isPlacefile"/>
+        <result column="placefile_date" property="placefileDate"/>
+        <result column="linkman" property="linkman"/>
+    </resultMap>
+
+</mapper>

+ 33 - 0
src/main/resources/mapper/HisDoctorAdviceMapper.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.HisDoctorAdviceMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.his.HisDoctorAdvice">
+        <id column="doctor_advice_id" property="doctorAdviceId"/>
+        <result column="behospital_code" property="behospitalCode"/>
+        <result column="order_doctor_name" property="orderDoctorName"/>
+        <result column="frequency" property="frequency"/>
+        <result column="parent_type_id" property="parentTypeId"/>
+        <result column="doctor_advice_type" property="doctorAdviceType"/>
+        <result column="usage_num" property="usageNum"/>
+        <result column="usage_unit" property="usageUnit"/>
+        <result column="dose" property="dose"/>
+        <result column="dose_unit" property="doseUnit"/>
+        <result column="med_mode_type" property="medModeType"/>
+        <result column="da_frequency" property="daFrequency"/>
+        <result column="da_deal_type" property="daDealType"/>
+        <result column="da_start_date" property="daStartDate"/>
+        <result column="da_item_name" property="daItemName"/>
+        <result column="da_status" property="daStatus"/>
+        <result column="da_stop_date" property="daStopDate"/>
+        <result column="da_group_no" property="daGroupNo"/>
+        <result column="da_prescription_type" property="daPrescriptionType"/>
+        <result column="medicine_type" property="medicineType"/>
+        <result column="da_med_type" property="daMedType"/>
+        <result column="doctor_notice" property="doctorNotice"/>
+        <result column="doctor_id" property="doctorId"/>
+        <result column="doctor_name" property="doctorName"/>
+    </resultMap>
+
+</mapper>

+ 18 - 0
src/main/resources/mapper/HisHomeDiagnoseInfoMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.HisHomeDiagnoseInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.his.HisHomeDiagnoseInfo">
+        <id column="home_page_id" property="homePageId" />
+        <result column="diagnose_order_no" property="diagnoseOrderNo" />
+        <result column="diagnose_type" property="diagnoseType" />
+        <result column="diagnose_type_short" property="diagnoseTypeShort" />
+        <result column="diagnose_name" property="diagnoseName" />
+        <result column="behospital_type" property="behospitalType" />
+        <result column="leave_hospital_type" property="leaveHospitalType" />
+        <result column="pathology_diagnose" property="pathologyDiagnose" />
+        <result column="icd_code" property="icdCode" />
+    </resultMap>
+
+</mapper>

+ 22 - 0
src/main/resources/mapper/HisHomeOperationInfoMapper.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.HisHomeOperationInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.his.HisHomeOperationInfo">
+        <id column="home_page_id" property="homePageId" />
+        <result column="operation_order_no" property="operationOrderNo" />
+        <result column="operation_date" property="operationDate" />
+        <result column="operation_code" property="operationCode" />
+        <result column="operation_doctor_id" property="operationDoctorId" />
+        <result column="first_assistant_id" property="firstAssistantId" />
+        <result column="second_assistant_id" property="secondAssistantId" />
+        <result column="cut_level" property="cutLevel" />
+        <result column="healing_level" property="healingLevel" />
+        <result column="operation_name" property="operationName" />
+        <result column="operation_level" property="operationLevel" />
+        <result column="anaesthesia_name" property="anaesthesiaName" />
+        <result column="sham_operation_name" property="shamOperationName" />
+    </resultMap>
+
+</mapper>

+ 149 - 0
src/main/resources/mapper/HisHomePageMapper.xml

@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.HisHomePageMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.his.HisHomePage">
+        <id column="home_page_id" property="homePageId" />
+        <result column="hospital_id" property="hospitalId" />
+        <result column="behospital_code" property="behospitalCode" />
+        <result column="hospital_code" property="hospitalCode" />
+        <result column="hospital_name" property="hospitalName" />
+        <result column="org_code" property="orgCode" />
+        <result column="pay_type" property="payType" />
+        <result column="health_card" property="healthCard" />
+        <result column="behospital_num" property="behospitalNum" />
+        <result column="file_code" property="fileCode" />
+        <result column="name" property="name" />
+        <result column="sex" property="sex" />
+        <result column="birthday" property="birthday" />
+        <result column="age" property="age" />
+        <result column="age_unit" property="ageUnit" />
+        <result column="nationality" property="nationality" />
+        <result column="newborn_month" property="newbornMonth" />
+        <result column="newborn_day" property="newbornDay" />
+        <result column="newborn_weight" property="newbornWeight" />
+        <result column="newborn_behospital_weight" property="newbornBehospitalWeight" />
+        <result column="born_address" property="bornAddress" />
+        <result column="born_place" property="bornPlace" />
+        <result column="nation" property="nation" />
+        <result column="identity_card_no" property="identityCardNo" />
+        <result column="job_type" property="jobType" />
+        <result column="marriage" property="marriage" />
+        <result column="cur_address" property="curAddress" />
+        <result column="cur_phone" property="curPhone" />
+        <result column="cur_post_code" property="curPostCode" />
+        <result column="residence_address" property="residenceAddress" />
+        <result column="residence_post_code" property="residencePostCode" />
+        <result column="work_address" property="workAddress" />
+        <result column="work_phone" property="workPhone" />
+        <result column="work_post_code" property="workPostCode" />
+        <result column="contact_name" property="contactName" />
+        <result column="contact_relation" property="contactRelation" />
+        <result column="contact_address" property="contactAddress" />
+        <result column="contact_phone" property="contactPhone" />
+        <result column="behospital_way" property="behospitalWay" />
+        <result column="behospital_date" property="behospitalDate" />
+        <result column="behospital_dept" property="behospitalDept" />
+        <result column="behospital_ward" property="behospitalWard" />
+        <result column="behospital_bed_id" property="behospitalBedId" />
+        <result column="behospital_bed_code" property="behospitalBedCode" />
+        <result column="change_dept" property="changeDept" />
+        <result column="leave_hospital_date" property="leaveHospitalDate" />
+        <result column="leave_hospital_dept" property="leaveHospitalDept" />
+        <result column="leave_hospital_ward" property="leaveHospitalWard" />
+        <result column="leave_hospital_bed_id" property="leaveHospitalBedId" />
+        <result column="leave_hospital_bed_code" property="leaveHospitalBedCode" />
+        <result column="behospital_day_num" property="behospitalDayNum" />
+        <result column="outpatient_emr_diagnose" property="outpatientEmrDiagnose" />
+        <result column="outpatient_emr_diagnose_code" property="outpatientEmrDiagnoseCode" />
+        <result column="poison_factor" property="poisonFactor" />
+        <result column="poison_factor_code" property="poisonFactorCode" />
+        <result column="pathology_diagnose" property="pathologyDiagnose" />
+        <result column="pathology_diagnose_code" property="pathologyDiagnoseCode" />
+        <result column="pathology_diagnose_id" property="pathologyDiagnoseId" />
+        <result column="is_med_allergy" property="isMedAllergy" />
+        <result column="med_allergy_name" property="medAllergyName" />
+        <result column="autopsy" property="autopsy" />
+        <result column="blood_type" property="bloodType" />
+        <result column="rh" property="rh" />
+        <result column="dept_director" property="deptDirector" />
+        <result column="director_doctor" property="directorDoctor" />
+        <result column="attending_doctor" property="attendingDoctor" />
+        <result column="behospital_doctor" property="behospitalDoctor" />
+        <result column="response_nurse" property="responseNurse" />
+        <result column="study_doctor" property="studyDoctor" />
+        <result column="practice_doctor" property="practiceDoctor" />
+        <result column="encode_man" property="encodeMan" />
+        <result column="home_page_quality" property="homePageQuality" />
+        <result column="qc_doctor" property="qcDoctor" />
+        <result column="qc_nurse" property="qcNurse" />
+        <result column="qc_date" property="qcDate" />
+        <result column="leave_hospital_type" property="leaveHospitalType" />
+        <result column="accept_org_code" property="acceptOrgCode" />
+        <result column="again_behospital_plan" property="againBehospitalPlan" />
+        <result column="again_behospital_goal" property="againBehospitalGoal" />
+        <result column="tbi_before_day" property="tbiBeforeDay" />
+        <result column="tbi_before_hour" property="tbiBeforeHour" />
+        <result column="tbi_before_minute" property="tbiBeforeMinute" />
+        <result column="tbi_after_day" property="tbiAfterDay" />
+        <result column="tbi_after_hour" property="tbiAfterHour" />
+        <result column="tbi_after_minute" property="tbiAfterMinute" />
+        <result column="total_fee" property="totalFee" />
+        <result column="own_fee" property="ownFee" />
+        <result column="general_fee" property="generalFee" />
+        <result column="service_fee" property="serviceFee" />
+        <result column="nurse_fee" property="nurseFee" />
+        <result column="other_fee" property="otherFee" />
+        <result column="pathology_fee" property="pathologyFee" />
+        <result column="lab_fee" property="labFee" />
+        <result column="pacs_fee" property="pacsFee" />
+        <result column="clinic_diagnose_fee" property="clinicDiagnoseFee" />
+        <result column="not_operation_fee" property="notOperationFee" />
+        <result column="clinic_physic_fee" property="clinicPhysicFee" />
+        <result column="operation_treat_fee" property="operationTreatFee" />
+        <result column="anaesthesia_fee" property="anaesthesiaFee" />
+        <result column="operation_fee" property="operationFee" />
+        <result column="health_type_fee" property="healthTypeFee" />
+        <result column="chn_treat_fee" property="chnTreatFee" />
+        <result column="western_med_fee" property="westernMedFee" />
+        <result column="antibiosis_fee" property="antibiosisFee" />
+        <result column="chn_med_fee" property="chnMedFee" />
+        <result column="chn_herb_fee" property="chnHerbFee" />
+        <result column="blood_fee" property="bloodFee" />
+        <result column="albumen_fee" property="albumenFee" />
+        <result column="globulin_fee" property="globulinFee" />
+        <result column="blood_factor_fee" property="bloodFactorFee" />
+        <result column="cell_factor_fee" property="cellFactorFee" />
+        <result column="check_material_fee" property="checkMaterialFee" />
+        <result column="treat_material_fee" property="treatMaterialFee" />
+        <result column="operation_material_fee" property="operationMaterialFee" />
+        <result column="other_type_fee" property="otherTypeFee" />
+        <result column="single_diag_manage" property="singleDiagManage" />
+        <result column="clinic_pathway_manage" property="clinicPathwayManage" />
+        <result column="is_outpatient_behospital" property="isOutpatientBehospital" />
+        <result column="is_leave_behospital" property="isLeaveBehospital" />
+        <result column="is_operation_before_after" property="isOperationBeforeAfter" />
+        <result column="is_clinic_pathology" property="isClinicPathology" />
+        <result column="is_radiate_pathology" property="isRadiatePathology" />
+        <result column="rescue_num" property="rescueNum" />
+        <result column="rescue_success_num" property="rescueSuccessNum" />
+        <result column="is_auto_leavehospital" property="isAutoLeavehospital" />
+        <result column="return_to_type" property="returnToType" />
+        <result column="is_physical_restraint" property="isPhysicalRestraint" />
+        <result column="tbi_behospital_before_time" property="tbiBehospitalBeforeTime" />
+        <result column="tbi_behospital_after_time" property="tbiBehospitalAfterTime" />
+        <result column="is_fall_bed" property="isFallBed" />
+        <result column="is_nosocomial_infection" property="isNosocomialInfection" />
+        <result column="is_into_icu" property="isIntoIcu" />
+        <result column="is_complications" property="isComplications" />
+        <result column="is_pressure_sore" property="isPressureSore" />
+        <result column="is_behospital_pressure_sore" property="isBehospitalPressureSore" />
+        <result column="is_unplanned_reoperation" property="isUnplannedReoperation" />
+        <result column="treatment_results" property="treatmentResults" />
+        <result column="complications_results" property="complicationsResults" />
+        <result column="infection_site" property="infectionSite" />
+        <result column="is_be_in_danger" property="isBeInDanger" />
+    </resultMap>
+
+</mapper>

+ 12 - 0
src/main/resources/mapper/HisMedicalRecordContentMapper.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.HisMedicalRecordContentMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.his.HisMedicalRecordContent">
+        <result column="rec_id" property="recId" />
+        <result column="content_blob" property="contentBlob" typeHandler="org.apache.ibatis.type.BlobTypeHandler"/>
+        <result column="content_text" property="contentText" />
+    </resultMap>
+
+</mapper>

+ 14 - 0
src/main/resources/mapper/HisMedicalRecordMapper.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.HisMedicalRecordMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.his.HisMedicalRecord">
+        <id column="rec_id" property="recId" />
+        <result column="behospital_code" property="behospitalCode" />
+        <result column="org_code" property="orgCode" />
+        <result column="rec_date" property="recDate" />
+        <result column="rec_title" property="recTitle" />
+    </resultMap>
+
+</mapper>