Переглянути джерело

PHR 处方医嘱
LAB 化验医嘱
RAD 放射医嘱
NSC 治疗处治
OP 手术
ANE 麻醉
EXA 检查
FOD 饮食
ADM 入院
DIS 出院
D 处方医嘱(西)
Z 处方医嘱(中)
M 卫生材料
F 收费项目
O 医嘱
Y 处方医嘱(中成药)

lantone 5 роки тому
батько
коміт
860c59b733

+ 57 - 0
src/main/java/com/diagbot/enums/data/DaPrescriptionEnum.java

@@ -0,0 +1,57 @@
+package com.diagbot.enums.data;
+
+import lombok.Setter;
+
+public enum DaPrescriptionEnum implements AKeyedNamed {
+    PHR_PRESCRIPTION("PHR", "处方医嘱"),
+    LAB_PRESCRIPTION("LAB", "化验医嘱"),
+    RAD_PRESCRIPTION("RAD", "放射医嘱"),
+    M_PRESCRIPTION("M", "卫生材料"),
+    Y_PRESCRIPTION("Y", "处方医嘱(中成药)"),
+    O_PRESCRIPTION("O", "医嘱"),
+    F_PRESCRIPTION("F", "收费项目"),
+    Z_PRESCRIPTION("Z", "处方医嘱(中)"),
+    D_PRESCRIPTION("D", "处方医嘱(西)"),
+    DIS_PRESCRIPTION("DIS", "出院"),
+    ADM_PRESCRIPTION("ADM", "入院"),
+    FOD_PRESCRIPTION("FOD", "饮食"),
+    EXA_PRESCRIPTION("EXA", "检查"),
+    ANE_PRESCRIPTION("ANE", "麻醉"),
+    OP_PRESCRIPTION("OP", "手术"),
+    NSC_PRESCRIPTION("NSC", "治疗处治");
+
+    @Setter
+    private String key;
+
+    @Setter
+    private String name;
+
+    DaPrescriptionEnum(String key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static DaPrescriptionEnum getEnum(String key) {
+        for (DaPrescriptionEnum item : DaPrescriptionEnum.values()) {
+            if (key.equals(item.getKey())) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(String key) {
+        DaPrescriptionEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public String getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 45 - 0
src/main/java/com/diagbot/enums/data/DoctorAdviceTypeEnum.java

@@ -0,0 +1,45 @@
+package com.diagbot.enums.data;
+
+import lombok.Setter;
+
+public enum DoctorAdviceTypeEnum implements AKeyedNamed {
+    C_ADVICE("C", "出院带药"),
+    R_ADVICE("R", "长期医嘱"),
+    S_ADVICE("S", "临时医嘱"),
+    E_ADVICE("E", "紧急临时医嘱");
+
+    @Setter
+    private String key;
+
+    @Setter
+    private String name;
+
+    DoctorAdviceTypeEnum(String key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static DoctorAdviceTypeEnum getEnum(String key) {
+        for (DoctorAdviceTypeEnum item : DoctorAdviceTypeEnum.values()) {
+            if (key.equals(item.getKey())) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(String key) {
+        DoctorAdviceTypeEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public String getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 8 - 0
src/main/java/com/diagbot/facade/data/ADoctorAdviceFacade.java

@@ -7,6 +7,8 @@ import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.ADoctorAdviceDTO;
 import com.diagbot.entity.DoctorAdvice;
 import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.enums.data.DaPrescriptionEnum;
+import com.diagbot.enums.data.DoctorAdviceTypeEnum;
 import com.diagbot.service.impl.DoctorAdviceServiceImpl;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.DateUtil;
@@ -79,6 +81,12 @@ public class ADoctorAdviceFacade extends DoctorAdviceServiceImpl{
                     if(StringUtil.isNotBlank(s.getDaStopDate())){
                         doctorAdvice.setDaStopDate(DateUtil.parseDateTime(s.getDaStopDate()));
                     }
+                    if(StringUtil.isNotEmpty(s.getDoctorAdviceType())){
+                        doctorAdvice.setDoctorAdviceType(DoctorAdviceTypeEnum.getName(s.getDoctorAdviceType().toUpperCase()));
+                    }
+                    if(StringUtil.isNotEmpty(s.getDaPrescriptionType())){
+                        doctorAdvice.setDaPrescriptionType(DaPrescriptionEnum.getName(s.getDaPrescriptionType().toUpperCase()));
+                    }
                     doctorAdviceList.add(doctorAdvice);
                 });
                 execute(doctorAdviceList);

+ 3 - 3
src/main/resources/application-local.yml

@@ -1,5 +1,5 @@
 server:
-  port: 5656
+  port: 5858
   max-http-header-size: 10MB
 
 hystrix:
@@ -59,7 +59,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.100.157:3306/qc-5656?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+      url: jdbc:mysql://192.168.3.5:3306/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
       username: root
       password: lantone
       # 连接池的配置信息
@@ -111,7 +111,7 @@ spring:
     database:
       cache: 8 # cache索引
       token: 8 # Token索引
-    host: 192.168.100.157  #Redis服务器地址
+    host: 192.168.2.132  #Redis服务器地址
     port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
     password: lantone # Redis服务器连接密码(默认为空)
     lettuce: