|
@@ -9,6 +9,7 @@ import com.lantone.qc.kernel.structure.ai.BeHospitalizedAI;
|
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
|
import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
|
|
|
import com.lantone.qc.pub.model.doc.MedicalRecordInfoDoc;
|
|
|
+import com.lantone.qc.pub.model.entity.Allergy;
|
|
|
import com.lantone.qc.pub.model.entity.BloodTransfusion;
|
|
|
import com.lantone.qc.pub.model.entity.Diag;
|
|
|
import com.lantone.qc.pub.model.entity.DiagInfectious;
|
|
@@ -21,6 +22,7 @@ import com.lantone.qc.pub.model.label.PastLabel;
|
|
|
import com.lantone.qc.pub.model.label.PresentLabel;
|
|
|
import com.lantone.qc.pub.model.vo.EzAnalysisVO;
|
|
|
import com.lantone.qc.pub.res.EzAnalysisDTO;
|
|
|
+import com.lantone.qc.pub.util.FileUtil;
|
|
|
import com.lantone.qc.pub.util.ListUtil;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
import com.lantone.qc.trans.beilun.util.ez.EzXmlAnalysis;
|
|
@@ -59,11 +61,12 @@ public class EZAnalysis {
|
|
|
|
|
|
public List<EzAnalysisDTO> anlysis(EzAnalysisVO ezAnalysisVO) throws Exception {
|
|
|
List<EzAnalysisDTO> details = Lists.newArrayList();
|
|
|
- // ezAnalysisVO.setXml(bom(FileUtil.fileRead("C:\\Users\\Administrator\\Desktop\\恩泽\\入院记录\\小儿外科入院记录(男)\\1677273_小儿外科入院记录(男).txt")));
|
|
|
+// ezAnalysisVO.setXml(bom(FileUtil.fileRead("C:\\Users\\Administrator\\Desktop\\恩泽\\eztest.txt")));
|
|
|
Map<String, String> sourceMap = EzXmlAnalysis.analysisEk(ezAnalysisVO.getDeptName(), ezAnalysisVO.getXml());
|
|
|
InputInfo inputInfo = ai(sourceMap);
|
|
|
structHandle(inputInfo, sourceMap);
|
|
|
Map<String, String> structMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
|
|
|
+ structMap.put("接诊医师签名", structMap.get("初步诊断签名"));
|
|
|
Map<String, String> keyMaps = getKmaps();
|
|
|
kys.forEach(ky -> {
|
|
|
EzAnalysisDTO ezAnalysisDTO = new EzAnalysisDTO();
|
|
@@ -91,6 +94,7 @@ public class EZAnalysis {
|
|
|
vaccinateHandle(inputInfo, structMap);
|
|
|
operationHandle(inputInfo, structMap);
|
|
|
bloodTransfusionHandle(inputInfo, structMap);
|
|
|
+ allergyDescHandle(inputInfo, structMap);
|
|
|
generalDescHandle(inputInfo, structMap);
|
|
|
}
|
|
|
|
|
@@ -203,6 +207,43 @@ public class EZAnalysis {
|
|
|
map.put("输血史", sbf.toString());
|
|
|
}
|
|
|
|
|
|
+ private void allergyDescHandle(InputInfo inputInfo, Map<String, String> map) {
|
|
|
+ StringBuffer sbf = new StringBuffer();
|
|
|
+ PastLabel pastLabel = inputInfo.getBeHospitalizedDoc().getPastLabel();
|
|
|
+ List<Allergy> allergies = pastLabel.getAllergies();
|
|
|
+ if (ListUtil.isNotEmpty(allergies)) {
|
|
|
+ allergies.stream()
|
|
|
+ .filter(i -> i != null && StringUtil.isNotBlank(i.getName()) && (i.getNegative() == null || StringUtil.isBlank(i.getNegative().getName())))
|
|
|
+ .forEach(i -> {
|
|
|
+ if (i.getAllergyFood() != null && StringUtil.isNotBlank(i.getAllergyFood().getName())) {
|
|
|
+ sbf.append(i.getAllergyFood().getName()).append(i.getName()).append(",");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ allergies.stream()
|
|
|
+ .filter(i -> i != null && StringUtil.isNotBlank(i.getName()) && i.getNegative() != null && StringUtil.isNotBlank(i.getNegative().getName()))
|
|
|
+ .forEach(i -> {
|
|
|
+ if (i.getAllergyFood() != null && StringUtil.isNotBlank(i.getAllergyFood().getName())) {
|
|
|
+ sbf.append(i.getNegative().getName()).append(i.getAllergyFood().getName()).append(i.getName()).append(",");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ allergies.stream()
|
|
|
+ .filter(i -> i != null && StringUtil.isNotBlank(i.getName()) && (i.getNegative() == null || StringUtil.isBlank(i.getNegative().getName())))
|
|
|
+ .forEach(i -> {
|
|
|
+ if (i.getAllergyMedicine() != null && StringUtil.isNotBlank(i.getAllergyMedicine().getName())) {
|
|
|
+ sbf.append(i.getAllergyMedicine().getName()).append(i.getName()).append(",");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ allergies.stream()
|
|
|
+ .filter(i -> i != null && StringUtil.isNotBlank(i.getName()) && i.getNegative() != null && StringUtil.isNotBlank(i.getNegative().getName()))
|
|
|
+ .forEach(i -> {
|
|
|
+ if (i.getAllergyMedicine() != null && StringUtil.isNotBlank(i.getAllergyMedicine().getName())) {
|
|
|
+ sbf.append(i.getNegative().getName()).append(i.getAllergyMedicine().getName()).append(i.getName()).append(",");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ map.put("过敏史", sbf.toString());
|
|
|
+ }
|
|
|
+
|
|
|
private void generalDescHandle(InputInfo inputInfo, Map<String, String> map) {
|
|
|
StringBuffer sbf = new StringBuffer();
|
|
|
PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
|