|
@@ -9,15 +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;
|
|
|
-import com.lantone.qc.pub.model.entity.General;
|
|
|
-import com.lantone.qc.pub.model.entity.GeneralDesc;
|
|
|
-import com.lantone.qc.pub.model.entity.Operation;
|
|
|
-import com.lantone.qc.pub.model.entity.Vaccinate;
|
|
|
-import com.lantone.qc.pub.model.entity.Wound;
|
|
|
+import com.lantone.qc.pub.model.entity.*;
|
|
|
import com.lantone.qc.pub.model.label.PastLabel;
|
|
|
import com.lantone.qc.pub.model.label.PresentLabel;
|
|
|
import com.lantone.qc.pub.model.vo.EzAnalysisVO;
|
|
@@ -58,7 +50,8 @@ public class EZAnalysis {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- public List<EzAnalysisDTO> anlysis(EzAnalysisVO ezAnalysisVO) throws Exception {
|
|
|
+ public Map<String, Object> anlysis(EzAnalysisVO ezAnalysisVO) throws Exception {
|
|
|
+ Map<String, Object> output = Maps.newHashMap();
|
|
|
List<EzAnalysisDTO> details = Lists.newArrayList();
|
|
|
// ezAnalysisVO.setXml(bom(FileUtil.fileRead("C:\\Users\\Administrator\\Desktop\\恩泽\\eztest.txt")));
|
|
|
Map<String, String> sourceMap = EzXmlAnalysis.analysisEk(ezAnalysisVO.getDeptName(), ezAnalysisVO.getXml());
|
|
@@ -74,7 +67,36 @@ public class EZAnalysis {
|
|
|
ezAnalysisDTO.setModelValue(modelValueHandle(structMap.get(ky)));
|
|
|
details.add(ezAnalysisDTO);
|
|
|
});
|
|
|
- return details;
|
|
|
+ output.put("data", details);
|
|
|
+ Map<String, String> structureMap = Maps.newHashMap();
|
|
|
+ getStructureMap(structMap, structureMap, details, Lists.newArrayList("主诉", "现病史", "既往史", "个人史", "婚育史"));
|
|
|
+ output.put("structureMap", structureMap);
|
|
|
+ return output;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void getStructureMap(Map<String, String> structMap, Map<String, String> structureMap, List<EzAnalysisDTO> details, List<String> keys) {
|
|
|
+ keys.forEach(i -> structureMap.put(i, structMap.get(i)));
|
|
|
+ StringBuffer sbf = new StringBuffer();
|
|
|
+ String physicalExam = "";
|
|
|
+ for (EzAnalysisDTO i : details) {
|
|
|
+ if (i.getModelName().contains("体格检查")) {
|
|
|
+ if (i.getModelName().contains("(")) {
|
|
|
+ sbf.append(i.getModelName().split("--")[1].split("(")[0]);
|
|
|
+ } else {
|
|
|
+ sbf.append(i.getModelName().split("--")[1]);
|
|
|
+ }
|
|
|
+ sbf.append(":").append(i.getModelValue());
|
|
|
+ if (i.getModelValue().length() == 0 || i.getModelValue().charAt(i.getModelValue().length() - 1) != '。') {
|
|
|
+ sbf.append(",");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (sbf.toString().length() > 0 && sbf.toString().charAt(sbf.toString().length() - 1) == ',') {
|
|
|
+ physicalExam = sbf.toString().substring(0, sbf.toString().length() - 1);
|
|
|
+ } else {
|
|
|
+ physicalExam = sbf.toString();
|
|
|
+ }
|
|
|
+ structureMap.put("体格检查", physicalExam);
|
|
|
}
|
|
|
|
|
|
private String modelValueHandle(String modelValue) {
|