|
@@ -4,10 +4,10 @@ import com.diagbot.dto.BillNeoDTO;
|
|
|
import com.diagbot.dto.DrugBillNeoDTO;
|
|
|
import com.diagbot.dto.LisBillNeoDTO;
|
|
|
import com.diagbot.dto.PacsBillNeoDTO;
|
|
|
+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.relationship.Medicine_AgeMin;
|
|
|
import com.diagbot.repository.*;
|
|
|
import com.diagbot.vo.BillNeoVO;
|
|
|
import com.diagbot.vo.StandConvert;
|
|
@@ -34,6 +34,8 @@ public class NeoFacade {
|
|
|
PacsRepository pacsRepository;
|
|
|
@Autowired
|
|
|
LisRepository lisRepository;
|
|
|
+ @Autowired
|
|
|
+ DiseaseRepository diseaseRepository;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -62,6 +64,7 @@ public class NeoFacade {
|
|
|
billNeoDTOs.addAll(getDrugBill(billNeoVO.getDrugList()));
|
|
|
billNeoDTOs.addAll(getPacsBill(billNeoVO.getPacsList()));
|
|
|
billNeoDTOs.addAll(getLisBill(billNeoVO.getLisList()));
|
|
|
+ getDiag(billNeoVO.getDiagList());
|
|
|
|
|
|
for (BillNeoDTO billNeoDTO:billNeoDTOs) {
|
|
|
System.out.println(billNeoDTO);
|
|
@@ -74,7 +77,7 @@ public class NeoFacade {
|
|
|
/**
|
|
|
* 处理处方开单合理性
|
|
|
*/
|
|
|
- public List<BillNeoDTO> getDrugBill(List<String> meds) {
|
|
|
+ public List<BillNeoDTO> getDrugBill(Map<String, String> medsterm) {
|
|
|
List<BillNeoDTO> billNeoDTOs = new ArrayList<>();
|
|
|
BillNeoDTO billNeoDTO;
|
|
|
|
|
@@ -82,16 +85,19 @@ public class NeoFacade {
|
|
|
|
|
|
MedicineNode medicineNode = new MedicineNode();
|
|
|
Medicine medicine;
|
|
|
+ String medname;
|
|
|
|
|
|
- for (String medname : meds) {
|
|
|
+ for (String term : medsterm.keySet()) {
|
|
|
billNeoDTO = new BillNeoDTO();
|
|
|
- billNeoDTO.setName(medname);
|
|
|
+ medname = medsterm.get(term);
|
|
|
+ billNeoDTO.setName(term);
|
|
|
+ billNeoDTO.setStandname(medname);
|
|
|
|
|
|
drugBillNeoDTO = new DrugBillNeoDTO();
|
|
|
|
|
|
medicine = medicineRepository.findByNameIs(medname);
|
|
|
|
|
|
- if (medicine!=null) {
|
|
|
+ if (medicine != null) {
|
|
|
drugBillNeoDTO = medicineNode.MedicinetoDrugDTO(medicine);
|
|
|
}
|
|
|
|
|
@@ -100,6 +106,7 @@ public class NeoFacade {
|
|
|
billNeoDTOs.add(billNeoDTO);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
return billNeoDTOs;
|
|
|
}
|
|
|
|
|
@@ -107,7 +114,7 @@ public class NeoFacade {
|
|
|
/**
|
|
|
* 处理辅检开单合理性
|
|
|
*/
|
|
|
- public List<BillNeoDTO> getPacsBill(List<String> pacslist) {
|
|
|
+ public List<BillNeoDTO> getPacsBill(Map<String, String> pacsterm) {
|
|
|
List<BillNeoDTO> billNeoDTOs = new ArrayList<>();
|
|
|
BillNeoDTO billNeoDTO;
|
|
|
|
|
@@ -115,16 +122,19 @@ public class NeoFacade {
|
|
|
|
|
|
PACSNode pacsNode = new PACSNode();
|
|
|
PACS pacs;
|
|
|
+ String pacsname;
|
|
|
|
|
|
- for (String pacsname : pacslist) {
|
|
|
+ for (String term : pacsterm.keySet()) {
|
|
|
billNeoDTO = new BillNeoDTO();
|
|
|
- billNeoDTO.setName(pacsname);
|
|
|
+ pacsname = pacsterm.get(term);
|
|
|
+ billNeoDTO.setName(term);
|
|
|
+ billNeoDTO.setStandname(pacsname);
|
|
|
|
|
|
pacsBillNeoDTO = new PacsBillNeoDTO();
|
|
|
|
|
|
pacs = pacsRepository.findByNameIs(pacsname);
|
|
|
|
|
|
- if (pacs!=null) {
|
|
|
+ if (pacs != null) {
|
|
|
pacsBillNeoDTO = pacsNode.PacstoPACSDTO(pacs);
|
|
|
}
|
|
|
|
|
@@ -140,7 +150,7 @@ public class NeoFacade {
|
|
|
/**
|
|
|
* 处理化验开单合理性
|
|
|
*/
|
|
|
- public List<BillNeoDTO> getLisBill(List<String> lislist) {
|
|
|
+ public List<BillNeoDTO> getLisBill(Map<String, String> listerm) {
|
|
|
List<BillNeoDTO> billNeoDTOs = new ArrayList<>();
|
|
|
BillNeoDTO billNeoDTO;
|
|
|
|
|
@@ -148,16 +158,19 @@ public class NeoFacade {
|
|
|
|
|
|
LISNode lisNode = new LISNode();
|
|
|
LIS lis;
|
|
|
+ String lisname;
|
|
|
|
|
|
- for (String lisname : lislist) {
|
|
|
+ for (String term : listerm.keySet()) {
|
|
|
billNeoDTO = new BillNeoDTO();
|
|
|
- billNeoDTO.setName(lisname);
|
|
|
+ lisname = listerm.get(term);
|
|
|
+ billNeoDTO.setName(term);
|
|
|
+ billNeoDTO.setStandname(lisname);
|
|
|
|
|
|
lisBillNeoDTO = new LisBillNeoDTO();
|
|
|
|
|
|
lis = lisRepository.findByNameIs(lisname);
|
|
|
|
|
|
- if (lis!=null) {
|
|
|
+ if (lis != null) {
|
|
|
lisBillNeoDTO = lisNode.ListoLISDTO(lis);
|
|
|
}
|
|
|
|
|
@@ -170,6 +183,24 @@ public class NeoFacade {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ public void getDiag(Map<String, String> diaglist) {
|
|
|
+
|
|
|
+ Disease disease;
|
|
|
+ String diag;
|
|
|
+
|
|
|
+ for (String term : diaglist.keySet()) {
|
|
|
+
|
|
|
+ diag = diaglist.get(term);
|
|
|
+ disease = diseaseRepository.findByNameIs(diag);
|
|
|
+
|
|
|
+ if (disease != null) {
|
|
|
+ System.out.println(disease);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 标准词转换
|