Ver código fonte

清理多余的节点信息

MarkHuang 4 anos atrás
pai
commit
f0ac734225

+ 0 - 19
src/main/java/com/diagbot/entity/node/GeneralCompl.java

@@ -1,19 +0,0 @@
-package com.diagbot.entity.node;
-
-import com.diagbot.entity.node.base.BaseNode;
-import lombok.Getter;
-import lombok.Setter;
-import org.neo4j.ogm.annotation.NodeEntity;
-import org.neo4j.ogm.annotation.Relationship;
-
-import java.util.Set;
-
-@Setter
-@Getter
-//@EqualsAndHashCode(callSuper = false)
-@NodeEntity(label = "全身并发症")
-public class GeneralCompl extends BaseNode  {
-
-    @Relationship(type="疾病相关全身并发症", direction = Relationship.INCOMING)
-    private Set<Disease> diseases;
-}

+ 0 - 19
src/main/java/com/diagbot/entity/node/LocalCompl.java

@@ -1,19 +0,0 @@
-package com.diagbot.entity.node;
-
-import com.diagbot.entity.node.base.BaseNode;
-import lombok.Getter;
-import lombok.Setter;
-import org.neo4j.ogm.annotation.NodeEntity;
-import org.neo4j.ogm.annotation.Relationship;
-
-import java.util.Set;
-
-@Setter
-@Getter
-//@EqualsAndHashCode(callSuper = false)
-@NodeEntity(label = "局部并发症")
-public class LocalCompl extends BaseNode  {
-
-    @Relationship(type="疾病相关局部并发症", direction = Relationship.INCOMING)
-    private Set<Disease> diseases;
-}

+ 0 - 19
src/main/java/com/diagbot/entity/node/StdDept.java

@@ -1,19 +0,0 @@
-package com.diagbot.entity.node;
-
-import com.diagbot.entity.node.base.BaseNode;
-import lombok.Getter;
-import lombok.Setter;
-import org.neo4j.ogm.annotation.NodeEntity;
-import org.neo4j.ogm.annotation.Relationship;
-
-import java.util.Set;
-
-@Setter
-@Getter
-//@EqualsAndHashCode(callSuper = false)
-@NodeEntity(label = "标准科室")
-public class StdDept extends BaseNode  {
-
-    @Relationship(type="疾病相关标准科室", direction = Relationship.INCOMING)
-    private Set<Disease> diseases;
-}

+ 0 - 120
src/main/java/com/diagbot/entity/node/YiBaoDisease.java

@@ -1,120 +0,0 @@
-package com.diagbot.entity.node;
-
-import com.diagbot.entity.node.Disease;
-import com.diagbot.entity.node.LIS;
-import com.diagbot.entity.node.Medicine;
-import com.diagbot.entity.node.PACS;
-import com.diagbot.entity.node.base.BaseNode;
-import lombok.Getter;
-import lombok.Setter;
-import org.neo4j.ogm.annotation.NodeEntity;
-import org.neo4j.ogm.annotation.Property;
-import org.neo4j.ogm.annotation.Relationship;
-
-import java.util.HashSet;
-import java.util.Set;
-
-@Setter
-@Getter
-//@EqualsAndHashCode(callSuper = false)
-@NodeEntity(label = "医保ICD_10疾病")
-public class YiBaoDisease extends BaseNode  {
-
-    @Property(name = "医保ICD-10代码")
-    private String icd_code;
-
-    @Property(name = "疾病名称")
-    private String disease_name;
-
-
-    @Relationship(type="医保ICD-10疾病相关年龄", direction = Relationship.OUTGOING)
-    private Age age;
-
-    @Relationship(type="医保ICD-10疾病相关性别", direction = Relationship.OUTGOING)
-    private Gender gender;
-
-    @Relationship(type="医保ICD-10疾病相关治愈率", direction = Relationship.OUTGOING)
-    private CureRate curerate;
-
-    @Relationship(type="医保ICD-10疾病相关治疗周期", direction = Relationship.OUTGOING)
-    private TreatCycle treatcycle;
-
-    @Relationship(type="医保ICD-10疾病相关传染途径", direction = Relationship.OUTGOING)
-    private Set<Infection> infections = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关多发人群", direction = Relationship.OUTGOING)
-    private Set<Group> groups = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关别名", direction = Relationship.OUTGOING)
-    private Set<Alias> alias = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关体征", direction = Relationship.OUTGOING)
-    private Set<Vital> vitals = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关科室", direction = Relationship.OUTGOING)
-    private Set<Dept> depts = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关症状", direction = Relationship.OUTGOING)
-    private Set<Symptom> symptoms = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关发病情况", direction = Relationship.OUTGOING)
-    private Set<Situation> situations = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关标准科室", direction = Relationship.OUTGOING)
-    private Set<Dept> stddepts = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关并发症", direction = Relationship.OUTGOING)
-    private Set<Complication> complications = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关检查", direction = Relationship.OUTGOING)
-    private Set<PACS> pacss = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关药品", direction = Relationship.OUTGOING)
-    private Set<Medicine> medicines = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关发病原因", direction = Relationship.OUTGOING)
-    private Set<Cause> causes = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关鉴别诊断", direction = Relationship.OUTGOING)
-    private Set<Disease> diff_diseases = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关手术和操作", direction = Relationship.OUTGOING)
-    private Set<Operation> operations = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关病原体", direction = Relationship.OUTGOING)
-    private Set<Pathogen> pathogens = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关遗传性", direction = Relationship.OUTGOING)
-    private Set<Heredity> hereditys = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关治疗", direction = Relationship.OUTGOING)
-    private Set<Treatment> treatments = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关分型", direction = Relationship.OUTGOING)
-    private Set<DiseaseType> diseasetypes = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关局部并发症", direction = Relationship.OUTGOING)
-    private Set<Complication> localcompls = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关全身并发症", direction = Relationship.OUTGOING)
-    private Set<Complication> generalcompls = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关化验", direction = Relationship.OUTGOING)
-    private Set<LIS> liss = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关实验室检查", direction = Relationship.OUTGOING)
-    private Set<LIS> liss_dis = new HashSet<>();
-
-    @Relationship(type="医保ICD-10疾病相关辅助检查", direction = Relationship.OUTGOING)
-    private Set<PACS> pacs = new HashSet<>();
-
-    @Relationship(type="药品通用名禁忌医保ICD-10疾病", direction = Relationship.INCOMING)
-    private Set<Medicine> medicine_conflict_diseases;
-
-    @Relationship(type="辅助检查禁忌医保ICD-10疾病", direction = Relationship.INCOMING)
-    private Set<PACS> pacs_conflict_diseases;
-
-    @Relationship(type="实验室检查禁忌医保ICD-10疾病", direction = Relationship.INCOMING)
-    private Set<Disease> lis_conflict_diseases;
-
-}

+ 0 - 246
src/main/java/com/diagbot/repository/YiBaoDiseaseNode.java

@@ -1,246 +0,0 @@
-package com.diagbot.repository;
-
-import com.diagbot.dto.NeoPushDTO;
-import com.diagbot.dto.PushBaseDTO;
-import com.diagbot.entity.node.*;
-import com.diagbot.enums.MedicalAdviceEnum;
-import com.diagbot.util.NeoUtil;
-import com.diagbot.vo.NeoPushVO;
-
-import java.util.*;
-
-public class YiBaoDiseaseNode {
-
-	public NeoPushDTO YiBaoDiseasetoPushDTO(YiBaoDisease disease, NeoPushVO neoPushVO) {
-
-        NeoPushDTO pushDTO = null;
-        PushBaseDTO pushBaseDTO;
-        List<PushBaseDTO> pushBaseDTOS;
-
-        int gender = neoPushVO.getSex();
-        int age = neoPushVO.getAge();
-
-        if (matchBasic(disease, gender, age)) {
-
-        	pushDTO = new NeoPushDTO();
-
-        	pushBaseDTO = new PushBaseDTO();
-			pushBaseDTO.setName(disease.getName());
-			pushDTO.setDisease(pushBaseDTO);
-
-
-			pushBaseDTO = new PushBaseDTO();
-			pushBaseDTO.setName(disease.getIcd_code());
-			pushDTO.setIcd10(pushBaseDTO);
-
-			/*
-			CureRate curerate = disease.getCurerate();
-			if (null != curerate) {
-				NeoUtil.updateNodeInfo(curerate.getName(), null, null, null);
-			}
-
-			TreatCycle treatcycle = disease.getTreatcycle();
-			if (null != treatcycle) {
-				NeoUtil.updateNodeInfo(treatcycle.getName(), null, null, null);
-			}
-
-			Set<Infection> infections = disease.getInfections();
-			for (Infection infection : infections) {
-				NeoUtil.updateNodeInfo(infection.getName(), null, null, null);
-			}
-
-			Set<Group> groups = disease.getGroups();
-			for (Group group : groups) {
-				NeoUtil.updateNodeInfo(group.getName(), null, null, null);
-			}
-
-			Set<Alias> aliass = disease.getAlias();
-			for (Alias alias : aliass) {
-				NeoUtil.updateNodeInfo(alias.getName(), null, null, null);
-			}
-			*/
-
-			pushBaseDTOS = new ArrayList<>();
-			Set<Vital> vitals = disease.getVitals();
-			for (Vital vital : vitals) {
-				pushBaseDTO = new PushBaseDTO();
-				pushBaseDTO.setName(vital.getName());
-				pushBaseDTOS.add(pushBaseDTO);
-			}
-			pushDTO.setVitals(pushBaseDTOS);
-
-			/*
-			Set<Dept> depts = disease.getDepts();
-			for (Dept dept : depts) {
-				NeoUtil.updateNodeInfo(dept.getName(), null, null, null);
-			}
-			*/
-
-			pushBaseDTOS = new ArrayList<>();
-			Set<Symptom> symptoms = disease.getSymptoms();
-			for (Symptom symptom : symptoms) {
-				pushBaseDTO = new PushBaseDTO();
-				pushBaseDTO.setName(symptom.getName());
-				pushBaseDTOS.add(pushBaseDTO);
-			}
-			pushDTO.setSymptoms(pushBaseDTOS);
-
-			/*
-			Set<Situation> situations = disease.getSituations();
-			for (Situation situation : situations) {
-				NeoUtil.updateNodeInfo(situation.getName(), null, null, null);
-			}
-
-			Set<Dept> stddepts = disease.getDepts();
-			for (Dept stddept : stddepts) {
-				NeoUtil.updateNodeInfo(stddept.getName(), null, null, null);
-			}
-
-
-			Set<Complication> complications = disease.getComplications();
-			for (Complication complication : complications) {
-				pushDTO.getComplications().add(NeoUtil.updatePushInfo(complication.getName()));
-			}
-			*/
-
-
-			pushBaseDTOS = new ArrayList<>();
-			Set<PACS> pacss = disease.getPacs();
-			for (PACS pacs : pacss) {
-				pushBaseDTO = new PushBaseDTO();
-				pushBaseDTO.setName(pacs.getName());
-				pushBaseDTOS.add(pushBaseDTO);
-			}
-			pushDTO.setPacs(pushBaseDTOS);
-
-
-			pushBaseDTOS = new ArrayList<>();
-			Set<Medicine> medicines = disease.getMedicines();
-			for (Medicine medicine : medicines) {
-				pushBaseDTO = new PushBaseDTO();
-				pushBaseDTO.setName(medicine.getName());
-				pushBaseDTOS.add(pushBaseDTO);
-			}
-			pushDTO.getTreat().put(MedicalAdviceEnum.getName(1), pushBaseDTOS);
-
-			/*
-			Set<Cause> causes = disease.getCauses();
-			for (Cause cause : causes) {
-				NeoUtil.updateNodeInfo(cause.getName(), null, null, null);
-			}
-
-
-			Set<Disease> diff_diseases = disease.getDiff_diseases();
-			List<PushBaseDTO> pushBaseDTOs = new ArrayList<>();
-			for (Disease diff_disease : diff_diseases) {
-				pushBaseDTOs.add(NeoUtil.updatePushInfo(diff_disease.getName()));
-			}
-			Map<String, List<PushBaseDTO>> dis = new HashMap<>();
-			dis.put("鉴别诊断", pushBaseDTOs);
-			pushDTO.setDis(dis);
-			*/
-
-			pushBaseDTOS = new ArrayList<>();
-			Set<Operation> operations = disease.getOperations();
-			for (Operation operation : operations) {
-				pushBaseDTO = new PushBaseDTO();
-				pushBaseDTO.setName(operation.getName());
-				pushBaseDTOS.add(pushBaseDTO);
-			}
-			pushDTO.getTreat().put(MedicalAdviceEnum.getName(2), pushBaseDTOS);
-
-			/*
-			Set<Pathogen> pathogens = disease.getPathogens();
-			for (Pathogen pathogen : pathogens) {
-				NeoUtil.updateNodeInfo(pathogen.getName(), null, null, null);
-			}
-
-			Set<Heredity> hereditys = disease.getHereditys();
-			for (Heredity heredity : hereditys) {
-				NeoUtil.updateNodeInfo(heredity.getName(), null, null, null);
-			}
-
-			Set<Treatment> treatments = disease.getTreatments();
-			for (Treatment treatment : treatments) {
-				NeoUtil.updateNodeInfo(treatment.getName(), null, null, null);
-			}
-
-			Set<DiseaseType> diseasetypes = disease.getDiseasetypes();
-			for (DiseaseType diseasetype : diseasetypes) {
-				NeoUtil.updateNodeInfo(diseasetype.getName(), null, null, null);
-			}
-
-			Set<Complication> localcompls = disease.getLocalcompls();
-			for (Complication localcompl : localcompls) {
-				NeoUtil.updateNodeInfo(localcompl.getName(), null, null, null);
-			}
-
-			Set<Complication> generalcompls = disease.getGeneralcompls();
-			for (Complication generalcompl : generalcompls) {
-				NeoUtil.updateNodeInfo(generalcompl.getName(), null, null, null);
-			}
-			*/
-
-
-			pushBaseDTOS = new ArrayList<>();
-			Set<LIS> liss = disease.getLiss_dis();
-			for (LIS lis : liss) {
-				pushBaseDTO = new PushBaseDTO();
-				pushBaseDTO.setName(lis.getName());
-				pushBaseDTOS.add(pushBaseDTO);
-			}
-			pushDTO.setLis(pushBaseDTOS);
-
-
-			/*
-			Set<PACS> pacs_disease= disease.getPacs_disease();
-			for (PACS pacs : pacs_disease) {
-				String name = pacs.getName();
-				String min = pacs.getMinval();
-				String max = pacs.getMaxval();
-				String unit = pacs.getUnit();
-				NeoUtil.updateNodeInfo(name, min, max, unit);
-			}
-
-			Medicine_Code medicine_code = disease.getMedicine_code();
-			if (null != medicine_code) {
-				NeoUtil.updateNodeInfo(medicine_code.getName(), null, null, null);
-			}
-			*/
-		}
-
-		return pushDTO;
-	}
-
-
-	private boolean matchBasic(YiBaoDisease disease, int gender_code, int age) {
-		boolean match = true;
-
-		String gender = null;
-
-		if (gender_code==1) {
-			gender = "男";
-		}
-		else if (gender_code==2) {
-			gender = "女";
-		}
-
-		if (null!=disease.getGender() && gender!=null) {
-			if (!disease.getGender().getName().contains(gender)) {
-				match = false;
-			}
-		}
-
-		if (null!=disease.getAge()) {
-			int min = disease.getAge().getMinval();
-			int max = disease.getAge().getMaxval();
-			if (age < min || age > max) {
-				match = false;
-			}
-		}
-
-		return match;
-	}
-
-}
-

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

@@ -1,11 +0,0 @@
-package com.diagbot.repository;
-
-import com.diagbot.entity.node.YiBaoDisease;
-import org.springframework.data.neo4j.repository.Neo4jRepository;
-
-
-public interface YiBaoDiseaseRepository extends Neo4jRepository<YiBaoDisease, Long> {
-
-    YiBaoDisease findByNameIs(String name);
-}
-