|
@@ -9,9 +9,7 @@ import com.diagbot.dto.HighRiskNeoDTO;
|
|
import com.diagbot.dto.NeoPushDTO;
|
|
import com.diagbot.dto.NeoPushDTO;
|
|
import com.diagbot.dto.StandConvertCrfBatchDTO;
|
|
import com.diagbot.dto.StandConvertCrfBatchDTO;
|
|
import com.diagbot.dto.StandConvertCrfDTO;
|
|
import com.diagbot.dto.StandConvertCrfDTO;
|
|
-import com.diagbot.entity.node.ICDDisease;
|
|
|
|
-import com.diagbot.entity.node.Medicine_Code;
|
|
|
|
-import com.diagbot.entity.node.OralMedicine;
|
|
|
|
|
|
+import com.diagbot.entity.node.*;
|
|
import com.diagbot.enums.StandConvertEnum;
|
|
import com.diagbot.enums.StandConvertEnum;
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
import com.diagbot.exception.CommonException;
|
|
import com.diagbot.exception.CommonException;
|
|
@@ -98,22 +96,28 @@ public class NeoFacade {
|
|
public Map<String, List<String>> getDrugCache() {
|
|
public Map<String, List<String>> getDrugCache() {
|
|
Map<String, List<String>> res = new HashMap<>();
|
|
Map<String, List<String>> res = new HashMap<>();
|
|
|
|
|
|
- Iterator<Medicine_Code> iterator = medicineCodeRepository.findAll().iterator();
|
|
|
|
- Medicine_Code current;
|
|
|
|
|
|
+ Iterator<Medicine> iterator = medicineRepository.findAll().iterator();
|
|
|
|
+ Medicine current;
|
|
String med_code, med_type;
|
|
String med_code, med_type;
|
|
- List<OralMedicine> sets;
|
|
|
|
|
|
+ List<Medicine_Code> medcodes;
|
|
|
|
+ List<Medicine_Anatomy> medcates;
|
|
|
|
|
|
while (iterator.hasNext()) {
|
|
while (iterator.hasNext()) {
|
|
current = iterator.next();
|
|
current = iterator.next();
|
|
- if (current.getMedicine_related_chem().size() > 0) {
|
|
|
|
- sets = new ArrayList<>(current.getMedicine_related_chem());
|
|
|
|
- med_code = current.getName();
|
|
|
|
- med_type = sets.get(0).getName();
|
|
|
|
- if (res.get(med_type) == null) {
|
|
|
|
- res.put(med_type, new ArrayList<>());
|
|
|
|
- }
|
|
|
|
- if (res.get(med_type).indexOf(med_code) == -1) {
|
|
|
|
- res.get(med_type).add(med_code);
|
|
|
|
|
|
+ if (current.getMedicinecode_related_medicine().size() > 0) {
|
|
|
|
+ medcodes = new ArrayList<>(current.getMedicinecode_related_medicine());
|
|
|
|
+ for (Medicine_Code mcode : medcodes) {
|
|
|
|
+ if (mcode.getMedicine_related_Anatomy().size()>0) {
|
|
|
|
+ med_code = mcode.getName();
|
|
|
|
+ medcates = new ArrayList<>(mcode.getMedicine_related_Anatomy());
|
|
|
|
+ med_type = medcates.get(0).getName();
|
|
|
|
+ if (res.get(med_type) == null) {
|
|
|
|
+ res.put(med_type, new ArrayList<>());
|
|
|
|
+ }
|
|
|
|
+ if (res.get(med_type).indexOf(med_code) == -1) {
|
|
|
|
+ res.get(med_type).add(med_code);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|