diff --git a/WholeCheckInterface.iml b/WholeCheckInterface.iml
index ea627ba..9a11b43 100644
--- a/WholeCheckInterface.iml
+++ b/WholeCheckInterface.iml
@@ -15,6 +15,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -41,7 +51,6 @@
-
@@ -75,7 +84,6 @@
-
@@ -87,9 +95,9 @@
-
+
@@ -120,9 +128,7 @@
-
-
@@ -138,5 +144,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 5c83fc2..d4bd076 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,6 +42,12 @@
lombok
+
+ mysql
+ mysql-connector-java
+ 5.1.38
+
+
org.apache.cxf
cxf-spring-boot-starter-jaxws
@@ -65,6 +71,35 @@
+
+ junit
+ junit
+ test
+
+
+ junit
+ junit
+ test
+
+
+ junit
+ junit
+ test
+
+
+ io.springfox
+ springfox-swagger2
+ 2.9.2
+
+
+ io.springfox
+ springfox-swagger-ui
+ 2.9.2
+
+
+ org.junit.platform
+ junit-platform-commons
+
diff --git a/src/main/java/com/ann/demo/entity/filing/CommonTable.java b/src/main/java/com/ann/demo/entity/filing/CommonTable.java
index 9161ac0..cc1e17a 100644
--- a/src/main/java/com/ann/demo/entity/filing/CommonTable.java
+++ b/src/main/java/com/ann/demo/entity/filing/CommonTable.java
@@ -62,7 +62,7 @@ public class CommonTable {
/**
* 8 现住址(省、市、县、街道)
*/
- @Column(name = "home_addr")
+ @Column(name = "addr")
private String YZY075;
/**
@@ -115,7 +115,7 @@ public class CommonTable {
* 103 主治医师
*/
@Column(name = "attending")
- private String YZY055;
+ private String YZY054;
/**
@@ -146,4 +146,10 @@ public class CommonTable {
@Column(name = "main_dis_thing")
private String main_dis_thing;
+ /**
+ * 出院主诊断编码
+ */
+ @Column(name = "main_diag_code")
+ private String mainDiagCode;
+
}
diff --git a/src/main/java/com/ann/demo/entity/filing/CommonTable1.java b/src/main/java/com/ann/demo/entity/filing/CommonTable1.java
index 268a392..f36c917 100644
--- a/src/main/java/com/ann/demo/entity/filing/CommonTable1.java
+++ b/src/main/java/com/ann/demo/entity/filing/CommonTable1.java
@@ -96,7 +96,7 @@ public class CommonTable1 {
* 17 国籍
*/
@Column(name = "country")
- private String AAC161;
+ private String YZY013;
/**
* 18 籍贯
@@ -105,7 +105,7 @@ public class CommonTable1 {
private String YZY076;
/**
- * 23 联系人关系
+ * 23 联系人与病人关系
*/
@Column(name = "relation")
private String YZY026;
@@ -114,7 +114,7 @@ public class CommonTable1 {
/**
* 24 现住址电话
*/
- @Column(name = "home_tel")
+ @Column(name = "telphone")
private String YZY079;
/**
@@ -136,7 +136,7 @@ public class CommonTable1 {
private String YZY080;
/**
- * 64 (主要出院诊断)入院病情 -------------入院病情 1.危,2.急,3.一般
+ * 64 出院主诊断入院病情 -------------入院病情 1.危,2.急,3.一般
*/
@Column(name = "admiss_thing")
private String YZY111;
@@ -161,7 +161,7 @@ public class CommonTable1 {
private String YZY046;
/**
- * 75 是否死亡患者尸检 0.未做,1.符合,2.不符合,3.不肯定,4.不作统计
+ * 75 死亡患者是否尸检 0.未做,1.符合,2.不符合,3.不肯定,4.不作统计
*/
@Column(name = "emit_pathology")
private String YZY089;
@@ -221,11 +221,11 @@ public class CommonTable1 {
* 101 编码员
*/
@Column(name = "coding")
- private String YZY061;
+ private String YZY062;
/**
- * 102 (出院)病房
+ * 102 出院病室
*/
@Column(name = "dis_ward")
private String YZY039;
@@ -237,7 +237,7 @@ public class CommonTable1 {
private String YZY056;
/**
- * 105 科主任
+ * 105 科主任姓名
*/
@Column(name = "dept_director")
private String YZY050;
@@ -288,11 +288,228 @@ public class CommonTable1 {
*/
@Column(name = "refresher")
private String YZY058;
+
/**
* 实习医师
*/
@Column(name = "praxis")
private String YZY060;
+ /**
+ * 户口地址
+ */
+ @Column(name = "home_addr")
+ private String AAC010;
+
+ /**
+ * 住院总费用
+ */
+ @Column(name = "total_charge")
+ private String AKC264;
+
+ /**
+ * 治疗类-9-临床物理治疗费
+ */
+ @Column(name = "charge_34")
+ private String YZY132;
+
+ /**
+ * 治疗类-10-麻醉费
+ */
+ @Column(name = "charge_14")
+ private String YZY134;
+
+ /**
+ * 治疗类-10-手术费
+ */
+ @Column(name = "charge_19")
+ private String YZY135;
+
+ /**
+ * 西药类-13-抗菌药物费用
+ */
+ @Column(name = "charge_37")
+ private String YZY152;
+
+ /**
+ * 综合医疗服务类-一般医疗服务费(1)
+ */
+ @Column(name = "charge_10")
+ private String YZY123;
+
+ /**
+ * 综合医疗服务类-一般治疗操作费(2)
+ */
+ @Column(name = "charge_25")
+ private String YZY124;
+
+ /**
+ * 综合医疗服务类-护理费(3)
+ */
+ @Column(name = "charge_02")
+ private String YZY125;
+
+ /**
+ * 综合医疗服务类-其他费用(4)
+ */
+ @Column(name = "charge_20")
+ private String YZY126;
+
+ /**
+ * 诊断类-病理诊断费(5)
+ */
+ @Column(name = "charge_29")
+ private String YZY127;
+
+ /**
+ * 诊断类-实验室诊断费(6)
+ */
+ @Column(name = "charge_30")
+ private String YZY128;
+
+ /**
+ * 诊断类-影像学诊断费(7)
+ */
+ @Column(name = "charge_31")
+ private String YZY129;
+
+ /**
+ * 诊断类-临床诊断项目费(8)
+ */
+ @Column(name = "charge_32")
+ private String YZY130;
+
+ /**
+ * 治疗类-非手术治疗项目费(9)
+ */
+ @Column(name = "charge_33")
+ private String YZY131;
+
+ /**
+ * 康复类-康复费(11)
+ */
+ @Column(name = "charge_36")
+ private String YZY136;
+
+ /**
+ * 中医类-中医治疗费(12)
+ */
+ @Column(name = "charge_38")
+ private String YZY137;
+
+ /**
+ * 西药类-西药费(13)
+ */
+ @Column(name = "charge_03")
+ private String YZY138;
+
+ /**
+ * 中药类-中成药费(14)
+ */
+ @Column(name = "charge_04")
+ private String YZY153;
+
+ /**
+ * 中药类-中草药费(15)
+ */
+ @Column(name = "charge_05")
+ private String YZY154;
+
+ /**
+ * 血液和血液制品类-血费(16)
+ */
+ @Column(name = "charge_09")
+ private String YZY139;
+
+ /**
+ * 血液和血液制品类-白蛋白类制品费(17)
+ */
+ @Column(name = "charge_39")
+ private String YZY140;
+
+ /**
+ * 血液和血液制品类-球蛋白类制品费(18)
+ */
+ @Column(name = "charge_40")
+ private String YZY141;
+
+ /**
+ * 血液和血液制品类-凝血因子类制品费(19)
+ */
+ @Column(name = "charge_41")
+ private String YZY142;
+
+ /**
+ * 血液和血液制品类-细胞因子类制品费(20)
+ */
+ @Column(name = "charge_42")
+ private String YZY143;
+
+ /**
+ * 耗材类-检查用一次性医用材料费(21)
+ */
+ @Column(name = "charge_43")
+ private String YZY144;
+
+ /**
+ * 耗材类-治疗用一次性医用材料费(22)
+ */
+ @Column(name = "charge_44")
+ private String YZY145;
+
+ /**
+ * 耗材类-手术用一次性医用材料费(23)
+ */
+ @Column(name = "charge_45")
+ private String YZY146;
+
+ /**
+ * 其他类-其他费(24)
+ */
+ @Column(name = "other")
+ private String YZY155;
+
+ /**
+ * 自付费用
+ */
+ @Column(name = "charge_22")
+ private String YZY122;
+
+ /**
+ * (入院前)颅脑损伤时间
+ */
+ @Column(name = "craniocerebral_starttime")
+ private String YZY081;
+
+ /**
+ * (入院后)颅脑损伤时间
+ */
+ @Column(name = "craniocerebral_endtime")
+ private String YZY082;
+
+ /**
+ * 离院方式
+ */
+ @Column(name = "dis_type")
+ private String YZY070;
+
+ /**
+ * 是否有31天内再次入院计划
+ */
+ @Column(name = "is_hospitalization")
+ private String YZY098;
+
+ /**
+ * 31天内再次入院目的
+ */
+ @Column(name = "hospitalization_objective")
+ private String YZY099;
+
+ /**
+ * 责任护士
+ */
+ @Column(name = "responsible_nurse")
+ private String YZY103;
+
}
diff --git a/src/main/java/com/ann/demo/entity/filing/ContentRetrunInfo.java b/src/main/java/com/ann/demo/entity/filing/ContentRetrunInfo.java
new file mode 100644
index 0000000..c69d067
--- /dev/null
+++ b/src/main/java/com/ann/demo/entity/filing/ContentRetrunInfo.java
@@ -0,0 +1,883 @@
+package com.ann.demo.entity.filing;
+
+/**
+ * @author 王思懿
+ * @创建人 wangsiyi
+ * @创建时间 2020/6/16
+ * @描述
+ */
+public class ContentRetrunInfo {
+ /**
+ * 属性单一判断
+ *
+ * @param type
+ * @return
+ */
+ public String getReturnInfo(String type) {
+ /**
+ * 新生儿出生体重(可能多胎)
+ */
+ String YZY072 = "YZY072";
+ if (YZY072.equals(type)) {
+ return "新生儿出生体重不能为空, ";
+ }
+
+ /**
+ * 新生儿入院体重
+ */
+ String YZY073 = "YZY073";
+ if (YZY073.equals(type)) {
+ return "新生儿入院体重不能为空, ";
+ }
+
+ /**
+ * 病案号
+ */
+ String YZY001 = "YZY001";
+ if (YZY001.equals(type)) {
+ return "病案号必填, ";
+ }
+
+ /**
+ * 出生日期
+ */
+ String AAC006 = "AAC006";
+ if (AAC006.equals(type)) {
+ return "出生日期必填, ";
+ }
+
+ /**
+ * 医疗付费方式
+ */
+ String YZY074 = "YZY074";
+ if (YZY074.equals(type)) {
+ return "医疗付费方式必填, ";
+ }
+
+ /**
+ * 现住址(省、市、县、街道)
+ */
+ String YZY075 = "YZY075";
+ if (YZY075.equals(type)) {
+ return "现住址必填, ";
+ }
+
+ /**
+ * 出生地(省、市、县)
+ */
+ String YZY010 = "YZY010";
+ if (YZY010.equals(type)) {
+ return "出生地必填, ";
+ }
+
+ /**
+ * 职业
+ */
+ String YZY016 = "YZY016";
+ if (YZY016.equals(type)) {
+ return "职业必填, ";
+ }
+
+ /**
+ * 联系人地址
+ */
+ String YZY027 = "YZY027";
+ if (YZY027.equals(type)) {
+ return "联系人姓名不为空时,联系人地址必填, ";
+ }
+
+ /**
+ * 联系人地址
+ */
+ String YZY028 = "YZY028";
+ if (YZY028.equals(type)) {
+ return "联系人姓名不为空时,联系人电话必填, ";
+ }
+
+ /**
+ * 身份证
+ */
+ String YZY011 = "YZY011";
+ if (YZY011.equals(type)) {
+ return "身份证信息必填, ";
+ }
+
+ /**
+ * 住院次数
+ */
+ String YZY002 = "YZY002";
+ if (YZY002.equals(type)) {
+ return "住院次数必填, ";
+ }
+
+ /**
+ * 婚姻
+ */
+ String YZY018 = "YZY018";
+ if (YZY018.equals(type)) {
+ return "婚况必填, ";
+ }
+
+ /**
+ * 姓名
+ */
+ String AAC003 = "AAC003";
+ if (AAC003.equals(type)) {
+ return "姓名必填, ";
+ }
+
+ /**
+ * 民族
+ */
+ String YZY015 = "YZY015";
+ if (YZY015.equals(type)) {
+ return "民族必填, ";
+ }
+
+ /**
+ * 国籍
+ */
+ String YZY013 = "YZY013";
+ if (YZY013.equals(type)) {
+ return "国籍必填, ";
+ }
+
+ /**
+ * 籍贯
+ */
+ String YZY076 = "YZY076";
+ if (YZY076.equals(type)) {
+ return "籍贯必填, ";
+ }
+
+ /**
+ * 组织机构代码
+ */
+ String YZY077 = "YZY077";
+ if (YZY077.equals(type)) {
+ return "组织机构代码必填, ";
+ }
+
+ /**
+ * 医疗机构
+ */
+ String YZY078 = "YZY078";
+ if (YZY078.equals(type)) {
+ return "医疗机构必填, ";
+ }
+
+ /**
+ * 户口地址(省、市、县、街道)
+ */
+ String AAC010 = "AAC010";
+ if (AAC010.equals(type)) {
+ return "户口地址必填, ";
+ }
+
+ /**
+ * 户口地址邮编
+ */
+ String YZY024 = "YZY024";
+ if (YZY024.equals(type)) {
+ return "户口地址邮编必填, ";
+ }
+
+ /**
+ * 联系人关系
+ */
+ String YZY026 = "YZY026";
+ if (YZY026.equals(type)) {
+ return "联系人姓名不为空时,联系人关系必填, ";
+ }
+
+ /**
+ * 现住址电话
+ */
+ String YZY079 = "YZY079";
+ if (YZY079.equals(type)) {
+ return "现住址电话必填, ";
+ }
+
+ /**
+ * 工作单位电话
+ */
+ String YZY021 = "YZY021";
+ if (YZY021.equals(type)) {
+ return "当工作单位及地址不为空时,工作单位电话必填, ";
+ }
+
+ /**
+ * 工作单位地址邮编
+ */
+ String YZY022 = "YZY022";
+ if (YZY022.equals(type)) {
+ return "当工作单位及地址不为空时,工作单位地址邮编必填, ";
+ }
+
+ /**
+ * 现住址邮编
+ */
+ String YZY080 = "YZY080";
+ if (YZY080.equals(type)) {
+ return "现住址邮编必填, ";
+ }
+
+ /**
+ * 治疗类-9-临床物理治疗费
+ */
+ String YZY132 = "YZY132";
+ if (YZY132.equals(type)) {
+ return "治疗类-9-临床物理治疗费:费用不允许小于0, ";
+ }
+
+ /**
+ * 治疗类-10-麻醉费
+ */
+ String YZY134 = "YZY134";
+ if (YZY134.equals(type)) {
+ return "治疗类-10-麻醉费:费用不允许小于0,";
+ }
+
+ /**
+ * 西药类-13-抗菌药物费用
+ */
+ String YZY152 = "YZY152";
+ if (YZY152.equals(type)) {
+ return "西药类-13-抗菌药物费用:费用不允许小于0,";
+ }
+
+ /**
+ * 综合医疗服务类-一般医疗服务费(1)
+ */
+ String YZY123 = "YZY123";
+ if (YZY123.equals(type)) {
+ return "综合医疗服务类-一般医疗服务费(1):费用不允许小于0,";
+ }
+
+ /**
+ * 综合医疗服务类-一般治疗操作费(2)
+ */
+ String YZY124 = "YZY124";
+ if (YZY124.equals(type)) {
+ return "综合医疗服务类-一般治疗操作费(2):费用不允许小于0,";
+ }
+
+ /**
+ * 综合医疗服务类-护理费(3)
+ */
+ String YZY125 = "YZY125";
+ if (YZY125.equals(type)) {
+ return "综合医疗服务类-护理费(3):费用不允许小于0,";
+ }
+
+ /**
+ * 综合医疗服务类-其他费用(4)
+ */
+ String YZY126 = "YZY126";
+ if (YZY126.equals(type)) {
+ return "综合医疗服务类-其他费用(4):费用不允许小于0,";
+ }
+
+ /**
+ * 诊断类-实验室诊断费(6)
+ */
+ String YZY128 = "YZY128";
+ if (YZY128.equals(type)) {
+ return "诊断类-实验室诊断费(6):费用不允许小于0, ";
+ }
+
+ /**
+ * 诊断类-影像学诊断费(7)
+ */
+ String YZY129 = "YZY129";
+ if (YZY129.equals(type)) {
+ return "诊断类-影像学诊断费(7):费用不允许小于0, ";
+ }
+
+ /**
+ * 康复类-康复费(11)
+ */
+ String YZY136 = "YZY136";
+ if (YZY136.equals(type)) {
+ return "康复类-康复费(11):费用不允许小于0, ";
+ }
+
+ /**
+ * 中医类-中医治疗费(12)
+ */
+ String YZY137 = "YZY137";
+ if (YZY137.equals(type)) {
+ return "中医类-中医治疗费(12):费用不允许小于0, ";
+ }
+
+ /**
+ * 中药类-中成药费(14)
+ */
+ String YZY153 = "YZY153";
+ if (YZY153.equals(type)) {
+ return "中药类-中成药费(14):费用不允许小于0, ";
+ }
+
+ /**
+ * 中药类-中草药费(15)
+ */
+ String YZY154 = "YZY154";
+ if (YZY154.equals(type)) {
+ return "中药类-中草药费(15):费用不允许小于0, ";
+ }
+
+ /**
+ * 血液和血液制品类-血费(16)
+ */
+ String YZY139 = "YZY139";
+ if (YZY139.equals(type)) {
+ return "血液和血液制品类-血费(16):费用不允许小于0, ";
+ }
+
+ /**
+ * 血液和血液制品类-白蛋白类制品费(17)
+ */
+ String YZY140 = "YZY140";
+ if (YZY140.equals(type)) {
+ return "血液和血液制品类-白蛋白类制品费(17):费用不允许小于0, ";
+ }
+
+ /**
+ * 血液和血液制品类-球蛋白类制品费(18)
+ */
+ String YZY141 = "YZY141";
+ if (YZY141.equals(type)) {
+ return "血液和血液制品类-球蛋白类制品费(18):费用不允许小于0, ";
+ }
+
+ /**
+ * 血液和血液制品类-凝血因子类制品费(19)
+ */
+ String YZY142 = "YZY142";
+ if (YZY142.equals(type)) {
+ return "血液和血液制品类-凝血因子类制品费(19):费用不允许小于0, ";
+ }
+
+ /**
+ * 血液和血液制品类-细胞因子类制品费(20)
+ */
+ String YZY143 = "YZY143";
+ if (YZY143.equals(type)) {
+ return "血液和血液制品类-细胞因子类制品费(20):费用不允许小于0, ";
+ }
+
+ /**
+ * 耗材类-检查用一次性医用材料费(21)
+ */
+ String YZY144 = "YZY144";
+ if (YZY144.equals(type)) {
+ return "耗材类-检查用一次性医用材料费(21):费用不允许小于0, ";
+ }
+
+ /**
+ * 耗材类-治疗用一次性医用材料费(22)
+ */
+ String YZY145 = "YZY145";
+ if (YZY145.equals(type)) {
+ return "耗材类-治疗用一次性医用材料费(22):费用不允许小于0, ";
+ }
+
+ /**
+ * 耗材类-手术用一次性医用材料费(23)
+ */
+ String YZY146 = "YZY146";
+ if (YZY146.equals(type)) {
+ return "耗材类-手术用一次性医用材料费(23):费用不允许小于0, ";
+ }
+
+ /**
+ * 其他类-其他费(24)
+ */
+ String YZY155 = "YZY155";
+ if (YZY155.equals(type)) {
+ return "其他类-其他费(24):费用不允许小于0, ";
+ }
+
+ /**
+ * 自付费用
+ */
+ String YZY122 = "YZY122";
+ if (YZY122.equals(type)) {
+ return "自付费用必填, ";
+ }
+
+ /**
+ * (主要出院诊断)编码
+ */
+ String mainDiagCode = "mainDiagCode";
+ if (mainDiagCode.equals(type)) {
+ return "(主要出院诊断)编码的编码范围应为:A~U开头和Z开头的编码, ";
+ }
+
+ /**
+ * (主要出院诊断)名称
+ */
+ String mainDiagName = "mainDiagName";
+ if (mainDiagName.equals(type)) {
+ return "(主要出院诊断)名称必填, ";
+ }
+
+ /**
+ * (主要手术)名称
+ */
+ String YZY105 = "YZY105";
+ if (YZY105.equals(type)) {
+ return "有手术治疗费的患者,(主要手术)名称必填, ";
+ }
+
+ /**
+ * (主要操作)名称
+ */
+ String YZY110 = "YZY110";
+ if (YZY110.equals(type)) {
+ return "有影像学诊断费的患者,(主要操作)名称必填, ";
+ }
+
+ /**
+ * (主要出院诊断)入院病情
+ */
+ String YZY111 = "YZY111";
+ if (YZY111.equals(type)) {
+ return "(主要出院诊断)入院病情必填, ";
+ }
+
+ /**
+ * (入院前)颅脑损伤时间
+ */
+ String YZY081 = "YZY081";
+ if (YZY081.equals(type)) {
+ return "(入院前)颅脑损伤时间必填, ";
+ }
+
+ /**
+ * (入院后)颅脑损伤时间
+ */
+ String YZY082 = "YZY082";
+ if (YZY082.equals(type)) {
+ return "(入院后)颅脑损伤时间必填, ";
+ }
+
+ /**
+ * (主要操作)切口愈合等级
+ */
+ String YZY083 = "YZY083";
+ if (YZY083.equals(type)) {
+ return "有“影像学诊断费”的患者,(主要操作)切口愈合等级必填, ";
+ }
+
+ /**
+ * (主要手术)切口愈合等级
+ */
+ String YZY084 = "YZY084";
+ if (YZY084.equals(type)) {
+ return "有“手术治疗费”的患者,(主要手术)切口愈合等级必填, ";
+ }
+
+ /**
+ * (主要手术)日期
+ */
+ String YZY106 = "YZY106";
+ if (YZY106.equals(type)) {
+ return "有“手术治疗费”的患者,(主要手术)日期必填, ";
+ }
+
+ /**
+ * (主要操作)日期
+ */
+ String YZY085 = "YZY085";
+ if (YZY085.equals(type)) {
+ return "有“影像学诊断费”的患者,(主要操作)日期必填, ";
+ }
+
+ /**
+ * 基于其他病理诊断内容判断病理诊断编码不为空
+ */
+ String pathologyDingCode = "pathologyDingCode";
+ if (pathologyDingCode.equals(type)) {
+ return "主要诊断为肿瘤编码时,当病理号、病理诊断或病理诊断费不为空时,病理诊断编码不能为空, ";
+ }
+
+ /**
+ * 基于其他病理诊断内容判断病理诊断不为空
+ */
+ String pathologyDingName = "pathologyDingName";
+ if (pathologyDingName.equals(type)) {
+ return "主要诊断为肿瘤编码时,当病理号、病理诊断编码或病理诊断费不为空时,病理诊断不能为空, ";
+ }
+
+ /**
+ * (主要手术)麻醉方式
+ */
+ String YZY107 = "YZY107";
+ if (YZY107.equals(type)) {
+ return "有“麻醉费”的患者,麻醉方式必填, ";
+ }
+
+ /**
+ * 门急诊诊断编码
+ */
+ String YZY113 = "YZY113";
+ if (YZY113.equals(type)) {
+ return "门急诊诊断编码范围应为:A~U开头和Z开头的编码, ";
+ }
+
+ /**
+ * 门急诊诊断
+ */
+ String YZY114 = "YZY114";
+ if (YZY114.equals(type)) {
+ return "门急诊诊断编码范围应为:A~U开头和Z开头的编码, ";
+ }
+
+ /**
+ * 过敏药物
+ */
+ String YZY046 = "YZY046";
+ if (YZY046.equals(type)) {
+ return "患者有药物过敏,过敏药物必填, ";
+ }
+
+ /**
+ * 死亡患者是否尸检
+ */
+ String YZY089 = "YZY089";
+ if (YZY089.equals(type)) {
+ return "有“尸体料理费”的患者,“离院方式”或“疗效”为“死亡”的患者,“死亡患者尸检”必填, ";
+ }
+
+ /**
+ * ABO血型
+ */
+ String YZY090 = "YZY090";
+ if (YZY090.equals(type)) {
+ return "血型必填, ";
+ }
+
+ /**
+ * 有无药物过敏
+ */
+ String is_medicine = "is_medicine";
+ if (is_medicine.equals(type)) {
+ return "有无药物过敏必填, ";
+ }
+
+ /**
+ * 损伤、中毒的外部原因疾病编码必填
+ */
+ String YZY091 = "YZY091";
+ if (YZY091.equals(type)) {
+ return "主要诊断编码以S、T开头的,损伤、中毒的外部原因疾病编码必填, ";
+ }
+
+ /**
+ * 损伤中毒的外部原因编码
+ */
+ String YZY092 = "YZY092";
+ if (YZY092.equals(type)) {
+ return "当主要诊断编码的范围在 S00 到 T98 之间时,其他诊断编码的必须为V, W, X, Y开头, ";
+ }
+
+ /**
+ * 损伤、中毒的外部原因必填
+ */
+ String YZY093 = "YZY093";
+ if (YZY093.equals(type)) {
+ return "主要诊断编码以S、T开头的,损伤、中毒的外部原因必填, ";
+ }
+
+ /**
+ * (主要操作)级别
+ */
+ String YZY094 = "YZY094";
+ if (YZY094.equals(type)) {
+ return "有“影像学诊断费”的患者,(主要操作)级别必填, ";
+ }
+
+ /**
+ * (主要手术)级别
+ */
+ String YZY108 = "YZY108";
+ if (YZY108.equals(type)) {
+ return "有“手术治疗费”的患者,(主要手术)级别必填, ";
+ }
+
+ /**
+ * 基于其他病理诊断内容判断病理号不为空
+ */
+ String YZY095 = "YZY095";
+ if (YZY095.equals(type)) {
+ return "主要诊断为肿瘤编码时,当病理诊断、病理诊断编码或病理诊断费不为空时,病理号必填, ";
+ }
+
+ /**
+ * Rh血型
+ */
+ String YZY096 = "YZY096";
+ if (YZY096.equals(type)) {
+ return "Rh血型必填, ";
+ }
+
+ /**
+ * (主要手术)术者
+ */
+ String YZY109 = "YZY109";
+ if (YZY109.equals(type)) {
+ return "有“手术治疗费”的患者,(主要手术) 术者必填, ";
+ }
+
+ /**
+ * (主要操作)术者
+ */
+ String YZY097 = "YZY097";
+ if (YZY097.equals(type)) {
+ return "有“影像学诊断费”的患者,(主要操作)术者必填, ";
+ }
+
+ /**
+ * 是否有31天内再次入院计划
+ */
+ String YZY098 = "YZY098";
+ if (YZY098.equals(type)) {
+ return "是否有31天内再次入院计划必填, ";
+ }
+
+ /**
+ * 31天内再次入院目的
+ */
+ String YZY099 = "YZY099";
+ if (YZY099.equals(type)) {
+ return "有31天内再入院计划的患者,31天内再次住院目的必填, ";
+ }
+
+ /**
+ * 转科科别
+ */
+ String YZY101 = "YZY101";
+ if (YZY101.equals(type)) {
+ return "在入院科别和出院科别不同时转科科别必填, ";
+ }
+
+ /**
+ * 主任(副主任)医师
+ */
+ String YZY052 = "YZY052";
+ if (YZY052.equals(type)) {
+ return "主任(副主任)医师必填, ";
+ }
+
+ /**
+ * 编码员
+ */
+ String YZY062 = "YZY062";
+ if (YZY062.equals(type)) {
+ return "编码员必填, ";
+ }
+
+
+ return null;
+ }
+
+ /**
+ * 属性多次判断
+ *
+ * @param type
+ * @param typeNum
+ * @return
+ */
+ public String getReturnInfo(String type, int typeNum) {
+ /**
+ * 性别
+ */
+ String YZY008 = "YZY008";
+ //判断是否为空
+ if (YZY008.equals(type) && typeNum == 1) {
+ return "性别必填, ";
+ }
+ //当性别为男时
+ if (YZY008.equals(type) && typeNum == 2) {
+ return "当性别为男性时,门(急)诊诊断编码、主要诊断编码、其它诊断编码不能使用以下编码:A34;B37.3;C51-C58;" +
+ "C79.6;D06;D07.0-D07.3;D25-D28;D39;E28;E89.4;F52.5;F53;I86.3;L29.2;M80.0-M80.1;" +
+ "M81.0-M81.1;M83.0;N70-N98;N99.2-N99.3;O00-O99;P54.6;Q50-Q52;R87;S31.4;S37.4-S37.6;" +
+ "T19.2-T19.3;T83.3;Z01.4;Z12.4;Z30.1;Z30.3;Z30.5;Z31.1-Z31.2;Z32-Z37;Z39;Z87.5;Z97.5, ";
+ }
+ //当性别为女时
+ if (YZY008.equals(type) && typeNum == 3) {
+ return "当性别为女性时,门(急)诊诊断编码、主要诊断编码、其它诊断编码不能使用以下编码:B26.0;C60-C63;D07.4-D07.6;" +
+ "D17.6;D29;D40;E29;E89.5;F52.4;I86.1;L29.1;N40-N51;Q53-Q55;R86;S31.2-S31.3;Z12.5, ";
+ }
+
+ /**
+ * 年龄
+ */
+ String AKC023 = "AKC023";
+ //判断是否为空
+ if (AKC023.equals(type) && typeNum == 1) {
+ return "年龄必填, ";
+ }
+ //年龄等于入院日期减出生日期
+ if (AKC023.equals(type) && typeNum == 2) {
+ return "年龄必须等于入院日期减出生日期, ";
+ }
+ //不足一周岁年龄(月天)-1
+ if (AKC023.equals(type) && typeNum == 3) {
+ return "当门(急)诊诊断编码、主要诊断编码、其它诊断编码出现P10~P15时,入院日期减出生日期必须≤28天,且(年龄不足1周岁的)年龄必须≤28天, ";
+ }
+ //不足一周岁年龄(月天)-2
+ if (AKC023.equals(type) && typeNum == 4) {
+ return "年龄小于1周岁即年龄为0时,(年龄不足1周岁的)年龄不能为空, ";
+ }
+
+ /**
+ * 住院总费用
+ */
+ String AKC264 = "AKC264";
+ //判断是否为空
+ if (AKC264.equals(type) && typeNum == 1) {
+ return "住院总费用必填, ";
+ }
+ //判断总费用范围
+ if (AKC264.equals(type) && typeNum == 2) {
+ return "住院费用不能小于5,不能大于1000000, ";
+ }
+
+ /**
+ * 诊断类-病理诊断费(5)
+ */
+ String YZY127 = "YZY127";
+ //判断是否小于0
+ if (YZY127.equals(type) && typeNum == 1) {
+ return "诊断类-病理诊断费(5) 费用不允许小于0,";
+ }
+ //判断主要诊断为肿瘤编码时,当病理号、病理诊断编码或病理诊断不为空时是否为空
+ if (YZY127.equals(type) && typeNum == 2) {
+ return "主要诊断为肿瘤编码时,当病理号、病理诊断编码或病理诊断不为空时,诊断类-病理诊断费(5)不能为空,";
+ }
+
+ /**
+ * 治疗类-非手术治疗项目费(9)
+ */
+ String YZY131 = "YZY131";
+ //判断是否小于0
+ if (YZY131.equals(type) && typeNum == 1) {
+ return "治疗类-非手术治疗项目费(9) 费用不允许小于0, ";
+ }
+ //判断非手术治疗项目费是否大于等于临床物理治疗费
+ if (YZY131.equals(type) && typeNum == 2) {
+ return "非手术治疗项目费必须大于等于临床物理治疗费, ";
+ }
+
+ /**
+ * 治疗类-手术治疗费(10)
+ */
+ String YZY133 = "YZY133";
+ //判断是否小于0
+ if (YZY133.equals(type) && typeNum == 1) {
+ return "治疗类-手术治疗费(10) 费用不允许小于0, ";
+ }
+ //手术治疗费必须大于等于麻醉费与手术费之和
+ if (YZY133.equals(type) && typeNum == 2) {
+ return "手术治疗费必须大于等于麻醉费与手术费之和, ";
+ }
+ //判断是否有手术病例
+ if (YZY133.equals(type) && typeNum == 3) {
+ return "有手术的病例手术治疗费必须大于0, ";
+ }
+
+ /**
+ * 西药类-西药费(13)
+ */
+ String YZY138 = "YZY138";
+ //判断是否小于0
+ if (YZY138.equals(type) && typeNum == 1) {
+ return "西药类-西药费(13) 费用不允许小于0, ";
+ }
+ //西药费必须大于等于抗菌药物费用
+ if (YZY138.equals(type) && typeNum == 2) {
+ return "西药费必须大于等于抗菌药物费用, ";
+ }
+
+ /**
+ * (其他出院诊断)编码-1
+ */
+ String YZY221 = "YZY221";
+ //其他出院诊断)编码的编码范围应为:A~U开头和Z开头的编码
+ if (YZY221.equals(type) && typeNum == 1) {
+ return "(其他出院诊断)编码的编码范围应为:A~U开头和Z开头的编码, ";
+ }
+ //当主要诊断或者其它诊断编码出现O80-O84编码,且无流产结局编码出现O00-O08编码时,其它诊断编码必须有分娩结局编码Z37
+ if (YZY221.equals(type) && typeNum == 2) {
+ return "当主要诊断或者其它诊断编码出现O80-O84编码,且无流产结局编码出现O00-O08编码时,其它诊断编码必须有分娩结局编码Z37, ";
+ }
+
+ /**
+ * 离院方式
+ */
+ String YZY070 = "YZY070";
+ //判断是否为空
+ if (YZY070.equals(type) && typeNum == 1) {
+ return "离院方式必填, ";
+ }
+ //有“尸体料理费”的患者,“离院方式”都只能为“死亡
+ if (YZY070.equals(type) && typeNum == 1) {
+ return "有“尸体料理费”的患者,“离院方式”都只能为“死亡”, ";
+ }
+
+ /**
+ * 入院时间
+ */
+ String YKC701 = "YKC701";
+ //判断是否为空
+ if (YKC701.equals(type) && typeNum == 1) {
+ return "入院时间必填, ";
+ }
+ //判断入院时间是否小于出院时间
+ if (YKC701.equals(type) && typeNum == 1) {
+ return "入院日期应该小于出院日期, ";
+ }
+ //判断手术操作日期是否大于入院日期,小于出院日期
+ if (YKC701.equals(type) && typeNum == 1) {
+ return "手术操作日期应大于入院日期, ";
+ }
+
+ /**
+ * 出院时间
+ */
+ String YKC702 = "YKC702";
+ //判断是否为空
+ if (YKC702.equals(type) && typeNum == 1) {
+ return "出院时间必填, ";
+ }
+ //判断入院时间是否小于出院时间
+ if (YKC702.equals(type) && typeNum == 1) {
+ return "入院日期应该小于出院日期, ";
+ }
+ //判断手术操作日期是否大于入院日期,小于出院日期
+ if (YKC702.equals(type) && typeNum == 1) {
+ return "手术操作日期应大于入院日期,小于出院日期, ";
+ }
+
+ /**
+ * 主要诊断编码判断
+ */
+ String AKC196 = "AKC196";
+ //Z37不能作为组长
+ if (AKC196.equals(type) && typeNum == 1) {
+ return "Z37不能作为组长, ";
+ }
+ //主要诊断出现C00到C97 D00到D48 附属诊断开头为N 且有斜杆
+ if (AKC196.equals(type) && typeNum == 2) {
+ return "主要诊断出现C00到C97 D00到D48 附属诊断开头为N 且有斜杆, ";
+ }
+
+
+
+
+
+ return null;
+ }
+}
diff --git a/src/main/java/com/ann/demo/entity/filing/DiagDetail.java b/src/main/java/com/ann/demo/entity/filing/DiagDetail.java
index a54631d..76f3ce3 100644
--- a/src/main/java/com/ann/demo/entity/filing/DiagDetail.java
+++ b/src/main/java/com/ann/demo/entity/filing/DiagDetail.java
@@ -24,7 +24,7 @@ public class DiagDetail {
private String masterId;
/**
- * 诊断ID
+ * 诊断ID ICD码
* */
@Id
@Column(name = "diag_code", length = 50)
@@ -46,7 +46,7 @@ public class DiagDetail {
private Integer YZY201;
/**
- * 诊断病名
+ * 诊断名称
* */
@Column(name = "diag_name")
private String AKC185;
diff --git a/src/main/java/com/ann/demo/entity/filing/MedicalRecordHomepage.java b/src/main/java/com/ann/demo/entity/filing/MedicalRecordHomepage.java
index 58cccdd..934b225 100644
--- a/src/main/java/com/ann/demo/entity/filing/MedicalRecordHomepage.java
+++ b/src/main/java/com/ann/demo/entity/filing/MedicalRecordHomepage.java
@@ -27,7 +27,9 @@ public class MedicalRecordHomepage {
*/
private List DiagDetails;
- // 20200525 新增其他节点 用于校验数据
+ /**
+ * 20200525 新增其他节点 用于校验数据
+ */
private OtherData otherData;
}
diff --git a/src/main/java/com/ann/demo/entity/filing/OperDetail.java b/src/main/java/com/ann/demo/entity/filing/OperDetail.java
index 8424423..1d79977 100644
--- a/src/main/java/com/ann/demo/entity/filing/OperDetail.java
+++ b/src/main/java/com/ann/demo/entity/filing/OperDetail.java
@@ -24,26 +24,26 @@ public class OperDetail {
private String masterId;
/**
- *
+ * 诊断序号
*/
@Column(name = "operate_no")
private Integer YZY201;
/**
- * 手术操作编码
+ * 手术码
*/
@Id
@Column(name = "operateCode")
private String YZY207;
/**
- * 手术操作名称
+ * 手术名称
*/
@Column(name = "operateName")
private String YZY208;
/**
- * 手术操作日期
+ * 手术日期
*/
@Column(name = "operateDate")
private Date YZY209;
@@ -55,7 +55,7 @@ public class OperDetail {
private String YZY227;
/**
- * 手术操作术者
+ * 手术医生
*/
@Column(name = "operator")
private String YZY215;
@@ -79,7 +79,7 @@ public class OperDetail {
private String assistant_3;
/**
- * 切口愈合等级
+ * 切口编号
*/
@Column(name = "cut")
private String YZY210;
@@ -88,13 +88,13 @@ public class OperDetail {
* 麻醉方式
*/
@Column(name = "anaesthesia_type")
- private String YZY216;
+ private String YZY217;
/**
* 麻醉医师
*/
@Column(name = "anaesthesia_name")
- private String YZY223;
+ private String YZY224;
/**
* 录入员编号
@@ -122,7 +122,7 @@ public class OperDetail {
private String OPERATION_SCALE;
/**
- *
+ * 是否周期性手术
*/
@Column(name = "chossurg")
private String ChosSurg;
diff --git a/src/main/java/com/ann/demo/entity/filing/OtherData.java b/src/main/java/com/ann/demo/entity/filing/OtherData.java
index 4a376ee..3724e72 100644
--- a/src/main/java/com/ann/demo/entity/filing/OtherData.java
+++ b/src/main/java/com/ann/demo/entity/filing/OtherData.java
@@ -23,94 +23,11 @@ public class OtherData {
*/
private String YZY078;
-
- /**
- * 21 户口地址
- */
- private String AAC010;
-
/**
* 22 户口地址邮编
*/
private String YZY024;
- /**
- * 28 住院总费用
- */
- private String AKC264;
-
- /**
- * 29 治疗类-9-临床物理治疗费
- */
- @Column(name = "lcwlzlf")
- private String YZY132;
-
- /**
- * 30 治疗类-10-麻醉费
- */
- @Column(name = "mzf")
- private String YZY134;
-
-
- /**
- * 31 治疗类-10-手术费
- */
- @Column(name = "ssf")
- private String YZY135;
-
- /**
- * 32 西药类-13-抗菌药物费用
- */
- @Column(name = "kjywfy")
- private String YZY152;
-
- /**
- * 33 综合医疗服务类-一般医疗服务费(1)
- */
- @Column(name = "ybylfwf1")
- private String YZY123;
-
- /**
- * 34 综合医疗服务类-一般治疗操作费(2)
- */
- @Column(name = "ybylfwf2")
- private String YZY124;
-
- /**
- * 35 综合医疗服务类-护理费(3)
- */
- @Column(name = "hlf")
- private String YZY125;
-
- /**
- * 36 综合医疗服务类-其他费用(4)
- */
- @Column(name = "qtfy")
- private String YZY126;
-
- /**
- * 37 诊断类-病理诊断费(5)
- */
- @Column(name = "blzdf")
- private String YZY127;
-
- /**
- * 38 诊断类-实验室诊断费(6)
- */
- @Column(name = "syszdf")
- private String YZY128;
-
- /**
- * 39 诊断类-影像学诊断费(7)
- */
- @Column(name = "yxxzdf")
- private String YZY129;
-
- /**
- * 40 诊断类-临床诊断项目费(8)
- */
- @Column(name = "lczdxmf")
- private String YZY130;
// /**
// * 41 治疗类-非手术治疗项目费(9)-2
@@ -119,12 +36,6 @@ public class OtherData {
// private String YZY132;
- /**
- * 42 治疗类-非手术治疗项目费(9)
- */
- @Column(name = "fsszlxmf")
- private String YZY131;
-
/**
* 43 治疗类-手术治疗费(10)
*/
@@ -132,146 +43,58 @@ public class OtherData {
private String YZY133;
/**
- * 44 康复类-康复费(11)
- */
- @Column(name = "kff")
- private String YZY136;
-
- /**
- * 45 中医类-中医治疗费(12)
- */
- @Column(name = "zyzlf")
- private String YZY137;
-
-
- /**
- * 46 西药类-西药费(13)
- */
- @Column(name = "xyf")
- private String YZY138;
-
- /**
- * 47 中药类-中成药费(14)
+ * 61 主要手术名称
*/
- @Column(name = "zcyf")
- private String YZY153;
-
- /**
- * 48 中药类-中草药费(15)
- */
- @Column(name = "zcyf")
- private String YZY154;
-
- /**
- * 49 血液和血液制品类-血费(16)
- */
- @Column(name = "xf")
- private String YZY139;
-
- /**
- * 50 血液和血液制品类-白蛋白类制品费(17)
- */
- @Column(name = "bdblzpf")
- private String YZY140;
-
- /**
- * 51 血液和血液制品类-球蛋白类制品费(18)
- */
- @Column(name = "qdblzpf")
- private String YZY141;
-
- /**
- * 52 血液和血液制品类-凝血因子类制品费(19)
- */
- @Column(name = "nxyzlzpf")
- private String YZY142;
-
- /**
- * 53 血液和血液制品类-细胞因子类制品费(20)
- */
- @Column(name = "xbyzlzpf")
- private String YZY143;
-
- /**
- * 54 耗材类-检查用一次性医用材料费(21)
- */
- @Column(name = "jcyycxyyclf")
- private String YZY144;
-
- /**
- * 55 耗材类-治疗用一次性医用材料费(22)
- */
- @Column(name = "zlyycxyyclf")
- private String YZY145;
+ @Column(name = "operate_name")
+ private String YZY105;
/**
- * 56 耗材类-手术用一次性医用材料费(23)
+ * (主要手术)切口愈合等级
*/
- @Column(name = "ssyycxyyclf")
- private String YZY146;
+ @Column(name = "cut")
+ private String YZY084;
/**
- * 57 其他类-其他费(24)
+ * 主要手术日期
*/
- @Column(name = "qtf")
- private String YZY155;
+ @Column(name = "operate_date")
+ private String YZY106;
/**
- * 58 自付费用
+ * 主要手术级别
*/
- @Column(name = "zffy")
- private String YZY122;
+ @Column(name = "operate_class")
+ private String YZY108;
/**
- * 59 (主要出院诊断)编码
+ * 主要手术术者
*/
- private String mainDiagCode;
-
-
+ @Column(name = "operator")
+ private String YZY109;
/**
- * 61 (主要手术)名称
+ * (主要手术)麻醉医师
*/
- private String YZY105;
+ @Column(name = "anaesthesia_name")
+ private String YZY112;
/**
- * 62 (主要操作)名称
+ * 62 主要操作名称
*/
private String YZY110;
/**
* 63 (其他出院诊断)编码-1-2
- * 等待确认
- */
-
-
- /**
- * 65 (入院前)颅脑损伤时间
- */
- private String YZY081;
-
- /**
- * 66 (入院后)颅脑损伤时间
*/
- private String YZY082;
+ private String YZY221;
/**
* 67 (主要操作)切口愈合等级
*/
private String YZY083;
- /**
- * 68 (主要手术)切口愈合等级
- */
- private String YZY084;
-
- /**
- * 69 (主要手术)日期
- */
- private String YZY106;
-
/**
* 70 (主要操作)日期
*/
@@ -288,14 +111,14 @@ public class OtherData {
private String pathologyDingName;
/**
- * 71 (主要手术)麻醉方式
+ * 71 主要手术麻醉方式
*/
private String YZY107;
/**
* 78 损伤、中毒的外部原因疾病编码必填
*/
- private String mainDiagCodeOutSideReason;
+ private String YZY091;
/**
* 79 损伤中毒的外部原因编码
@@ -312,21 +135,12 @@ public class OtherData {
*/
private String YZY094;
- /**
- * 82 (主要手术)级别
- */
- private String YZY108;
/**
* 83 病理号 (基于其他病理诊断内容判断病理号不为空 )
*/
private String YZY095;
- /**
- * 85 (主要手术)术者
- */
- private String YZY109;
-
/**
* 86 (主要操作)术者
@@ -334,33 +148,8 @@ public class OtherData {
private String YZY097;
- /**
- * 87 离院方式
- */
- private String YZY070;
-
-
- /**
- * 91 是否有31天内再次入院计划
- */
- private String YZY098;
-
- /**
- * 92 31天内再次入院目的
- */
- private String YZY099;
- /**
- * 98 (主要手术)麻醉医师
- */
- private String YZY112;
-
-
- /**
- * 100 责任护士
- */
- private String YZY103;
diff --git a/src/main/java/com/ann/demo/interfaces/config/SwaggerConfig.java b/src/main/java/com/ann/demo/interfaces/config/SwaggerConfig.java
new file mode 100644
index 0000000..22e7364
--- /dev/null
+++ b/src/main/java/com/ann/demo/interfaces/config/SwaggerConfig.java
@@ -0,0 +1,26 @@
+package com.ann.demo.interfaces.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+/**
+ * @author 王思懿
+ * @创建人 wangsiyi
+ * @创建时间 2020/6/16
+ * @描述
+ */
+@Configuration
+@EnableSwagger2
+public class SwaggerConfig {
+ @Bean
+ public Docket api(){
+ return new Docket(DocumentationType.SWAGGER_2)
+ .select()
+ .apis(RequestHandlerSelectors.any())
+ .build();
+ }
+}
diff --git a/src/main/java/com/ann/demo/repository/MedicalRecordHomepageCacheRepository.java b/src/main/java/com/ann/demo/repository/MedicalRecordHomepageCacheRepository.java
index 74bf93e..10a8a8d 100644
--- a/src/main/java/com/ann/demo/repository/MedicalRecordHomepageCacheRepository.java
+++ b/src/main/java/com/ann/demo/repository/MedicalRecordHomepageCacheRepository.java
@@ -3,8 +3,6 @@ package com.ann.demo.repository;
import com.ann.demo.entity.filing.MedicalRecordHomepageCache;
import com.ann.demo.entity.filing.ids.MedicalRecordHomepageCacheIds;
import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.Modifying;
-import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
/**
@@ -13,6 +11,10 @@ import org.springframework.stereotype.Repository;
*/
@Repository
public interface MedicalRecordHomepageCacheRepository extends JpaRepository {
-
-
+ /**
+ * 根据masterId查询
+ * @param masterId
+ * @return
+ */
+ public MedicalRecordHomepageCache findByMasterId(String masterId);
}
diff --git a/src/main/java/com/ann/demo/service/MedicalRecordHomepageCacheService.java b/src/main/java/com/ann/demo/service/MedicalRecordHomepageCacheService.java
index babcc29..6e65081 100644
--- a/src/main/java/com/ann/demo/service/MedicalRecordHomepageCacheService.java
+++ b/src/main/java/com/ann/demo/service/MedicalRecordHomepageCacheService.java
@@ -6,7 +6,12 @@ package com.ann.demo.service;
* @Date: 2019/9/26 9:26
*/
public interface MedicalRecordHomepageCacheService {
-
+ /**
+ * json
+ * @param masterId
+ * @return
+ */
+ public String handleMedicalRecordHomepageCache(String masterId);
}
diff --git a/src/main/java/com/ann/demo/service/impl/MedicalRecordHomepageCacheServiceImpl.java b/src/main/java/com/ann/demo/service/impl/MedicalRecordHomepageCacheServiceImpl.java
index a55b004..97333fc 100644
--- a/src/main/java/com/ann/demo/service/impl/MedicalRecordHomepageCacheServiceImpl.java
+++ b/src/main/java/com/ann/demo/service/impl/MedicalRecordHomepageCacheServiceImpl.java
@@ -1,16 +1,20 @@
package com.ann.demo.service.impl;
import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.ann.demo.entity.filing.*;
import com.ann.demo.repository.MedicalRecordHomepageCacheRepository;
import com.ann.demo.service.ArchiveMasterService;
import com.ann.demo.service.MedicalRecordHomepageCacheService;
+import org.junit.platform.commons.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-import java.util.List;
+import java.text.SimpleDateFormat;
+import java.util.*;
/**
* @Author: LeiJiaXin
@@ -19,10 +23,1168 @@ import java.util.List;
@Service
public class MedicalRecordHomepageCacheServiceImpl implements MedicalRecordHomepageCacheService {
+ public static final int min = 5;
+ public static final int max = 1000000;
+ public static final int day = 28;
+ public static final int yearDay = 365;
static final Logger logger = LoggerFactory.getLogger(MedicalRecordHomepageCacheServiceImpl.class);
@Autowired
MedicalRecordHomepageCacheRepository medicalRecordHomepageCacheRepository;
+ @Override
+ public String handleMedicalRecordHomepageCache(String masterId) {
+ masterId = "82533508-f706-49bc-bc62-20cb4f5c647f";
+ MedicalRecordHomepageCache mc = medicalRecordHomepageCacheRepository.findByMasterId(masterId);
+ if (null != mc) {
+ StringBuffer stringBuffer = new StringBuffer();
+ String content = mc.getContent();
+ if (StringUtils.isNotBlank(content)) {
+ //获取校验规则的结果
+ stringBuffer.append(ValidationRules(content));
+ return content;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * 规则校验
+ *
+ * @param content
+ * @return
+ */
+ private StringBuffer ValidationRules(String content) {
+ MedicalRecordHomepage mr = JSONObject.parseObject(content, MedicalRecordHomepage.class);
+ CommonTable commonTable = mr.getCommonTable();
+ CommonTable1 commonTable1 = mr.getCommonTable1();
+ List operDetails = mr.getOperDetails();
+ List diagDetails = mr.getDiagDetails();
+ OtherData otherData = mr.getOtherData();
+ StringBuffer stringBuffer = new StringBuffer();
+ ContentRetrunInfo contentRetrunInfo = new ContentRetrunInfo();
+ /**
+ * 新生儿出生体重(可能多胎)
+ */
+ if (YZY072(commonTable, commonTable1, diagDetails)) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY072"));
+ }
+
+ /**
+ * 新生儿入院体重
+ */
+ if (YZY073(commonTable, commonTable1)) {
+ if (0 == commonTable1.getYZY072()) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY073"));
+ }
+ }
+
+ /**
+ * 病案号
+ */
+ if (StringUtils.isBlank(commonTable.getYZY001())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY001"));
+ }
+
+ /**
+ * 年龄-1
+ */
+ if (StringUtils.isBlank(commonTable.getAKC023())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("AKC023", 1));
+ }
+
+ /**
+ * 年龄-2
+ */
+ if (getBetweenDays(commonTable1.getAAC006(), commonTable.getYKC701()) / yearDay < commonTable.getAge() - 1 || getBetweenDays(commonTable1.getAAC006(), commonTable.getYKC701()) / yearDay > commonTable.getAge() + 1) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("AKC023", 2));
+ }
+
+ /**
+ * 不足一周岁年龄(月天)-1
+ */
+ if (AKC023(commonTable1, diagDetails)) {
+ if (getBetweenDays(commonTable1.getAAC006(), commonTable.getYKC701()) > day && !(commonTable.getAge() == 0 && commonTable.getAge_day() <= day)) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("AKC023", 3));
+ }
+ }
+
+ /**
+ * 不足一周岁年龄(月天)-2
+ */
+ if (commonTable.getAge() == 0 && StringUtils.isBlank(commonTable.getAKC023())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("AKC023", 4));
+ }
+
+
+ /**
+ * 出生日期
+ */
+ if (null == commonTable1.getAAC006()) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("AAC006"));
+ }
+
+ /**
+ * 性别-1
+ */
+ if (StringUtils.isBlank(commonTable.getYZY008())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY008", 1));
+ }
+
+ /**
+ * 性别-2
+ */
+ if ("男".equals(commonTable.getYZY008())) {
+ if (YZY008Male(commonTable1, diagDetails)) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY008", 2));
+ }
+ }
+
+ /**
+ * 性别-3
+ */
+ if ("女".equals(commonTable.getYZY008())) {
+ if (YZY008Female(commonTable1, diagDetails)) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY008", 3));
+ }
+ }
+
+ /**
+ * 医疗付费方式
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY074())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY074"));
+ }
+
+ /**
+ * 现住址(省、市、县、街道)
+ */
+ if (StringUtils.isBlank(commonTable.getYZY075())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY075"));
+ }
+
+ /**
+ * 出生地(省、市、县)
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY010())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY010"));
+ }
+
+ /**
+ * 职业
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY016())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY016"));
+ }
+
+ /**
+ * 联系人地址
+ */
+ if (StringUtils.isNotBlank(commonTable1.getAAE004())) {
+ if (StringUtils.isBlank(commonTable1.getYZY027())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY027"));
+ }
+ }
+
+ /**
+ * 联系人电话
+ */
+ if (StringUtils.isNotBlank(commonTable1.getAAE004())) {
+ if (StringUtils.isBlank(commonTable1.getYZY028())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY028"));
+ }
+ }
+
+ /**
+ * 身份证
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY011())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY011"));
+ }
+
+ /**
+ * 住院次数
+ */
+ if (StringUtils.isBlank(commonTable.getYZY002())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY002"));
+ }
+
+ /**
+ * 婚姻
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY018())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY018"));
+ }
+
+ /**
+ * 姓名
+ */
+ if (StringUtils.isBlank(commonTable.getAAC003())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("AAC003"));
+ }
+
+ /**
+ * 民族
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY015())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY015"));
+ }
+
+ /**
+ * 国籍
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY013())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY013"));
+ }
+
+ /**
+ * 籍贯
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY076())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY076"));
+ }
+
+ /**
+ * 组织机构代码
+ */
+ if (StringUtils.isBlank(otherData.getYZY077())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY077"));
+ }
+
+ /**
+ * 医疗机构
+ */
+ if (StringUtils.isBlank(otherData.getYZY078())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY078"));
+ }
+
+ /**
+ * 户口地址(省、市、县、街道)
+ */
+ if (StringUtils.isBlank(commonTable1.getAAC010())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("AAC010"));
+ }
+
+ /**
+ * 户口地址邮编
+ */
+ if (StringUtils.isBlank(otherData.getYZY024())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY024"));
+ }
+
+ /**
+ * 联系人关系
+ */
+ if (StringUtils.isNotBlank(commonTable1.getAAE004())) {
+ if (StringUtils.isBlank(commonTable1.getYZY026())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY026"));
+ }
+ }
+
+ /**
+ * 户口地址邮编
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY079())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY079"));
+ }
+
+ /**
+ * 工作单位电话
+ */
+ if (StringUtils.isNotBlank(commonTable1.getYZY020())) {
+ if (StringUtils.isBlank(commonTable1.getYZY021())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY021"));
+ }
+ }
+
+ /**
+ * 工作单位地址邮编
+ */
+ if (StringUtils.isNotBlank(commonTable1.getYZY020())) {
+ if (StringUtils.isBlank(commonTable1.getYZY022())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY022"));
+ }
+ }
+
+ /**
+ * 现住址邮编
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY080())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY080"));
+ }
+
+ /**
+ * 住院总费用 1
+ */
+ if (StringUtils.isBlank(commonTable1.getAKC264())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("AKC264", 1));
+ }
+
+ /**
+ * 住院总费用 2
+ */
+ if (Double.valueOf(commonTable1.getAKC264()) <= min || Double.valueOf(commonTable1.getAKC264()) >= max) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("AKC264", 2));
+ }
+
+ /**
+ * 治疗类-9-临床物理治疗费
+ */
+ if (Double.valueOf(commonTable1.getYZY132()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY132"));
+ }
+
+ /**
+ * 治疗类-10-麻醉费
+ */
+ if (Double.valueOf(commonTable1.getYZY134()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY134"));
+ }
+
+ /**
+ * 西药类-13-抗菌药物费用
+ */
+ if (Double.valueOf(commonTable1.getYZY152()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY152"));
+ }
+
+ /**
+ * 综合医疗服务类-一般医疗服务费(1)
+ */
+ if (Double.valueOf(commonTable1.getYZY123()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY123"));
+ }
+
+ /**
+ * 综合医疗服务类-一般治疗操作费(2)
+ */
+ if (Double.valueOf(commonTable1.getYZY124()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY124"));
+ }
+
+ /**
+ * 综合医疗服务类-护理费(3)
+ */
+ if (Double.valueOf(commonTable1.getYZY125()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY125"));
+ }
+
+ /**
+ * 综合医疗服务类-其他费用(4)
+ */
+ if (Double.valueOf(commonTable1.getYZY126()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY126"));
+ }
+
+ /**
+ * 诊断类-病理诊断费(5) 1
+ */
+ if (Double.valueOf(commonTable1.getYZY127()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY127", 1));
+ }
+
+ /**
+ * 基于其他病理诊断内容判断诊断类-病理诊断费(5)不为空
+ */
+ List tumourList = Arrays.asList("C00", "C01", "C02", "C03", "C04", "C05", "C06", "C07", "C08", "C09", "C10", "C11", "C12",
+ "C13", "C14", "C15", "C16", "C17", "C18", "C19", "C20", "C21", "C22", "C23", "C24", "C25", "C26", "C27", "C28", "C29", "C30",
+ "C31", "C32", "C33", "C34", "C35", "C36", "C37", "C38", "C39", "C40", "C41", "C42", "C43", "C44", "C45", "C46", "C47", "C48",
+ "C49", "C50", "C51", "C52", "C53", "C54", "C55", "C56", "C57", "C58", "C59", "C60", "C61", "C62", "C63", "C64", "C65", "C66",
+ "C67", "C68", "C69", "C70", "C71", "C72", "C73", "C74", "C75", "C76", "C77", "C78", "C79", "C80", "C81", "C82", "C83", "C84",
+ "C85", "C86", "C87", "C88", "C89", "C90", "C91", "C92", "C93", "C94", "C95", "C96", "C97", "D00", "D01", "D02", "D03", "D04",
+ "D05", "D06", "D07", "D08", "D09", "D10", "D11", "D12", "D13", "D14", "D15", "D16", "D17", "D18", "D19", "D20", "D21", "D22",
+ "D23", "D24", "D25", "D26", "D27", "D28", "D29", "D30", "D31", "D32", "D33", "D34", "D35", "D36", "D37", "D38", "D39", "D40",
+ "D41", "D42", "D43", "D44", "D45", "D46", "D47", "D48");
+ if (YZY127(diagDetails, otherData, tumourList)) {
+ if (StringUtils.isBlank(commonTable1.getYZY127())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY127", 2));
+ }
+ }
+
+ /**
+ * 诊断类-实验室诊断费(6)
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY128())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY128"));
+ }
+
+ /**
+ * 诊断类-影像学诊断费(7)
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY129())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY129"));
+ }
+
+ /**
+ * 治疗类-非手术治疗项目费(9) 1
+ */
+ if (Double.valueOf(commonTable1.getYZY131()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY131", 1));
+ }
+
+ /**
+ * 治疗类-非手术治疗项目费(9) 2
+ */
+ if (Double.valueOf(commonTable1.getYZY131()) < Double.valueOf(commonTable1.getYZY132())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY131", 2));
+ }
+
+ /**
+ * 治疗类-手术治疗费(10) 1
+ */
+ if (Double.valueOf(otherData.getYZY133()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY133", 1));
+ }
+
+ /**
+ * 治疗类-手术治疗费(10) 2
+ */
+ if (Double.valueOf(otherData.getYZY133()) < Double.valueOf(commonTable1.getYZY134()) + Double.valueOf(commonTable1.getYZY135())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY133", 2));
+ }
+
+ /**
+ * 治疗类-手术治疗费(10) 3
+ */
+ if ("有".equals(commonTable.getIsOper()) && StringUtils.isBlank(otherData.getYZY133())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY133", 3));
+ }
+
+ /**
+ * 康复类-康复费(11)
+ */
+ if (Double.valueOf(commonTable1.getYZY136()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY136"));
+ }
+
+ /**
+ * 中医类-中医治疗费(12)
+ */
+ if (Double.valueOf(commonTable1.getYZY137()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY137"));
+ }
+
+ /**
+ * 西药类-西药费(13)-1
+ */
+ if (Double.valueOf(commonTable1.getYZY138()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY138", 1));
+ }
+
+ /**
+ * 西药类-西药费(13)-2
+ */
+ if (Double.valueOf(commonTable1.getYZY138()) < Double.valueOf(commonTable1.getYZY152())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY138", 2));
+ }
+
+ /**
+ * 中药类-中成药费(14)
+ */
+ if (Double.valueOf(commonTable1.getYZY153()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY153"));
+ }
+
+ /**
+ * 中药类-中草药费(15)
+ */
+ if (Double.valueOf(commonTable1.getYZY154()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY154"));
+ }
+
+ /**
+ * 血液和血液制品类-血费(16)
+ */
+ if (Double.valueOf(commonTable1.getYZY139()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY139"));
+ }
+
+ /**
+ * 血液和血液制品类-白蛋白类制品费(17)
+ */
+ if (Double.valueOf(commonTable1.getYZY140()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY140"));
+ }
+
+ /**
+ * 血液和血液制品类-球蛋白类制品费(18)
+ */
+ if (Double.valueOf(commonTable1.getYZY141()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY141"));
+ }
+
+ /**
+ * 血液和血液制品类-凝血因子类制品费(19)
+ */
+ if (Double.valueOf(commonTable1.getYZY142()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY142"));
+ }
+
+ /**
+ * 血液和血液制品类-细胞因子类制品费(20)
+ */
+ if (Double.valueOf(commonTable1.getYZY143()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY143"));
+ }
+
+ /**
+ * 耗材类-检查用一次性医用材料费(21)
+ */
+ if (Double.valueOf(commonTable1.getYZY144()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY144"));
+ }
+
+ /**
+ * 耗材类-治疗用一次性医用材料费(22)
+ */
+ if (Double.valueOf(commonTable1.getYZY145()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY145"));
+ }
+
+ /**
+ * 耗材类-手术用一次性医用材料费(23)
+ */
+ if (Double.valueOf(commonTable1.getYZY146()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY146"));
+ }
+
+ /**
+ * 其他类-其他费(24)
+ */
+ if (Double.valueOf(commonTable1.getYZY155()) < 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY155"));
+ }
+
+ /**
+ * 自付费用
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY122())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY122"));
+ }
+
+ /**
+ * (主要出院诊断)编码
+ */
+ List mainList = Arrays.asList("V", "W", "X", "Y");
+ if (mainList.contains(commonTable.getMainDiagCode().substring(0, 1))) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("mainDiagCode"));
+ }
+
+ /**
+ * (主要出院诊断)名称
+ */
+ if (StringUtils.isBlank(commonTable.getMainDiagName())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("mainDiagName"));
+ }
+
+ /**
+ * (主要手术)名称
+ */
+ if (StringUtils.isNotBlank(otherData.getYZY133()) && StringUtils.isBlank(otherData.getYZY105())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY105"));
+ }
+
+ /**
+ * (主要操作)名称
+ */
+ if (StringUtils.isNotBlank(commonTable1.getYZY129()) && StringUtils.isBlank(otherData.getYZY110())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY110"));
+ }
+
+ /**
+ * (其他出院诊断)编码-1
+ */
+ if (mainList.contains(otherData.getYZY221().substring(0, 1))) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY221", 1));
+ }
+
+ /**
+ * (其他出院诊断)编码-2
+ */
+ if (YZY221(diagDetails)) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY221", 2));
+ }
+
+ /**
+ * Z37不能作为组长
+ */
+ if (AKC196(diagDetails)) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("AKC196", 1));
+ }
+
+ /**
+ * 主要诊断出现C00到C97 D00到D48 附属诊断开头为N 且有斜杆
+ */
+ if (AKC196(diagDetails, tumourList)) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("AKC196", 2));
+ }
+
+
+ /**
+ * (主要出院诊断)入院病情
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY111())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY111"));
+ }
+
+ /**
+ * (入院前)颅脑损伤时间
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY081())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY081"));
+ }
+
+ /**
+ * (入院后)颅脑损伤时间
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY082())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY082"));
+ }
+
+ /**
+ * (主要操作)切口愈合等级
+ */
+ if (StringUtils.isNotBlank(commonTable1.getYZY129()) && StringUtils.isBlank(otherData.getYZY083())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY083"));
+ }
+
+ /**
+ * (主要手术)切口愈合等级
+ */
+ if (StringUtils.isNotBlank(otherData.getYZY133()) && StringUtils.isBlank(otherData.getYZY084())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY084"));
+ }
+
+ /**
+ * (主要手术)日期
+ */
+ if (StringUtils.isNotBlank(otherData.getYZY133()) && StringUtils.isBlank(otherData.getYZY106())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY106"));
+ }
+
+ /**
+ * (主要操作)日期
+ */
+ if (StringUtils.isNotBlank(commonTable1.getYZY129()) && StringUtils.isBlank(otherData.getYZY085())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY085"));
+ }
+
+ /**
+ * 基于其他病理诊断内容判断病理诊断编码不为空
+ */
+ if (pathologyDingCode(commonTable1, diagDetails, tumourList, otherData)) {
+ if (StringUtils.isBlank(otherData.getPathologyDingCode())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("pathologyDingCode"));
+ }
+ }
+
+ /**
+ * 基于其他病理诊断内容判断病理诊断不为空
+ */
+ if (pathologyDingCode(commonTable1, diagDetails, tumourList, otherData)) {
+ if (StringUtils.isBlank(otherData.getPathologyDingName())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("pathologyDingName"));
+ }
+ }
+
+ /**
+ * (主要手术)麻醉方式
+ */
+ if (StringUtils.isNotBlank(commonTable1.getYZY134()) && StringUtils.isBlank(otherData.getYZY107())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY107"));
+ }
+
+ /**
+ * 门急诊诊断编码
+ */
+ if (mainList.contains(commonTable1.getYZY113().substring(0, 1))) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY113"));
+ }
+
+ /**
+ * 门急诊诊断
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY114())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY114"));
+ }
+
+ /**
+ * 过敏药物
+ */
+ if (StringUtils.isNotBlank(commonTable1.getIs_medicine()) && StringUtils.isBlank(commonTable1.getYZY046())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY046"));
+ }
+
+ /**
+ * 死亡患者是否尸检
+ */
+ if ("死亡".equals(commonTable1.getYZY070()) && StringUtils.isBlank(commonTable1.getYZY089())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY089"));
+ }
+
+ /**
+ * ABO血型
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY090())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY090"));
+ }
+
+ /**
+ * 有无药物过敏
+ */
+ if (StringUtils.isBlank(commonTable1.getIs_medicine())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("is_medicine"));
+ }
+
+ /**
+ * 损伤、中毒的外部原因疾病编码必填
+ */
+ if ("S".equals(commonTable.getMainDiagCode().substring(0, 1)) || "T".equals(commonTable.getMainDiagCode().substring(0, 1))) {
+ if (StringUtils.isBlank(otherData.getYZY091())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY091"));
+ }
+ }
+
+ /**
+ * 损伤中毒的外部原因编码
+ */
+ if (YZY092(diagDetails, mainList)) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY092"));
+ }
+
+ /**
+ * 损伤、中毒的外部原因必填
+ */
+ if ("S".equals(commonTable.getMainDiagCode().substring(0, 1)) || "T".equals(commonTable.getMainDiagCode().substring(0, 1))) {
+ if (StringUtils.isBlank(otherData.getYZY093())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY093"));
+ }
+ }
+
+ /**
+ * (主要操作)级别
+ */
+ if (StringUtils.isNotBlank(commonTable1.getYZY129()) && StringUtils.isBlank(otherData.getYZY094())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY094"));
+ }
+
+ /**
+ * (主要手术)级别
+ */
+ if (StringUtils.isNotBlank(otherData.getYZY133()) && StringUtils.isBlank(otherData.getYZY108())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY108"));
+ }
+
+ /**
+ * 基于其他病理诊断内容判断病理号不为空
+ */
+ if (YZY095(commonTable1, diagDetails, tumourList, otherData)) {
+ if (StringUtils.isBlank(otherData.getYZY095())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY095"));
+ }
+ }
+
+ /**
+ * Rh血型
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY096())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY096"));
+ }
+
+ /**
+ * (主要手术)术者
+ */
+ if (StringUtils.isNotBlank(otherData.getYZY133()) && StringUtils.isBlank(otherData.getYZY109())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY109"));
+ }
+
+ /**
+ * (主要操作)术者
+ */
+ if (StringUtils.isNotBlank(commonTable1.getYZY129()) && StringUtils.isBlank(otherData.getYZY097())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY097"));
+ }
+
+ /**
+ * 离院方式-1
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY070())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY070"));
+ }
+
+ /**
+ * 离院方式-2
+ */
+
+
+ /**
+ * 入院时间-1
+ */
+ if (null == commonTable.getYKC701()) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YKC701", 1));
+ }
+
+ /**
+ * 入院时间-2
+ */
+ if (commonTable.getYKC701().compareTo(commonTable.getYKC702()) > 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YKC701", 2));
+ }
+
+ /**
+ * 入院时间-3
+ */
+ if (commonTable.getYKC701().getTime() <= Long.valueOf(otherData.getYZY106())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YKC701", 3));
+ }
+
+ /**
+ * 出院时间-1
+ */
+ if (null == commonTable.getYKC702()) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YKC702", 1));
+ }
+
+ /**
+ * 出院时间-2
+ */
+ if (commonTable.getYKC701().compareTo(commonTable.getYKC702()) > 0) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YKC702", 2));
+ }
+
+ /**
+ * 出院时间-3
+ */
+ if (commonTable.getYKC701().getTime() <= Long.valueOf(otherData.getYZY106()) && Long.valueOf(otherData.getYZY106()) <= commonTable.getYKC702().getTime()) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YKC702", 3));
+ }
+
+
+ /**
+ * 是否有31天内再次入院计划
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY098())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY098"));
+ }
+
+ /**
+ * 31天内再次入院目的
+ */
+ if (StringUtils.isNotBlank(commonTable1.getYZY098()) && StringUtils.isBlank(commonTable1.getYZY099())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY099"));
+ }
+
+ /**
+ * 转科科别
+ */
+ if (commonTable1.getYZY033().equals(commonTable.getYZY038())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY101"));
+ }
+
+ /**
+ * 主任(副主任)医师
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY052())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY052"));
+ }
+
+ /**
+ * 编码员
+ */
+ if (StringUtils.isBlank(commonTable1.getYZY062())) {
+ stringBuffer.append(contentRetrunInfo.getReturnInfo("YZY062"));
+ }
+
+
+ return stringBuffer;
+ }
+
+ /**
+ * 新生儿出生体重(可能多胎)判断
+ *
+ * @param commonTable
+ * @param commonTable1
+ * @param diagDetails
+ * @return
+ */
+ private Boolean YZY072(CommonTable commonTable, CommonTable1 commonTable1, List diagDetails) {
+ if (commonTable.getAge() == 0 && commonTable.getAge_month() == 0 && commonTable.getAge_day() <= 28) {
+ return true;
+ }
+ if (getBetweenDays(commonTable1.getAAC006(), commonTable.getYKC701()) <= 28) {
+ return true;
+ }
+ for (DiagDetail diagDetail : diagDetails) {
+ if (!"3".equals(diagDetail.getYZY203()) && diagDetail.getYZY201() != 1 && "Z37".equals(diagDetail.getAKC196().substring(0, 3))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * 新生儿入院体重 判断
+ *
+ * @param commonTable
+ * @param commonTable1
+ * @return
+ */
+ private Boolean YZY073(CommonTable commonTable, CommonTable1 commonTable1) {
+ if (commonTable.getAge() == 0 && commonTable.getAge_month() == 0 && commonTable.getAge_day() <= 28) {
+ return true;
+ }
+ if (getBetweenDays(commonTable1.getAAC006(), commonTable.getYKC701()) <= 28) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * 不足一周岁年龄(月天)-1 判断
+ *
+ * @param commonTable1
+ * @param diagDetails
+ * @return
+ */
+ private Boolean AKC023(CommonTable1 commonTable1, List diagDetails) {
+ //判断区间
+ List ageList = Arrays.asList("P10", "P11", "P12", "P13", "P14", "P15");
+ //门急诊诊断编码判断
+ if (ageList.contains(commonTable1.getYZY113().substring(0, 3))) {
+ return true;
+ }
+ //主要诊断,其他诊断判断
+ for (DiagDetail diagDetail : diagDetails) {
+ if (ageList.contains(diagDetail.getAKC196().substring(0, 3))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * 性别-2 判断
+ *
+ * @param commonTable1
+ * @param diagDetails
+ * @return
+ */
+ private Boolean YZY008Male(CommonTable1 commonTable1, List diagDetails) {
+ //编码区间
+ List maleList1 = Arrays.asList("A34", "C51", "C52", "C53", "C54", "C55", "C56", "C57", "C58", "D06", "D25", "D26", "D27", "D28", "D39", "E28", "F53",
+ "N70", "N71", "N72", "N73", "N74", "N75", "N76", "N77", "N78", "N79", "N80", "N81", "N82", "N83", "N84", "N85", "N86", "N87", "N88", "N89", "N90", "N91",
+ "N92", "N93", "N94", "N95", "N96", "N97", "N98", "O00", "O01", "O02", "O03", "O04", "O05", "O06", "O07", "O08", "O09", "O10", "O11", "O12", "O13", "O14",
+ "O15", "O16", "O17", "O18", "O19", "O20", "O21", "O22", "O23", "O24", "O25", "O26", "O27", "O28", "O29", "O30", "O31", "O32", "O33", "O34", "O35", "O36",
+ "O37", "O38", "O39", "O40", "O41", "O42", "O43", "O44", "O45", "O46", "O47", "O48", "O49", "O50", "O51", "O52", "O53", "O54", "O55", "O56", "O57", "O58",
+ "O59", "O60", "O61", "O62", "O63", "O64", "O65", "O66", "O67", "O68", "O69", "O70", "O71", "O72", "O73", "O74", "O75", "O76", "O77", "O78", "O79", "O80",
+ "O81", "O82", "O83", "O84", "O85", "O86", "O87", "O88", "O89", "O90", "O91", "O92", "O93", "O94", "O95", "O96", "O97", "O98", "O99", "Q50", "Q51", "Q52",
+ "R87", "Z32", "Z33", "Z34", "Z35", "Z36", "Z37", "Z39");
+ List maleList2 = Arrays.asList("B37.3", "C79.6", "D07.0", "D07.1", "D07.2", "D07.3", "E89.4", "F52.5", "I86.3", "L29.2", "M80.0", "M80.1", "M81.0", "M81.1",
+ "M83.0", "N99.2", "N99.3", "P54.6", "S31.4", "S37.4", "S37.5", "S37.6", "T19.2", "T19.3", "T83.3", "Z01.4", "Z12.4", "Z30.1", "Z30.3", "Z30.5", "Z31.1",
+ "Z31.2", "Z87.5", "Z97.5");
+ //门急诊诊断编码判断
+ if (maleList1.contains(commonTable1.getYZY113().substring(0, 3)) || maleList2.contains(commonTable1.getYZY113().substring(0, 5))) {
+ return true;
+ }
+ //主要诊断,其他诊断判断
+ for (DiagDetail diagDetail : diagDetails) {
+ if (maleList1.contains(diagDetail.getAKC196().substring(0, 3)) || maleList2.contains(diagDetail.getAKC196().substring(0, 5))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * 性别-3 判断
+ *
+ * @param commonTable1
+ * @param diagDetails
+ * @return
+ */
+ private Boolean YZY008Female(CommonTable1 commonTable1, List diagDetails) {
+ //编码区间
+ List femaleList1 = Arrays.asList("C60", "C61", "C62", "C63", "D29", "D40", "E29", "N40", "N41", "N42", "N43", "N44", "N45", "N46", "N47", "N48",
+ "N49", "N50", "N51", "Q53", "Q54", "Q55", "R86");
+ List femaleList2 = Arrays.asList("B26.0", "D07.4", "D07.6", "D17.6", "E89.5", "F52.4", "I86.1", "L29.1", "S31.2", "S31.2", "Z12.5");
+ //门急诊诊断编码判断
+ if (femaleList1.contains(commonTable1.getYZY113().substring(0, 3)) || femaleList2.contains(commonTable1.getYZY113().substring(0, 5))) {
+ return true;
+ }
+ //主要诊断,其他诊断判断
+ for (DiagDetail diagDetail : diagDetails) {
+ if (femaleList1.contains(diagDetail.getAKC196().substring(0, 3)) || femaleList2.contains(diagDetail.getAKC196().substring(0, 5))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * (其他出院诊断)编码-2 判断
+ *
+ * @param diagDetails
+ * @return
+ */
+ private Boolean YZY221(List diagDetails) {
+ //编码区间
+ List codeList1 = Arrays.asList("O80", "O81", "O82", "O83", "O84");
+ List codeList2 = Arrays.asList("O00", "O01", "O02", "O03", "O04", "O05", "O06", "O07", "O08");
+ //主要诊断,其他诊断判断
+ for (DiagDetail diagDetail : diagDetails) {
+ if (codeList1.contains(diagDetail.getAKC196().substring(0, 3))) {
+ if (!"3".equals(diagDetail.getYZY203()) && diagDetail.getYZY201() != 1 && codeList2.contains(diagDetail.getAKC196().substring(0, 3))) {
+ for (DiagDetail diagDetail2 : diagDetails) {
+ if ("Z37".equals(diagDetail2.getAKC196().substring(0, 3))) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * 当主要诊断编码的范围在 S00 到 T98 之间时,其他诊断编码的必须为V, W, X, Y开头
+ * @param diagDetails
+ * @param mainList
+ * @return
+ */
+ private Boolean YZY092(List diagDetails, List mainList) {
+ List codeList = new ArrayList();
+ for (int i = 0; i < 100; i++) {
+ if (i >= 0 && i <= 9) {
+ codeList.add("D0" + i);
+ } else {
+ codeList.add("D" + i);
+ }
+ }
+ for (int j = 0; j < 99; j++) {
+ if (j >= 0 && j <= 9) {
+ codeList.add("T0" + j);
+ } else {
+ codeList.add("T" + j);
+ }
+ }
+ for (DiagDetail diagDetail : diagDetails) {
+ if ("3".equals(diagDetail.getYZY203()) && diagDetail.getYZY201() == 1 && codeList.contains(diagDetail.getAKC196().substring(0, 3))) {
+ for (DiagDetail diagDetail2 : diagDetails) {
+ if (!"3".equals(diagDetail.getYZY203()) && diagDetail.getYZY201() != 1 && !mainList.contains(diagDetail.getAKC196().substring(0, 3))) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Z37不能作为组长
+ *
+ * @param diagDetails
+ * @return
+ */
+ private Boolean AKC196(List diagDetails) {
+ for (DiagDetail diagDetail : diagDetails) {
+ if ("3".equals(diagDetail.getYZY203()) && diagDetail.getYZY201() == 1 && "Z37".equals(diagDetail.getAKC196().substring(0, 3))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * 主要诊断出现C00到C97 D00到D48 附属诊断开头为N 且有斜杆
+ *
+ * @param diagDetails
+ * @return
+ */
+ private Boolean AKC196(List diagDetails, List tumourList) {
+ for (DiagDetail diagDetail : diagDetails) {
+ if ("3".equals(diagDetail.getYZY203()) && diagDetail.getYZY201() == 1 && tumourList.contains(diagDetail.getAKC196().substring(0, 3))) {
+ for (DiagDetail diagDetail1 : diagDetails) {
+ if (!"3".equals(diagDetail.getYZY203()) && diagDetail.getYZY201() != 1 && !tumourList.contains(diagDetail.getAKC196().substring(0, 1))) {
+
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * 基于其他病理诊断内容判断诊断类-病理诊断费(5)不为空 判断
+ * @param diagDetails
+ * @param otherData
+ * @param tumourList
+ * @return
+ */
+ private Boolean YZY127(List diagDetails, OtherData otherData, List tumourList){
+ for (DiagDetail diagDetail : diagDetails) {
+ if ("3".equals(diagDetail.getYZY203()) && diagDetail.getYZY201() == 1 && tumourList.contains(diagDetail.getAKC196().substring(0, 3))) {
+ if (StringUtils.isNotBlank(otherData.getYZY095()) || StringUtils.isNotBlank(otherData.getPathologyDingCode()) || StringUtils.isNotBlank(otherData.getPathologyDingName())) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * 基于其他病理诊断内容判断病理诊断编码不为空 判断
+ * @param commonTable1
+ * @param diagDetails
+ * @param tumourList
+ * @param otherData
+ * @return
+ */
+ private Boolean pathologyDingCode(CommonTable1 commonTable1, List diagDetails, List tumourList, OtherData otherData) {
+ for (DiagDetail diagDetail : diagDetails) {
+ if ("3".equals(diagDetail.getYZY203()) && diagDetail.getYZY201() == 1 && tumourList.contains(diagDetail.getAKC196().substring(0, 3))) {
+ if (StringUtils.isNotBlank(otherData.getYZY095()) || StringUtils.isNotBlank(otherData.getPathologyDingName()) || StringUtils.isNotBlank(commonTable1.getYZY127())) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * 基于其他病理诊断内容判断病理号不为空 判断
+ * @param commonTable1
+ * @param diagDetails
+ * @param tumourList
+ * @param otherData
+ * @return
+ */
+ private Boolean YZY095(CommonTable1 commonTable1, List diagDetails, List tumourList, OtherData otherData){
+ for (DiagDetail diagDetail : diagDetails) {
+ if ("3".equals(diagDetail.getYZY203()) && diagDetail.getYZY201() == 1 && tumourList.contains(diagDetail.getAKC196().substring(0, 3))) {
+ if (StringUtils.isNotBlank(otherData.getPathologyDingName()) || StringUtils.isNotBlank(otherData.getPathologyDingCode()) || StringUtils.isNotBlank(commonTable1.getYZY127())) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * 判断两个日期之间天数天数
+ *
+ * @param startTime
+ * @param endTime
+ * @return
+ */
+ private int getBetweenDays(Date startTime, Date endTime) {
+ int betweenDays = 0;
+
+ long start = startTime.getTime();
+ long end = endTime.getTime();
+
+ betweenDays = (int) (Math.abs(end - start) / (24 * 3600 * 1000));
+ return betweenDays;
+ }
+
}
diff --git a/src/main/java/com/ann/demo/util/JsonController.java b/src/main/java/com/ann/demo/util/JsonController.java
new file mode 100644
index 0000000..9a2ddb1
--- /dev/null
+++ b/src/main/java/com/ann/demo/util/JsonController.java
@@ -0,0 +1,23 @@
+package com.ann.demo.util;
+
+import com.ann.demo.service.MedicalRecordHomepageCacheService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @创建人 wangsiyi
+ * @创建时间 2020/6/16
+ * @描述
+ */
+@RestController
+public class JsonController {
+
+ @Autowired
+ private MedicalRecordHomepageCacheService mServer;
+
+ @RequestMapping("json")
+ public String getJsonController(String masterId){
+ return mServer.handleMedicalRecordHomepageCache(masterId);
+ }
+}
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 1ebe465..23c442f 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -1,13 +1,16 @@
spring:
datasource:
- #url: jdbc:sqlserver://120.27.212.36:1433;DatabaseName=emr_record
- url: jdbc:sqlserver://10.6.1.127:1433;DatabaseName=DB_PrivilegeManagement_GYFY
- username: sa
- password: docus@702
- driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
- jpa:
- hibernate:
- dialect: org.hibernate.dialect.SQLServer2008Dialect
+ url: jdbc:mysql://localhost:3306/test?serverTimezone=UTC&characterEncoding=utf8&useUnicode=true&useSSL=false
+ # url: jdbc:mysql://10.6.1.127:3306/test
+ username: root
+ password: 123456
+ driver-class-name: com.mysql.jdbc.Driver
+ jpa:
+ database: mysql
+ show-sql: false
+ hibernate:
+ ddl-auto: update
+ database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
hikari:
#是否为只读数据库
diff --git a/src/test/java/com/ann/demo/service/impl/MedicalRecordHomepageCacheServiceImplTest.java b/src/test/java/com/ann/demo/service/impl/MedicalRecordHomepageCacheServiceImplTest.java
new file mode 100644
index 0000000..dbead76
--- /dev/null
+++ b/src/test/java/com/ann/demo/service/impl/MedicalRecordHomepageCacheServiceImplTest.java
@@ -0,0 +1,7 @@
+package com.ann.demo.service.impl;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+class MedicalRecordHomepageCacheServiceImplTest {
+
+}
\ No newline at end of file