Browse Source

Merge branch 'master' into 122run

gaodm 5 years ago
parent
commit
0e33976464
100 changed files with 2587 additions and 1552 deletions
  1. 12 9
      aipt-service/src/main/java/com/diagbot/aggregate/PushItemAggregate.java
  2. 148 88
      aipt-service/src/main/java/com/diagbot/aggregate/SearchItemAggregate.java
  3. 7 7
      aipt-service/src/main/java/com/diagbot/aggregate/TreatmentAggregate.java
  4. 6 7
      aipt-service/src/main/java/com/diagbot/client/AIServiceClient.java
  5. 0 23
      aipt-service/src/main/java/com/diagbot/client/bean/AdverseReaction.java
  6. 0 16
      aipt-service/src/main/java/com/diagbot/client/bean/AdverseReactionDetail.java
  7. 0 43
      aipt-service/src/main/java/com/diagbot/client/bean/FeatureRate.java
  8. 0 18
      aipt-service/src/main/java/com/diagbot/client/bean/GdbResponse.java
  9. 0 22
      aipt-service/src/main/java/com/diagbot/client/bean/MedicalIndication.java
  10. 0 17
      aipt-service/src/main/java/com/diagbot/client/bean/MedicalIndicationDetail.java
  11. 0 28
      aipt-service/src/main/java/com/diagbot/client/bean/Medicition.java
  12. 0 27
      aipt-service/src/main/java/com/diagbot/client/bean/MedicitionClass.java
  13. 0 18
      aipt-service/src/main/java/com/diagbot/client/bean/MeditionDetail.java
  14. 0 33
      aipt-service/src/main/java/com/diagbot/client/bean/ResponseData.java
  15. 12 54
      aipt-service/src/main/java/com/diagbot/client/bean/SearchData.java
  16. 0 26
      aipt-service/src/main/java/com/diagbot/client/bean/Treat.java
  17. 0 18
      aipt-service/src/main/java/com/diagbot/client/bean/TreatmentPlan.java
  18. 6 7
      aipt-service/src/main/java/com/diagbot/client/hystrix/AIServiceHystrix.java
  19. 6 0
      aipt-service/src/main/java/com/diagbot/dto/GetTopPatientInfoDTO.java
  20. 7 13
      aipt-service/src/main/java/com/diagbot/dto/GetTopPatientInfoDjDTO.java
  21. 0 26
      aipt-service/src/main/java/com/diagbot/dto/LisResult.java
  22. 0 19
      aipt-service/src/main/java/com/diagbot/dto/PacsResult.java
  23. 7 1
      aipt-service/src/main/java/com/diagbot/dto/PushDTO.java
  24. 13 112
      aipt-service/src/main/java/com/diagbot/entity/HospitalDept.java
  25. 37 0
      aipt-service/src/main/java/com/diagbot/facade/AssembleFacade.java
  26. 16 320
      aipt-service/src/main/java/com/diagbot/facade/ClinicalFacade.java
  27. 15 2
      aipt-service/src/main/java/com/diagbot/facade/DisclaimerInformationFacade.java
  28. 10 5
      aipt-service/src/main/java/com/diagbot/facade/EvaluationFacade.java
  29. 49 59
      aipt-service/src/main/java/com/diagbot/facade/PushFacade.java
  30. 110 56
      aipt-service/src/main/java/com/diagbot/facade/TransferFacade.java
  31. 12 11
      aipt-service/src/main/java/com/diagbot/facade/TreatmentFacade.java
  32. 1 1
      aipt-service/src/main/java/com/diagbot/facade/VersionDetailFacade.java
  33. 20 0
      aipt-service/src/main/java/com/diagbot/vo/DisclaimerInformationVO.java
  34. 2 4
      aipt-service/src/main/java/com/diagbot/vo/EvaluationDiseaseNameVO.java
  35. 0 52
      aipt-service/src/main/java/com/diagbot/vo/SearchVo.java
  36. 6 16
      aipt-service/src/main/java/com/diagbot/web/ClinicalController.java
  37. 4 2
      aipt-service/src/main/java/com/diagbot/web/DisclaimerInformationController.java
  38. 3 3
      aipt-service/src/main/java/com/diagbot/web/EvaluationController.java
  39. 52 72
      aipt-service/src/main/java/com/diagbot/web/PushController.java
  40. 1 1
      aipt-service/src/main/resources/mapper/EvaluationMapper.xml
  41. 25 0
      common-biz-client/.gitignore
  42. 94 0
      common-biz-client/pom.xml
  43. 27 0
      common-biz-client/src/main/java/com/diagbot/client/MrqcServiceClient.java
  44. 26 0
      common-biz-client/src/main/java/com/diagbot/client/hystrix/MrqcServiceHystrix.java
  45. 159 0
      common-biz-client/src/main/java/com/diagbot/entity/Constants.java
  46. 190 0
      common-biz-client/src/main/java/com/diagbot/entity/Response.java
  47. 132 0
      common-biz-client/src/main/java/com/diagbot/entity/Status.java
  48. 30 0
      common-biz-client/src/main/java/com/diagbot/facade/MrqcFacade.java
  49. 21 0
      common-biz-client/src/main/java/com/diagbot/vo/MedrecVO.java
  50. 23 0
      common-biz-client/src/main/java/com/diagbot/vo/QueryVO.java
  51. 17 0
      common-biz-client/src/main/java/com/diagbot/vo/TokenVO.java
  52. 38 0
      common/src/main/java/com/diagbot/biz/push/dto/ConceptDetailDTO.java
  53. 44 0
      common/src/main/java/com/diagbot/biz/push/entity/AdverseReaction.java
  54. 8 2
      ltapi-service/src/main/java/com/diagbot/client/bean/AdverseReactionDetail.java
  55. 1 5
      triage-service/src/main/java/com/diagbot/client/bean/FeatureRate.java
  56. 26 0
      common/src/main/java/com/diagbot/biz/push/entity/Item.java
  57. 58 0
      common/src/main/java/com/diagbot/biz/push/entity/Lis.java
  58. 150 0
      common/src/main/java/com/diagbot/biz/push/entity/MRBaseData.java
  59. 17 2
      data-service/src/main/java/com/diagbot/client/bean/MedicalIndication.java
  60. 24 0
      common/src/main/java/com/diagbot/biz/push/entity/MedicalIndicationDetail.java
  61. 21 3
      data-service/src/main/java/com/diagbot/client/bean/Medicition.java
  62. 60 0
      common/src/main/java/com/diagbot/biz/push/entity/MedicitionClass.java
  63. 8 2
      data-service/src/main/java/com/diagbot/client/bean/MeditionDetail.java
  64. 34 0
      common/src/main/java/com/diagbot/biz/push/entity/Pacs.java
  65. 66 0
      common/src/main/java/com/diagbot/biz/push/entity/ResponseData.java
  66. 39 0
      common/src/main/java/com/diagbot/biz/push/entity/SearchBaseData.java
  67. 50 0
      common/src/main/java/com/diagbot/biz/push/entity/Treat.java
  68. 8 2
      icss-service/src/main/java/com/diagbot/client/bean/TreatmentPlan.java
  69. 4 2
      aipt-service/src/main/java/com/diagbot/enums/FeatureTypeEnum.java
  70. 19 0
      common/src/main/java/com/diagbot/biz/push/vo/SearchVO.java
  71. 2 1
      common/src/main/java/com/diagbot/enums/SysTypeEnum.java
  72. 5 1
      config-server/src/main/resources/shared/application-dev.yml
  73. 5 1
      config-server/src/main/resources/shared/application-local.yml
  74. 5 1
      config-server/src/main/resources/shared/application-pre.yml
  75. 5 1
      config-server/src/main/resources/shared/application-pro.yml
  76. 5 1
      config-server/src/main/resources/shared/application-test.yml
  77. 7 0
      config-server/src/main/resources/shared/gateway-service-dev.yml
  78. 7 0
      config-server/src/main/resources/shared/gateway-service-local.yml
  79. 7 0
      config-server/src/main/resources/shared/gateway-service-pre.yml
  80. 7 0
      config-server/src/main/resources/shared/gateway-service-pro.yml
  81. 7 0
      config-server/src/main/resources/shared/gateway-service-test.yml
  82. 99 0
      config-server/src/main/resources/shared/mrqcman-service-dev.yml
  83. 99 0
      config-server/src/main/resources/shared/mrqcman-service-local.yml
  84. 99 0
      config-server/src/main/resources/shared/mrqcman-service-pre.yml
  85. 99 0
      config-server/src/main/resources/shared/mrqcman-service-pro.yml
  86. 99 0
      config-server/src/main/resources/shared/mrqcman-service-test.yml
  87. 6 0
      data-service/pom.xml
  88. 7 15
      data-service/src/main/java/com/diagbot/client/AiptServiceClient.java
  89. 0 23
      data-service/src/main/java/com/diagbot/client/bean/AdverseReaction.java
  90. 0 16
      data-service/src/main/java/com/diagbot/client/bean/AdverseReactionDetail.java
  91. 0 26
      data-service/src/main/java/com/diagbot/client/bean/LisResult.java
  92. 0 17
      data-service/src/main/java/com/diagbot/client/bean/MedicalIndicationDetail.java
  93. 0 27
      data-service/src/main/java/com/diagbot/client/bean/MedicitionClass.java
  94. 0 45
      data-service/src/main/java/com/diagbot/client/bean/SearchData.java
  95. 0 26
      data-service/src/main/java/com/diagbot/client/bean/Treat.java
  96. 0 18
      data-service/src/main/java/com/diagbot/client/bean/TreatmentPlan.java
  97. 7 18
      data-service/src/main/java/com/diagbot/client/hystrix/AiptServiceHystrix.java
  98. 29 3
      data-service/src/main/java/com/diagbot/dto/PushDTO.java
  99. 0 58
      data-service/src/main/java/com/diagbot/enums/FeatureTypeEnum.java
  100. 0 0
      data-service/src/main/java/com/diagbot/facade/AssembleFacade.java

+ 12 - 9
aipt-service/src/main/java/com/diagbot/aggregate/PushItemAggregate.java

@@ -2,19 +2,19 @@ package com.diagbot.aggregate;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import com.diagbot.biz.push.entity.FeatureRate;
+import com.diagbot.biz.push.entity.MedicalIndication;
+import com.diagbot.biz.push.entity.MedicalIndicationDetail;
+import com.diagbot.biz.push.entity.ResponseData;
+import com.diagbot.biz.push.enums.FeatureTypeEnum;
 import com.diagbot.client.TranServiceClient;
 import com.diagbot.client.bean.CalculateData;
-import com.diagbot.client.bean.FeatureRate;
 import com.diagbot.client.bean.HosCodeVO;
-import com.diagbot.client.bean.MedicalIndication;
-import com.diagbot.client.bean.MedicalIndicationDetail;
-import com.diagbot.client.bean.ResponseData;
 import com.diagbot.dto.ConceptPushDTO;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.Concept;
 import com.diagbot.enums.ConceptTypeEnum;
-import com.diagbot.enums.FeatureTypeEnum;
 import com.diagbot.enums.LexiconTypeEnum;
 import com.diagbot.facade.ClinicalFacade;
 import com.diagbot.facade.ConceptFacade;
@@ -57,14 +57,17 @@ public class PushItemAggregate {
 
     @DataProvider("setAll")
     public PushDTO setAll(
+            @InvokeParameter("pushDTO") PushDTO pushDTO,
             @DataConsumer("getDept") ConceptPushDTO dept,
             @DataConsumer("setSymptom") List<ConceptPushDTO> symptom,
             @DataConsumer("setVital") List<ConceptPushDTO> vital,
             @DataConsumer("setLab") List<ConceptPushDTO> lab,
-            @DataConsumer("setPacs") List<ConceptPushDTO> pacs,
+            @DataConsumer("setRetPacs") List<ConceptPushDTO> pacs,
             @DataConsumer("setDis") Map<String, List<ConceptPushDTO>> dis,
             @DataConsumer("setMedicalIndications") List<MedicalIndication> medicalIndications) {
-        PushDTO pushDTO = new PushDTO();
+        if (pushDTO == null) {
+            pushDTO = new PushDTO();
+        }
         if (null != dept) {
             pushDTO.setDept(dept);
         }
@@ -211,8 +214,8 @@ public class PushItemAggregate {
         return labRes;
     }
 
-    @DataProvider("setPacs")
-    public List<ConceptPushDTO> setPacs(@InvokeParameter("featureTypeSet") Set<String> featureTypeSet,
+    @DataProvider("setRetPacs")
+    public List<ConceptPushDTO> setRetPacs(@InvokeParameter("featureTypeSet") Set<String> featureTypeSet,
                                         @InvokeParameter("data") ResponseData data,
                                         @InvokeParameter("isConnect") Boolean isConnect,
                                         @InvokeParameter("hosCode") String hosCode) {

+ 148 - 88
aipt-service/src/main/java/com/diagbot/aggregate/SearchItemAggregate.java

@@ -1,17 +1,16 @@
 package com.diagbot.aggregate;
 
-import com.diagbot.dto.LisResult;
-import com.diagbot.dto.PacsResult;
-import com.diagbot.enums.FeatureTypeEnum;
-import com.diagbot.enums.SysTypeEnum;
+import com.diagbot.biz.push.entity.Item;
+import com.diagbot.biz.push.entity.Lis;
+import com.diagbot.biz.push.entity.Pacs;
+import com.diagbot.biz.push.vo.SearchVO;
+import com.diagbot.enums.ConceptTypeEnum;
 import com.diagbot.facade.TransferFacade;
 import com.diagbot.util.ListUtil;
-import com.diagbot.util.StringUtil;
-import com.diagbot.vo.SearchVo;
+import com.google.common.collect.Lists;
 import io.github.lvyahui8.spring.annotation.DataConsumer;
 import io.github.lvyahui8.spring.annotation.DataProvider;
 import io.github.lvyahui8.spring.annotation.InvokeParameter;
-import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -28,133 +27,194 @@ public class SearchItemAggregate {
     private TransferFacade transferFacade;
 
     @DataProvider("assembleSearchData")
-    public SearchVo assembleSearchData(@InvokeParameter("searchVo") SearchVo searchVo,
+    public SearchVO assembleSearchData(@InvokeParameter("searchVO") SearchVO searchVO,
                                        @InvokeParameter("isConnect") Boolean isConnect,
-                                       @DataConsumer("setLisArr") List<LisResult> lisArr,
-                                       @DataConsumer("setPacsStr") String pacs,
-                                       @DataConsumer("setDiag") String diag,
-                                       @DataConsumer("setDiseaseName") String diseaseName,
-                                       @DataConsumer("setLisOrder") String lisOrder,
-                                       @DataConsumer("setPacsOrder") String pacsOrder) {
+                                       @DataConsumer("setLis") List<Lis> lis,
+                                       @DataConsumer("setPacs") List<Pacs> pacs,
+                                       @DataConsumer("setDiag") List<Item> diag,
+                                       @DataConsumer("setDrug") List<Item> drug,
+                                       @DataConsumer("setLisOrder") List<Lis> lisOrder,
+                                       @DataConsumer("setPacsOrder") List<Pacs> pacsOrder,
+                                       @DataConsumer("setDiagOrder") List<Item> diagOrder,
+                                       @DataConsumer("setDrugOrder") List<Item> drugOrder,
+                                       @DataConsumer("setOperationOrder") List<Item> operationOrder,
+                                       @DataConsumer("setOtherOrder") List<Item> otherOrder,
+                                       @DataConsumer("setDiseaseName") Item diseaseName
+    ) {
         if (isConnect) {
-            //化验转公表项处理
-            searchVo.setLisArr(lisArr);
-            //下面转换仅限数据引擎模式
-            if (searchVo.getSysType().equals(SysTypeEnum.LTAPI_SERVICE.getKey())) {
-                //辅检预处理
-                searchVo.setPacs(pacs);
-                //诊断预处理
-                searchVo.setDiag(diag);
-                //治疗方案诊断转换
-                searchVo.setDiseaseName(diseaseName);
-                //化验开单项
-                searchVo.setLisOrder(lisOrder);
-                //辅检开单项
-                searchVo.setPacsOrder(pacsOrder);
-            }
+            //化验数据映射公表(化验公表项)
+            searchVO.setLis(lis);
+            //辅检数据映射公表(辅检项目)
+            searchVO.setPacs(pacs);
+            //诊断数据映射公表(诊断)
+            searchVO.setDiag(diag);
+            //药品数据映射公表(药品通用名)
+            searchVO.setDrug(drug);
+            //化验开单项映射
+            searchVO.setLisOrder(lisOrder);
+            //辅检开单项映射
+            searchVO.setPacsOrder(pacsOrder);
+            //诊断开单项映射
+            searchVO.setDiagOrder(diagOrder);
+            //药品开单项映射
+            searchVO.setDrugOrder(drugOrder);
+            //手术开单项映射
+            searchVO.setOperationOrder(operationOrder);
+            //其他开单项映射
+            searchVO.setOtherOrder(otherOrder);
+            //选中诊断映射
+            searchVO.setDiseaseName(diseaseName);
         }
-        return searchVo;
+        return searchVO;
     }
 
     /**
      * 化验增加公表项
      *
-     * @param searchVo
+     * @param searchVO
      * @return
      */
-    @DataProvider("setLisArr")
-    public List<LisResult> setLisArr(@InvokeParameter("searchVo") SearchVo searchVo) {
-        List<LisResult> lisArr = searchVo.getLisArr();
-        lisArr = transferFacade.addLisUniqueName(lisArr, searchVo.getHosCode());
-        return lisArr;
+    @DataProvider("setLis")
+    public List<Lis> setLis(@InvokeParameter("searchVO") SearchVO searchVO) {
+        List<Lis> lis = searchVO.getLis();
+        lis = transferFacade.addLisUniqueName(lis, searchVO.getHosCode());
+        return lis;
     }
 
     /**
-     * 辅检转内部项目名称
+     * 辅检增加公表项
      *
-     * @param searchVo
+     * @param searchVO
      * @return
      */
-    @DataProvider("setPacsStr")
-    public String setPacsStr(@InvokeParameter("searchVo") SearchVo searchVo) {
-        String pacs = "";
-        if (StringUtil.isNotBlank(searchVo.getPacs())) {
-            pacs += searchVo.getPacs() + ";";
-        }
-        List<PacsResult> pacsArr = searchVo.getPacsArr();
-        if (ListUtil.isNotEmpty(pacsArr)) {
-            List<PacsResult> convertPacsArr = transferFacade.addPacsUniqueName(pacsArr, searchVo.getHosCode());
-            for (PacsResult pacsResult : convertPacsArr) {
-                String pacsResultString = "";
-                if (StringUtils.isNotBlank(pacsResult.getUniqueName())) {
-                    pacsResultString = pacsResult.getUniqueName() + ":";
-                } else {
-                    pacsResultString = pacsResult.getName() + ":";
-                }
-                pacsResultString += pacsResult.getResult() + ";";
-                pacs += pacsResultString;
-            }
-        }
+    @DataProvider("setPacs")
+    public List<Pacs> setPacs(@InvokeParameter("searchVO") SearchVO searchVO) {
+        List<Pacs> pacs = searchVO.getPacs();
+        pacs = transferFacade.addPacsUniqueName(pacs, searchVO.getHosCode());
         return pacs;
     }
 
     /**
-     * 诊断转内部名称
+     * 诊断增加公表项
      *
-     * @param searchVo
+     * @param searchVO
      * @return
      */
     @DataProvider("setDiag")
-    public String setDiag(@InvokeParameter("searchVo") SearchVo searchVo) {
-        String diag = "";
-        if (StringUtil.isNotBlank(searchVo.getDiag())) {
-            diag = transferFacade.strConvert(searchVo.getDiag(), searchVo.getHosCode(), FeatureTypeEnum.Feature_Type_Disease.getKey());
-        }
+    public List<Item> setDiag(@InvokeParameter("searchVO") SearchVO searchVO) {
+        List<Item> diag = searchVO.getDiag();
+        diag = transferFacade.addItemUniqueName(diag, ConceptTypeEnum.Disease.getKey(), searchVO.getHosCode());
         return diag;
     }
 
     /**
-     * 获取治疗方案诊断转内部名称
+     * 药品增加公表项
      *
-     * @param searchVo
+     * @param searchVO
      * @return
      */
-    @DataProvider("setDiseaseName")
-    public String setDiseaseName(@InvokeParameter("searchVo") SearchVo searchVo) {
-        String diseaseName = "";
-        if (StringUtil.isNotBlank(searchVo.getDiseaseName())) {
-            diseaseName = transferFacade.strConvert(searchVo.getDiseaseName(), searchVo.getHosCode(), FeatureTypeEnum.Feature_Type_Disease.getKey());
-        }
-        return diseaseName;
+    @DataProvider("setDrug")
+    public List<Item> setDrug(@InvokeParameter("searchVO") SearchVO searchVO) {
+        List<Item> drug = searchVO.getDrug();
+        drug = transferFacade.addItemUniqueName(drug, ConceptTypeEnum.Drug.getKey(), searchVO.getHosCode());
+        return drug;
     }
 
     /**
-     * 化验开单项映射公表名称
+     * 化验开单项增加公表名称
      *
-     * @param searchVo
+     * @param searchVO
      * @return
      */
     @DataProvider("setLisOrder")
-    public String setLisOrder(@InvokeParameter("searchVo") SearchVo searchVo) {
-        String lisOrder = "";
-        if (StringUtil.isNotBlank(searchVo.getLisOrder())) {
-            lisOrder = transferFacade.strConvert(searchVo.getLisOrder(), searchVo.getHosCode(), FeatureTypeEnum.Feature_Type_Lis.getKey());
-        }
+    public List<Lis> setLisOrder(@InvokeParameter("searchVO") SearchVO searchVO) {
+        List<Lis> lisOrder = searchVO.getLisOrder();
+        lisOrder = transferFacade.addLisUniqueName(lisOrder, searchVO.getHosCode());
         return lisOrder;
     }
 
     /**
-     * 辅检开单项转内部项目名称
+     * 辅检开单项增加公表项
      *
-     * @param searchVo
+     * @param searchVO
      * @return
      */
     @DataProvider("setPacsOrder")
-    public String setPacsOrder(@InvokeParameter("searchVo") SearchVo searchVo) {
-        String pacsOrder = "";
-        if (StringUtil.isNotBlank(searchVo.getPacsOrder())) {
-            pacsOrder = transferFacade.strConvert(searchVo.getPacsOrder(), searchVo.getHosCode(), FeatureTypeEnum.Feature_Type_Pacs.getKey());
-        }
+    public List<Pacs> setPacsOrder(@InvokeParameter("searchVO") SearchVO searchVO) {
+        List<Pacs> pacsOrder = searchVO.getPacsOrder();
+        pacsOrder = transferFacade.addPacsUniqueName(pacsOrder, searchVO.getHosCode());
         return pacsOrder;
     }
+
+    /**
+     * 诊断开单项增加公表项
+     *
+     * @param searchVO
+     * @return
+     */
+    @DataProvider("setDiagOrder")
+    public List<Item> setDiagOrder(@InvokeParameter("searchVO") SearchVO searchVO) {
+        List<Item> diagOrder = searchVO.getDiagOrder();
+        diagOrder = transferFacade.addItemUniqueName(diagOrder, ConceptTypeEnum.Disease.getKey(), searchVO.getHosCode());
+        return diagOrder;
+    }
+
+    /**
+     * 药品开单项增加公表项
+     *
+     * @param searchVO
+     * @return
+     */
+    @DataProvider("setDrugOrder")
+    public List<Item> setDrugOrder(@InvokeParameter("searchVO") SearchVO searchVO) {
+        List<Item> drugOrder = searchVO.getDrugOrder();
+        drugOrder = transferFacade.addItemUniqueName(drugOrder, ConceptTypeEnum.Drug.getKey(), searchVO.getHosCode());
+        return drugOrder;
+    }
+
+    /**
+     * 手术开单项增加公表项
+     *
+     * @param searchVO
+     * @return
+     */
+    @DataProvider("setOperationOrder")
+    public List<Item> setOperationOrder(@InvokeParameter("searchVO") SearchVO searchVO) {
+        List<Item> operationOrder = searchVO.getOperationOrder();
+        operationOrder = transferFacade.addItemUniqueName(operationOrder, ConceptTypeEnum.OPERATION.getKey(), searchVO.getHosCode());
+        return operationOrder;
+    }
+
+    /**
+     * 其他开单项增加公表项(暂未处理)
+     *
+     * @param searchVO
+     * @return
+     */
+    @DataProvider("setOtherOrder")
+    public List<Item> setOtherOrder(@InvokeParameter("searchVO") SearchVO searchVO) {
+        List<Item> operationOrder = searchVO.getOperationOrder();
+        return operationOrder;
+    }
+
+    /**
+     * 诊断开单项增加公表项
+     *
+     * @param searchVO
+     * @return
+     */
+    @DataProvider("setDiseaseName")
+    public Item setDiseaseName(@InvokeParameter("searchVO") SearchVO searchVO) {
+        if (searchVO.getDiseaseName() == null) {
+            return null;
+        }
+        List<Item> diseaseItem = Lists.newLinkedList();
+        diseaseItem.add(searchVO.getDiseaseName());
+        diseaseItem = transferFacade.addItemUniqueName(diseaseItem, ConceptTypeEnum.Disease.getKey(), searchVO.getHosCode());
+        if (ListUtil.isNotEmpty(diseaseItem)) {
+            return diseaseItem.get(0);
+        } else {
+            return null;
+        }
+    }
 }

+ 7 - 7
aipt-service/src/main/java/com/diagbot/aggregate/TreatmentAggregate.java

@@ -1,12 +1,12 @@
 package com.diagbot.aggregate;
 
-import com.diagbot.client.bean.AdverseReaction;
-import com.diagbot.client.bean.Medicition;
-import com.diagbot.client.bean.MedicitionClass;
-import com.diagbot.client.bean.MeditionDetail;
-import com.diagbot.client.bean.Treat;
-import com.diagbot.client.bean.TreatmentPlan;
-import com.diagbot.dto.ConceptDetailDTO;
+import com.diagbot.biz.push.entity.AdverseReaction;
+import com.diagbot.biz.push.dto.ConceptDetailDTO;
+import com.diagbot.biz.push.entity.Medicition;
+import com.diagbot.biz.push.entity.MedicitionClass;
+import com.diagbot.biz.push.entity.MeditionDetail;
+import com.diagbot.biz.push.entity.Treat;
+import com.diagbot.biz.push.entity.TreatmentPlan;
 import com.diagbot.entity.Concept;
 import com.diagbot.entity.ConceptDetail;
 import com.diagbot.enums.ConceptTypeEnum;

+ 6 - 7
aipt-service/src/main/java/com/diagbot/client/AIServiceClient.java

@@ -1,11 +1,10 @@
 package com.diagbot.client;
 
+import com.diagbot.biz.push.entity.ResponseData;
 import com.diagbot.client.bean.CalculateData;
-import com.diagbot.client.bean.GdbResponse;
 import com.diagbot.client.bean.Response;
-import com.diagbot.client.bean.ResponseData;
+import com.diagbot.client.bean.SearchData;
 import com.diagbot.client.hystrix.AIServiceHystrix;
-import com.diagbot.vo.SearchVo;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -22,20 +21,20 @@ public interface AIServiceClient {
     /**
      * 推理
      *
-     * @param searchVo
+     * @param searchData
      * @return
      */
     @PostMapping(value = "/push-web/algorithm/neural")
-    Response<ResponseData> bayesPageData(@RequestBody SearchVo searchVo);
+    Response<ResponseData> bayesPageData(@RequestBody SearchData searchData);
 
     /**
      * 量表推理
      *
-     * @param searchVo
+     * @param searchData
      * @return
      */
     @PostMapping(value = "/push-web/graph/scale")
-    Map<String, Object> scale(@RequestBody SearchVo searchVo);
+    Map<String, Object> scale(@RequestBody SearchData searchData);
 
     /**
      * 计算接口

+ 0 - 23
aipt-service/src/main/java/com/diagbot/client/bean/AdverseReaction.java

@@ -1,23 +0,0 @@
-package com.diagbot.client.bean;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.List;
-
-/**
- * @Description: 不良反应
- * @Author:zhaops
- * @time: 2019/3/14 11:14
- */
-@Getter
-@Setter
-public class AdverseReaction {
-    private Long conceptId;
-    private String name;  //名称
-    private Integer libType;
-    private Integer type;
-    private String showInfo = "0";//是否显示提示信息
-    private Integer controlType; //控件类型
-    private List<AdverseReactionDetail> details;
-}

+ 0 - 16
aipt-service/src/main/java/com/diagbot/client/bean/AdverseReactionDetail.java

@@ -1,16 +0,0 @@
-package com.diagbot.client.bean;
-
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * @Description: 不良反应明细
- * @Author:zhaops
- * @time: 2019/3/14 11:19
- */
-@Getter
-@Setter
-public class AdverseReactionDetail {
-    private String name;
-    private Integer value; //是否选中:0-未选中,1-选中
-}

+ 0 - 43
aipt-service/src/main/java/com/diagbot/client/bean/FeatureRate.java

@@ -1,43 +0,0 @@
-package com.diagbot.client.bean;
-
-/**
- * Created by fyeman on 2018/1/17.
- */
-public class FeatureRate {
-    private String featureName;
-    private String extraProperty;
-    private String desc;
-    private String rate;
-
-    public String getFeatureName() {
-        return featureName;
-    }
-
-    public void setFeatureName(String featureName) {
-        this.featureName = featureName;
-    }
-
-    public String getRate() {
-        return rate;
-    }
-
-    public void setRate(String rate) {
-        this.rate = rate;
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
-
-    public String getExtraProperty() {
-        return extraProperty;
-    }
-
-    public void setExtraProperty(String extraProperty) {
-        this.extraProperty = extraProperty;
-    }
-}

+ 0 - 18
aipt-service/src/main/java/com/diagbot/client/bean/GdbResponse.java

@@ -1,18 +0,0 @@
-package com.diagbot.client.bean;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * 图形数据库数据返回结构
- * Created by Mark Huang on 2018/10/26.
- */
-@Getter
-@Setter
-public class GdbResponse {
-    private String status = "";
-    private Map<String, String> Result = new HashMap<>();
-}

+ 0 - 22
aipt-service/src/main/java/com/diagbot/client/bean/MedicalIndication.java

@@ -1,22 +0,0 @@
-package com.diagbot.client.bean;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.List;
-
-
-/**
- * @Description:推送指标
- * @Author:zhaops
- * @time: 2019/3/14 14:40
- */
-@Getter
-@Setter
-public class MedicalIndication {
-    private Long conceptId;
-    private Integer libType;
-    private Integer type;
-    private String name;
-    private List<MedicalIndicationDetail> details;
-}

+ 0 - 17
aipt-service/src/main/java/com/diagbot/client/bean/MedicalIndicationDetail.java

@@ -1,17 +0,0 @@
-package com.diagbot.client.bean;
-
-import com.alibaba.fastjson.JSONObject;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * @Description:推送指标明细
- * @Author:zhaops
- * @time: 2019/4/11 10:15
- */
-@Getter
-@Setter
-public class MedicalIndicationDetail {
-    private Integer type; //1-量表,2-公式,3-其他指标,4-危机值
-    private JSONObject content;  //type<>1 非量表,返回内容;type=1 量表,返回量表名称{"name":""} ,controlType:0-radio,1-checkbox,2-text,3-dropdownlist
-}

+ 0 - 28
aipt-service/src/main/java/com/diagbot/client/bean/Medicition.java

@@ -1,28 +0,0 @@
-package com.diagbot.client.bean;
-
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * @Description:药品信息
- * @Author:zhaops
- * @time: 2018/12/17 13:27
- */
-@Getter
-@Setter
-public class Medicition {
-    private Long conceptId;
-    private String medicitionName;
-    private Integer libType;
-    /**
-     * 1-显示,0-隐藏
-     */
-    private String isShow;
-    private String forbidden;
-    /**
-     * 1-有提示信息,0-没有提示信息
-     */
-    private String showInfo = "0";
-    private String rate;
-    private Integer type;
-}

+ 0 - 27
aipt-service/src/main/java/com/diagbot/client/bean/MedicitionClass.java

@@ -1,27 +0,0 @@
-package com.diagbot.client.bean;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.LinkedList;
-
-/**
- * @Description:药品分类
- * @Author:zhaops
- * @time: 2018/12/17 13:32
- */
-@Getter
-@Setter
-public class MedicitionClass {
-    private String showInfo = "0";
-    private String drugsForbidden;
-    private Long bigdrugsConceptId;//药品分类概念id-大类
-    private String bigdrugsName;//药类名
-    private Integer bigdrgusLibType;
-    private Integer bigdrugsType;
-    private Long subdrugsConceptId;//药品分类概念id-小类
-    private String subdrugsName;//药类名-小类
-    private Integer subdrugsLibType;
-    private Integer subdrugsType;
-    private LinkedList<Medicition> medicitionsList;
-}

+ 0 - 18
aipt-service/src/main/java/com/diagbot/client/bean/MeditionDetail.java

@@ -1,18 +0,0 @@
-package com.diagbot.client.bean;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.List;
-
-/**
- * @Description:
- * @Author:zhaops
- * @time: 2019/11/21 11:15
- */
-@Getter
-@Setter
-public class MeditionDetail {
-    private String description;
-    private List<MedicitionClass> treatment;
-}

+ 0 - 33
aipt-service/src/main/java/com/diagbot/client/bean/ResponseData.java

@@ -1,33 +0,0 @@
-package com.diagbot.client.bean;
-
-import com.alibaba.fastjson.JSONObject;
-import com.google.common.eventbus.AllowConcurrentEvents;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Created by fyeman on 2018/2/2.
- */
-@Getter
-@Setter
-public class ResponseData {
-    private String participleSymptom = "";
-
-    private List<FeatureRate> symptom = new ArrayList<>(10);
-    private List<FeatureRate> vitals = new ArrayList<>(10);
-    private List<FeatureRate> dis = new ArrayList<>(10);
-    private List<FeatureRate> labs = new ArrayList<>(10);
-    private List<FeatureRate> pacs = new ArrayList<>(10);
-    private List<FeatureRate> history = new ArrayList<>(10);
-    private Treat treat;   //治疗方案
-    private Map<String, JSONObject> scale;   //量表内容
-    private Map<String, JSONObject> managementEvaluation;   //管理评估
-    private List<MedicalIndication> medicalIndications;     //量表和指标项推送
-
-    private Map<String, Map<String, String>> inputs = new HashMap<>(10, 0.5f);
-}

+ 12 - 54
aipt-service/src/main/java/com/diagbot/client/bean/SearchData.java

@@ -1,67 +1,25 @@
 package com.diagbot.client.bean;
 
-import com.diagbot.dto.LisResult;
+import com.diagbot.biz.push.entity.SearchBaseData;
 import lombok.Getter;
 import lombok.Setter;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 /**
- * Created by fyeman on 2018/1/31.
+ * @Description:推理相关入参
+ * @Author:zhaops
+ * @time: 2019/12/6 10:02
  */
 @Getter
 @Setter
-public class SearchData {
-    private int length = 10;
+public class SearchData extends SearchBaseData {
     private int age_start = 0;
     private int age_end = 200;
-    private int age = 0;
-    private String sex;
-    // 搜索结果的贝叶斯阈值
+    /**
+     * 搜索结果的贝叶斯阈值
+     */
     private String threshold = "0";
-
-    private String symptom = "";
-    private String vital = "";
-    private String lis = "";
-    private String pacs = "";
-    private String diag = "";
-    private String pasts = "";
-    private String other = "";
-    private List<LisResult> lisArr;
-    private Integer disType; //0-普通病(默认不填),1-慢病,2-急诊
-    private String scaleName;
-    private String indications;
-
-    private String lisString;  //化验纯文本
-    private String lisOrder;   //当前正在下单化验
-    private String pacsOrder;   //当前正在下单辅检
-    private String otherOrder; //其他
-
-    private String ruleType;   //规则类型
-
-    //特征类别
-    private String featureType;
-    //特征类别对","进行分割后数据
-    private String[] featureTypes;
-    //门诊 住院分类
-    private String resourceType;
-    //模型
-    private AlgorithmClassify algorithmClassify[];
-    //模型
-    private String algorithmClassifyValue;
-    //外部系统编码 用于返回映射数据,如果sysCode为空或null,则返回kl_standard_info标准名称
-    private String sysCode;
-
-    private Map<String, Map<String, String>> inputs = new HashMap<>(10, 0.8f);
-
-
-    private List<Feature> symptomFeatureList = new ArrayList<>();
-    private List<Feature> vitalFeatureList = new ArrayList<>();
-    private List<Feature> lisFeatureList = new ArrayList<>();
-    private List<Feature> pacsFeatureList = new ArrayList<>();
-    private List<Feature> diagFeatureList = new ArrayList<>();
-    private List<Feature> symptompropertyFeatureList = new ArrayList<>();
+    /**
+     * 性别(M:男,F:女,A:通用)
+     */
+    private String sex;
 }

+ 0 - 26
aipt-service/src/main/java/com/diagbot/client/bean/Treat.java

@@ -1,26 +0,0 @@
-package com.diagbot.client.bean;
-
-import com.diagbot.dto.ConceptDetailDTO;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description:
- * @Author:zhaops
- * @time: 2019/11/21 15:36
- */
-@Getter
-@Setter
-public class Treat {
-    private Integer disType;
-    private String diseaseName;
-    private List<AdverseReaction> adverseEvent;//不良反应
-    private List<TreatmentPlan> treatmentPlan;//治疗方案
-    private ConceptDetailDTO commonTreatment; //一般治疗
-    private ConceptDetailDTO surgeryTreatment; //手术治疗
-    private Object followUp;
-    private Map<String, List<Medicition>> drugHistory;
-}

+ 0 - 18
aipt-service/src/main/java/com/diagbot/client/bean/TreatmentPlan.java

@@ -1,18 +0,0 @@
-package com.diagbot.client.bean;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.List;
-
-/**
- * @Description:
- * @Author:zhaops
- * @time: 2019/11/21 11:14
- */
-@Getter
-@Setter
-public class TreatmentPlan {
-    private String title;
-    private List<MeditionDetail> meditionDetails;
-}

+ 6 - 7
aipt-service/src/main/java/com/diagbot/client/hystrix/AIServiceHystrix.java

@@ -1,11 +1,10 @@
 package com.diagbot.client.hystrix;
 
+import com.diagbot.biz.push.entity.ResponseData;
 import com.diagbot.client.AIServiceClient;
 import com.diagbot.client.bean.CalculateData;
-import com.diagbot.client.bean.GdbResponse;
 import com.diagbot.client.bean.Response;
-import com.diagbot.client.bean.ResponseData;
-import com.diagbot.vo.SearchVo;
+import com.diagbot.client.bean.SearchData;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -23,11 +22,11 @@ public class AIServiceHystrix implements AIServiceClient {
     /**
      * 推理
      *
-     * @param searchVo
+     * @param searchData
      * @return
      */
     @Override
-    public Response<ResponseData> bayesPageData(SearchVo searchVo) {
+    public Response<ResponseData> bayesPageData(SearchData searchData) {
         log.error("【hystrix】调用{}异常", "bayesPageData");
         return null;
     }
@@ -35,11 +34,11 @@ public class AIServiceHystrix implements AIServiceClient {
     /**
      * 量表推理
      *
-     * @param searchVo
+     * @param searchData
      * @return
      */
     @Override
-    public Map<String, Object> scale(@RequestBody SearchVo searchVo) {
+    public Map<String, Object> scale(@RequestBody SearchData searchData) {
         log.error("【hystrix】调用{}异常", "scale");
         return null;
     }

+ 6 - 0
aipt-service/src/main/java/com/diagbot/dto/GetTopPatientInfoDTO.java

@@ -127,6 +127,12 @@ public class GetTopPatientInfoDTO {
 	@ApiModelProperty(value = "患者身份证号")
 	private String patientIdentityNum;
 
+	/**
+	 * 患者联系电话
+	 */
+	@ApiModelProperty(value = "患者联系电话")
+	private String patientPhone;
+
 	/**
 	 * 系统时间
 	 */

+ 7 - 13
aipt-service/src/main/java/com/diagbot/dto/GetTopPatientInfoDjDTO.java

@@ -138,6 +138,12 @@ public class GetTopPatientInfoDjDTO {
     @ApiModelProperty(value = "病人证件号码")
     private String patientIdNo;
 
+    /**
+     * 患者联系电话
+     */
+    @ApiModelProperty(value = "患者联系电话")
+    private String patientPhone;
+
     /**
      * 系统时间
      */
@@ -158,16 +164,4 @@ public class GetTopPatientInfoDjDTO {
     @ApiModelProperty(value = "门诊号")
     private String recordId;
 
-    /**
-     * 模式分类
-     */
-    @ApiModelProperty(value = "模式分类")
-    private Integer modeClassify;
-
-    /**
-     * 模式值
-     */
-    @ApiModelProperty(value = "模式值")
-    private Integer modeValue;
-
-}
+}

+ 0 - 26
aipt-service/src/main/java/com/diagbot/dto/LisResult.java

@@ -1,26 +0,0 @@
-package com.diagbot.dto;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import javax.validation.constraints.NotNull;
-
-/**
- * @Description:化验信息
- * @Author:zhaops
- * @time: 2018/12/19 14:03
- */
-@Getter
-@Setter
-public class LisResult {
-    private String name;//套餐名称
-    private String detailName;//化验项名称
-    private String uniqueName;//公表名称
-    private Double value;//值
-    private Double maxValue;//最大值
-    private Double minValue;//最小值
-    private String units;//单位
-    private String otherValue;//其他结果,包括阴性阳性,文字描述等
-    @NotNull(message = "请输入数据来源")
-    private Integer source;
-}

+ 0 - 19
aipt-service/src/main/java/com/diagbot/dto/PacsResult.java

@@ -1,19 +0,0 @@
-package com.diagbot.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * @Description:
- * @Author:zhaops
- * @time: 2019/11/7 15:02
- */
-@Getter
-@Setter
-public class PacsResult {
-    private String name;
-    @ApiModelProperty(hidden = true)
-    private String uniqueName;
-    private String result;
-}

+ 7 - 1
aipt-service/src/main/java/com/diagbot/dto/PushDTO.java

@@ -1,6 +1,7 @@
 package com.diagbot.dto;
 
-import com.diagbot.client.bean.MedicalIndication;
+import com.diagbot.biz.push.entity.MedicalIndication;
+import com.diagbot.biz.push.entity.Treat;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -24,4 +25,9 @@ public class PushDTO {
     private Map<String, List<ConceptPushDTO>> dis;
     private ConceptPushDTO dept;
     private List<MedicalIndication> medicalIndications;
+    private Treat treat;
+    /**
+     * 有无病情提示标志(0:无,1:有)
+     */
+    private String hasIndications;
 }

+ 13 - 112
aipt-service/src/main/java/com/diagbot/entity/HospitalDept.java

@@ -3,6 +3,8 @@ package com.diagbot.entity;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Getter;
+import lombok.Setter;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -16,6 +18,8 @@ import java.util.Date;
  * @since 2018-11-19
  */
 @TableName("tran_hospital_dept")
+@Getter
+@Setter
 public class HospitalDept implements Serializable {
 
     private static final long serialVersionUID = 1L;
@@ -86,116 +90,13 @@ public class HospitalDept implements Serializable {
      */
     private String remark;
 
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-    public String getIsDeleted() {
-        return isDeleted;
-    }
-
-    public void setIsDeleted(String isDeleted) {
-        this.isDeleted = isDeleted;
-    }
-    public Date getGmtCreate() {
-        return gmtCreate;
-    }
-
-    public void setGmtCreate(Date gmtCreate) {
-        this.gmtCreate = gmtCreate;
-    }
-    public Date getGmtModified() {
-        return gmtModified;
-    }
-
-    public void setGmtModified(Date gmtModified) {
-        this.gmtModified = gmtModified;
-    }
-    public String getCreator() {
-        return creator;
-    }
-
-    public void setCreator(String creator) {
-        this.creator = creator;
-    }
-    public String getModifier() {
-        return modifier;
-    }
-
-    public void setModifier(String modifier) {
-        this.modifier = modifier;
-    }
-    public String getCode() {
-        return code;
-    }
-
-    public void setCode(String code) {
-        this.code = code;
-    }
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-    public String getHospitalCode() {
-        return hospitalCode;
-    }
-
-    public void setHospitalCode(String hospitalCode) {
-        this.hospitalCode = hospitalCode;
-    }
-    public String getHospitalName() {
-        return hospitalName;
-    }
-
-    public void setHospitalName(String hospitalName) {
-        this.hospitalName = hospitalName;
-    }
-
-    public String getConceptDeptName() {
-        return conceptDeptName;
-    }
-
-    public void setconceptDeptName(String conceptDeptName) {
-        this.conceptDeptName = conceptDeptName;
-    }
-
-    public Integer getStatus() {
-        return status;
-    }
-
-    public void setStatus(Integer status) {
-        this.status = status;
-    }
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    @Override
-    public String toString() {
-        return "HospitalDept{" +
-                "id=" + id +
-                ", isDeleted=" + isDeleted +
-                ", gmtCreate=" + gmtCreate +
-                ", gmtModified=" + gmtModified +
-                ", creator=" + creator +
-                ", modifier=" + modifier +
-                ", code=" + code +
-                ", name=" + name +
-                ", hospitalCode=" + hospitalCode +
-                ", hospitalName=" + hospitalName +
-                ", conceptDeptName=" + conceptDeptName +
-                ", status=" + status +
-                ", remark=" + remark +
-                "}";
-    }
+    /**
+     * 医院科室地址
+     */
+    private String url;
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
 }

+ 37 - 0
aipt-service/src/main/java/com/diagbot/facade/AssembleFacade.java

@@ -0,0 +1,37 @@
+package com.diagbot.facade;
+
+import com.diagbot.biz.push.vo.SearchVO;
+import com.diagbot.client.bean.SearchData;
+import com.diagbot.util.BeanUtil;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:入参拼装
+ * @Author:zhaops
+ * @time: 2019/12/6 10:02
+ */
+@Component
+public class AssembleFacade {
+    /**
+     * 拼装数据
+     *
+     * @param searchVO
+     * @return
+     */
+    public SearchData assembleData(SearchVO searchVO) {
+        SearchData searchData = new SearchData();
+        BeanUtil.copyProperties(searchVO, searchData);
+        switch (searchVO.getSex()) {
+            case 1:
+                searchData.setSex("M");
+                break;
+            case 2:
+                searchData.setSex("F");
+                break;
+            default:
+                searchData.setSex("A");
+                break;
+        }
+        return searchData;
+    }
+}

+ 16 - 320
aipt-service/src/main/java/com/diagbot/facade/ClinicalFacade.java

@@ -1,26 +1,21 @@
 package com.diagbot.facade;
 
 import com.alibaba.fastjson.JSON;
+import com.diagbot.biz.push.entity.ResponseData;
+import com.diagbot.biz.push.vo.SearchVO;
 import com.diagbot.client.AIServiceClient;
-import com.diagbot.client.NLPServiceClient;
 import com.diagbot.client.bean.CalculateData;
 import com.diagbot.client.bean.Response;
-import com.diagbot.client.bean.ResponseData;
-import com.diagbot.dto.Lexeme;
-import com.diagbot.dto.LisResult;
+import com.diagbot.client.bean.SearchData;
 import com.diagbot.entity.ScaleContent;
 import com.diagbot.enums.ScaleTypeEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.service.ScaleContentService;
-import com.diagbot.util.ListUtil;
-import com.diagbot.vo.SearchVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.RequestBody;
 
-import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -40,112 +35,46 @@ public class ClinicalFacade {
     @Autowired
     private ScaleContentService scaleContentService;
     @Autowired
-    private NLPServiceClient nlpServiceClient;
-
-    @Autowired
-    private ConceptFacade conceptFacade;
-
-    private static String up = "升高";
-    private static String down = "降低";
-    private static String normal = "正常";
-
-    private static String pos = "阳性";
-    private static String neg = "阴性";
-
-    //    private static Map<String, List<Map<String, String>>> standWordObj = null;
+    private AssembleFacade assembleFacade;
 
     /**
      * 处理临床数据
      *
-     * @param searchVo
+     * @param searchVO
      * @return ResponseData
      */
-    public ResponseData processClinicalData(@RequestBody SearchVo searchVo) {
-        SearchVo sData = searchVo;
-        //        Map<String, List<Map<String, String>>> standWord = getStandWord();
-        //        //        standWordObj = getStandWord();
-        //        Response<List<Lexeme>> resp = nlpServiceClient.split(sData.getSymptom());
-        //        if (null != resp && null != resp.getData()) {
-        //            addStandWord(resp.getData(), standWord, sData);
-        //        }
-
-        // sData.setLisArr(processLis(sData.getLisArr()));
-
-        /*if (ListUtil.isNotEmpty(sData.getLisArr())) {
-            List<String> otherVal = sData.getLisArr().stream().map(lisArr -> lisArr.getOtherValue()).collect(Collectors.toList());
-            sData.setLis(String.join(",", otherVal));
-        }*/
-
-        Response<ResponseData> res = aiServiceClient.bayesPageData(sData);
+    public ResponseData processClinicalData(@RequestBody SearchVO searchVO) {
+        SearchData searchData = assembleFacade.assembleData(searchVO);
+        Response<ResponseData> res = aiServiceClient.bayesPageData(searchData);
         if (res == null || res.getData() == null) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "AI没有返回结果");
         }
-
         return res.getData();
     }
 
-    private List<LisResult> processLis(List<LisResult> lisArr) {
-        if (ListUtil.isEmpty(lisArr)) {
-            return lisArr;
-        }
-
-        String Otherval = "";
-
-        for (int i = 0; i < lisArr.size(); i++) {
-            LisResult lisres = lisArr.get(i);
-
-            Otherval = (lisres.getOtherValue().trim().length() > 0) ? lisres.getOtherValue().trim() + "\n" : "";
-            Otherval = lisres.getOtherValue();
-
-            if (Otherval.indexOf(pos) >= 0 || Otherval.indexOf(neg) >= 0) {
-                lisres.setOtherValue(lisres.getUniqueName() + Otherval);
-            } else {
-                Otherval = (Otherval.trim().length() > 0) ? Otherval.trim() + "\n" : "";
-                if (lisres.getValue() == null) {
-                    continue;
-                } else if (lisres.getMaxValue() != null && lisres.getValue() > lisres.getMaxValue()) {
-                    lisres.setOtherValue(Otherval + lisres.getUniqueName() + up);
-                } else if (lisres.getMinValue() != null && lisres.getValue() < lisres.getMinValue()) {
-                    lisres.setOtherValue(Otherval + lisres.getUniqueName() + down);
-                } else {
-                    lisres.setOtherValue(Otherval + lisres.getUniqueName() + normal);
-                }
-            }
-        }
-
-        return lisArr;
-    }
-
     /**
      * 获取量表内容
      *
-     * @param searchVo
+     * @param searchVO
      * @return
      */
-    public Map<String, Object> scale(SearchVo searchVo) {
-        Map<String, Object> response = aiServiceClient.scale(searchVo);
+    public List<ScaleContent> getScale(SearchVO searchVO) {
+        SearchData searchData = assembleFacade.assembleData(searchVO);
+        Map<String, Object> response = aiServiceClient.scale(searchData);
         if (null == response) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "量表没有返回结果");
         }
-        return response;
+        List<ScaleContent> list = getContent(searchData.getScaleName(), JSON.toJSONString(response));
+        return list;
     }
 
-
     /**
      * 获取量表内容
      *
-     * @param searchVo
+     * @param scaleName
+     * @param pushContent
      * @return
      */
-    public List<ScaleContent> getScale(SearchVo searchVo) {
-        Map<String, Object> response = aiServiceClient.scale(searchVo);
-        if (null == response) {
-            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "量表没有返回结果");
-        }
-        List<ScaleContent> list = getContent(searchVo.getScaleName(), JSON.toJSONString(response));
-        return list;
-    }
-
     public List<ScaleContent> getContent(String scaleName, String pushContent) {
         List<ScaleContent> list = scaleContentService.getContentByName(scaleName);
         for (ScaleContent scaleContent : list) {
@@ -170,237 +99,4 @@ public class ClinicalFacade {
         }
         return response;
     }
-
-    public SearchVo addStandWord(List<Lexeme> lexemes, Map<String, List<Map<String, String>>> standWords, SearchVo sData) {
-        List<Lexeme> feature = new ArrayList<>();
-        //收集分词结果中体征指标或体征指标值(数字)
-        for (int i = 0; i < lexemes.size(); i++) {
-            if (lexemes.get(i).getProperty().contains("33") || lexemes.get(i).getProperty().contains("28")
-                    || lexemes.get(i).getProperty().contains("2") || lexemes.get(i).getProperty().contains("9")
-            ) {
-                feature.add(lexemes.get(i));
-            }
-        }
-        //根据收集到的分词结果把体征指标和对应体征指标值(数字)拼接
-        List<String> featureType = new ArrayList<>();
-        for (int i = 0; i < feature.size(); i++) {
-            boolean featureTypeState = true;
-            if (i < feature.size() - 2) {
-                if ((feature.get(i).getProperty().contains("33") && feature.get(i + 1).getProperty().contains("28")
-                        && feature.get(i + 2).getProperty().contains("2"))
-                        || (feature.get(i).getProperty().contains("33") && feature.get(i + 1).getProperty().contains("28")
-                        && feature.get(i + 2).getProperty().contains("9"))) {
-                    featureType.add(feature.get(i).getText() + "\t" + feature.get(i + 1).getText() + "\t"
-                            + feature.get(i + 2).getText());
-                    featureTypeState = false;
-                }
-            }
-            if (i < feature.size() - 1 && featureTypeState) {
-                if (feature.get(i).getProperty().contains("33") && feature.get(i + 1).getProperty().contains("28")) {
-                    featureType.add(feature.get(i).getText() + "\t" + feature.get(i + 1).getText());
-                }
-            }
-        }
-        //将标准词中体征指标值(数字)与分词结果中体征指标值(数字)比较
-        for (String f : featureType) {
-            String[] features = f.split("\t");
-            if (standWords.containsKey(features[0])) {
-                List<Map<String, String>> standWordList = standWords.get(features[0]);
-                for (Map<String, String> standWordMap : standWordList) {
-                    if (standWordMap.containsKey("op") && standWordMap.containsKey("unit")
-                            && standWordMap.containsKey("value")) {
-                        if (features.length == 2) {
-                            judgment(sData, features, features[0], standWordMap);
-                        } else {
-                            if (standWordMap.get("unit").equals(features[2])) {
-                                judgment(sData, features, features[0], standWordMap);
-                            }
-                        }
-                    } else if (standWordMap.containsKey("op") && standWordMap.containsKey("value")) {
-                        if (features.length == 2) {
-                            judgment(sData, features, features[0], standWordMap);
-                        }
-                    }
-                }
-            }
-        }
-        return sData;
-    }
-
-    //将标准词中体征指标值(数字)与分词结果中体征指标值(数字)比较
-    private void judgment(SearchVo sData, String[] features, String standWordKey, Map<String, String> standWordMap) {
-        if (standWordMap.get("op").contains(">=") || standWordMap.get("op").contains("≥")
-                || standWordMap.get("op").contains(">") || standWordMap.get("op").contains("大于")
-                || standWordMap.get("op").contains(">") || standWordMap.get("op").contains("大")) {
-            //单独处理  血压≥140/90mmHg   类似情况
-            if (features[1].contains("/")) {
-                if (standWordMap.get("value").contains("/")) {
-                    String[] feature = features[1].split("/");
-                    Integer featuresSBP = Integer.valueOf(feature[0]); //分词特征收缩压
-                    Integer featuresDBP = Integer.valueOf(feature[1]); //分词特征舒张压
-
-                    String[] values = standWordMap.get("value").split("/");
-                    Integer standWordSBP = Integer.valueOf(values[0]); //标准词收缩压
-                    Integer standWordDBP = Integer.valueOf(values[1]); //标准词舒张压
-                    if (featuresSBP > standWordSBP && featuresDBP > standWordDBP) {
-                        String standWord = standWordKey
-                                + standWordMap.get("op")
-                                + standWordMap.get("value")
-                                + standWordMap.get("unit") + "。";
-                        sData.setSymptom(sData.getSymptom() + standWord);
-                        System.out.println(sData.getSymptom());
-                    }
-                }
-            } else {
-                String num = getNum(standWordMap.get("value"));
-                if (Double.valueOf(getNum(features[1])) > Double.valueOf(num)) {
-                    String standWord = standWordKey
-                            + standWordMap.get("op")
-                            + standWordMap.get("value")
-                            + standWordMap.get("unit") + "。";
-                    sData.setSymptom(sData.getSymptom() + standWord);
-                    System.out.println(sData.getSymptom());
-
-                }
-            }
-        } else if (standWordMap.get("op").contains("<=") || standWordMap.get("op").contains("≤")
-                || standWordMap.get("op").contains("<") || standWordMap.get("op").contains("小于")
-                || standWordMap.get("op").contains("<") || standWordMap.get("op").contains("少于")
-                || standWordMap.get("op").contains("小")) {
-            //单独处理  血压小于90/60mmHg   类似情况
-            if (standWordMap.get("value").contains("/")) {
-                if (features[1].contains("/")) {
-                    String[] feature = features[1].split("/");
-                    Integer featuresSBP = Integer.valueOf(feature[0]); //收缩压
-                    Integer featuresDBP = Integer.valueOf(feature[1]); //舒张压
-
-                    String[] values = standWordMap.get("value").split("/");
-                    Integer standWordSBP = Integer.valueOf(values[0]); //收缩压
-                    Integer standWordDBP = Integer.valueOf(values[1]); //舒张压
-                    if (featuresSBP < standWordSBP && featuresDBP < standWordDBP) {
-                        String standWord = standWordKey
-                                + standWordMap.get("op")
-                                + standWordMap.get("value")
-                                + standWordMap.get("unit") + "。";
-                        sData.setSymptom(sData.getSymptom() + standWord);
-                        System.out.println(sData.getSymptom());
-                    }
-                }
-            } else {
-                String num = getNum(standWordMap.get("value"));
-                if (Double.valueOf(getNum(features[1])) < Double.valueOf(num)) {
-                    String standWord = standWordKey
-                            + standWordMap.get("op")
-                            + standWordMap.get("value")
-                            + standWordMap.get("unit")
-                            + "。";
-                    sData.setSymptom(sData.getSymptom() + standWord);
-                    System.out.println(sData.getSymptom());
-                }
-            }
-        }
-    }
-
-    private String getNum(String standWord) {
-        StringBuffer sb = new StringBuffer();
-        try {
-            for (String num : standWord.replaceAll("[^0-9]", ",").split(",")) {
-                if (num.length() > 0) {
-                    sb.append(num);
-                }
-            }
-        } catch (NumberFormatException e) {
-            e.printStackTrace();
-            System.out.println(e.getMessage() + "不是标准数字");
-        }
-        return sb.toString();
-    }
-
-    private Map<String, List<Map<String, String>>> getStandWord() {
-        Map<String, List<Map<String, String>>> standWordObj = new HashMap<>();
-        List<List<Lexeme>> splitStandWords = new ArrayList<>();
-        List<Lexeme> data = null;
-        /*BufferedReader reader = null;
-        InputStream inputStream = null;
-        String line = "";
-        try {
-            //file = ResourceUtils.getFile("classpath:standword.txt");
-            //            Resource resource = new ClassPathResource("standword.txt");
-            ClassPathResource classPathResource = new ClassPathResource("standword.txt");
-            inputStream = classPathResource.getInputStream();
-            //            file = resource.getFile();
-            reader = new BufferedReader(new InputStreamReader(inputStream, "UTF-8"));
-            while ((line = reader.readLine()) != null) {
-                data = nlpServiceClient.split(line).getData();
-                splitStandWords.add(data);
-                //                standWord.add(line);
-            }
-        } catch (FileNotFoundException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
-        } finally {
-            try {
-                reader.close();
-                inputStream.close();
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
-        }*/
-        List<String> standWords = conceptFacade.getStandWord();
-        for (String standWord : standWords) {
-            data = nlpServiceClient.split(standWord).getData();
-            splitStandWords.add(data);
-        }
-
-        List<Map<String, String>> standWordObjValList = null;
-        Map<String, String> standWordObjVal = null;
-        for (List<Lexeme> splitStandWord : splitStandWords) {
-            standWordObjValList = new ArrayList<>();
-            standWordObjVal = new HashMap<>();
-            int i = 0;
-            String standWordObjKey = "";
-            for (Lexeme lexeme : splitStandWord) {
-                i++;
-                //                if ("\uFEFF".equals(lexeme.getText()) || lexeme.getText().length() <= 0) {
-                //                    continue;
-                //                }
-                if (lexeme.getProperty().contains("1") || lexeme.getProperty().contains("5")
-                        || lexeme.getProperty().contains("33")) {
-                    if (!standWordObj.containsKey(lexeme.getText())) {
-                        standWordObj.put(lexeme.getText(), standWordObjValList);
-                    } else {
-                        standWordObjKey = lexeme.getText();
-                    }
-                } else if (lexeme.getProperty().contains("44")) {
-
-                    if (standWordObjVal.containsKey("op")) {
-                        standWordObjVal.put("op", standWordObjVal.get("op") + "," + lexeme.getText());
-                    } else {
-                        standWordObjVal.put("op", lexeme.getText());
-                    }
-                } else if (lexeme.getProperty().contains("13") || lexeme.getProperty().contains("28")) {
-                    if (standWordObjVal.containsKey("value")) {
-                        standWordObjVal.put("value", standWordObjVal.get("value") + "," + lexeme.getText());
-                    } else {
-                        standWordObjVal.put("value", lexeme.getText());
-                    }
-                } else if (lexeme.getProperty().contains("2") || lexeme.getProperty().contains("9")) {
-                    if (standWordObjVal.containsKey("unit")) {
-                        standWordObjVal.put("unit", standWordObjVal.get("unit") + "," + lexeme.getText());
-                    } else {
-                        standWordObjVal.put("unit", lexeme.getText());
-                    }
-                }
-                if (splitStandWord.size() == i) {
-                    if (standWordObj.containsKey(standWordObjKey)) {
-                        standWordObj.get(standWordObjKey).add(standWordObjVal);
-                    } else {
-                        standWordObjValList.add(standWordObjVal);
-                    }
-                }
-            }
-        }
-        return standWordObj;
-    }
 }

+ 15 - 2
aipt-service/src/main/java/com/diagbot/facade/DisclaimerInformationFacade.java

@@ -7,9 +7,14 @@ import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.enums.StatusEnum;
 import com.diagbot.service.impl.DisclaimerInformationServiceImpl;
 import com.diagbot.util.BeanUtil;
+import com.diagbot.vo.DisclaimerInformationVO;
 import org.springframework.stereotype.Component;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author wangfeng
@@ -18,15 +23,23 @@ import java.util.List;
  */
 @Component
 public class DisclaimerInformationFacade extends DisclaimerInformationServiceImpl {
-
+    private static final Map<Integer,List<String>> map;
+    static
+    {
+        map = new HashMap<>();
+        map.put(1, Arrays.asList("1", "2", "3"));
+        map.put(2, Arrays.asList("1", "2", "3"));
+        map.put(3, Arrays.asList("4"));
+    }
     /**
      * @return
      */
-    public List<DisclaimerInformationDTO> getDisclaimerInformation() {
+    public List<DisclaimerInformationDTO> getDisclaimerInformation(DisclaimerInformationVO disclaimerInformationVO) {
 
         QueryWrapper<DisclaimerInformation> disclaimerInformation = new QueryWrapper<>();
         disclaimerInformation
                 .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .in("disclaimer_code", map.get(disclaimerInformationVO.getType()))
                 .eq("STATUS", StatusEnum.Enable.getKey())
                 .orderByAsc("order_no");
         List<DisclaimerInformation> data = list(disclaimerInformation);

+ 10 - 5
aipt-service/src/main/java/com/diagbot/facade/EvaluationFacade.java

@@ -1,11 +1,13 @@
 package com.diagbot.facade;
 
 import com.alibaba.fastjson.JSONObject;
+import com.diagbot.biz.push.vo.SearchVO;
 import com.diagbot.dto.EvaluationDTO;
 import com.diagbot.service.impl.EvaluationServiceImpl;
 import com.diagbot.util.BeanUtil;
+import com.diagbot.util.StringUtil;
 import com.diagbot.vo.EvaluationDiseaseNameVO;
-import com.diagbot.vo.SearchVo;
+import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -21,16 +23,19 @@ public class EvaluationFacade extends EvaluationServiceImpl {
     /**
      * 获取管理与评估模板接口
      *
-     * @param searchVo
+     * @param searchVO
      * @return
      */
-    public List<EvaluationDTO> getEvaluationModule(SearchVo searchVo) {
+    public List<EvaluationDTO> getEvaluationModule(SearchVO searchVO) {
+        if (searchVO.getDiseaseName() == null || StringUtil.isBlank(searchVO.getDiseaseName().getUniqueName())) {
+            return Lists.newArrayList();
+        }
 
         EvaluationDiseaseNameVO evaluationdiseaseNameVO = new EvaluationDiseaseNameVO();
-        BeanUtil.copyProperties(searchVo, evaluationdiseaseNameVO);
+        BeanUtil.copyProperties(searchVO, evaluationdiseaseNameVO);
         List<EvaluationDTO> evaluationList = this.getEvaluationModule(evaluationdiseaseNameVO);
 
-        Map<String, JSONObject> jsonobject = pushFacade.getManagementEvaluationContent(searchVo);
+        Map<String, JSONObject> jsonobject = pushFacade.getManagementEvaluationContent(searchVO);
         for (String key : jsonobject.keySet()) {
             for (EvaluationDTO evaluadata : evaluationList) {
                 if (key.equals(evaluadata.getRegionName())) {

+ 49 - 59
aipt-service/src/main/java/com/diagbot/facade/PushFacade.java

@@ -1,15 +1,16 @@
 package com.diagbot.facade;
 
 import com.alibaba.fastjson.JSONObject;
-import com.diagbot.client.bean.ResponseData;
-import com.diagbot.client.bean.Treat;
+import com.diagbot.biz.push.entity.Item;
+import com.diagbot.biz.push.entity.ResponseData;
+import com.diagbot.biz.push.vo.SearchVO;
+import com.diagbot.biz.push.entity.Treat;
+import com.diagbot.biz.push.enums.FeatureTypeEnum;
 import com.diagbot.dto.PushDTO;
-import com.diagbot.enums.FeatureTypeEnum;
 import com.diagbot.enums.SysTypeEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.util.StringUtil;
-import com.diagbot.vo.SearchVo;
 import io.github.lvyahui8.spring.aggregate.facade.DataBeanAggregateQueryFacade;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -39,109 +40,98 @@ public class PushFacade {
     /**
      * 推理接口
      *
-     * @param searchVo
+     * @param searchVO
      * @return ResponseData
      */
-    public PushDTO pushInner(SearchVo searchVo) {
+    public PushDTO pushInner(SearchVO searchVO) {
         PushDTO pushDTO = new PushDTO();
         //是否对接
-        Boolean isConnect = transferFacade.isConnect(searchVo.getHosCode(), searchVo.getSysType());
+        Boolean isConnect = transferFacade.isConnect(searchVO.getHosCode(), searchVO.getSysType());
         //入参预处理
-        searchVo = precSearchData(searchVo, isConnect);
-        ResponseData data = clinicalFacade.processClinicalData(searchVo);
+        searchVO = precSearchData(searchVO, isConnect);
+        ResponseData data = clinicalFacade.processClinicalData(searchVO);
 
-        String featureType = searchVo.getFeatureType();
+        //是否有病情提示标志
+        pushDTO.setHasIndications(data.getHasIndications());
+
+        String featureType = searchVO.getFeatureType();
         String[] featureTypes = featureType.split(",|,");
         Set<String> featureTypeSet = new HashSet(Arrays.asList(featureTypes));
 
         try {
             Map<String, Object> invokeParams = new HashMap<>();
+            invokeParams.put("pushDTO",pushDTO);
             invokeParams.put("featureTypeSet", featureTypeSet);
             invokeParams.put("data", data);
             invokeParams.put("isConnect", isConnect);
-            invokeParams.put("hosCode", searchVo.getHosCode());
+            invokeParams.put("hosCode", searchVO.getHosCode());
             pushDTO
                     = dataBeanAggregateQueryFacade.get("setAll", invokeParams, PushDTO.class);
         } catch (Exception e) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR);
         }
-        return pushDTO;
-    }
-
-    /**
-     * 获取管理评估大数据推理内容
-     *
-     * @param searchVo
-     * @return
-     */
-    public Map<String, JSONObject> getManagementEvaluationContent(SearchVo searchVo) {
-        ResponseData data = clinicalFacade.processClinicalData(searchVo);
 
-        String featureType = searchVo.getFeatureType();
-        String[] featureTypes = featureType.split(",|,");
-        Set<String> featureTypeSet = new HashSet(Arrays.asList(featureTypes));
-        if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_ManagementEvaluation.getKey()))) {
-            return data.getManagementEvaluation();
-        } else {
-            return null;
+        //治疗方案单独处理
+        if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Treat.getKey()))) {
+            pushDTO.setTreat(getTreatment(data.getTreat(), searchVO.getDiseaseName(), searchVO.getDisType()));
         }
+        return pushDTO;
     }
 
     /**
-     * 获取量表推理内容
+     * 获取治疗方案
      *
-     * @param searchVo
+     * @param
      * @return
      */
-    public Map<String, Object> scale(SearchVo searchVo) {
-        Map<String, Object> data = clinicalFacade.scale(searchVo);
-        return data;
+    public Treat getTreatment(Treat treat, Item diseaseName, Integer disType) {
+        if (StringUtil.isBlank(diseaseName.getUniqueName())) {
+            throw new CommonException(CommonErrorCode.PARAM_ERROR, "请输入需获取治疗方案的诊断名称");
+        }
+        treat = treatmentFacade.getTreatment(treat, diseaseName, disType);
+        return treat;
     }
 
     /**
-     * 获取治疗方案
+     * 获取管理评估动态推送内容(来源大数据)
      *
-     * @param searchVo
+     * @param searchVO
      * @return
      */
-    public Treat getTreatment(SearchVo searchVo) {
-        //记录外部诊断名称
-        String diseaseName = searchVo.getDiseaseName();
-        //是否对接
-        Boolean isConnect = transferFacade.isConnect(searchVo.getHosCode(), searchVo.getSysType());
-        //入参预处理
-        searchVo = precSearchData(searchVo, isConnect);
-        ResponseData data = clinicalFacade.processClinicalData(searchVo);
-        Treat treat = data.getTreat();
-        if (StringUtil.isBlank(searchVo.getDiseaseName())) {
-            throw new CommonException(CommonErrorCode.PARAM_ERROR, "请输入需获取治疗方案的诊断名称");
-        }
-        treat = treatmentFacade.getTreatment(treat, searchVo.getDiseaseName(), searchVo.getDisType());
+    public Map<String, JSONObject> getManagementEvaluationContent(SearchVO searchVO) {
+        ResponseData data = clinicalFacade.processClinicalData(searchVO);
 
-        //数据引擎模式下,诊断名称转换成外部名称
-        if (isConnect && searchVo.getSysType().equals(SysTypeEnum.LTAPI_SERVICE.getKey())) {
-            treat.setDiseaseName(diseaseName);
+        String featureType = searchVO.getFeatureType();
+        String[] featureTypes = featureType.split(",|,");
+        Set<String> featureTypeSet = new HashSet(Arrays.asList(featureTypes));
+        if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_ManagementEvaluation.getKey()))) {
+            return data.getManagementEvaluation();
+        } else {
+            return null;
         }
-        return treat;
     }
 
     /**
      * searchData入参预处理
      *
-     * @param searchVo
+     * @param searchVO
      * @param isConnect
      * @return
      */
-    public SearchVo precSearchData(SearchVo searchVo, Boolean isConnect) {
+    public SearchVO precSearchData(SearchVO searchVO, Boolean isConnect) {
+        //未对接或非数据引擎模式,不做映射
+        if (!isConnect || (!searchVO.getSysType().equals(SysTypeEnum.LTAPI_SERVICE.getKey()))) {
+            return searchVO;
+        }
         try {
             Map<String, Object> inputParams = new HashMap<>();
-            inputParams.put("searchVo", searchVo);
+            inputParams.put("searchVO", searchVO);
             inputParams.put("isConnect", isConnect);
-            searchVo
-                    = dataBeanAggregateQueryFacade.get("assembleSearchData", inputParams, SearchVo.class);
+            searchVO
+                    = dataBeanAggregateQueryFacade.get("assembleSearchData", inputParams, SearchVO.class);
         } catch (Exception e) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR);
         }
-        return searchVo;
+        return searchVO;
     }
 }

+ 110 - 56
aipt-service/src/main/java/com/diagbot/facade/TransferFacade.java

@@ -1,12 +1,14 @@
 package com.diagbot.facade;
 
+import com.diagbot.biz.push.entity.Item;
+import com.diagbot.biz.push.entity.Lis;
+import com.diagbot.biz.push.entity.Pacs;
+import com.diagbot.biz.push.enums.FeatureTypeEnum;
 import com.diagbot.client.TranServiceClient;
 import com.diagbot.client.bean.HosCodeVO;
-import com.diagbot.dto.LisResult;
-import com.diagbot.dto.PacsResult;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.SysSetInfoDTO;
-import com.diagbot.enums.FeatureTypeEnum;
+import com.diagbot.enums.ConceptTypeEnum;
 import com.diagbot.enums.LisSourceEnum;
 import com.diagbot.enums.SysTypeEnum;
 import com.diagbot.util.BeanUtil;
@@ -76,70 +78,74 @@ public class TransferFacade {
     }
 
     /**
-     * 化验结果增公表名
+     * 化验结果增公表名
      *
-     * @param lisResults
+     * @param lis
      * @param hosCode
      * @return
      */
-    public List<LisResult> addLisUniqueName(List<LisResult> lisResults, String hosCode) {
-        List<LisResult> retLisResults = Lists.newLinkedList();
+    public List<Lis> addLisUniqueName(List<Lis> lis, String hosCode) {
+        if (ListUtil.isEmpty(lis)) {
+            return Lists.newLinkedList();
+        }
+        List<Lis> retLis = Lists.newLinkedList();
         //化验项转公表内容,参数处理
-        if (ListUtil.isNotEmpty(lisResults)) {
-            List<String> mealNameList = lisResults
-                    .stream()
-                    .map(lisResult -> lisResult.getName()).collect(Collectors.toList());
-            LisConfigVO lisConfigVO = new LisConfigVO();
-            lisConfigVO.setHosCode(hosCode);
-            lisConfigVO.setMealNameList(mealNameList);
-            RespDTO<Map<String, Map<String, List<String>>>> lisConfigRes
-                    = tranServiceClient.getLisConfigByMealNameAndHosCode(lisConfigVO);
-            Map<String, Map<String, List<String>>> lisConfigMap = new LinkedHashMap<>();
-            if (RespDTOUtil.respIsOK(lisConfigRes)) {
-                lisConfigMap = lisConfigRes.data;
+        List<String> mealNameList = lis
+                .stream()
+                .map(lisResult -> lisResult.getName()).collect(Collectors.toList());
+        LisConfigVO lisConfigVO = new LisConfigVO();
+        lisConfigVO.setHosCode(hosCode);
+        lisConfigVO.setMealNameList(mealNameList);
+        RespDTO<Map<String, Map<String, List<String>>>> lisConfigRes
+                = tranServiceClient.getLisConfigByMealNameAndHosCode(lisConfigVO);
+        Map<String, Map<String, List<String>>> lisConfigMap = new LinkedHashMap<>();
+        if (RespDTOUtil.respIsOK(lisConfigRes)) {
+            lisConfigMap = lisConfigRes.data;
+        }
+        for (Lis lisResult : lis) {
+            //内部数据,获取标签时映射, 不二次映射
+            if (lisResult.getSource() == null || lisResult.getSource().equals(LisSourceEnum.Inner.getKey())) {
+                retLis.add(lisResult);
+                continue;
             }
-            for (LisResult lisResult : lisResults) {
-                if (!lisResult.getSource().equals(LisSourceEnum.Outer.getKey())) {
-                    retLisResults.add(lisResult);
-                    continue;
-                }
-                if (lisResult.getDetailName() == null) {
-                    lisResult.setDetailName("");
-                }
-                Map<String, List<String>> itemMap = lisConfigMap.get(lisResult.getName());
-                if (itemMap != null) {
-                    List<String> uniqueNameList = itemMap.get(lisResult.getDetailName());
-                    if (ListUtil.isNotEmpty(uniqueNameList)) {
-                        //化验公表映射出多项时,拆分成多个公表项数据,指标值保持一致
-                        for (String uniqueName : uniqueNameList) {
-                            LisResult lisResult_new = new LisResult();
-                            BeanUtil.copyProperties(lisResult, lisResult_new);
-                            lisResult_new.setUniqueName(uniqueName);
-                            retLisResults.add(lisResult_new);
-                        }
-                    } else {
-                        retLisResults.add(lisResult);
+            if (lisResult.getDetailName() == null) {
+                lisResult.setDetailName("");
+            }
+            Map<String, List<String>> itemMap = lisConfigMap.get(lisResult.getName());
+            if (itemMap != null) {
+                List<String> uniqueNameList = itemMap.get(lisResult.getDetailName());
+                if (ListUtil.isNotEmpty(uniqueNameList)) {
+                    //化验公表映射出多项时,拆分成多个公表项数据,指标值保持一致
+                    for (String uniqueName : uniqueNameList) {
+                        Lis lisResult_new = new Lis();
+                        BeanUtil.copyProperties(lisResult, lisResult_new);
+                        lisResult_new.setUniqueName(uniqueName);
+                        retLis.add(lisResult_new);
                     }
+                } else {
+                    retLis.add(lisResult);
                 }
             }
         }
-        return retLisResults;
+        return retLis;
     }
 
 
     /**
      * 辅检结果增加公表名(辅检项目名称)
      *
-     * @param pacsArr
+     * @param pacs
      * @param hosCode
      * @return
      */
-    public List<PacsResult> addPacsUniqueName(List<PacsResult> pacsArr, String hosCode) {
-        Map<String, PacsResult> pacsOriginalMap = EntityUtil.makeEntityMap(pacsArr, "name");
-        List<PacsResult> convertPacsArr = Lists.newLinkedList();
+    public List<Pacs> addPacsUniqueName(List<Pacs> pacs, String hosCode) {
+        if (ListUtil.isEmpty(pacs)) {
+            return Lists.newLinkedList();
+        }
+        List<Pacs> convertPacs = Lists.newLinkedList();
         PacsConfigVO pacsConfigVO = new PacsConfigVO();
         pacsConfigVO.setHosCode(hosCode);
-        pacsConfigVO.setMealNameList(pacsArr
+        pacsConfigVO.setMealNameList(pacs
                 .stream()
                 .map(pacsResult -> pacsResult.getName())
                 .distinct()
@@ -147,20 +153,25 @@ public class TransferFacade {
         RespDTO<Map<String, List<String>>> pacsRespDTO = tranServiceClient.getPacsConfig(pacsConfigVO);
         if (RespDTOUtil.respIsOK(pacsRespDTO)) {
             Map<String, List<String>> pacsMap = pacsRespDTO.data;
-            for (Map.Entry<String, PacsResult> entry : pacsOriginalMap.entrySet()) {
-                if (ListUtil.isNotEmpty(pacsMap.get(entry.getKey()))) {
-                    for (String uniqueName : pacsMap.get(entry.getKey())) {
-                        PacsResult pacsResult = new PacsResult();
-                        BeanUtil.copyProperties(entry.getValue(), pacsResult);
-                        pacsResult.setUniqueName(uniqueName);
-                        convertPacsArr.add(pacsResult);
-                    }
+            for (Pacs pacsResult : pacs) {
+                if (StringUtil.isBlank(pacsResult.getName())) {
+                    convertPacs.add(pacsResult);
+                    continue;
                 } else {
-                    convertPacsArr.add(entry.getValue());
+                    if (ListUtil.isNotEmpty(pacsMap.get(pacsResult.getName()))) {
+                        for (String uniqueName : pacsMap.get(pacsResult.getName())) {
+                            Pacs convertPacsResult = new Pacs();
+                            BeanUtil.copyProperties(pacsResult, convertPacsResult);
+                            convertPacsResult.setUniqueName(uniqueName);
+                            convertPacs.add(convertPacsResult);
+                        }
+                    } else {
+                        convertPacs.add(pacsResult);
+                    }
                 }
             }
         }
-        return convertPacsArr;
+        return convertPacs;
     }
 
     /**
@@ -185,6 +196,49 @@ public class TransferFacade {
         return lisConfigMap;
     }
 
+    /**
+     * 其他类型增加公表名(诊断、药品、手术等)
+     *
+     * @param items
+     * @param hosCode
+     * @return
+     */
+    public List<Item> addItemUniqueName(List<Item> items, Integer type, String hosCode) {
+        if (ListUtil.isEmpty(items)) {
+            return Lists.newLinkedList();
+        }
+        List<Item> convertItems = Lists.newLinkedList();
+        List<String> nameList = items
+                .stream().map(item -> item.getName())
+                .distinct()
+                .collect(Collectors.toList());
+        if (type.equals(ConceptTypeEnum.Disease.getKey())) {
+            DiseaseIcdVO diseaseIcdVO = new DiseaseIcdVO();
+            diseaseIcdVO.setHosCode(hosCode);
+            diseaseIcdVO.setDiseaseNameList(nameList);
+            Map<String, String> disMap = new LinkedHashMap<>();
+            RespDTO<Map<String, String>> disRespDTO = tranServiceClient.getDiseaseIcdMap(diseaseIcdVO);
+            if (RespDTOUtil.respIsOK(disRespDTO)) {
+                disMap = disRespDTO.data;
+                for (Item disease : items) {
+                    if (StringUtil.isBlank(disease.getName())) {
+                        continue;
+                    } else {
+                        disease.setUniqueName(disMap.get(disease.getName()));
+                    }
+                }
+                convertItems = BeanUtil.listCopyTo(items, Item.class);
+            }
+        } else if (type.equals(ConceptTypeEnum.Drug.getKey())) {
+            //暂无映射关系
+            convertItems.addAll(items);
+        } else if (type.equals(ConceptTypeEnum.OPERATION.getKey())) {
+            //暂无映射关系
+            convertItems.addAll(items);
+        }
+        return convertItems;
+    }
+
     /**
      * 外部项目名称转内部名称-字符串格式
      *

+ 12 - 11
aipt-service/src/main/java/com/diagbot/facade/TreatmentFacade.java

@@ -1,11 +1,12 @@
 package com.diagbot.facade;
 
-import com.diagbot.client.bean.AdverseReaction;
-import com.diagbot.client.bean.Medicition;
-import com.diagbot.client.bean.MedicitionClass;
-import com.diagbot.client.bean.MeditionDetail;
-import com.diagbot.client.bean.Treat;
-import com.diagbot.client.bean.TreatmentPlan;
+import com.diagbot.biz.push.entity.AdverseReaction;
+import com.diagbot.biz.push.entity.Item;
+import com.diagbot.biz.push.entity.Medicition;
+import com.diagbot.biz.push.entity.MedicitionClass;
+import com.diagbot.biz.push.entity.MeditionDetail;
+import com.diagbot.biz.push.entity.Treat;
+import com.diagbot.biz.push.entity.TreatmentPlan;
 import com.diagbot.dto.ConceptRes;
 import com.diagbot.entity.Concept;
 import com.diagbot.entity.ConceptDetail;
@@ -50,12 +51,12 @@ public class TreatmentFacade {
      * @param
      * @return
      */
-    public Treat getTreatment(Treat treat, String diseaseName, Integer disType) {
+    public Treat getTreatment(Treat treat, Item diseaseName, Integer disType) {
         List<MedicitionClass> drugsList = Lists.newLinkedList();
         List<String> conceptNameList = Lists.newLinkedList();
-        conceptNameList.add(diseaseName);
+        conceptNameList.add(diseaseName.getUniqueName());
         ConceptBaseVO conceptBaseVO = new ConceptBaseVO();
-        conceptBaseVO.setName(diseaseName);
+        conceptBaseVO.setName(diseaseName.getUniqueName());
         conceptBaseVO.setLibType(LexiconTypeEnum.DIAGNOSIS.getKey());
         Concept disease = conceptFacade.exist(conceptBaseVO);
         if (disease == null) {
@@ -141,7 +142,7 @@ public class TreatmentFacade {
             Concept chronicConcept = conceptFacade.exist(conceptBaseVO);
             ConceptWrapper conceptWrapper = new ConceptWrapper();
             conceptWrapper.setStartId(disease.getId());
-            conceptWrapper.setStartName(diseaseName);
+            conceptWrapper.setStartName(diseaseName.getUniqueName());
             conceptWrapper.setStartType(LexiconTypeEnum.DIAGNOSIS.getKey());
             conceptWrapper.setEndId(chronicConcept.getId());
             conceptWrapper.setEndName(chronicConcept.getLibName());
@@ -154,7 +155,7 @@ public class TreatmentFacade {
         try {
             Map<String, Object> invokeParams = new HashMap<>();
             invokeParams.put("treat", treat);
-            invokeParams.put("diseaseName", diseaseName);
+            invokeParams.put("diseaseName", diseaseName.getUniqueName());
             invokeParams.put("drugsList", drugsList);
             invokeParams.put("treatmentPlan", treatmentPlanList);
             invokeParams.put("conceptMap", conceptMap);

+ 1 - 1
aipt-service/src/main/java/com/diagbot/facade/VersionDetailFacade.java

@@ -36,7 +36,7 @@ public class VersionDetailFacade extends VersionDetailServiceImpl {
         mapAll.put("is_deleted", IsDeleteEnum.N.getKey());
         mapAll.put("version_id", id);
         mapAll.put("STATUS", StatusEnum.Enable.getKey());
-        versionDetailQuery.allEq(mapAll).orderByAsc("order_no");
+        versionDetailQuery.allEq(mapAll).orderByDesc("gmt_create").orderByAsc("order_no");
 
         VersionDetail versionDetail = new VersionDetail();
         versionDetail.setVersionId(id);

+ 20 - 0
aipt-service/src/main/java/com/diagbot/vo/DisclaimerInformationVO.java

@@ -0,0 +1,20 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/1/2 18:11
+ */
+@Getter
+@Setter
+public class DisclaimerInformationVO {
+    /*产品类型
+    1:ICSS
+    2:页面推送模式
+    3:预问诊
+     */
+    private Integer type;
+}

+ 2 - 4
aipt-service/src/main/java/com/diagbot/vo/EvaluationDiseaseNameVO.java

@@ -1,5 +1,6 @@
 package com.diagbot.vo;
 
+import com.diagbot.biz.push.vo.SearchVO;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -11,8 +12,5 @@ import lombok.Setter;
  */
 @Setter
 @Getter
-public class EvaluationDiseaseNameVO extends SearchVo{
-
-	//private String diseaseName;
-	
+public class EvaluationDiseaseNameVO extends SearchVO {
 }

+ 0 - 52
aipt-service/src/main/java/com/diagbot/vo/SearchVo.java

@@ -1,52 +0,0 @@
-package com.diagbot.vo;
-
-import com.diagbot.dto.LisResult;
-import com.diagbot.dto.PacsResult;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.List;
-
-/**
- * @Description:
- * @author: Weixuan Huang
- * @time: 2019/3/4 16:35
- */
-@Getter
-@Setter
-public class SearchVo {
-    @ApiModelProperty(hidden = true)
-    private int length = 10;
-    //外部系统编码 用于返回映射数据,如果sysCode为空或null,则返回kl_standard_info标准名称
-    @ApiModelProperty(hidden = true)
-    private String sysCode = "1";
-    private int age;
-    private String sex;
-    //特征类别
-    private String featureType;
-    private String symptom;
-    private String pasts;
-    private String other;
-    private String vital;
-    @ApiModelProperty(hidden = true)
-    private String lis;
-    private List<LisResult> lisArr;
-    private String pacs;
-    private List<PacsResult> pacsArr;
-    private String diag;
-    private String diseaseName; //指定诊断,例如取治疗方案
-    private String scaleName;   //量表名称
-    private String indications; //指标结果
-    private String adverseReactions; //不良反应
-    private Integer disType;    //诊断类型
-    private String hosCode;  // 对接时,hosCode必填
-    private Integer sysType; //系统类型
-
-    private String lisString;  //化验纯文本
-    private String lisOrder;   //当前正在下单化验
-    private String pacsOrder;   //当前正在下单辅检
-    private String otherOrder; //其他
-
-    private String ruleType;   //规则类型
-}

+ 6 - 16
aipt-service/src/main/java/com/diagbot/web/ClinicalController.java

@@ -2,12 +2,12 @@ package com.diagbot.web;
 
 
 import com.diagbot.annotation.SysLogger;
+import com.diagbot.biz.push.entity.ResponseData;
+import com.diagbot.biz.push.vo.SearchVO;
 import com.diagbot.client.bean.CalculateData;
-import com.diagbot.client.bean.ResponseData;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.ScaleContent;
 import com.diagbot.facade.ClinicalFacade;
-import com.diagbot.vo.SearchVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
-import springfox.documentation.annotations.ApiIgnore;
 
 import javax.validation.Valid;
 import java.util.List;
@@ -40,25 +39,16 @@ public class ClinicalController {
     @ApiOperation(value = "知识库标准化-临床数据处理(只是用大数据推理)", notes = "")
     @PostMapping("/processData")
     @SysLogger("processData")
-    public RespDTO<ResponseData> processData(@Valid @RequestBody SearchVo searchVo) {
-        ResponseData data = clinicalFacade.processClinicalData(searchVo);
-        return RespDTO.onSuc(data);
-    }
-
-    @ApiOperation(value = "获取量表", notes = "")
-    @PostMapping("/scale")
-    @SysLogger("scale")
-    @ApiIgnore
-    public RespDTO<Map<String, Object>> scale(@RequestBody SearchVo searchVo) {
-        Map<String, Object> data = clinicalFacade.scale(searchVo);
+    public RespDTO<ResponseData> processData(@Valid @RequestBody SearchVO searchVO) {
+        ResponseData data = clinicalFacade.processClinicalData(searchVO);
         return RespDTO.onSuc(data);
     }
 
     @ApiOperation(value = "知识库标准化-获取量表内容", notes = "")
     @PostMapping("/getScale")
     @SysLogger("getScale")
-    public RespDTO<List<ScaleContent>> getScale(@RequestBody SearchVo searchVo) {
-        List<ScaleContent> data = clinicalFacade.getScale(searchVo);
+    public RespDTO<List<ScaleContent>> getScale(@RequestBody SearchVO searchVO) {
+        List<ScaleContent> data = clinicalFacade.getScale(searchVO);
         return RespDTO.onSuc(data);
     }
 

+ 4 - 2
aipt-service/src/main/java/com/diagbot/web/DisclaimerInformationController.java

@@ -5,10 +5,12 @@ import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.DisclaimerInformationDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.DisclaimerInformationFacade;
+import com.diagbot.vo.DisclaimerInformationVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -32,8 +34,8 @@ public class DisclaimerInformationController {
     @ApiOperation(value = "知识库标准化-获取免责申明详情[by:wangfeng]", notes = "获取免责申明详情")
     @PostMapping("/getDisclaimerInformations")
     @SysLogger("getDisclaimerInformations")
-    public RespDTO<List<DisclaimerInformationDTO>> getDisclaimerInformations() {
-        List<DisclaimerInformationDTO> data = disclaimerInformationFacade.getDisclaimerInformation();
+    public RespDTO<List<DisclaimerInformationDTO>> getDisclaimerInformations(@RequestBody DisclaimerInformationVO disclaimerInformationVO) {
+        List<DisclaimerInformationDTO> data = disclaimerInformationFacade.getDisclaimerInformation(disclaimerInformationVO);
         return RespDTO.onSuc(data);
     }
 }

+ 3 - 3
aipt-service/src/main/java/com/diagbot/web/EvaluationController.java

@@ -1,10 +1,10 @@
 package com.diagbot.web;
 
 import com.diagbot.annotation.SysLogger;
+import com.diagbot.biz.push.vo.SearchVO;
 import com.diagbot.dto.EvaluationDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.EvaluationFacade;
-import com.diagbot.vo.SearchVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -36,8 +36,8 @@ public class EvaluationController {
     @ApiOperation(value = "获取管理与评估模板[by:wangfeng]", notes = "获取管理与评估模板")
     @PostMapping("/getEvaluationModules")
     @SysLogger("getEvaluationModules")
-    public RespDTO<List<EvaluationDTO>> getEvaluationModules(@Valid @RequestBody SearchVo searchVo) {
-        List<EvaluationDTO> data = evaluationFacade.getEvaluationModule(searchVo);
+    public RespDTO<List<EvaluationDTO>> getEvaluationModules(@Valid @RequestBody SearchVO searchVO) {
+        List<EvaluationDTO> data = evaluationFacade.getEvaluationModule(searchVO);
         return RespDTO.onSuc(data);
     }
 }

+ 52 - 72
aipt-service/src/main/java/com/diagbot/web/PushController.java

@@ -1,11 +1,10 @@
 package com.diagbot.web;
 
 import com.diagbot.annotation.SysLogger;
-import com.diagbot.client.bean.Treat;
+import com.diagbot.biz.push.vo.SearchVO;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.PushFacade;
-import com.diagbot.vo.SearchVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -29,82 +28,63 @@ public class PushController {
     @Autowired
     private PushFacade pushFacade;
 
-    @ApiOperation(value = "知识库标准化-治疗方案[by:zhaops]",
-            notes = "age: 年龄(必填)<br>" +
-                    "sex:性别(必填),M:男,F:女<br>" +
-                    "symptom:症状,String<br>" +
-                    "pasts:既往史,String<br>" +
-                    "other:其它史,String<br>" +
-                    "vital:查体,String<br>" +
-                    "lis:化验,Array<br>" +
-                    "lis:name:套餐名称(必填),String<br>" +
-                    "lis:detailName:化验项名称(必填),String<br>" +
-                    "lis:uniqueName:公表名称,String<br>" +
-                    "lis:value:值,Double<br>" +
-                    "lis:maxValue:最大值,Double<br>" +
-                    "lis:minValue:最小值,Double<br>" +
-                    "lis:units:单位,String<br>" +
-                    "lis:otherValue:其他结果,包括阴性阳性,文字描述等,String<br>" +
-                    "lis:source:数据来源(必填),Integer<br>" +
-                    "pacs:辅检,String<br>" +
-                    "pacsArr:辅检结构化输入,Array<br>" +
-                    "pacsArr:name:辅检项目,String<br>" +
-                    "pacsArr:uniqueName:辅检项目(标准术语名),String<br>" +
-                    "pacsArr:result:辅检结果,String<br>" +
-                    "diag:诊断,String<br>" +
-                    "featureType:类型(必填),8:治疗方案,String<br>" +
-                    "diseaeName:取治疗方案的诊断,String<br>" +
-                    "disType:诊断类型,1-慢病,2-急诊,普通病不填,Integer<br>" +
-                    "indications:指标结果,String<br>" +
-                    "adverseReactions:不良反应,String<br>" +
-                    "lisString:化验纯文本,String<br>" +
-                    "lisOrder:下单化验项,多项用分号隔开,String<br>" +
-                    "pacsOrder:下单辅检项,多项用分号隔开,String<br>" +
-                    "otherOrder:其他下单项,多项用分号隔开,String<br>" +
-                    "ruleType:规则类型,1:危急值提醒  2:开单合理性  3:管理评估  4:不良反应  5:药物推荐  6:异常值,多项用分号隔开,String<br>")
-    @PostMapping("/treatment")
-    @SysLogger("treatment")
-    public RespDTO<Treat> getTreatment(@Valid @RequestBody SearchVo searchVo) {
-        Treat data = pushFacade.getTreatment((searchVo));
-        return RespDTO.onSuc(data);
-    }
-
     @ApiOperation(value = "知识库标准化-推理接口[by:zhaops]",
-            notes = "age: 年龄(必填)<br>" +
-                    "sex:性别(必填),M:男,F:女<br>" +
-                    "symptom:症状,String<br>" +
+            notes = "hosCode: 医院编码<br>" +
+                    "featureType:类型(必填多选),1:症状,4:查体结果,41:查体模板,42:查体指标,5:化验,6:辅检,7:诊断,8:治疗方案,22:病情提示(核心指标、危急值、开单合理项、异常值等),多项用逗号分开,String<br>" +
+                    "ruleType:规则类型,1:危急值提醒  2:开单合理性  3:管理评估  4:不良反应  5:药物推荐  6:异常值,多项用分号隔开,String<br>" +
+                    "age: 年龄(必填)<br>" +
+                    "sex:性别(必填),1:男,2:女,Integer<br>" +
+                    "chief:主诉,String<br>" +
+                    "symptom:现病史,String<br>" +
+                    "vital:查体,String<br>" +
                     "pasts:既往史,String<br>" +
+                    "infectious:传染病史,String<br>" +
+                    "operation:手术外伤史,String<br>" +
+                    "allergy:过敏史,String<br>" +
+                    "vaccination:接种史,String<br>" +
+                    "personal:个人史,String<br>" +
+                    "marital:婚育史,String<br>" +
+                    "family:家族史,String<br>" +
+                    "menstrual:月经史,String<br>" +
                     "other:其它史,String<br>" +
-                    "vital:查体,String<br>" +
-                    "lis:化验,Array<br>" +
-                    "lis:name:套餐名称(必填),String<br>" +
-                    "lis:detailName:化验项名称(必填),String<br>" +
-                    "lis:uniqueName:公表名称,String<br>" +
-                    "lis:value:值,Double<br>" +
-                    "lis:maxValue:最大值,Double<br>" +
-                    "lis:minValue:最小值,Double<br>" +
+                    "lisString:化验文本输入,String<br>" +
+                    "pacsString:辅检文本输入,String<br>" +
+                    "diagString:诊断文本输入,String<br>" +
+                    "drugString:药品文本输入,String<br>" +
+                    "lis:化验,ArrayList<br>" +
+                    "lis.name:套餐名称(必填),String<br>" +
+                    "lis.detailName:化验项名称(必填),String<br>" +
+                    "lis.uniqueName:公表名称,String<br>" +
+                    "lis.value:值,Double<br>" +
+                    "lis.otherValue:其他结果,包括阴性阳性,文字描述等,String<br>" +
                     "lis:units:单位,String<br>" +
-                    "lis:otherValue:其他结果,包括阴性阳性,文字描述等,String<br>" +
-                    "lis:source:数据来源(必填),Integer<br>" +
-                    "pacs:辅检,String<br>" +
-                    "pacsArr:辅检结构化输入,Array<br>" +
-                    "pacsArr:name:辅检项目,String<br>" +
-                    "pacsArr:uniqueName:辅检项目(标准术语名),String<br>" +
-                    "pacsArr:result:辅检结果,String<br>" +
-                    "diag:诊断,String<br>" +
-                    "featureType:类型(必填),1:症状,3:其他史,4:查体结果,42:查体指标,5:化验,6:辅检,7:诊断,22-指标,String<br>" +
-                    "disType:诊断类型,1-慢病,2-急诊,普通病不填,Integer<br>" +
-                    "indications:指标结果,String<br>" +
-                    "adverseReactions:不良反应,String<br>" +
-                    "lisString:化验纯文本,String<br>" +
-                    "lisOrder:下单化验项,多项用分号隔开,String<br>" +
-                    "pacsOrder:下单辅检项,多项用分号隔开,String<br>" +
-                    "otherOrder:其他下单项,多项用分号隔开,String<br>" +
-                    "ruleType:规则类型,1:危急值提醒  2:开单合理性  3:管理评估  4:不良反应  5:药物推荐  6:异常值,多项用分号隔开,String<br>")
+                    "lis.minValue:最小值,Double<br>" +
+                    "lis.maxValue:最大值,Double<br>" +
+                    "lis.result:HIS比较结果,String<br>" +
+                    "lis.dateValue:结果时间,String<br>" +
+                    "lis:source:数据来源(必填),0:内部来源,1:外部来源,Integer<br>" +
+                    "pacs:辅检,ArrayList<br>" +
+                    "pacs.name:辅检项目(外部),String<br>" +
+                    "pacs.uniqueName:公表名辅检项目(内部),String<br>" +
+                    "pacs.desc:检查描述(描述信息),String<br>" +
+                    "pacs.result:检查结果(非描述信息),String<br>" +
+                    "pacs.dateValue:结果时间,String<br>" +
+                    "diag:诊断,ArrayList<br>" +
+                    "item.name:外部项目名称(诊断、药品等),String<br>" +
+                    "item.uniqueName:内部项目名称(诊断、药品等),String<br>" +
+                    "item.dateValue:结果时间,String<br>" +
+                    "lisOrder:当前化验开单项,参考lis结构<br>" +
+                    "pacsOrder:当前辅检开单项,参考pacs结构<br>" +
+                    "diagOrder:当前诊断开单项,参考item结构<br>" +
+                    "drugOrder:当前药品开单项,参考item结构<br>" +
+                    "operationOrder:当前手术开单项,参考item结构<br>" +
+                    "otherOrder:其他开单项,参考item结构<br>" +
+                    "diseaseName:选中诊断,参考item结构<br>" +
+                    "disType:诊断类型,1-慢病,2-急诊,普通病不填,Integer<br>")
     @PostMapping("/pushInner")
     @SysLogger("pushInner")
-    public RespDTO<PushDTO> pushInner(@Valid @RequestBody SearchVo searchVo) {
-        PushDTO data = pushFacade.pushInner(searchVo);
+    public RespDTO<PushDTO> pushInner(@Valid @RequestBody SearchVO searchVO) {
+        PushDTO data = pushFacade.pushInner(searchVO);
         return RespDTO.onSuc(data);
     }
 }

+ 1 - 1
aipt-service/src/main/resources/mapper/EvaluationMapper.xml

@@ -31,7 +31,7 @@
 		WHERE a.is_deleted = "N"
 		AND b.lib_type = 18
 		<if test="evaluationModule.diseaseName != null">
-		AND b.lib_name = #{evaluationModule.diseaseName}
+		AND b.lib_name = #{evaluationModule.diseaseName.uniqueName}
 		</if>
 	</select>
 </mapper>

+ 25 - 0
common-biz-client/.gitignore

@@ -0,0 +1,25 @@
+/target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/build/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/

+ 94 - 0
common-biz-client/pom.xml

@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.diagbot</groupId>
+    <artifactId>common-biz-client</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <packaging>jar</packaging>
+
+    <name>common-biz-client</name>
+    <description>common biz client project for Spring Boot</description>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <encoding>UTF-8</encoding>
+        <java.version>1.8</java.version>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+        <docker.image.prefix>192.168.2.236:5000/diagbotcloud</docker.image.prefix>
+        <registryUrl>http://192.168.2.236:5000/repository/diagbotcloud/</registryUrl>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <version>2.2.1.RELEASE</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+            <version>2.2.0.RELEASE</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
+            <version>2.2.0.RELEASE</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.18.10</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.diagbot</groupId>
+            <artifactId>common</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+            <!-- 添加docker-maven插件 -->
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+                <version>1.1.1</version>
+                <configuration>
+                    <imageName>${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>
+                    <pushImage>true</pushImage>
+                    <!--<forceTags>true</forceTags>-->
+                    <!--镜像的FROM,使用java官方镜像-->
+                    <baseImage>frolvlad/alpine-oraclejre8:slim</baseImage>
+                    <entryPoint>["java", "-jar", "-Xms256m", "-Xmx1024m", "-Duser.timezone=GMT+8","/${project.build.finalName}.jar"]</entryPoint>
+                    <resources>
+                        <resource>
+                            <targetPath>/</targetPath>
+                            <directory>${project.build.directory}</directory>
+                            <include>${project.build.finalName}.jar</include>
+                        </resource>
+                    </resources>
+                    <serverId>docker-registry</serverId>
+                    <registryUrl>${registryUrl}</registryUrl>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 27 - 0
common-biz-client/src/main/java/com/diagbot/client/MrqcServiceClient.java

@@ -0,0 +1,27 @@
+package com.diagbot.client;
+
+import com.diagbot.client.hystrix.MrqcServiceHystrix;
+import com.diagbot.entity.Response;
+import com.diagbot.vo.QueryVO;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.util.Map;
+
+/**
+ * @Description: 病历质控远程调用客户端
+ * @author: gaodm
+ * @time: 2019/12/23 9:40
+ */
+@FeignClient(name = "MRQC", url = "${mrqc.server.address}", fallback = MrqcServiceHystrix.class)
+public interface MrqcServiceClient {
+
+    @PostMapping(value = "/analyse/recInner")
+    Response<Map<String, Object>> extract(@RequestBody QueryVO queryVO);
+}
+
+
+

+ 26 - 0
common-biz-client/src/main/java/com/diagbot/client/hystrix/MrqcServiceHystrix.java

@@ -0,0 +1,26 @@
+package com.diagbot.client.hystrix;
+
+import com.diagbot.client.MrqcServiceClient;
+import com.diagbot.entity.Response;
+import com.diagbot.vo.QueryVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import java.util.Map;
+
+/**
+ * @Description: 病历质控远程调用客户端(请求失败熔断)
+ * @author: gaodm
+ * @time: 2019/12/23 9:40
+ */
+@Component
+@Slf4j
+public class MrqcServiceHystrix implements MrqcServiceClient {
+
+    @Override
+    public Response<Map<String, Object>> extract(@RequestBody QueryVO queryVO) {
+        log.error("【hystrix】调用{}异常", "extract");
+        return null;
+    }
+}

+ 159 - 0
common-biz-client/src/main/java/com/diagbot/entity/Constants.java

@@ -0,0 +1,159 @@
+/**
+ * @Company: 杭州朗通信息技术有限公司
+ * @Department: 系统软件部
+ * @Description: 朗通智能辅助诊疗系统
+ * @Address: 浙江省杭州市西湖区西斗门路3号 天堂软件园D-7B
+ */
+package com.diagbot.entity;
+
+/**
+ * @Title: Constants.java
+ * @Package org.diagbot.public
+ * @Description: 通用常数接口定义
+ * @author 楼辉荣(Fyeman)
+ * @date 2015年4月23日 下午11:25:37
+ * @version V1.0
+ */
+public interface Constants {
+    /**
+     * 操作名称
+     */
+    String OP_NAME = "op";
+    /**
+     * 消息key
+     */
+    String MESSAGE = "message";
+    /**
+     * 错误key
+     */
+    String ERROR = "error";
+    /**
+     * 上个页面地址
+     */
+    String BACK_URL = "BackURL";
+    String IGNORE_BACK_URL = "ignoreBackURL";
+    /**
+     * 当前请求的地址 带参数
+     */
+    String CURRENT_URL = "currentURL";
+    /**
+     * 当前请求的地址 不带参数
+     */
+    String NO_QUERYSTRING_CURRENT_URL = "noQueryStringCurrentURL";
+    /**
+     * 上下文
+     */
+    String CONTEXT_PATH = "ctx";
+    /**
+     * 当前登录的用户
+     */
+    String CURRENT_APPLICATION = "c_app";
+    String CURRENT_USER = "c_user";
+    String CURRENT_USERNAME = "username";
+    String USER_MENUS = "menus";
+
+    /**
+     * 管理控制台应用ID=0
+     */
+    long ADMIN_APPLICATION = 0;
+    /**
+     * 一级菜单grade标识
+     */
+    int FIRST_MENU = 1;
+    /**
+     * 二级菜单grade标识
+     */
+    int SECOND_MENU = 2;
+    /**
+     * 操作按钮等级标识
+     */
+    int MENU_GRADE = 3;
+    /**
+     * 最高级资源grade标识
+     */
+    int TOP_REC = 0;
+    /**
+     * 编码方式
+     */
+    String ENCODING = "UTF-8";
+    /**
+     * 系统用户状态--启用
+     */
+    int USER_STATUS_UNLOCK = 1;
+    /**
+     * 系统用户状态--禁用
+     */
+    int USER_STATUS_LOCK = 0;
+    /**
+     * 通用值0
+     */
+    int COMMON_INT_0 = 0;
+    /**
+     * 通用值1
+     */
+    int COMMON_INT_1 = 1;
+    /**
+     * 通用值-1
+     */
+    int COMMON_INT_NEG_1 = -1;
+    /**
+     * 通用值0
+     */
+    long COMMON_LONG_0 = 0L;
+    /**
+     * 通用值1
+     */
+    long COMMON_LONG_1 = 1L;
+    /**
+     * 通用值-1
+     */
+    long COMMON_LONG_NEG_1 = -1L;
+    /**
+     * 通用值"0"
+     */
+    String COMMON_STRING_0 = "0";
+    /**
+     * 通用值"1"
+     */
+    String COMMON_STRING_1 = "1";
+    /**
+     * 通用值"-1"
+     */
+    String COMMON_STRING_NEG_1 = "-1";
+
+    /**
+     * 通用值"-1"
+     */
+    String COMMON_STRING_99 = "99";
+    /**
+     * 登录页面
+     */
+    String LOGIN_URL = "/login";
+    /**
+     * 上传文件夹
+     */
+    String UPLOAD_FOLDER_NAME = "upload";
+    /**
+     * 临时文件夹
+     */
+    String TEMP_FOLDER_NAME = "temp";
+    /**
+     * 地域标示
+     */
+    public static final String DEFAULT_LOCALE = "zh_CN";
+    /**
+     * 缺省字符集
+     */
+    public static final String DEFAULT_ENCODE = "UTF-8";
+    /**
+     * 以下为接口返回公共属性定义常量
+     */
+    public static final String MSG_SUCCESS = "操作成功";    //操作成功
+    public static final String MSG_FALURE = "操作失败";    //操作失败
+
+    public static final long INVALIDATE_VALUE = -1;        //起止时间定义
+    public static final int RET_SUCCESS = 0;            //成功
+    public static final int RET_FAIL = 1;                //失败
+    public static final int RET_ERROR_PARAM = -1;        //参数校验失败
+    public static final int RET_NO_TOKEN = -2;    //用户token丢失
+}

+ 190 - 0
common-biz-client/src/main/java/com/diagbot/entity/Response.java

@@ -0,0 +1,190 @@
+package com.diagbot.entity;
+
+/**
+ * ClassName: org.diagbot.pub.api.Response
+ * Function: API接口提供标准返回数据包, 数据包格式如下:
+ * {
+ * status:"OK",
+ * startTime:8206448610408,
+ * endTime:8206448610418,
+ * version:"1.0",
+ * msg:"操作成功",
+ * ret:"0",
+ * timeConsum:10,
+ * data:{
+ * ..。
+ * }
+ * }
+ * date: 2015年7月6日 下午1:36:58
+ *
+ * @author 楼辉荣(Fyeman)
+ * @version 1.0
+ * @since JDK 1.7
+ */
+public class Response<T> implements java.io.Serializable {
+    private static final long serialVersionUID = 8206448610408409499L;
+    private Status status = Status.PENDING;  //状态
+    private long startTime = Constants.INVALIDATE_VALUE;                                  //起始时间
+    private long endTime = Constants.INVALIDATE_VALUE;                                    //结束时间
+    private String version = "1.0";
+    private String msg = Constants.MSG_SUCCESS;                                  //消息
+    private T data = null;                                                                //序列化后的结果数据
+    // 返回结果标志,默认成功0,失败 1 参数错误 -1 token丢失-2
+    private int ret = Constants.RET_SUCCESS;
+
+    private String token;
+    //耗时
+    private long timeConsum;
+
+    public int getRet() {
+        return ret;
+    }
+
+    public void setRet(int ret) {
+        this.ret = ret;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public long getTimeConsum() {
+        return timeConsum;
+    }
+
+    public void setTimeConsum(long timeConsum) {
+        this.timeConsum = timeConsum;
+    }
+
+    public Response() {
+        super();
+    }
+
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * 在调用end()方法时,会自动设置状态,因此,如果调用了end()方法,就不要调用这个方法
+     *
+     * @param status
+     */
+    public Response<T> setStatus(Status status) {
+        this.status = status;
+        return this;
+    }
+
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    public long getStartTime() {
+        return startTime;
+    }
+
+    public Response<T> setStartTime(long startTime) {
+        this.startTime = startTime;
+        return this;
+    }
+
+    public long getEndTime() {
+        return endTime;
+    }
+
+    public Response<T> setEndTime(long endTime) {
+        this.endTime = endTime;
+        return this;
+    }
+
+    public T getData() {
+        return data;
+    }
+
+    public void setData(T data) {
+        this.data = data;
+    }
+
+    public String getToken() {
+        return token;
+    }
+
+    public void setToken(String token) {
+        this.token = token;
+    }
+
+    /**
+     * 设置状态和起始时间,表示操作正在进行
+     */
+    public Response<T> start() {
+        this.setStatus(Status.RUNNING);
+        this.setStartTime(System.currentTimeMillis());
+        return this;
+    }
+
+    /**
+     * 设置状态和时间,表示操作结束,没有失败
+     */
+    public Response<T> end() {
+        this.setEndTime(System.currentTimeMillis());
+        this.setTimeConsum(this.endTime - this.startTime);
+        this.setStatus(Status.OK);
+        return this;
+    }
+
+    /**
+     * 设置状态和时间,表示操作结束,并且失败
+     */
+    public Response<T> endAndFailed() {
+        this.setStatus(Status.FAIL);
+        this.setEndTime(System.currentTimeMillis());
+        return this;
+    }
+
+    /**
+     * 非参数错误通用失败信息
+     */
+    public Response<T> failure(String msg) {
+        this.msg = msg;
+        this.ret = Constants.RET_FAIL;
+        this.end();
+        return this;
+    }
+
+    /**
+     * 参数错误信息
+     */
+    public Response<T> paramFailure(String msg) {
+        this.msg = msg;
+        this.ret = Constants.RET_ERROR_PARAM;
+        this.end();
+        return this;
+    }
+
+    /**
+     * 用户信息丢失
+     */
+    public Response<T> tokenFailure(String msg) {
+        this.msg = msg;
+        this.ret = Constants.RET_NO_TOKEN;
+        this.end();
+        return this;
+    }
+
+    /**
+     * 通用成功
+     */
+    public Response<T> success() {
+        this.end();
+        return this;
+    }
+
+}

+ 132 - 0
common-biz-client/src/main/java/com/diagbot/entity/Status.java

@@ -0,0 +1,132 @@
+package com.diagbot.entity;
+
+public enum Status {
+    /**
+     * <code>PENDING = 1;</code>
+     *
+     * <pre>
+     * 操作尚未开始
+     * </pre>
+     */
+    PENDING(1),
+    /**
+     * <code>RUNNING = 2;</code>
+     *
+     * <pre>
+     * 操作开始
+     * </pre>
+     */
+    RUNNING(2),
+    /**
+     * <code>OK = 3;</code>
+     *
+     * <pre>
+     * 操作正常结束
+     * </pre>
+     */
+    OK(3),
+    /**
+     * <code>WARN = 4;</code>
+     *
+     * <pre>
+     * 有警告,但是正常结束
+     * </pre>
+     */
+    WARN(4),
+    /**
+     * <code>ERROR = 5;</code>
+     *
+     * <pre>
+     * 有错误,但是完整结束
+     * </pre>
+     */
+    ERROR(5),
+    /**
+     * <code>FAIL = 6;</code>
+     *
+     * <pre>
+     * 操作失败
+     * </pre>
+     */
+    FAIL(6),
+    ;
+
+    /**
+     * <code>PENDING = 1;</code>
+     *
+     * <pre>
+     * 操作尚未开始
+     * </pre>
+     */
+    public static final int PENDING_VALUE = 1;
+    /**
+     * <code>RUNNING = 2;</code>
+     *
+     * <pre>
+     * 操作开始
+     * </pre>
+     */
+    public static final int RUNNING_VALUE = 2;
+    /**
+     * <code>OK = 3;</code>
+     *
+     * <pre>
+     * 操作正常结束
+     * </pre>
+     */
+    public static final int OK_VALUE = 3;
+    /**
+     * <code>WARN = 4;</code>
+     *
+     * <pre>
+     * 有警告,但是正常结束
+     * </pre>
+     */
+    public static final int WARN_VALUE = 4;
+    /**
+     * <code>ERROR = 5;</code>
+     *
+     * <pre>
+     * 有错误,但是完整结束
+     * </pre>
+     */
+    public static final int ERROR_VALUE = 5;
+    /**
+     * <code>FAIL = 6;</code>
+     *
+     * <pre>
+     * 操作失败
+     * </pre>
+     */
+    public static final int FAIL_VALUE = 6;
+
+    public final int getNumber() {
+        return value;
+    }
+
+    public static Status valueOf(int value) {
+        switch (value) {
+            case 1:
+                return PENDING;
+            case 2:
+                return RUNNING;
+            case 3:
+                return OK;
+            case 4:
+                return WARN;
+            case 5:
+                return ERROR;
+            case 6:
+                return FAIL;
+            default:
+                return null;
+        }
+    }
+
+    private final int value;
+
+    private Status(int value) {
+        this.value = value;
+    }
+
+}

+ 30 - 0
common-biz-client/src/main/java/com/diagbot/facade/MrqcFacade.java

@@ -0,0 +1,30 @@
+package com.diagbot.facade;
+
+import com.diagbot.client.MrqcServiceClient;
+import com.diagbot.entity.Response;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.vo.QueryVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2019/12/23 15:38
+ */
+@Component
+public class MrqcFacade {
+    @Autowired
+    private MrqcServiceClient mrqcServiceClient;
+
+    public Map<String, Object> extract(QueryVO queryVO) {
+        Response<Map<String, Object>> res = mrqcServiceClient.extract(queryVO);
+        if (res == null || res.getData() == null) {
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "病历质控没有返回结果");
+        }
+        return res.getData();
+    }
+}

+ 21 - 0
common-biz-client/src/main/java/com/diagbot/vo/MedrecVO.java

@@ -0,0 +1,21 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 病历查询结构
+ * @author: Mark Huang
+ * @Time: 2019/04/04 :15:14
+ *
+ */
+@Getter
+@Setter
+public class MedrecVO {
+    private String title;
+    private Map<String, String> content;
+    private List<String> label;
+}

+ 23 - 0
common-biz-client/src/main/java/com/diagbot/vo/QueryVO.java

@@ -0,0 +1,23 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description: 业务查询
+ * @author: Mark Huang
+ * @Time: 2019/04/04 :15:14
+ *
+ */
+@Getter
+@Setter
+public class QueryVO extends TokenVO {
+
+//    private String title;
+//    private String content;
+    private List<MedrecVO> medrec;
+    // 调用id, 0:ICSS
+    private int cid;
+}

+ 17 - 0
common-biz-client/src/main/java/com/diagbot/vo/TokenVO.java

@@ -0,0 +1,17 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+
+/**
+ * @description:
+ * @author: zhoutg
+ * @time: 2019/12/24 19:17
+ */
+@Getter
+@Setter
+public class TokenVO implements Serializable {
+    private String token; //token信息
+}

+ 38 - 0
common/src/main/java/com/diagbot/biz/push/dto/ConceptDetailDTO.java

@@ -0,0 +1,38 @@
+package com.diagbot.biz.push.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:静态知识返回结构
+ * @Author:zhaops
+ * @time: 2019/12/11 9:38
+ */
+@Getter
+@Setter
+public class ConceptDetailDTO {
+    /**
+     * 提示明细标题
+     */
+    private String title;
+
+    /**
+     * 提示明细内容
+     */
+    private String content;
+
+    /**
+     * 纯文本
+     */
+    private String text;
+
+    /**
+     * 是否诊断依据(1-是,0-否)
+     */
+    private Integer isReason;
+
+    /**
+     * 显示位置(多选):1-推送展示,2-更多展示,3-一般治疗展示,4-手术治疗展示,5-药品说明书,6-不良反应,7-症状描述信息(智能分诊)
+     */
+    private String position;
+}

+ 44 - 0
common/src/main/java/com/diagbot/biz/push/entity/AdverseReaction.java

@@ -0,0 +1,44 @@
+package com.diagbot.biz.push.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description: 不良反应
+ * @Author:zhaops
+ * @time: 2019/3/14 11:14
+ */
+@Getter
+@Setter
+public class AdverseReaction {
+    /**
+     * 术语id
+     */
+    private Long conceptId;
+    /**
+     * 术语名称
+     */
+    private String name;
+    /**
+     * 词性
+     */
+    private Integer libType;
+    /**
+     * 类型(10:不良反应)
+     */
+    private Integer type;
+    /**
+     * 是否有提示信息(0:无,1:有)
+     */
+    private String showInfo = "0";
+    /**
+     * 控件类型(0:单选-radio,2:多选-checkbox,2:文本框-text,3:下拉列表-dropdownlist)
+     */
+    private Integer controlType;
+    /**
+     * 选项明细
+     */
+    private List<AdverseReactionDetail> details;
+}

+ 8 - 2
ltapi-service/src/main/java/com/diagbot/client/bean/AdverseReactionDetail.java

@@ -1,4 +1,4 @@
-package com.diagbot.client.bean;
+package com.diagbot.biz.push.entity;
 
 import lombok.Getter;
 import lombok.Setter;
@@ -11,6 +11,12 @@ import lombok.Setter;
 @Getter
 @Setter
 public class AdverseReactionDetail {
+    /**
+     * 选项名称
+     */
     private String name;
-    private Integer value; //是否选中:0-未选中,1-选中
+    /**
+     * 是否选中(推荐值,0:未选中,1:选中)
+     */
+    private Integer value;
 }

+ 1 - 5
triage-service/src/main/java/com/diagbot/client/bean/FeatureRate.java

@@ -1,11 +1,8 @@
-package com.diagbot.client.bean;
+package com.diagbot.biz.push.entity;
 
-import com.diagbot.dto.HospitalDeptDTO;
 import lombok.Getter;
 import lombok.Setter;
 
-import java.util.List;
-
 /**
  * Created by fyeman on 2018/1/17.
  */
@@ -16,5 +13,4 @@ public class FeatureRate {
     private String extraProperty;
     private String desc;
     private String rate;
-    private List<HospitalDeptDTO> hospitalDepts;
 }

+ 26 - 0
common/src/main/java/com/diagbot/biz/push/entity/Item.java

@@ -0,0 +1,26 @@
+package com.diagbot.biz.push.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:诊断、药品等对接项目通用结构
+ * @Author:zhaops
+ * @time: 2019/12/10 14:29
+ */
+@Getter
+@Setter
+public class Item {
+    /**
+     * HIS名称
+     */
+    private String name;
+    /**
+     * 内部名称(公表名)
+     */
+    private String uniqueName;
+    /**
+     * 结果时间
+     */
+    private String dateValue;
+}

+ 58 - 0
common/src/main/java/com/diagbot/biz/push/entity/Lis.java

@@ -0,0 +1,58 @@
+package com.diagbot.biz.push.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:化验结构
+ * @Author:zhaops
+ * @time: 2019/12/6 11:11
+ */
+@Getter
+@Setter
+public class Lis {
+    /**
+     * 套餐名称
+     */
+    private String name;
+    /**
+     * 化验明细项
+     */
+    private String detailName;
+    /**
+     * 化验公表名
+     */
+    private String uniqueName;
+    /**
+     * 化验结果值
+     */
+    private Double value;
+    /**
+     * 单位
+     */
+    private String units;
+    /**
+     * 最小值
+     */
+    private Double minValue;
+    /**
+     * 最大值
+     */
+    private Double maxValue;
+    /**
+     * 其他非数值结果,包括阴性阳性,文字描述等
+     */
+    private String otherValue;
+    /**
+     * 结果时间
+     */
+    private String dateValue;
+    /**
+     * 数据来源(0:内部数据,1:外部数据)
+     */
+    private Integer source;
+    /**
+     * HIS比较结果
+     */
+    private String result;
+}

+ 150 - 0
common/src/main/java/com/diagbot/biz/push/entity/MRBaseData.java

@@ -0,0 +1,150 @@
+package com.diagbot.biz.push.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description:病历基本信息
+ * @Author:zhaops
+ * @time: 2019/12/16 16:22
+ */
+@Getter
+@Setter
+public class MRBaseData {
+    /**
+     * 医院编码
+     */
+    private String hosCode = "";
+    /**
+     * 年龄
+     */
+    private Integer age;
+
+    /**
+     * 婚姻
+     */
+    private String marriage = "";
+    /**
+     * 主诉
+     */
+    private String chief = "";
+    /**
+     * 现病史
+     */
+    private String symptom = "";
+    /**
+     * 查体
+     */
+    private String vital = "";
+    /**
+     * 既往史
+     */
+    private String pasts = "";
+    /**
+     * 传染病史
+     */
+    private String infectious = "";
+    /**
+     * 手术外伤史
+     */
+    private String operation = "";
+    /**
+     * 过敏史
+     */
+    private String allergy = "";
+    /**
+     * 接种史
+     */
+    private String vaccination = "";
+    /**
+     * 个人史
+     */
+    private String personal = "";
+    /**
+     * 婚育史
+     */
+    private String marital = "";
+    /**
+     * 家族史
+     */
+    private String family = "";
+    /**
+     * 月经史
+     */
+    private String menstrual = "";
+    /**
+     * 其他史
+     */
+    private String other = "";
+    /**
+     * 化验文本数据
+     */
+    private String lisString = "";
+    /**
+     * 辅检文本数据
+     */
+    private String pacsString = "";
+    /**
+     * 诊断文本数据
+     */
+    private String diagString = "";
+    /**
+     * 药品文本数据
+     */
+    private String drugString = "";
+    /**
+     * 化验项目和结果
+     */
+    private List<Lis> lis = new ArrayList<>();
+    /**
+     * 辅检项目和结果
+     */
+    private List<Pacs> pacs = new ArrayList<>();
+    /**
+     * 诊断
+     */
+    private List<Item> diag = new ArrayList<>();
+    /**
+     * 药品
+     */
+    private List<Item> drug = new ArrayList<>();
+    /**
+     * 当前化验开单项
+     */
+    private List<Lis> lisOrder = new ArrayList<>();
+    /**
+     * 当前辅检开单项
+     */
+    private List<Pacs> pacsOrder = new ArrayList<>();
+    /**
+     * 当前诊断开单项
+     */
+    private List<Item> diagOrder = new ArrayList<>();
+    /**
+     * 当前药品开单项
+     */
+    private List<Item> drugOrder = new ArrayList<>();
+    /**
+     * 当前手术开单项
+     */
+    private List<Item> operationOrder = new ArrayList<>();
+    /**
+     * 其他开单项
+     */
+    private List<Item> otherOrder = new ArrayList<>();
+    /**
+     * 选中诊断
+     */
+    private Item diseaseName;
+    /**
+     * 诊断类型(0-普通病(默认不填),1-慢病,2-急诊)
+     */
+    private Integer disType = 0;
+    /**
+     * 量表名称
+     */
+    private String scaleName = "";
+}

+ 17 - 2
data-service/src/main/java/com/diagbot/client/bean/MedicalIndication.java

@@ -1,4 +1,4 @@
-package com.diagbot.client.bean;
+package com.diagbot.biz.push.entity;
 
 import lombok.Getter;
 import lombok.Setter;
@@ -7,16 +7,31 @@ import java.util.List;
 
 
 /**
- * @Description:推送指标
+ * @Description:病情提示
  * @Author:zhaops
  * @time: 2019/3/14 14:40
  */
 @Getter
 @Setter
 public class MedicalIndication {
+    /**
+     * 术语id
+     */
     private Long conceptId;
+    /**
+     * 词性
+     */
     private Integer libType;
+    /**
+     * 类型
+     */
     private Integer type;
+    /**
+     * 名称(术语、描述等)
+     */
     private String name;
+    /**
+     * 病情提示明细
+     */
     private List<MedicalIndicationDetail> details;
 }

+ 24 - 0
common/src/main/java/com/diagbot/biz/push/entity/MedicalIndicationDetail.java

@@ -0,0 +1,24 @@
+package com.diagbot.biz.push.entity;
+
+import com.alibaba.fastjson.JSONObject;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:病情提示明细
+ * @Author:zhaops
+ * @time: 2019/4/11 10:15
+ */
+@Getter
+@Setter
+public class MedicalIndicationDetail {
+    /**
+     * 类型(1:量表,2:计算公式,3:其他指标,可能结果等,4:危急值、开单合理项、异常值等规则推送结果)
+     */
+    private Integer type;
+    /**
+     * 动态内容(量表不返回具体结构,只提供名称,具体内容单独获取)
+     * 返回结构包含以下控件类型controlType(0:单选-radio,2:多选-checkbox,2:文本框-text,3:下拉列表-dropdownlist)
+     */
+    private JSONObject content;
+}

+ 21 - 3
data-service/src/main/java/com/diagbot/client/bean/Medicition.java

@@ -1,4 +1,4 @@
-package com.diagbot.client.bean;
+package com.diagbot.biz.push.entity;
 
 import lombok.Getter;
 import lombok.Setter;
@@ -11,18 +11,36 @@ import lombok.Setter;
 @Getter
 @Setter
 public class Medicition {
+    /**
+     * 术语id
+     */
     private Long conceptId;
+    /**
+     * 药品名称
+     */
     private String medicitionName;
+    /**
+     * 词性(10:药品通用名)
+     */
     private Integer libType;
     /**
-     * 1-显示,0-隐藏
+     * 是否显示(0:隐藏,1:显示)
      */
     private String isShow;
+    /**
+     * 药品慎用禁忌标志(0:正常,1:慎用,2:禁忌)
+     */
     private String forbidden;
     /**
-     * 1-有提示信息,0-没有提示信息
+     * 是否有药品说明书(0:无,1:有)
      */
     private String showInfo = "0";
+    /**
+     * 使用率
+     */
     private String rate;
+    /**
+     * 类型
+     */
     private Integer type;
 }

+ 60 - 0
common/src/main/java/com/diagbot/biz/push/entity/MedicitionClass.java

@@ -0,0 +1,60 @@
+package com.diagbot.biz.push.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.LinkedList;
+
+/**
+ * @Description:药品分类
+ * @Author:zhaops
+ * @time: 2018/12/17 13:32
+ */
+@Getter
+@Setter
+public class MedicitionClass {
+    /**
+     * 是否有静态知识(0:无,1:有)
+     */
+    private String showInfo = "0";
+    /**
+     * 药品分类禁用慎用标志(0:正常,1:慎用,2:禁用)
+     */
+    private String drugsForbidden;
+    /**
+     * 药品大类术语id
+     */
+    private Long bigdrugsConceptId;
+    /**
+     * 药品大类名称
+     */
+    private String bigdrugsName;
+    /**
+     * 药品大类词性
+     */
+    private Integer bigdrgusLibType;
+    /**
+     * 药品大类类型
+     */
+    private Integer bigdrugsType;
+    /**
+     * 药品小类术语id
+     */
+    private Long subdrugsConceptId;
+    /**
+     * 药品小类名称
+     */
+    private String subdrugsName;
+    /**
+     * 药品小类词性
+     */
+    private Integer subdrugsLibType;
+    /**
+     * 药品小类类型
+     */
+    private Integer subdrugsType;
+    /**
+     * 药品列表
+     */
+    private LinkedList<Medicition> medicitionsList;
+}

+ 8 - 2
data-service/src/main/java/com/diagbot/client/bean/MeditionDetail.java

@@ -1,4 +1,4 @@
-package com.diagbot.client.bean;
+package com.diagbot.biz.push.entity;
 
 import lombok.Getter;
 import lombok.Setter;
@@ -6,13 +6,19 @@ import lombok.Setter;
 import java.util.List;
 
 /**
- * @Description:
+ * @Description:药品推荐(子模块)
  * @Author:zhaops
  * @time: 2019/11/21 11:15
  */
 @Getter
 @Setter
 public class MeditionDetail {
+    /**
+     * 标题(二级标题)
+     */
     private String description;
+    /**
+     * 药品分类列表
+     */
     private List<MedicitionClass> treatment;
 }

+ 34 - 0
common/src/main/java/com/diagbot/biz/push/entity/Pacs.java

@@ -0,0 +1,34 @@
+package com.diagbot.biz.push.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:辅检结构
+ * @Author:zhaops
+ * @time: 2019/12/6 11:13
+ */
+@Getter
+@Setter
+public class Pacs {
+    /**
+     * HIS项目
+     */
+    private String name;
+    /**
+     * 内部检查项目(公表名)
+     */
+    private String uniqueName;
+    /**
+     * 描述信息
+     */
+    private String desc;
+    /**
+     * 检查结果(结果非描述信息)
+     */
+    private String result;
+    /**
+     * 结果时间
+     */
+    private String dateValue;
+}

+ 66 - 0
common/src/main/java/com/diagbot/biz/push/entity/ResponseData.java

@@ -0,0 +1,66 @@
+package com.diagbot.biz.push.entity;
+
+import com.alibaba.fastjson.JSONObject;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:大数据返回结构
+ * @Author:zhaops
+ * @time: 2019/12/9 13:21
+ */
+@Getter
+@Setter
+public class ResponseData {
+    /**
+     * 症状
+     */
+    private List<FeatureRate> symptom = new ArrayList<>(10);
+    /**
+     * 病史
+     */
+    private List<FeatureRate> history = new ArrayList<>(10);
+    /**
+     * 查体(体征)
+     */
+    private List<FeatureRate> vitals = new ArrayList<>(10);
+    /**
+     * 化验
+     */
+    private List<FeatureRate> labs = new ArrayList<>(10);
+    /**
+     * 辅检
+     */
+    private List<FeatureRate> pacs = new ArrayList<>(10);
+    /**
+     * 诊断
+     */
+    private List<FeatureRate> dis = new ArrayList<>(10);
+    /**
+     * 治疗方案
+     */
+    private Treat treat;
+    /**
+     * 量表动态内容
+     */
+    private Map<String, JSONObject> scale;
+    /**
+     * 管理评估动态内容
+     */
+    private Map<String, JSONObject> managementEvaluation;
+    /**
+     * 病情提示(1:量表,2:计算公式,3:可能结果,4:危机值、开单合理项、异常值等规则推送内容)
+     */
+    private List<MedicalIndication> medicalIndications;
+    /**
+     * 有无病情提示标志(0:无,1:有)
+     */
+    private String hasIndications;
+
+    private Map<String, Map<String, String>> inputs = new HashMap<>(10, 0.5f);
+}

+ 39 - 0
common/src/main/java/com/diagbot/biz/push/entity/SearchBaseData.java

@@ -0,0 +1,39 @@
+package com.diagbot.biz.push.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:推理通用入参
+ * @Author:zhaops
+ * @time: 2019/12/11 14:16
+ */
+@Getter
+@Setter
+public class SearchBaseData extends MRBaseData {
+    /**
+     * 外部系统编码 用于返回映射数据,如果sysCode为空或null,则返回kl_standard_info标准名称
+     */
+    private String sysCode = "1";
+    /**
+     * 大数据返回内容截取长度
+     */
+    private Integer length = 10;
+
+    /**
+     * 推理类型(1:症状,4:查体结果,41:查体模板,42:查体指标,5:化验,6:辅检,7:诊断,8:治疗方案,11:管理评估,21:量表,22:病情提示-量表、计算公式、可能结果、危急值、开单合理性、异常值等)
+     */
+    private String featureType = "";
+    /**
+     * 规则类型(1:危机值提醒,2:开单合理性,3:管理评估,4:不良反应,5:药物推荐,6:异常值)
+     */
+    private String ruleType = "";
+    /**
+     * 是否映射(0:否,1:是)
+     */
+    private Integer isMapping;
+    /**
+     * 系统类型
+     */
+    private Integer sysType;
+}

+ 50 - 0
common/src/main/java/com/diagbot/biz/push/entity/Treat.java

@@ -0,0 +1,50 @@
+package com.diagbot.biz.push.entity;
+
+import com.diagbot.biz.push.dto.ConceptDetailDTO;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:治疗方案返回结构
+ * @Author:zhaops
+ * @time: 2019/11/21 15:36
+ */
+@Getter
+@Setter
+public class Treat {
+    /**
+     * 诊断类型
+     */
+    private Integer disType;
+    /**
+     * 诊断名称
+     */
+    private Item diseaseName;
+    /**
+     * 一般治疗
+     */
+    private ConceptDetailDTO commonTreatment;
+    /**
+     * 手术治疗
+     */
+    private ConceptDetailDTO surgeryTreatment;
+    /**
+     * 随访时间
+     */
+    private Object followUp;
+    /**
+     * 上次用药
+     */
+    private Map<String, List<Medicition>> drugHistory;
+    /**
+     * 不良反应
+     */
+    private List<AdverseReaction> adverseEvent;
+    /**
+     * 药品推荐
+     */
+    private List<TreatmentPlan> treatmentPlan;
+}

+ 8 - 2
icss-service/src/main/java/com/diagbot/client/bean/TreatmentPlan.java

@@ -1,4 +1,4 @@
-package com.diagbot.client.bean;
+package com.diagbot.biz.push.entity;
 
 import lombok.Getter;
 import lombok.Setter;
@@ -6,13 +6,19 @@ import lombok.Setter;
 import java.util.List;
 
 /**
- * @Description:
+ * @Description:药品推荐(大模块)
  * @Author:zhaops
  * @time: 2019/11/21 11:14
  */
 @Getter
 @Setter
 public class TreatmentPlan {
+    /**
+     * 标题(一级标题)
+     */
     private String title;
+    /**
+     * 子模块列表
+     */
     private List<MeditionDetail> meditionDetails;
 }

+ 4 - 2
aipt-service/src/main/java/com/diagbot/enums/FeatureTypeEnum.java

@@ -1,4 +1,4 @@
-package com.diagbot.enums;
+package com.diagbot.biz.push.enums;
 
 import com.diagbot.core.KeyedNamed;
 import lombok.Setter;
@@ -13,6 +13,7 @@ public enum FeatureTypeEnum implements KeyedNamed {
     Feature_Type_Past(1, "既往史"),
     Feature_Type_Other(3, "其他史"),
     Feature_Type_Vital_Result(4, "查体结果"),
+    Feature_Type_Vital_Module(41, "查体模板"),
     Feature_Type_Vital_Index(42, "查体指标"),
     Feature_Type_Lis(5, "化验"),
     Feature_Type_Pacs(6, "辅检"),
@@ -20,7 +21,8 @@ public enum FeatureTypeEnum implements KeyedNamed {
     Feature_Type_Treat(8, "治疗"),
     Feature_Type_ManagementEvaluation(11, "管理评估"),
     Feature_Type_Scale(21, "量表"),
-    Feature_Type_Indication(22, "指标");
+    Feature_Type_Indication(22, "指标"),
+    Feature_Type_Operation(25, "手术");
 
     @Setter
     private int key;

+ 19 - 0
common/src/main/java/com/diagbot/biz/push/vo/SearchVO.java

@@ -0,0 +1,19 @@
+package com.diagbot.biz.push.vo;
+
+import com.diagbot.biz.push.entity.SearchBaseData;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:推理个性化入参
+ * @Author:zhaops
+ * @time: 2019/12/11 14:18
+ */
+@Getter
+@Setter
+public class SearchVO extends SearchBaseData {
+    /**
+     * 性别(1:男,2:女,3:通用)
+     */
+    private Integer sex;
+}

+ 2 - 1
common/src/main/java/com/diagbot/enums/SysTypeEnum.java

@@ -28,7 +28,8 @@ public enum SysTypeEnum implements KeyedNamed {
     AIPT_SERVICE(15, "aipt-service"),
     DATA_SERVICE(16, "data-service"),
     PREC_SERVICE(17, "prec-service"),
-    PRECMAN_SERVICE(18, "precman-service");
+    PRECMAN_SERVICE(18, "precman-service"),
+    MRQCMAN_SERVICE(19, "mrqcman-service");
 
     @Setter
     private int key;

+ 5 - 1
config-server/src/main/resources/shared/application-dev.yml

@@ -75,4 +75,8 @@ syslog:
   enable: true
 
 bilog:
-  enable: false
+  enable: false
+
+mrqc:
+  server:
+    address: http://192.168.2.234:8090

+ 5 - 1
config-server/src/main/resources/shared/application-local.yml

@@ -75,4 +75,8 @@ syslog:
   enable: true
 
 bilog:
-  enable: false
+  enable: false
+
+mrqc:
+  server:
+    address: http://192.168.2.234:8090

+ 5 - 1
config-server/src/main/resources/shared/application-pre.yml

@@ -75,4 +75,8 @@ syslog:
   enable: true
 
 bilog:
-  enable: false
+  enable: false
+
+mrqc:
+  server:
+    address: http://192.168.2.186:8090

+ 5 - 1
config-server/src/main/resources/shared/application-pro.yml

@@ -75,4 +75,8 @@ syslog:
   enable: true
 
 bilog:
-  enable: false
+  enable: false
+
+mrqc:
+  server:
+    address: http://192.168.2.123:8090

+ 5 - 1
config-server/src/main/resources/shared/application-test.yml

@@ -75,4 +75,8 @@ syslog:
   enable: true
 
 bilog:
-  enable: false
+  enable: false
+
+mrqc:
+  server:
+    address: http://192.168.2.241:8090

+ 7 - 0
config-server/src/main/resources/shared/gateway-service-dev.yml

@@ -121,6 +121,13 @@ spring:
         filters:
 #        - SwaggerHeaderFilter
         - StripPrefix=2
+      - id: mrqcman-service
+        uri: lb://mrqcman-service
+        predicates:
+        - Path=/api/mrqcman/**
+        filters:
+        #        - SwaggerHeaderFilter
+        - StripPrefix=2
 
 server:
   port: 5050

+ 7 - 0
config-server/src/main/resources/shared/gateway-service-local.yml

@@ -125,6 +125,13 @@ spring:
         filters:
 #        - SwaggerHeaderFilter
         - StripPrefix=2
+      - id: mrqcman-service
+        uri: lb://mrqcman-service
+        predicates:
+        - Path=/api/mrqcman/**
+        filters:
+        #        - SwaggerHeaderFilter
+        - StripPrefix=2
 
 server:
   port: 5050

+ 7 - 0
config-server/src/main/resources/shared/gateway-service-pre.yml

@@ -128,6 +128,13 @@ spring:
         filters:
         #        - SwaggerHeaderFilter
         - StripPrefix=2
+      - id: mrqcman-service
+        uri: lb://mrqcman-service
+        predicates:
+        - Path=/api/mrqcman/**
+        filters:
+        #        - SwaggerHeaderFilter
+        - StripPrefix=2
 
 server:
   port: 5050

+ 7 - 0
config-server/src/main/resources/shared/gateway-service-pro.yml

@@ -121,6 +121,13 @@ spring:
         filters:
         #        - SwaggerHeaderFilter
         - StripPrefix=2
+      - id: mrqcman-service
+        uri: lb://mrqcman-service
+        predicates:
+        - Path=/api/mrqcman/**
+        filters:
+        #        - SwaggerHeaderFilter
+        - StripPrefix=2
 
 server:
   port: 5050

+ 7 - 0
config-server/src/main/resources/shared/gateway-service-test.yml

@@ -128,6 +128,13 @@ spring:
         filters:
 #        - SwaggerHeaderFilter
         - StripPrefix=2
+      - id: mrqcman-service
+        uri: lb://mrqcman-service
+        predicates:
+        - Path=/api/mrqcman/**
+        filters:
+        #        - SwaggerHeaderFilter
+        - StripPrefix=2
 
 server:
   port: 5050

+ 99 - 0
config-server/src/main/resources/shared/mrqcman-service-dev.yml

@@ -0,0 +1,99 @@
+server:
+  port: 8832
+
+# 驱动配置信息
+spring:
+  datasource:
+    druid:
+      driver-class-name: com.mysql.cj.jdbc.Driver
+      platform: mysql
+      url: jdbc:mysql://192.168.2.236:3306/sys-mrqc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      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:
+          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
+
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+
+  #mq
+  rabbitmq:
+    host: 192.168.2.236
+    port: 5672
+    username: lantone
+    password: lantone
+    publisher-confirms: true
+    virtual-host: /
+
+#mybatis
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+
+imageUrl:
+  prefix: http://192.168.2.236:82

+ 99 - 0
config-server/src/main/resources/shared/mrqcman-service-local.yml

@@ -0,0 +1,99 @@
+server:
+  port: 8832
+
+# 驱动配置信息
+spring:
+  datasource:
+    druid:
+      driver-class-name: com.mysql.cj.jdbc.Driver
+      platform: mysql
+      url: jdbc:mysql://192.168.2.236:3306/sys-mrqc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      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:
+          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
+
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+
+  #mq
+  rabbitmq:
+    host: localhost
+    port: 5672
+    username: guest
+    password: guest
+    publisher-confirms: true
+    virtual-host: /
+
+#mybatis
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+
+imageUrl:
+  prefix: http://192.168.2.236:82

+ 99 - 0
config-server/src/main/resources/shared/mrqcman-service-pre.yml

@@ -0,0 +1,99 @@
+server:
+  port: 8832
+
+# 驱动配置信息
+spring:
+  datasource:
+    druid:
+      driver-class-name: com.mysql.cj.jdbc.Driver
+      platform: mysql
+      url: jdbc:mysql://192.168.2.121:3306/sys-mrqc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      username: teamback
+      password: goTulmLeon
+      # 连接池的配置信息
+      # 初始化大小,最小,最大
+      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:
+          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
+
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+
+  #mq
+  rabbitmq:
+    host: 192.168.2.121
+    port: 5672
+    username: lantone
+    password: lantone
+    publisher-confirms: true
+    virtual-host: /
+
+#mybatis
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+
+imageUrl:
+  prefix: http://192.168.2.121:82

+ 99 - 0
config-server/src/main/resources/shared/mrqcman-service-pro.yml

@@ -0,0 +1,99 @@
+server:
+  port: 8832
+
+# 驱动配置信息
+spring:
+  datasource:
+    druid:
+      driver-class-name: com.mysql.cj.jdbc.Driver
+      platform: mysql
+      url: jdbc:mysql://192.168.2.122:3306/sys-mrqc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      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:
+          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
+
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+
+  #mq
+  rabbitmq:
+    host: 192.168.2.122
+    port: 5672
+    username: lantone
+    password: lantone
+    publisher-confirms: true
+    virtual-host: /
+
+#mybatis
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+
+imageUrl:
+  prefix: http://192.168.2.122:82

+ 99 - 0
config-server/src/main/resources/shared/mrqcman-service-test.yml

@@ -0,0 +1,99 @@
+server:
+  port: 8832
+
+# 驱动配置信息
+spring:
+  datasource:
+    druid:
+      driver-class-name: com.mysql.cj.jdbc.Driver
+      platform: mysql
+      url: jdbc:mysql://192.168.2.241:3306/sys-mrqc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      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:
+          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
+
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+
+  #mq
+  rabbitmq:
+    host: 192.168.2.241
+    port: 5672
+    username: lantone
+    password: lantone
+    publisher-confirms: true
+    virtual-host: /
+
+#mybatis
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+
+imageUrl:
+  prefix: http://192.168.2.241:82

+ 6 - 0
data-service/pom.xml

@@ -24,6 +24,12 @@
             <artifactId>common</artifactId>
             <version>0.0.1-SNAPSHOT</version>
         </dependency>
+
+        <dependency>
+            <groupId>com.diagbot</groupId>
+            <artifactId>common-biz-client</artifactId>
+        </dependency>
+
         <dependency>
             <groupId>org.springframework.cloud</groupId>
             <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>

+ 7 - 15
data-service/src/main/java/com/diagbot/client/AiptServiceClient.java

@@ -1,9 +1,8 @@
 package com.diagbot.client;
 
+import com.diagbot.biz.push.vo.SearchVO;
 import com.diagbot.client.bean.CalculateData;
 import com.diagbot.client.bean.ScaleContent;
-import com.diagbot.client.bean.SearchData;
-import com.diagbot.client.bean.Treat;
 import com.diagbot.client.hystrix.AiptServiceHystrix;
 import com.diagbot.dto.ConceptIntroduceDTO;
 import com.diagbot.dto.DictionaryInfoDTO;
@@ -14,6 +13,7 @@ import com.diagbot.dto.RetrievalDTO;
 import com.diagbot.dto.ScaleIndexDTO;
 import com.diagbot.dto.VersionWrapperDTO;
 import com.diagbot.vo.ConceptIntroduceVO;
+import com.diagbot.vo.DisclaimerInformationVO;
 import com.diagbot.vo.GetStaticKnowledgeVO;
 import com.diagbot.vo.ScaleIndexVO;
 import com.diagbot.vo.VersionVO;
@@ -36,23 +36,15 @@ public interface AiptServiceClient {
     /**
      * 推理
      *
-     * @param searchData
+     * @param searchVO
      * @return
      */
     @PostMapping("/push/pushInner")
-    RespDTO<PushDTO> pushInner(@RequestBody SearchData searchData);
+    RespDTO<PushDTO> pushInner(@RequestBody SearchVO searchVO);
 
-    /**
-     * 获取治疗方案
-     *
-     * @param searchData
-     * @return
-     */
-    @PostMapping("/push/treatment")
-    RespDTO<Treat> getTreatment(@RequestBody SearchData searchData);
 
     @PostMapping("/disclaimerInformation/getDisclaimerInformations")
-    RespDTO<List<DisclaimerInformationDTO>> getDisclaimerInformations();
+    RespDTO<List<DisclaimerInformationDTO>> getDisclaimerInformations(@RequestBody DisclaimerInformationVO disclaimerInformationVO);
 
     /**
      * 计算接口-量表/公式
@@ -66,11 +58,11 @@ public interface AiptServiceClient {
     /**
      * 获取量表接口
      *
-     * @param searchData
+     * @param searchVO
      * @return
      */
     @PostMapping(value = "/clinicaldata/getScale")
-    RespDTO<List<ScaleContent>> getScale(@RequestBody SearchData searchData);
+    RespDTO<List<ScaleContent>> getScale(@RequestBody SearchVO searchVO);
 
     /**
      * 获取提示信息

+ 0 - 23
data-service/src/main/java/com/diagbot/client/bean/AdverseReaction.java

@@ -1,23 +0,0 @@
-package com.diagbot.client.bean;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.List;
-
-/**
- * @Description: 不良反应
- * @Author:zhaops
- * @time: 2019/3/14 11:14
- */
-@Getter
-@Setter
-public class AdverseReaction {
-    private Long conceptId;
-    private String name;  //名称
-    private Integer libType;
-    private Integer type;
-    private String showInfo = "0";//是否显示提示信息
-    private Integer controlType; //控件类型
-    private List<AdverseReactionDetail> details;
-}

+ 0 - 16
data-service/src/main/java/com/diagbot/client/bean/AdverseReactionDetail.java

@@ -1,16 +0,0 @@
-package com.diagbot.client.bean;
-
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * @Description: 不良反应明细
- * @Author:zhaops
- * @time: 2019/3/14 11:19
- */
-@Getter
-@Setter
-public class AdverseReactionDetail {
-    private String name;
-    private Integer value; //是否选中:0-未选中,1-选中
-}

+ 0 - 26
data-service/src/main/java/com/diagbot/client/bean/LisResult.java

@@ -1,26 +0,0 @@
-package com.diagbot.client.bean;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import javax.validation.constraints.NotNull;
-
-/**
- * @Description:化验信息
- * @Author:zhaops
- * @time: 2018/12/19 14:03
- */
-@Getter
-@Setter
-public class LisResult {
-    private String name;//套餐名称
-    private String detailName;//化验项名称
-    private String uniqueName;//公表名称
-    private Double value;//值
-    private Double maxValue;//最大值
-    private Double minValue;//最小值
-    private String units;//单位
-    private String otherValue;//其他结果,包括阴性阳性,文字描述等
-    @NotNull(message = "请输入数据来源")
-    private Integer source;
-}

+ 0 - 17
data-service/src/main/java/com/diagbot/client/bean/MedicalIndicationDetail.java

@@ -1,17 +0,0 @@
-package com.diagbot.client.bean;
-
-import com.alibaba.fastjson.JSONObject;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * @Description:推送指标明细
- * @Author:zhaops
- * @time: 2019/4/11 10:15
- */
-@Getter
-@Setter
-public class MedicalIndicationDetail {
-    private Integer type; //1-量表,2-公式,3-其他指标,4-危机值
-    private JSONObject content;  //type<>1 非量表,返回内容;type=1 量表,返回量表名称{"name":""} ,controlType:0-radio,1-checkbox,2-text,3-dropdownlist
-}

+ 0 - 27
data-service/src/main/java/com/diagbot/client/bean/MedicitionClass.java

@@ -1,27 +0,0 @@
-package com.diagbot.client.bean;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.LinkedList;
-
-/**
- * @Description:药品分类
- * @Author:zhaops
- * @time: 2018/12/17 13:32
- */
-@Getter
-@Setter
-public class MedicitionClass {
-    private String showInfo = "0";
-    private String drugsForbidden;
-    private Long bigdrugsConceptId;//药品分类概念id-大类
-    private String bigdrugsName;//药类名
-    private Integer bigdrgusLibType;
-    private Integer bigdrugsType;
-    private Long subdrugsConceptId;//药品分类概念id-小类
-    private String subdrugsName;//药类名-小类
-    private Integer subdrugsLibType;
-    private Integer subdrugsType;
-    private LinkedList<Medicition> medicitionsList;
-}

+ 0 - 45
data-service/src/main/java/com/diagbot/client/bean/SearchData.java

@@ -1,45 +0,0 @@
-package com.diagbot.client.bean;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.List;
-
-/**
- * Created by fyeman on 2018/1/31.
- */
-@Getter
-@Setter
-public class SearchData {
-    private int length;
-    private int age;
-    private String sex;
-    //特征类别
-    private String featureType;
-    //外部系统编码 用于返回映射数据,如果sysCode为空或null,则返回kl_standard_info标准名称
-    private String sysCode;
-    private String symptom;
-    private String pasts;
-    private String other;
-    private String vital;
-    private String lis;
-    private List<LisResult> lisArr;
-    private String pacs;
-    private String diag;
-    private String diseaseName; //指定诊断,例如取治疗方案
-    private String scaleName;   //量表名称
-    private String indications; //指标结果
-    private String adverseReactions; //不良反应
-    private Integer disType;    //诊断类型
-    private String adverseEvent;
-    private String hosCode;
-    @ApiModelProperty(hidden = true)
-    private Integer sysType;  //系统类型
-
-    private String lisOrder;   //当前正在下单化验
-    private String pacsOrder;   //当前正在下单辅检
-    private String otherOrder; //其他
-
-    private String ruleType;   //规则类型
-}

+ 0 - 26
data-service/src/main/java/com/diagbot/client/bean/Treat.java

@@ -1,26 +0,0 @@
-package com.diagbot.client.bean;
-
-import com.diagbot.dto.ConceptDetailDTO;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description:
- * @Author:zhaops
- * @time: 2019/11/21 15:36
- */
-@Getter
-@Setter
-public class Treat {
-    private Integer disType;
-    private String diseaseName;
-    private List<AdverseReaction> adverseEvent;//不良反应
-    private List<TreatmentPlan> treatmentPlan;//治疗方案
-    private ConceptDetailDTO commonTreatment; //一般治疗
-    private ConceptDetailDTO surgeryTreatment; //手术治疗
-    private Object followUp;
-    private Map<String, List<Medicition>> drugHistory;
-}

+ 0 - 18
data-service/src/main/java/com/diagbot/client/bean/TreatmentPlan.java

@@ -1,18 +0,0 @@
-package com.diagbot.client.bean;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.List;
-
-/**
- * @Description:
- * @Author:zhaops
- * @time: 2019/11/21 11:14
- */
-@Getter
-@Setter
-public class TreatmentPlan {
-    private String title;
-    private List<MeditionDetail> meditionDetails;
-}

+ 7 - 18
data-service/src/main/java/com/diagbot/client/hystrix/AiptServiceHystrix.java

@@ -1,10 +1,9 @@
 package com.diagbot.client.hystrix;
 
+import com.diagbot.biz.push.vo.SearchVO;
 import com.diagbot.client.AiptServiceClient;
 import com.diagbot.client.bean.CalculateData;
 import com.diagbot.client.bean.ScaleContent;
-import com.diagbot.client.bean.SearchData;
-import com.diagbot.client.bean.Treat;
 import com.diagbot.dto.ConceptIntroduceDTO;
 import com.diagbot.dto.DictionaryInfoDTO;
 import com.diagbot.dto.DisclaimerInformationDTO;
@@ -14,6 +13,7 @@ import com.diagbot.dto.RetrievalDTO;
 import com.diagbot.dto.ScaleIndexDTO;
 import com.diagbot.dto.VersionWrapperDTO;
 import com.diagbot.vo.ConceptIntroduceVO;
+import com.diagbot.vo.DisclaimerInformationVO;
 import com.diagbot.vo.GetStaticKnowledgeVO;
 import com.diagbot.vo.ScaleIndexVO;
 import com.diagbot.vo.VersionVO;
@@ -36,29 +36,18 @@ public class AiptServiceHystrix implements AiptServiceClient {
     /**
      * 推理
      *
-     * @param searchData
+     * @param searchVO
      * @return
      */
     @Override
-    public RespDTO<PushDTO> pushInner(@RequestBody SearchData searchData) {
+    public RespDTO<PushDTO> pushInner(@RequestBody SearchVO searchVO) {
         log.error("【hystrix】调用{}异常", "pushInner");
         return null;
     }
 
-    /**
-     * 获取治疗方案
-     *
-     * @param searchData
-     * @return
-     */
-    @Override
-    public RespDTO<Treat> getTreatment(@RequestBody SearchData searchData) {
-        log.error("【hystrix】调用{}异常", "getTreatment");
-        return null;
-    }
 
     @Override
-    public RespDTO<List<DisclaimerInformationDTO>> getDisclaimerInformations() {
+    public RespDTO<List<DisclaimerInformationDTO>> getDisclaimerInformations(DisclaimerInformationVO disclaimerInformationVO) {
         log.error("【hystrix】调用{}异常", "getDisclaimerInformations");
         return null;
     }
@@ -78,11 +67,11 @@ public class AiptServiceHystrix implements AiptServiceClient {
     /**
      * 获取量表接口
      *
-     * @param searchData
+     * @param searchVO
      * @return
      */
     @Override
-    public RespDTO<List<ScaleContent>> getScale(@RequestBody SearchData searchData) {
+    public RespDTO<List<ScaleContent>> getScale(@RequestBody SearchVO searchVO) {
         log.error("【hystrix】调用{}异常", "getScale");
         return null;
     }

+ 29 - 3
data-service/src/main/java/com/diagbot/dto/PushDTO.java

@@ -1,6 +1,7 @@
 package com.diagbot.dto;
 
-import com.diagbot.client.bean.MedicalIndication;
+import com.diagbot.biz.push.entity.MedicalIndication;
+import com.diagbot.biz.push.entity.Treat;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -8,18 +9,43 @@ import java.util.List;
 import java.util.Map;
 
 /**
- * @Description: 推理出参
+ * @Description: 页面推送模式推理出参
  * @Author:zhaops
  * @time: 2018/11/20 13:44
  */
 @Getter
 @Setter
 public class PushDTO {
+    /**
+     * 症状
+     */
     private List<ConceptPushDTO> symptom;
-    private List<ConceptPushDTO> other;
+    /**
+     * 体征结果
+     */
     private List<ConceptPushDTO> vital;
+    /**
+     * 化验
+     */
     private List<ConceptPushDTO> lab;
+    /**
+     * 辅检
+     */
     private List<ConceptPushDTO> pacs;
+    /**
+     * 诊断
+     */
     private Map<String, List<ConceptPushDTO>> dis;
+    /**
+     * 病情提示
+     */
     private List<MedicalIndication> medicalIndications;
+    /**
+     * 治疗方案
+     */
+    private Treat treat;
+    /**
+     * 有无病情提示标志(0:无,1:有)
+     */
+    private String hasIndications;
 }

+ 0 - 58
data-service/src/main/java/com/diagbot/enums/FeatureTypeEnum.java

@@ -1,58 +0,0 @@
-package com.diagbot.enums;
-
-import com.diagbot.core.KeyedNamed;
-import lombok.Setter;
-
-/**
- * @Description: 推送类型
- * @Author:zhaops
- * @time: 2019/3/14 11:28
- */
-public enum FeatureTypeEnum implements KeyedNamed {
-    Symptom(1, "症状"),
-    Other(3, "其他史"),
-    VitalResult(4, "查体结果"),
-    VitalIndex(42, "查体指标"),
-    Lis(5, "化验"),
-    Pacs(6, "辅检"),
-    Disease(7, "诊断"),
-    Treat(8, "治疗"),
-    Scale(21, "量表内容"),
-    MedicalIndication(22, "指标"),
-    ManagementEvaluation(11, "管理评估");
-
-    @Setter
-    private int key;
-
-    @Setter
-    private String name;
-
-    FeatureTypeEnum(int key, String name) {
-        this.key = key;
-        this.name = name;
-    }
-
-    public static FeatureTypeEnum getEnum(int key) {
-        for (FeatureTypeEnum item : FeatureTypeEnum.values()) {
-            if (item.key == key) {
-                return item;
-            }
-        }
-        return null;
-    }
-
-    public static String getName(int key) {
-        FeatureTypeEnum item = getEnum(key);
-        return item != null ? item.name : null;
-    }
-
-    @Override
-    public int getKey() {
-        return key;
-    }
-
-    @Override
-    public String getName() {
-        return name;
-    }
-}

+ 0 - 0
data-service/src/main/java/com/diagbot/facade/AssembleFacade.java


Some files were not shown because too many files changed in this diff