Commit c923ee664a55ae29084c765c94e1642ed8a67948

Authored by liquanyu
1 parent 2c2cff237d

高危诊断配置

Showing 6 changed files with 299 additions and 36 deletions

platform-common/src/main/java/com/lyms/platform/common/enums/DiagnoseEnums.java View file @ c923ee6
... ... @@ -27,7 +27,8 @@
27 27 jws(14, "既往史"),
28 28 crbs(15, "传染病史"),
29 29 ckjc(16, "产科检查"),
30   - bc(17, "B超");
  30 + bc(17, "B超"),
  31 + BCRSQK(18, "本次妊娠情况");
31 32 private DiagnoseItemEnums(int id, String title) {
32 33 this.id = id;
33 34 this.title = title;
... ... @@ -110,7 +111,8 @@
110 111 SZ(1, "数值比较"),
111 112 WZ(2, "文字包含"),
112 113 SF(3, "是否选择"),
113   - XL(4, "下拉选择");
  114 + XL(4, "下拉选择"),
  115 + WZJ(5, "无子集");
114 116  
115 117 private TypeEnums(int id, String title) {
116 118 this.id = id;
... ... @@ -208,7 +210,7 @@
208 210 CXGQT(6, "其他",5,TypeEnums.WZ.getId(),0,""),
209 211  
210 212 //辅助检查——血型
211   - RHXX(7, "RH血型",6,TypeEnums.SF.getId(),0,""),
  213 + RHXX(7, "RH血型——阳性(+)",6,TypeEnums.WZJ.getId(),0,""),
212 214 XT(8, "血糖",6,TypeEnums.SZ.getId(),0,"mmol/L"),
213 215  
214 216  
215 217  
216 218  
217 219  
... ... @@ -221,24 +223,27 @@
221 223 GGNBG(14, "丙肝",7,TypeEnums.SF.getId(),1,""),
222 224  
223 225 // 辅助检查——乙肝五项
224   - YGBMKY(15, "乙肝表面抗原",8,TypeEnums.SF.getId(),0,""),
225   - YGBMKT(16, "乙肝表面抗体",8,TypeEnums.SZ.getId(),0,""),
226   - YGEKY(17, "乙肝e抗原",8,TypeEnums.SZ.getId(),0,""),
227   - YGEKT(18, "乙肝e抗体",8,TypeEnums.SZ.getId(),0,""),
228   - YGKXKT(19, "乙肝核心抗体",8,TypeEnums.SZ.getId(),0,""),
  226 + YGBMKY(15, "乙肝表面抗原——阳性(+)",8,TypeEnums.WZJ.getId(),1,""),
  227 + YGBMKT(16, "乙肝表面抗体——阳性(+)",8,TypeEnums.WZJ.getId(),1,""),
  228 + YGEKY(17, "乙肝e抗原——阳性(+)",8,TypeEnums.WZJ.getId(),1,""),
  229 + YGEKT(18, "乙肝e抗体——阳性(+)",8,TypeEnums.WZJ.getId(),1,""),
  230 + YGKXKT(19, "乙肝核心抗体——阳性(+)",8,TypeEnums.WZJ.getId(),1,""),
229 231  
230 232 //辅助检查——肾功能
231 233 XQJG(20, "血清肌酐",9,TypeEnums.SZ.getId(),0,"μmol/L"),
232 234 XNXD(21, "血尿素氮",9,TypeEnums.SZ.getId(),0,"mmol/L"),
233 235  
234 236 //辅助检查——梅毒血清实验
235   - SYJG(22, "实验结果",10,TypeEnums.SF.getId(),1,""),
236   - HIVKTJC(23, "HIV抗体检测",10,TypeEnums.SF.getId(),1,""),
  237 + SYJGYXYQZ(22, "实验结果——阳性(+)已确诊 ",10,TypeEnums.WZJ.getId(),1,""),
  238 + SYJGYXCZJG(23, "实验结果——阳性(+)初诊结果 ",10,TypeEnums.WZJ.getId(),1,""),
237 239  
  240 + HIVYQZ(63, "HIV抗体检测——阳性(+)已确诊",10,TypeEnums.WZJ.getId(),1,""),
  241 + HIVCZJG(64, "HIV抗体检测——阳性(+)初诊结果",10,TypeEnums.WZJ.getId(),1,""),
  242 +
238 243 //妇科手术史(盆腔手术史)
239   - YWRSSS(24, "异位妊娠手术",11,TypeEnums.SF.getId(),1,""),
240   - ZGJLXC(25, "子宫肌瘤剥除",11,TypeEnums.SF.getId(),1,""),
241   - PGC(26, "剖宫产",11,TypeEnums.SF.getId(),1,""),
  244 + YWRSSS(24, "异位妊娠手术",11,TypeEnums.WZJ.getId(),1,""),
  245 + ZGJLXC(25, "子宫肌瘤剥除",11,TypeEnums.WZJ.getId(),1,""),
  246 + PGC(26, "剖宫产",11,TypeEnums.WZJ.getId(),1,""),
242 247 FKSSSQT(27, "其他",11,TypeEnums.WZ.getId(),0,""),
243 248  
244 249 //孕产史
... ... @@ -263,10 +268,10 @@
263 268 JWSQT(42, "其他",14,TypeEnums.WZ.getId(),0,""),
264 269  
265 270 //传染病史
266   - YG(43, "乙肝",15,TypeEnums.SF.getId(),0,""),
267   - BG(44, "丙肝",15,TypeEnums.SF.getId(),0,""),
268   - AZ(45, "艾滋",15,TypeEnums.SF.getId(),0,""),
269   - MD(46, "梅毒",15,TypeEnums.SF.getId(),0,""),
  271 + YG(43, "乙肝",15,TypeEnums.WZJ.getId(),1,""),
  272 + BG(44, "丙肝",15,TypeEnums.WZJ.getId(),1,""),
  273 + AZ(45, "艾滋",15,TypeEnums.WZJ.getId(),1,""),
  274 + MD(46, "梅毒",15,TypeEnums.WZJ.getId(),1,""),
270 275 CRBSQT(47, "其他",15,TypeEnums.WZ.getId(),0,""),
271 276  
272 277 //产科检查
273 278  
... ... @@ -277,8 +282,18 @@
277 282 TSLYST(52, "胎数>双胎",16,TypeEnums.WZ.getId(),0,""),
278 283  
279 284 //B超
280   - BC(53, "B超",17,TypeEnums.WZ.getId(),0,"");
  285 + BC(53, "B超",17,TypeEnums.WZ.getId(),0,""),
281 286  
  287 + //本次妊娠情况
  288 + EX(54, "恶心",18,TypeEnums.WZ.getId(),0,""),
  289 + OT(55, "呕吐",18,TypeEnums.WZ.getId(),0,""),
  290 + YH(56, "眼花",18,TypeEnums.WZ.getId(),0,""),
  291 + XM(57, "胸闷",18,TypeEnums.WZ.getId(),0,""),
  292 + FUZ(58, "浮肿",18,TypeEnums.WZ.getId(),0,""),
  293 + YDCX(59, "阴道出血",18,TypeEnums.WZ.getId(),0,""),
  294 + FT(60, "腹痛",18,TypeEnums.WZ.getId(),0,""),
  295 + TT(61, "头痛",18,TypeEnums.WZ.getId(),0,""),
  296 + FBXZG(62, "腹部下坠感",18,TypeEnums.WZ.getId(),0,"");
282 297  
283 298 private DiagnoseDetailItemEnums(int id, String title,Integer parentId,Integer type,Integer isRepeat,String unit) {
284 299 this.id = id;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DiagnoseConfigFacde.java View file @ c923ee6
... ... @@ -3,9 +3,12 @@
3 3 import com.lyms.platform.biz.service.DiagnoseConfigService;
4 4 import com.lyms.platform.common.constants.ErrorCodeConstants;
5 5 import com.lyms.platform.common.enums.OptActionEnums;
  6 +import com.lyms.platform.common.result.BaseObjectResponse;
6 7 import com.lyms.platform.common.result.BaseResponse;
7 8 import com.lyms.platform.common.utils.StringUtils;
8 9 import com.lyms.platform.operate.web.request.DiagnoseConfigRequest;
  10 +import com.lyms.platform.operate.web.result.DiagnoseConfigResult;
  11 +import com.lyms.platform.operate.web.result.DiagnoseItemResult;
9 12 import com.lyms.platform.pojo.DiagnoseConfigModel;
10 13 import com.lyms.platform.pojo.DiagnoseItemModel;
11 14 import com.lyms.platform.query.DiagnoseConfigQuery;
... ... @@ -14,6 +17,7 @@
14 17 import org.springframework.beans.factory.annotation.Autowired;
15 18 import org.springframework.stereotype.Component;
16 19  
  20 +import java.util.ArrayList;
17 21 import java.util.List;
18 22 import java.util.Map;
19 23  
20 24  
21 25  
22 26  
... ... @@ -150,15 +154,27 @@
150 154 if (configModel != null)
151 155 {
152 156  
  157 + DiagnoseConfigResult result = new DiagnoseConfigResult();
  158 + result.convertToResult(configModel);
  159 +
153 160 DiagnoseItemsQuery diagnoseItemsQuery = new DiagnoseItemsQuery();
154 161 diagnoseItemsQuery.setConfigId(configModel.getId());
155 162  
156 163 List<DiagnoseItemModel> diagnoseItemModels = diagnoseConfigService.queryDiagnoseItems(diagnoseItemsQuery);
  164 + if (CollectionUtils.isNotEmpty(diagnoseItemModels))
  165 + {
  166 + List<DiagnoseItemResult> results = new ArrayList<>();
  167 + for (DiagnoseItemModel model : diagnoseItemModels)
  168 + {
  169 + DiagnoseItemResult itemResult = new DiagnoseItemResult();
  170 + itemResult.convertToResult(model);
157 171  
  172 + results.add(itemResult);
  173 + }
  174 + result.setResults(results);
  175 + }
  176 + new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(result);
158 177 }
159   -
160   -
161   -
162 178 return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有数据");
163 179 }
164 180 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/DiagnoseConfigResult.java View file @ c923ee6
1 1 package com.lyms.platform.operate.web.result;
2 2  
  3 +import com.lyms.platform.common.base.IBasicResultConvert;
  4 +import com.lyms.platform.pojo.DiagnoseConfigModel;
  5 +
3 6 import java.util.List;
4 7 import java.util.Map;
5 8  
6 9 /**
7 10 * Created by Administrator on 2018-03-30.
8 11 */
9   -public class DiagnoseConfigResult {
  12 +public class DiagnoseConfigResult implements IBasicResultConvert<DiagnoseConfigResult, DiagnoseConfigModel> {
10 13  
11 14 private String id;
12 15 private String hospitalId;
13 16  
... ... @@ -14,9 +17,9 @@
14 17 private String enable;
15 18 private List<Map<Integer,String>> status;
16 19  
17   - private String created;
18   - private String modified;
  20 + private List<DiagnoseItemResult> results;
19 21  
  22 +
20 23 public String getId() {
21 24 return id;
22 25 }
23 26  
24 27  
... ... @@ -49,20 +52,21 @@
49 52 this.status = status;
50 53 }
51 54  
52   - public String getCreated() {
53   - return created;
  55 + public List<DiagnoseItemResult> getResults() {
  56 + return results;
54 57 }
55 58  
56   - public void setCreated(String created) {
57   - this.created = created;
  59 + public void setResults(List<DiagnoseItemResult> results) {
  60 + this.results = results;
58 61 }
59 62  
60   - public String getModified() {
61   - return modified;
62   - }
63   -
64   - public void setModified(String modified) {
65   - this.modified = modified;
  63 + @Override
  64 + public DiagnoseConfigResult convertToResult(DiagnoseConfigModel model) {
  65 + setId(model.getId());
  66 + setHospitalId(model.getHospitalId());
  67 + setEnable(model.getEnable());
  68 + setStatus(model.getStatus());
  69 + return this;
66 70 }
67 71 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/DiagnoseItemResult.java View file @ c923ee6
  1 +package com.lyms.platform.operate.web.result;
  2 +
  3 +import com.lyms.platform.common.base.IBasicResultConvert;
  4 +import com.lyms.platform.pojo.DiagnoseItemModel;
  5 +
  6 +
  7 +/**
  8 + * Created by Administrator on 2018-04-02.
  9 + */
  10 +public class DiagnoseItemResult implements IBasicResultConvert<DiagnoseItemResult,DiagnoseItemModel> {
  11 +
  12 + private String id;
  13 + private String configId;
  14 + private String hospitalId;
  15 + private String parentId;
  16 + //是否启用 0停用 1启用
  17 + private Integer enable;
  18 + private String valueOne;
  19 + private String valueTwo;
  20 + private String valueThree;
  21 + private String valueFour;
  22 + private String valueFive;
  23 + private String valueSix;
  24 + //权重
  25 + private Integer weight;
  26 +
  27 + //高危id
  28 + private String riskId;
  29 +
  30 + @Override
  31 + public DiagnoseItemResult convertToResult(DiagnoseItemModel model) {
  32 + setId(model.getId());
  33 + setConfigId(model.getConfigId());
  34 + setHospitalId(model.getHospitalId());
  35 + setParentId(model.getParentId());
  36 + setEnable(model.getEnable());
  37 + setValueOne(model.getValueOne());
  38 + setValueTwo(model.getValueTwo());
  39 + setValueThree(model.getValueThree());
  40 + setValueFour(model.getValueFour());
  41 + setValueFive(model.getValueFive());
  42 + setValueSix(model.getValueSix());
  43 + setWeight(model.getWeight());
  44 + setRiskId(model.getRiskId());
  45 + return this;
  46 + }
  47 +
  48 + public String getId() {
  49 + return id;
  50 + }
  51 +
  52 + public void setId(String id) {
  53 + this.id = id;
  54 + }
  55 +
  56 + public String getConfigId() {
  57 + return configId;
  58 + }
  59 +
  60 + public void setConfigId(String configId) {
  61 + this.configId = configId;
  62 + }
  63 +
  64 + public String getHospitalId() {
  65 + return hospitalId;
  66 + }
  67 +
  68 + public void setHospitalId(String hospitalId) {
  69 + this.hospitalId = hospitalId;
  70 + }
  71 +
  72 + public String getParentId() {
  73 + return parentId;
  74 + }
  75 +
  76 + public void setParentId(String parentId) {
  77 + this.parentId = parentId;
  78 + }
  79 +
  80 + public Integer getEnable() {
  81 + return enable;
  82 + }
  83 +
  84 + public void setEnable(Integer enable) {
  85 + this.enable = enable;
  86 + }
  87 +
  88 + public String getValueOne() {
  89 + return valueOne;
  90 + }
  91 +
  92 + public void setValueOne(String valueOne) {
  93 + this.valueOne = valueOne;
  94 + }
  95 +
  96 + public String getValueTwo() {
  97 + return valueTwo;
  98 + }
  99 +
  100 + public void setValueTwo(String valueTwo) {
  101 + this.valueTwo = valueTwo;
  102 + }
  103 +
  104 + public String getValueThree() {
  105 + return valueThree;
  106 + }
  107 +
  108 + public void setValueThree(String valueThree) {
  109 + this.valueThree = valueThree;
  110 + }
  111 +
  112 + public String getValueFour() {
  113 + return valueFour;
  114 + }
  115 +
  116 + public void setValueFour(String valueFour) {
  117 + this.valueFour = valueFour;
  118 + }
  119 +
  120 + public String getValueFive() {
  121 + return valueFive;
  122 + }
  123 +
  124 + public void setValueFive(String valueFive) {
  125 + this.valueFive = valueFive;
  126 + }
  127 +
  128 + public String getValueSix() {
  129 + return valueSix;
  130 + }
  131 +
  132 + public void setValueSix(String valueSix) {
  133 + this.valueSix = valueSix;
  134 + }
  135 +
  136 + public Integer getWeight() {
  137 + return weight;
  138 + }
  139 +
  140 + public void setWeight(Integer weight) {
  141 + this.weight = weight;
  142 + }
  143 +
  144 + public String getRiskId() {
  145 + return riskId;
  146 + }
  147 +
  148 + public void setRiskId(String riskId) {
  149 + this.riskId = riskId;
  150 + }
  151 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/SyncDataTaskService.java View file @ c923ee6
... ... @@ -53,7 +53,7 @@
53 53 // urls.put("area-weixian-api.healthbaby.com.cn:12356","威县");
54 54 urls.put("area-zhucheng-api.healthbaby.com.cn:12356","诸城市妇幼保健院");
55 55 urls.put("area-weihai-api.healthbaby.com.cn:12356","威海市妇幼");
56   - urls.put("rp-zk-api.healthbaby.com.cn","周口市妇幼保健院");
  56 +// urls.put("rp-zk-api.healthbaby.com.cn","周口市妇幼保健院");
57 57 urls.put("area-huaiyang-api.healthbaby.com.cn:12356","淮阳县人民医院");
58 58 }
59 59  
platform-report-api/src/main/java/com/lyms/platform/report/web/inteceptor/TokenUtil.java View file @ c923ee6
  1 +package com.lyms.platform.report.web.inteceptor;
  2 +
  3 +import org.apache.commons.codec.binary.Base64;
  4 +
  5 +import javax.crypto.Cipher;
  6 +import javax.crypto.spec.SecretKeySpec;
  7 +
  8 +/**
  9 + * Created by Administrator on 2018-04-03.
  10 + */
  11 +public class TokenUtil {
  12 + /// 加密
  13 + /// </summary>
  14 + /// <param name="sSrc">加密前明文</param>
  15 + /// <param name="sKey">16位密钥<</param>
  16 + /// <returns></returns>
  17 + public static String encrypt(String sSrc, String sKey) throws Exception {
  18 + if (sKey==null) {
  19 + System.out.print("Key为空null");
  20 + return null;
  21 + }
  22 + // 判断Key是否为16位
  23 + if (sKey.length() !=16) {
  24 + System.out.print("Key长度不是16位");
  25 + return null;
  26 + }
  27 + byte[] raw =sKey.getBytes("utf-8");
  28 + SecretKeySpec skeySpec=new SecretKeySpec(raw, "AES");
  29 + Cipher cipher= Cipher.getInstance("AES/ECB/PKCS5Padding");//"算法/模式/补码方式"
  30 + cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
  31 + byte[] encrypted =cipher.doFinal(sSrc.getBytes("utf-8"));
  32 +
  33 + return new Base64().encodeToString(encrypted);
  34 + }
  35 +
  36 + /// <summary>
  37 + /// 解密
  38 + /// </summary>
  39 + /// <param name="sSrc">密文</param>
  40 + /// <param name="sKey">16位密钥</param>
  41 + /// <returns></returns>
  42 + public static String decrypt(String sSrc, String sKey) throws Exception {
  43 + try {
  44 + // 判断Key是否正确
  45 + if (sKey==null) {
  46 + System.out.print("Key为空null");
  47 + return null;
  48 + }
  49 + // 判断Key是否为16位
  50 + if (sKey.length() !=16) {
  51 + System.out.print("Key长度不是16位");
  52 + return null;
  53 + }
  54 + byte[] raw =sKey.getBytes("utf-8");
  55 + SecretKeySpec skeySpec=new SecretKeySpec(raw, "AES");
  56 + Cipher cipher=Cipher.getInstance("AES/ECB/PKCS5Padding");
  57 + cipher.init(Cipher.DECRYPT_MODE, skeySpec);
  58 + byte[] encrypted1 =new Base64().decode(sSrc);//先用base64解密
  59 + try {
  60 + byte[] original =cipher.doFinal(encrypted1);
  61 + String originalString=new String(original,"utf-8");
  62 + return originalString;
  63 + } catch (Exception e) {
  64 + System.out.println(e.toString());
  65 + return null;
  66 + }
  67 + } catch (Exception ex) {
  68 + System.out.println(ex.toString());
  69 + return null;
  70 + }
  71 + }
  72 +
  73 + public static void main(String[] args) throws Exception {
  74 + String s = encrypt("E2BC2EE87653D64DDDB6352CD4AA248C","1D0CAF3624C67625");
  75 + System.out.println(s);
  76 + }
  77 +}