|
@@ -5,11 +5,14 @@ import com.diagbot.dto.BillNeoDTO;
|
|
|
import com.diagbot.dto.HighRiskNeoDTO;
|
|
|
import com.diagbot.dto.OperationBillNeoDTO;
|
|
|
import com.diagbot.dto.OperationInfoDTO;
|
|
|
-import com.diagbot.entity.node.Operation;
|
|
|
+import com.diagbot.entity.node.*;
|
|
|
+import com.diagbot.util.NeoUtil;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.Set;
|
|
|
|
|
|
public class OperationNode {
|
|
|
|
|
@@ -17,6 +20,48 @@ public class OperationNode {
|
|
|
public OperationBillNeoDTO OperationtoOperationDTO(Operation operation) {
|
|
|
OperationBillNeoDTO opBillNeoDTO = new OperationBillNeoDTO();
|
|
|
|
|
|
+
|
|
|
+ Gender gender = operation.getGender();
|
|
|
+ if (null!=gender) {
|
|
|
+ opBillNeoDTO.setGender(NeoUtil.updateNodeInfo(gender.getName(), null, null, null));
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<ClinicalFinding> clinicalfindings = operation.getClinicalFindings();
|
|
|
+ for (ClinicalFinding clinicalfinding : clinicalfindings) {
|
|
|
+ String name = clinicalfinding.getName();
|
|
|
+ BigDecimal min = NeoUtil.DoubletoBigDecimal(clinicalfinding.getMinval());
|
|
|
+ BigDecimal max = NeoUtil.DoubletoBigDecimal(clinicalfinding.getMaxval());
|
|
|
+ String unit = clinicalfinding.getUnit();
|
|
|
+ opBillNeoDTO.getClinicfindings().add(NeoUtil.updateNodeInfo(name, min, max, unit));
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<Vital> vitals = operation.getVitals();
|
|
|
+ for (Vital vital : vitals) {
|
|
|
+ String name = vital.getName();
|
|
|
+ BigDecimal min = NeoUtil.DoubletoBigDecimal(vital.getMinval());
|
|
|
+ BigDecimal max = NeoUtil.DoubletoBigDecimal(vital.getMaxval());
|
|
|
+ String unit = vital.getUnit();
|
|
|
+ opBillNeoDTO.getVitals().add(NeoUtil.updateNodeInfo(name, min, max, unit));
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<OralMedicine> conflict_oralmeds = operation.getOralMedicines();
|
|
|
+ for (OralMedicine conflict_oralmed : conflict_oralmeds) {
|
|
|
+ String name = conflict_oralmed.getName();
|
|
|
+ opBillNeoDTO.getConflictmeds().add(NeoUtil.updateNodeInfo(name, null, null, null));
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<Disease> conflict_disease = operation.getDiseases();
|
|
|
+ for (Disease disease : conflict_disease) {
|
|
|
+ String name = disease.getName();
|
|
|
+ opBillNeoDTO.getDisease().add(NeoUtil.updateNodeInfo(name, null, null, null));
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<Group> conflict_group = operation.getGroups();
|
|
|
+ for (Group group : conflict_group) {
|
|
|
+ String name = group.getName();
|
|
|
+ opBillNeoDTO.getGroup().add(NeoUtil.updateNodeInfo(name, null, null, null));
|
|
|
+ }
|
|
|
+
|
|
|
return opBillNeoDTO;
|
|
|
}
|
|
|
|