|
@@ -0,0 +1,93 @@
|
|
|
+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 LISPackNode {
|
|
|
+
|
|
|
+ public LisBillNeoDTO LisPacktoLISDTO(LISPack lispack) {
|
|
|
+
|
|
|
+ LisBillNeoDTO lisBillNeoDTO = new LisBillNeoDTO();
|
|
|
+
|
|
|
+ Gender gender = lispack.getGender();
|
|
|
+ if (null!=gender) {
|
|
|
+ lisBillNeoDTO.setGender(NeoUtil.updateNodeInfo(gender.getName(), null, null, null));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ Age age = lispack.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);
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<ClinicalFinding> clinicalfindings = lispack.getClinicalfindings();
|
|
|
+ for (ClinicalFinding clinicalfinding : clinicalfindings) {
|
|
|
+ String name = clinicalfinding.getName();
|
|
|
+ String min = clinicalfinding.getMinval();
|
|
|
+ String max = clinicalfinding.getMaxval();
|
|
|
+ String unit = clinicalfinding.getUnit();
|
|
|
+ lisBillNeoDTO.getClinicfindings().add(NeoUtil.updateNodeInfo(name, min, max, unit));
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<Medicine> conflict_medicines = lispack.getConflict_medicines();
|
|
|
+ for (Medicine conflict_medicine : conflict_medicines) {
|
|
|
+ String name = conflict_medicine.getName();
|
|
|
+ lisBillNeoDTO.getOralmeds().add(NeoUtil.updateNodeInfo(name, null, null, null));
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<AllergicMed> allergicmeds = lispack.getAllergicmeds();
|
|
|
+ for (AllergicMed allergicmed : allergicmeds) {
|
|
|
+ String name = allergicmed.getName();
|
|
|
+ lisBillNeoDTO.getAllergicmeds().add(NeoUtil.updateNodeInfo(name, null, null, null));
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<Operation> operations = lispack.getOperations();
|
|
|
+ for (Operation operation : operations) {
|
|
|
+ String name = operation.getName();
|
|
|
+ lisBillNeoDTO.getOperations().add(NeoUtil.updateNodeInfo(name, null, null, null));
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<Procedure> procedures = lispack.getProcedures();
|
|
|
+ for (Procedure procedure : procedures) {
|
|
|
+ String name = procedure.getName();
|
|
|
+ lisBillNeoDTO.getProcedures().add(NeoUtil.updateNodeInfo(name, null, null, null));
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<PACS> pacss = lispack.getPacs();
|
|
|
+ for (PACS pacs : pacss) {
|
|
|
+ String name = pacs.getName();
|
|
|
+ String min = pacs.getMinval();
|
|
|
+ String max = pacs.getMaxval();
|
|
|
+ String unit = pacs.getUnit();
|
|
|
+ lisBillNeoDTO.getPacs().add(NeoUtil.updateNodeInfo(name, min, max, unit));
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<Disease> diseases = lispack.getDiseases();
|
|
|
+ for (Disease disease : diseases) {
|
|
|
+ String name = disease.getName();
|
|
|
+ lisBillNeoDTO.getDisease().add(NeoUtil.updateNodeInfo(name, null, null, null));
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<Group> groups = lispack.getGroups();
|
|
|
+ for (Group group : groups) {
|
|
|
+ String name = group.getName();
|
|
|
+ lisBillNeoDTO.getGroup().add(NeoUtil.updateNodeInfo(name, null, null, null));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return lisBillNeoDTO;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|