Browse Source

标准术语维护

zhaops 4 years ago
parent
commit
6e96cf049f
26 changed files with 356 additions and 94 deletions
  1. 51 85
      src/main/java/com/diagbot/facade/EntityInfoFacade.java
  2. 12 0
      src/main/java/com/diagbot/repository/AllergenRepository.java
  3. 13 0
      src/main/java/com/diagbot/repository/BillConflictItemRepository.java
  4. 11 0
      src/main/java/com/diagbot/repository/ClinicalFindingRepository.java
  5. 13 0
      src/main/java/com/diagbot/repository/ConflictDeviceRepository.java
  6. 11 0
      src/main/java/com/diagbot/repository/DeptRepository.java
  7. 14 0
      src/main/java/com/diagbot/repository/DiseaseRepository.java
  8. 12 0
      src/main/java/com/diagbot/repository/FoodAllergenRepository.java
  9. 14 1
      src/main/java/com/diagbot/repository/GenderRepository.java
  10. 11 0
      src/main/java/com/diagbot/repository/GroupRepository.java
  11. 12 0
      src/main/java/com/diagbot/repository/LisBigNameRepository.java
  12. 12 0
      src/main/java/com/diagbot/repository/LisRemindRepository.java
  13. 12 0
      src/main/java/com/diagbot/repository/MedChemClassRepository.java
  14. 13 1
      src/main/java/com/diagbot/repository/MedClassRepository.java
  15. 13 0
      src/main/java/com/diagbot/repository/MedJiePouClassRepository.java
  16. 12 0
      src/main/java/com/diagbot/repository/MedYaoLiClassRepository.java
  17. 12 0
      src/main/java/com/diagbot/repository/MedZhiLiaoClassRepository.java
  18. 11 1
      src/main/java/com/diagbot/repository/MedicineRepository.java
  19. 14 0
      src/main/java/com/diagbot/repository/OralMedicineRepository.java
  20. 10 0
      src/main/java/com/diagbot/repository/PacsCriticalRepository.java
  21. 13 0
      src/main/java/com/diagbot/repository/PacsDescribeRepository.java
  22. 12 0
      src/main/java/com/diagbot/repository/PacsRemindRepository.java
  23. 13 1
      src/main/java/com/diagbot/repository/PacsResultRepository.java
  24. 15 4
      src/main/java/com/diagbot/repository/SymptomNameRepository.java
  25. 10 1
      src/main/java/com/diagbot/repository/TransfusionRemindRepository.java
  26. 10 0
      src/main/java/com/diagbot/repository/TransfusionSuggestRepository.java

+ 51 - 85
src/main/java/com/diagbot/facade/EntityInfoFacade.java

@@ -1,7 +1,7 @@
 package com.diagbot.facade;
 
 import com.diagbot.dto.DictionaryInfoDTO;
-import com.diagbot.entity.node.*;
+import com.diagbot.entity.node.EntityInfo;
 import com.diagbot.enums.LabelTypeEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
@@ -343,16 +343,28 @@ public class EntityInfoFacade {
                 break;
             case "药品注册名称":
                 if (entityInfo.getId() == null) {
-                    medRegNameRepository.create(entityInfo, entityInfo.getRisklevel(), entityInfo.getConflict_geiyao(), entityInfo.getConflict_gender(), entityInfo.getResult(), entityInfo.getAlias());
+                    medRegNameRepository.create(entityInfo,
+                            entityInfo.getRisklevel(),
+                            entityInfo.getConflict_geiyao(),
+                            entityInfo.getConflict_gender(),
+                            entityInfo.getResult(),
+                            entityInfo.getAlias());
                 } else {
-                    medRegNameRepository.update(entityInfo, entityInfo.getRisklevel(), entityInfo.getConflict_geiyao(), entityInfo.getConflict_gender(), entityInfo.getResult(), entityInfo.getAlias());
+                    medRegNameRepository.update(entityInfo,
+                            entityInfo.getRisklevel(),
+                            entityInfo.getConflict_geiyao(),
+                            entityInfo.getConflict_gender(),
+                            entityInfo.getResult(),
+                            entityInfo.getAlias());
                 }
                 break;
             case "体征":
                 if (entityInfo.getId() == null) {
-                    vitalRepository.create(entityInfo, entityInfo.getUnit());
+                    vitalRepository.create(entityInfo,
+                            entityInfo.getUnit());
                 } else {
-                    vitalRepository.update(entityInfo, entityInfo.getUnit());
+                    vitalRepository.update(entityInfo,
+                            entityInfo.getUnit());
                 }
                 break;
             case "药物过敏原":
@@ -360,241 +372,195 @@ public class EntityInfoFacade {
                     throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "请输入药品类型");
                 }
                 if (entityInfo.getId() == null) {
-                    medAllergenRepository.create(entityInfo, entityInfo.getMedtype(), entityInfo.getResult(), entityInfo.getAlias());
+                    medAllergenRepository.create(entityInfo,
+                            entityInfo.getMedtype(),
+                            entityInfo.getResult(),
+                            entityInfo.getAlias());
                 } else {
-                    medAllergenRepository.update(entityInfo, entityInfo.getMedtype(), entityInfo.getResult(), entityInfo.getAlias());
+                    medAllergenRepository.update(entityInfo,
+                            entityInfo.getMedtype(),
+                            entityInfo.getResult(),
+                            entityInfo.getAlias());
                 }
                 break;
             case "实验室检查套餐名":
                 if (entityInfo.getId() == null) {
-                    LisSet lisSet = new LisSet();
-                    BeanUtil.copyProperties(entityInfo, lisSet);
-                    lisSetRepository.save(lisSet);
+                    lisSetRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "药品通用名称":
                 if (entityInfo.getId() == null) {
-                    Medicine medicine = new Medicine();
-                    BeanUtil.copyProperties(entityInfo, medicine);
-                    medicineRepository.save(medicine);
+                    medicineRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "疾病":
                 if (entityInfo.getId() == null) {
-                    Disease disease = new Disease();
-                    BeanUtil.copyProperties(entityInfo, disease);
-                    diseaseRepository.save(disease);
+                    diseaseRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "化验提醒指标":
                 if (entityInfo.getId() == null) {
-                    LisRemind lisRemind = new LisRemind();
-                    BeanUtil.copyProperties(entityInfo, lisRemind);
-                    lisRemindRepository.save(lisRemind);
+                    lisRemindRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "化验套餐名称":
                 if (entityInfo.getId() == null) {
-                    LisBigName lisBigName = new LisBigName();
-                    BeanUtil.copyProperties(entityInfo, lisBigName);
-                    lisBigNameRepository.save(lisBigName);
+                    lisBigNameRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "辅助检查危急值":
                 if (entityInfo.getId() == null) {
-                    PacsCritical pacsCritical = new PacsCritical();
-                    BeanUtil.copyProperties(entityInfo, pacsCritical);
-                    pacsCriticalRepository.save(pacsCritical);
+                    pacsCriticalRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "辅助检查名称描述":
                 if (entityInfo.getId() == null) {
-                    PacsDescribe pacsDescribe = new PacsDescribe();
-                    BeanUtil.copyProperties(entityInfo, pacsDescribe);
-                    pacsDescribeRepository.save(pacsDescribe);
+                    pacsDescribeRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "辅助检查名称结果":
                 if (entityInfo.getId() == null) {
-                    PacsResult pacsResult = new PacsResult();
-                    BeanUtil.copyProperties(entityInfo, pacsResult);
-                    pacsResultRepository.save(pacsResult);
+                    pacsResultRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "辅检提醒指标":
                 if (entityInfo.getId() == null) {
-                    PacsRemind pacsRemind = new PacsRemind();
-                    BeanUtil.copyProperties(entityInfo, pacsRemind);
-                    pacsRemindRepository.save(pacsRemind);
+                    pacsRemindRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "药品类别":
                 if (entityInfo.getId() == null) {
-                    MedClass medClass = new MedClass();
-                    BeanUtil.copyProperties(entityInfo, medClass);
-                    medClassRepository.save(medClass);
+                    medClassRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "药品治疗学类别":
                 if (entityInfo.getId() == null) {
-                    MedZhiLiaoClass medZhiLiaoClass = new MedZhiLiaoClass();
-                    BeanUtil.copyProperties(entityInfo, medZhiLiaoClass);
-                    medZhiLiaoClassRepository.save(medZhiLiaoClass);
+                    medZhiLiaoClassRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "药品药理学类别":
                 if (entityInfo.getId() == null) {
-                    MedYaoLiClass medYaoLiClass = new MedYaoLiClass();
-                    BeanUtil.copyProperties(entityInfo, medYaoLiClass);
-                    medYaoLiClassRepository.save(medYaoLiClass);
+                    medYaoLiClassRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "药品解剖学类别":
                 if (entityInfo.getId() == null) {
-                    MedJiePouClass medJiePouClass = new MedJiePouClass();
-                    BeanUtil.copyProperties(entityInfo, medJiePouClass);
-                    medJiePouClassRepository.save(medJiePouClass);
+                    medJiePouClassRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "药品化学物质类别":
                 if (entityInfo.getId() == null) {
-                    MedChemClass medChemClass = new MedChemClass();
-                    BeanUtil.copyProperties(entityInfo, medChemClass);
-                    medChemClassRepository.save(medChemClass);
+                    medChemClassRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "服用药品":
                 if (entityInfo.getId() == null) {
-                    OralMedicine oralMedicine = new OralMedicine();
-                    BeanUtil.copyProperties(entityInfo, oralMedicine);
-                    oralMedicineRepository.save(oralMedicine);
+                    oralMedicineRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "禁忌医疗器械及物品":
                 if (entityInfo.getId() == null) {
-                    ConflictDevice conflictDevice = new ConflictDevice();
-                    BeanUtil.copyProperties(entityInfo, conflictDevice);
-                    conflictDeviceRepository.save(conflictDevice);
+                    conflictDeviceRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "性别":
                 if (entityInfo.getId() == null) {
-                    Gender gender = new Gender();
-                    BeanUtil.copyProperties(entityInfo, gender);
-                    genderRepository.save(gender);
+                    genderRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "症状":
                 if (entityInfo.getId() == null) {
-                    Symptom symptom = new Symptom();
-                    BeanUtil.copyProperties(entityInfo, symptom);
-                    symptomNameRepository.save(symptom);
+                    symptomNameRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "临床表现":
                 if (entityInfo.getId() == null) {
-                    ClinicalFinding clinicalFinding = new ClinicalFinding();
-                    BeanUtil.copyProperties(entityInfo, clinicalFinding);
-                    clinicalFindingRepository.save(clinicalFinding);
+                    clinicalFindingRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "科室":
                 if (entityInfo.getId() == null) {
-                    Dept dept = new Dept();
-                    BeanUtil.copyProperties(entityInfo, dept);
-                    deptRepository.save(dept);
+                    deptRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "开单项互斥":
                 if (entityInfo.getId() == null) {
-                    BillConflictItem billConflictItem = new BillConflictItem();
-                    BeanUtil.copyProperties(entityInfo, billConflictItem);
-                    billConflictItemRepository.save(billConflictItem);
+                    billConflictItemRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "禁忌人群":
                 if (entityInfo.getId() == null) {
-                    Group group = new Group();
-                    BeanUtil.copyProperties(entityInfo, group);
-                    groupRepository.save(group);
+                    groupRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "建议输血提醒":
                 if (entityInfo.getId() == null) {
-                    TransfusionSuggest transfusionSuggest = new TransfusionSuggest();
-                    BeanUtil.copyProperties(entityInfo, transfusionSuggest);
-                    transfusionSuggestRepository.save(transfusionSuggest);
+                    transfusionSuggestRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "过敏原":
                 if (entityInfo.getId() == null) {
-                    Allergen allergen = new Allergen();
-                    BeanUtil.copyProperties(entityInfo, allergen);
-                    allergenRepository.save(allergen);
+                    allergenRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "食物过敏原":
                 if (entityInfo.getId() == null) {
-                    FoodAllergen foodAllergen = new FoodAllergen();
-                    BeanUtil.copyProperties(entityInfo, foodAllergen);
-                    foodAllergenRepository.save(foodAllergen);
+                    foodAllergenRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }
                 break;
             case "输血提醒指标":
                 if (entityInfo.getId() == null) {
-                    TransfusionRemind transfusionRemind = new TransfusionRemind();
-                    BeanUtil.copyProperties(entityInfo, transfusionRemind);
-                    transfusionRemindRepository.save(transfusionRemind);
+                    transfusionRemindRepository.create(entityInfo);
                 } else {
                     entityInfoRepository.update(entityInfo);
                 }

+ 12 - 0
src/main/java/com/diagbot/repository/AllergenRepository.java

@@ -1,7 +1,10 @@
 package com.diagbot.repository;
 
 import com.diagbot.entity.node.Allergen;
+import com.diagbot.entity.node.EntityInfo;
+import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
+import org.springframework.data.repository.query.Param;
 
 import java.util.List;
 
@@ -14,5 +17,14 @@ public interface AllergenRepository extends Neo4jRepository<Allergen, Long> {
 
     List<Allergen> findByNameContaining(String name);
 
+    @Query("create (n:过敏原) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    Allergen create(@Param("entityInfo") EntityInfo entityInfo);
 }
 

+ 13 - 0
src/main/java/com/diagbot/repository/BillConflictItemRepository.java

@@ -1,7 +1,10 @@
 package com.diagbot.repository;
 
 import com.diagbot.entity.node.BillConflictItem;
+import com.diagbot.entity.node.EntityInfo;
+import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
+import org.springframework.data.repository.query.Param;
 
 import java.util.List;
 
@@ -12,4 +15,14 @@ import java.util.List;
  */
 public interface BillConflictItemRepository extends Neo4jRepository<BillConflictItem,Long> {
     List<BillConflictItem> findByNameIs(String name);
+
+    @Query("create (n:开单项互斥) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    BillConflictItem create(@Param("entityInfo") EntityInfo entityInfo);
 }

+ 11 - 0
src/main/java/com/diagbot/repository/ClinicalFindingRepository.java

@@ -1,6 +1,7 @@
 package com.diagbot.repository;
 
 import com.diagbot.entity.node.ClinicalFinding;
+import com.diagbot.entity.node.EntityInfo;
 import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
 import org.springframework.data.repository.query.Param;
@@ -45,4 +46,14 @@ public interface ClinicalFindingRepository extends Neo4jRepository<ClinicalFindi
                                    @Param("range") Integer range,
                                    @Param("unit") String unit,
                                    @Param("indication") String indication);
+
+    @Query("create (n:临床表现) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    ClinicalFinding create(@Param("entityInfo") EntityInfo entityInfo);
 }

+ 13 - 0
src/main/java/com/diagbot/repository/ConflictDeviceRepository.java

@@ -1,7 +1,10 @@
 package com.diagbot.repository;
 
 import com.diagbot.entity.node.ConflictDevice;
+import com.diagbot.entity.node.EntityInfo;
+import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
+import org.springframework.data.repository.query.Param;
 
 import java.util.List;
 
@@ -12,4 +15,14 @@ import java.util.List;
  */
 public interface ConflictDeviceRepository extends Neo4jRepository<ConflictDevice,Long> {
     List<ConflictDevice> findByNameIs(String name);
+
+    @Query("create (n:禁忌医疗器械及物品) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    ConflictDevice create(@Param("entityInfo") EntityInfo entityInfo);
 }

+ 11 - 0
src/main/java/com/diagbot/repository/DeptRepository.java

@@ -1,6 +1,7 @@
 package com.diagbot.repository;
 
 import com.diagbot.entity.node.Dept;
+import com.diagbot.entity.node.EntityInfo;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
 import org.springframework.data.neo4j.annotation.Query;
@@ -38,4 +39,14 @@ public interface DeptRepository extends Neo4jRepository<Dept, Long> {
 
     @Query("MATCH (n:科室) return distinct(n.name) as name LIMIT $(size)")
     List<String> getDeptNames(@Param("size") Integer size);
+
+    @Query("create (n:科室) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    Dept create(@Param("entityInfo") EntityInfo entityInfo);
 }

+ 14 - 0
src/main/java/com/diagbot/repository/DiseaseRepository.java

@@ -1,7 +1,11 @@
 package com.diagbot.repository;
 
 import com.diagbot.entity.node.Disease;
+import com.diagbot.entity.node.EntityInfo;
+import com.diagbot.entity.node.Group;
+import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
+import org.springframework.data.repository.query.Param;
 
 import java.util.List;
 
@@ -12,4 +16,14 @@ import java.util.List;
  */
 public interface DiseaseRepository extends Neo4jRepository<Disease,Long> {
     List<Disease> findByNameIs(String name);
+
+    @Query("create (n:疾病) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    Disease create(@Param("entityInfo") EntityInfo entityInfo);
 }

+ 12 - 0
src/main/java/com/diagbot/repository/FoodAllergenRepository.java

@@ -1,7 +1,10 @@
 package com.diagbot.repository;
 
+import com.diagbot.entity.node.EntityInfo;
 import com.diagbot.entity.node.FoodAllergen;
+import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
+import org.springframework.data.repository.query.Param;
 
 /**
  * @Description:
@@ -9,4 +12,13 @@ import org.springframework.data.neo4j.repository.Neo4jRepository;
  * @time: 2020/12/16 13:19
  */
 public interface FoodAllergenRepository extends Neo4jRepository<FoodAllergen,Long> {
+    @Query("create (n:食物过敏原) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    FoodAllergen create(@Param("entityInfo") EntityInfo entityInfo);
 }

+ 14 - 1
src/main/java/com/diagbot/repository/GenderRepository.java

@@ -1,7 +1,10 @@
 package com.diagbot.repository;
 
+import com.diagbot.entity.node.EntityInfo;
 import com.diagbot.entity.node.Gender;
+import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
+import org.springframework.data.repository.query.Param;
 
 import java.util.List;
 
@@ -12,4 +15,14 @@ import java.util.List;
  */
 public interface GenderRepository extends Neo4jRepository<Gender,Long> {
     List<Gender> findByNameIs(String name);
-}
+
+    @Query("create (n:性别) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    Gender create(@Param("entityInfo") EntityInfo entityInfo);
+}

+ 11 - 0
src/main/java/com/diagbot/repository/GroupRepository.java

@@ -1,5 +1,6 @@
 package com.diagbot.repository;
 
+import com.diagbot.entity.node.EntityInfo;
 import com.diagbot.entity.node.Group;
 import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
@@ -45,4 +46,14 @@ public interface GroupRepository extends Neo4jRepository<Group, Long> {
                          @Param("range") Integer range,
                          @Param("unit") String unit,
                          @Param("indication") String indication);
+
+    @Query("create (n:禁忌人群) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    Group create(@Param("entityInfo") EntityInfo entityInfo);
 }

+ 12 - 0
src/main/java/com/diagbot/repository/LisBigNameRepository.java

@@ -1,7 +1,10 @@
 package com.diagbot.repository;
 
+import com.diagbot.entity.node.EntityInfo;
 import com.diagbot.entity.node.LisBigName;
+import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
+import org.springframework.data.repository.query.Param;
 
 /**
  * @Description:
@@ -9,4 +12,13 @@ import org.springframework.data.neo4j.repository.Neo4jRepository;
  * @time: 2020/12/15 16:47
  */
 public interface LisBigNameRepository extends Neo4jRepository<LisBigName,Long> {
+    @Query("create (n:化验套餐名称) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    LisBigName create(@Param("entityInfo") EntityInfo entityInfo);
 }

+ 12 - 0
src/main/java/com/diagbot/repository/LisRemindRepository.java

@@ -1,8 +1,11 @@
 package com.diagbot.repository;
 
+import com.diagbot.entity.node.EntityInfo;
+import com.diagbot.entity.node.Group;
 import com.diagbot.entity.node.LisRemind;
 import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
+import org.springframework.data.repository.query.Param;
 
 import java.util.List;
 
@@ -13,5 +16,14 @@ public interface LisRemindRepository extends Neo4jRepository<LisRemind, Long> {
 
     List<LisRemind> findByNameContaining(String name);
 
+    @Query("create (n:化验提醒指标) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    LisRemind create(@Param("entityInfo") EntityInfo entityInfo);
 }
 

+ 12 - 0
src/main/java/com/diagbot/repository/MedChemClassRepository.java

@@ -1,7 +1,10 @@
 package com.diagbot.repository;
 
+import com.diagbot.entity.node.EntityInfo;
 import com.diagbot.entity.node.MedChemClass;
+import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
+import org.springframework.data.repository.query.Param;
 
 /**
  * @Description:
@@ -9,4 +12,13 @@ import org.springframework.data.neo4j.repository.Neo4jRepository;
  * @time: 2020/12/15 16:35
  */
 public interface MedChemClassRepository extends Neo4jRepository<MedChemClass,Long> {
+    @Query("create (n:药品化学物质类别) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    MedChemClass create(@Param("entityInfo") EntityInfo entityInfo);
 }

+ 13 - 1
src/main/java/com/diagbot/repository/MedClassRepository.java

@@ -1,7 +1,10 @@
 package com.diagbot.repository;
 
+import com.diagbot.entity.node.EntityInfo;
 import com.diagbot.entity.node.MedClass;
+import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
+import org.springframework.data.repository.query.Param;
 
 /**
  * @Description:
@@ -9,4 +12,13 @@ import org.springframework.data.neo4j.repository.Neo4jRepository;
  * @time: 2020/12/15 16:26
  */
 public interface MedClassRepository extends Neo4jRepository<MedClass,Long> {
-}
+    @Query("create (n:药品类别) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    MedClass create(@Param("entityInfo") EntityInfo entityInfo);
+}

+ 13 - 0
src/main/java/com/diagbot/repository/MedJiePouClassRepository.java

@@ -1,7 +1,10 @@
 package com.diagbot.repository;
 
+import com.diagbot.entity.node.EntityInfo;
 import com.diagbot.entity.node.MedJiePouClass;
+import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
+import org.springframework.data.repository.query.Param;
 
 import java.util.List;
 
@@ -11,5 +14,15 @@ public interface MedJiePouClassRepository extends Neo4jRepository<MedJiePouClass
     List<MedJiePouClass> findByNameIs(String name);
 
     List<MedJiePouClass> findByNameContaining(String name);
+
+    @Query("create (n:药品解剖学类别) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    MedJiePouClass create(@Param("entityInfo") EntityInfo entityInfo);
 }
 

+ 12 - 0
src/main/java/com/diagbot/repository/MedYaoLiClassRepository.java

@@ -1,7 +1,10 @@
 package com.diagbot.repository;
 
+import com.diagbot.entity.node.EntityInfo;
 import com.diagbot.entity.node.MedYaoLiClass;
+import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
+import org.springframework.data.repository.query.Param;
 
 /**
  * @Description:
@@ -9,4 +12,13 @@ import org.springframework.data.neo4j.repository.Neo4jRepository;
  * @time: 2020/12/15 16:30
  */
 public interface MedYaoLiClassRepository extends Neo4jRepository<MedYaoLiClass,Long> {
+    @Query("create (n:药品药理学类别) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    MedYaoLiClass create(@Param("entityInfo") EntityInfo entityInfo);
 }

+ 12 - 0
src/main/java/com/diagbot/repository/MedZhiLiaoClassRepository.java

@@ -1,7 +1,10 @@
 package com.diagbot.repository;
 
+import com.diagbot.entity.node.EntityInfo;
 import com.diagbot.entity.node.MedZhiLiaoClass;
+import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
+import org.springframework.data.repository.query.Param;
 
 /**
  * @Description:
@@ -9,4 +12,13 @@ import org.springframework.data.neo4j.repository.Neo4jRepository;
  * @time: 2020/12/15 16:27
  */
 public interface MedZhiLiaoClassRepository extends Neo4jRepository<MedZhiLiaoClass,Long> {
+    @Query("create (n:药品治疗学类别) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    MedZhiLiaoClass create(@Param("entityInfo") EntityInfo entityInfo);
 }

+ 11 - 1
src/main/java/com/diagbot/repository/MedicineRepository.java

@@ -1,6 +1,6 @@
 package com.diagbot.repository;
 
-import com.diagbot.entity.node.MedCodeName;
+import com.diagbot.entity.node.EntityInfo;
 import com.diagbot.entity.node.MedRegName;
 import com.diagbot.entity.node.Medicine;
 import org.springframework.data.domain.Page;
@@ -63,4 +63,14 @@ public interface MedicineRepository extends Neo4jRepository<Medicine, Long> {
 
     @Query("MATCH (n:药品通用名称) RETURN DISTINCT n.name as name LIMIT $size")
     List<String> getMedicineNames(@Param("size") Integer size);
+
+    @Query("create (n:药品通用名称) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    Medicine create(@Param("entityInfo") EntityInfo entityInfo);
 }

+ 14 - 0
src/main/java/com/diagbot/repository/OralMedicineRepository.java

@@ -1,7 +1,11 @@
 package com.diagbot.repository;
 
+import com.diagbot.entity.node.EntityInfo;
+import com.diagbot.entity.node.Group;
 import com.diagbot.entity.node.OralMedicine;
+import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
+import org.springframework.data.repository.query.Param;
 
 import java.util.List;
 
@@ -12,4 +16,14 @@ import java.util.List;
  */
 public interface OralMedicineRepository extends Neo4jRepository<OralMedicine,Long> {
     List<OralMedicine> findByNameIs(String name);
+
+    @Query("create (n:服用药品) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    OralMedicine create(@Param("entityInfo") EntityInfo entityInfo);
 }

+ 10 - 0
src/main/java/com/diagbot/repository/PacsCriticalRepository.java

@@ -1,5 +1,6 @@
 package com.diagbot.repository;
 
+import com.diagbot.entity.node.EntityInfo;
 import com.diagbot.entity.node.PacsCritical;
 import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
@@ -15,5 +16,14 @@ public interface PacsCriticalRepository extends Neo4jRepository<PacsCritical, Lo
 
     List<PacsCritical> findByNameContaining(String name);
 
+    @Query("create (n:辅助检查危急值) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    PacsCritical create(@Param("entityInfo") EntityInfo entityInfo);
 }
 

+ 13 - 0
src/main/java/com/diagbot/repository/PacsDescribeRepository.java

@@ -1,7 +1,10 @@
 package com.diagbot.repository;
 
+import com.diagbot.entity.node.EntityInfo;
 import com.diagbot.entity.node.PacsDescribe;
+import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
+import org.springframework.data.repository.query.Param;
 
 import java.util.List;
 
@@ -12,4 +15,14 @@ import java.util.List;
  */
 public interface PacsDescribeRepository extends Neo4jRepository<PacsDescribe,Long> {
     List<PacsDescribe> findByNameIs(String name);
+
+    @Query("create (n:辅助检查名称描述) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    PacsDescribe create(@Param("entityInfo") EntityInfo entityInfo);
 }

+ 12 - 0
src/main/java/com/diagbot/repository/PacsRemindRepository.java

@@ -1,7 +1,10 @@
 package com.diagbot.repository;
 
+import com.diagbot.entity.node.EntityInfo;
 import com.diagbot.entity.node.PacsRemind;
+import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
+import org.springframework.data.repository.query.Param;
 
 import java.util.List;
 
@@ -12,5 +15,14 @@ public interface PacsRemindRepository extends Neo4jRepository<PacsRemind, Long>
 
     List<PacsRemind> findByNameContaining(String name);
 
+    @Query("create (n:辅检提醒指标) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    PacsRemind create(@Param("entityInfo") EntityInfo entityInfo);
 }
 

+ 13 - 1
src/main/java/com/diagbot/repository/PacsResultRepository.java

@@ -1,5 +1,6 @@
 package com.diagbot.repository;
 
+import com.diagbot.entity.node.EntityInfo;
 import com.diagbot.entity.node.PacsResult;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
@@ -17,8 +18,9 @@ public interface PacsResultRepository extends Neo4jRepository<PacsResult, Long>
     List<PacsResult> findByNameContaining(String name);
 
     List<PacsResult> findByNameIn(List<String> names);
+
     @Query("match(f:辅助检查名称结果)-[r]->(d:医保疾病名称) where f.name in $pycode return d.name")
-    List<String> getDisByPacsResults(@Param("pycode")List<String> names);
+    List<String> getDisByPacsResults(@Param("pycode") List<String> names);
 
     Page<PacsResult> findByNameContainingIgnoreCaseOrPycodeContainingIgnoreCase(String name, String pycode, Pageable pageable);
 
@@ -51,4 +53,14 @@ public interface PacsResultRepository extends Neo4jRepository<PacsResult, Long>
             "WITH n SKIP 0 LIMIT $size\n" +
             "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
     List<PacsResult> index(@Param("name") String name, @Param("pycode") String pycode, @Param("size") Integer size);
+
+    @Query("create (n:辅助检查名称结果) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    PacsResult create(@Param("entityInfo") EntityInfo entityInfo);
 }

+ 15 - 4
src/main/java/com/diagbot/repository/SymptomNameRepository.java

@@ -1,5 +1,6 @@
 package com.diagbot.repository;
 
+import com.diagbot.entity.node.EntityInfo;
 import com.diagbot.entity.node.Symptom;
 import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
@@ -33,16 +34,26 @@ public interface SymptomNameRepository extends Neo4jRepository<Symptom, Long> {
 
 
     @Query("match(d:医保疾病名称)-[r{典型:1}]->(s) where any(label in labels(s) WHERE label in ['症状', '体征']) and s.name in {py} return d.name")
-//    @Query("match(d:医保疾病名称)-[r]->(s) where any(label in labels(s) WHERE label in ['症状', '体征']) and s.name in {py} return d.name")
-    List<String> getDisBySymptoms(@Param("py")List<String> symptoms);
+        //    @Query("match(d:医保疾病名称)-[r]->(s) where any(label in labels(s) WHERE label in ['症状', '体征']) and s.name in {py} return d.name")
+    List<String> getDisBySymptoms(@Param("py") List<String> symptoms);
 
     @Query("match(d:医保疾病名称)-[r]->(s:症状) where s.name in {py} return d.name")
-    List<String> getDisBySymptoms_1(@Param("py")List<String> symptoms);
+    List<String> getDisBySymptoms_1(@Param("py") List<String> symptoms);
 
     @Query("match(d:医保疾病名称)-[r:医保疾病名称相关体征]->(s:体征) where s.name in {py} return d.name")
-    List<String> getDisByVital(@Param("py")List<String> vitals);
+    List<String> getDisByVital(@Param("py") List<String> vitals);
 
     @Query("MATCH (n:症状) return distinct(n.name) as name LIMIT {size}")
     List<String> getSymptomNames(@Param("size") Integer size);
+
+    @Query("create (n:症状) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    Symptom create(@Param("entityInfo") EntityInfo entityInfo);
 }
 

+ 10 - 1
src/main/java/com/diagbot/repository/TransfusionRemindRepository.java

@@ -1,5 +1,6 @@
 package com.diagbot.repository;
 
+import com.diagbot.entity.node.EntityInfo;
 import com.diagbot.entity.node.TransfusionRemind;
 import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
@@ -26,5 +27,13 @@ public interface TransfusionRemindRepository extends Neo4jRepository<Transfusion
     @Query("MATCH (n:输血提醒指标) return distinct(n.输注类型) as type LIMIT $(size)")
     List<String> getTransfusionNames(@Param("size") Integer size);
 
+    @Query("create (n:输血提醒指标) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    TransfusionRemind create(@Param("entityInfo") EntityInfo entityInfo);
 }
-

+ 10 - 0
src/main/java/com/diagbot/repository/TransfusionSuggestRepository.java

@@ -1,5 +1,6 @@
 package com.diagbot.repository;
 
+import com.diagbot.entity.node.EntityInfo;
 import com.diagbot.entity.node.TransfusionSuggest;
 import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
@@ -20,5 +21,14 @@ public interface TransfusionSuggestRepository extends Neo4jRepository<Transfusio
     @Query("MATCH (n:建议输血提醒指标) where n.输注类型 contains {name} return n")
     List<TransfusionSuggest> findByTransfusionName(@Param("name") String name);
 
+    @Query("create (n:建议输血提醒指标) \n" +
+            "set  " +
+            "n.name = :#{#entityInfo.name}," +
+            "n.拼音编码 = :#{#entityInfo.pycode}," +
+            "n.静态知识标识 = :#{#entityInfo.is_kl}," +
+            "n.状态 = :#{#entityInfo.status}" +
+            "\n" +
+            "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
+    TransfusionSuggest create(@Param("entityInfo") EntityInfo entityInfo);
 }