|
@@ -0,0 +1,182 @@
|
|
|
+package com.diagbot.repository;
|
|
|
+
|
|
|
+import com.diagbot.dto.LisBillNeoDTO;
|
|
|
+import com.diagbot.dto.NodeNeoDTO;
|
|
|
+import com.diagbot.entity.node.*;
|
|
|
+import com.diagbot.util.NeoUtil;
|
|
|
+
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.util.Set;
|
|
|
+
|
|
|
+public class DiseaseNode {
|
|
|
+
|
|
|
+ public void DiseasetoDiseaseDTO(Disease disease) {
|
|
|
+
|
|
|
+
|
|
|
+ Age age = disease.getAge();
|
|
|
+ if (null!=age) {
|
|
|
+ NodeNeoDTO ageNeoDTO = new NodeNeoDTO();
|
|
|
+ ageNeoDTO.setMin(BigDecimal.valueOf(age.getMinval()));
|
|
|
+ ageNeoDTO.setMax(BigDecimal.valueOf(age.getMaxval()));
|
|
|
+ ageNeoDTO.setName("年龄");
|
|
|
+// lisBillNeoDTO.setAgeNeoDTO(ageNeoDTO);
|
|
|
+ }
|
|
|
+
|
|
|
+ Gender gender = disease.getGender();
|
|
|
+ if (null!=gender) {
|
|
|
+ NeoUtil.updateNodeInfo(gender.getName(), null, null, null);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<Vital> vitals = disease.getVitals();
|
|
|
+ for (Vital vital : vitals) {
|
|
|
+ String name = vital.getName();
|
|
|
+ NeoUtil.updateNodeInfo(name, null, null, null);
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<Dept> depts = disease.getDepts();
|
|
|
+ for (Dept dept : depts) {
|
|
|
+ NeoUtil.updateNodeInfo(dept.getName(), null, null, null);
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<Symptom> symptoms = disease.getSymptoms();
|
|
|
+ for (Symptom symptom : symptoms) {
|
|
|
+ NeoUtil.updateNodeInfo(symptom.getName(), null, null, null);
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<Situation> situations = disease.getSituations();
|
|
|
+ for (Situation situation : situations) {
|
|
|
+ NeoUtil.updateNodeInfo(situation.getName(), null, null, null);
|
|
|
+ }
|
|
|
+
|
|
|
+ Code code = disease.getCode();
|
|
|
+ if (null != code) {
|
|
|
+ NeoUtil.updateNodeInfo(code.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) {
|
|
|
+ String name = complication.getName();
|
|
|
+ NeoUtil.updateNodeInfo(complication.getName(), null, null, null);
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<PACS> pacss = disease.getPacs();
|
|
|
+ for (PACS pacs : pacss) {
|
|
|
+ String name = pacs.getName();
|
|
|
+ String min = pacs.getMinval();
|
|
|
+ String max = pacs.getMaxval();
|
|
|
+ String unit = pacs.getUnit();
|
|
|
+ NeoUtil.updateNodeInfo(name, min, max, unit);
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<Medicine> medicines = disease.getMedicines();
|
|
|
+ for (Medicine medicine : medicines) {
|
|
|
+ NeoUtil.updateNodeInfo(medicine.getName(), null, null, null);
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<Cause> causes = disease.getCauses();
|
|
|
+ for (Cause cause : causes) {
|
|
|
+ NeoUtil.updateNodeInfo(cause.getName(), null, null, null);
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<Disease> diff_diseases = disease.getDiff_diseases();
|
|
|
+ for (Disease diff_disease : diff_diseases) {
|
|
|
+ NeoUtil.updateNodeInfo(diff_disease.getName(), null, null, null);
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<Operation> operations = disease.getOperations();
|
|
|
+ for (Operation operation : operations) {
|
|
|
+ NeoUtil.updateNodeInfo(operation.getName(), null, null, null);
|
|
|
+ }
|
|
|
+
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<LIS> liss = disease.getLiss();
|
|
|
+ for (LIS lis : liss) {
|
|
|
+ String name = lis.getName();
|
|
|
+ String min = lis.getMinval();
|
|
|
+ String max = lis.getMaxval();
|
|
|
+ String unit = lis.getUnit();
|
|
|
+ NeoUtil.updateNodeInfo(name, min, max, unit);
|
|
|
+ }
|
|
|
+
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|