package org.algorithm.test;

import org.algorithm.core.neural.DiagnosisPredictExecutor;
import org.algorithm.core.neural.SymptomPredictExecutor;
import org.algorithm.util.Utils;

import java.util.HashMap;
import java.util.Map;


public class TensorflowExcutorTest {

    public static void main(String[] args) {
        
        //TODO:change VitalPredictExcutor to test different executors
//        VitalPredictExecutor excutor = new VitalPredictExecutor();
//        SymptomPredictExecutor excutor = new SymptomPredictExecutor();
//        LisPredictExecutor excutor = new LisPredictExecutor();
        DiagnosisPredictExecutor excutor = new DiagnosisPredictExecutor();
//        PacsPredictExecutor excutor = new PacsPredictExecutor();
//        DiagnosisToLisExecutor excutor = new DiagnosisToLisExecutor();
//        DiagnosisToPacsExecutor excutor = new DiagnosisToPacsExecutor();
//        DiagnosisToSymptomExecutor excutor = new DiagnosisToSymptomExecutor();
//        DiagnosisToVitalExecutor excutor = new DiagnosisToVitalExecutor();

        /**
         * 测试病历，虚构的
         */
        Map<String, Map<String, String>> aMap = new HashMap<>();
        Map<String, String> featureValues = new HashMap<>();

        featureValues.put("negative", "有");
//        aMap.put("夜间", featureValues);
//        aMap.put("肢体活动障碍", featureValues);
//        aMap.put("血压升高", featureValues);
        
//        aMap.put("体重下降", featureValues);
//        aMap.put("恶心", featureValues);
//        aMap.put("呕吐", featureValues);
//        aMap.put("反酸", featureValues);
//        aMap.put("肝脾", featureValues);
//        aMap.put("胃", featureValues);
//        aMap.put("腹平软", featureValues);
//        aMap.put("巩膜", featureValues);
//        aMap.put("大便无殊", featureValues);
//        aMap.put("血吸虫病", featureValues);
//        aMap.put("尿急", featureValues);
//        aMap.put("泌尿系结石", featureValues);
//        aMap.put("冠心病", featureValues);

//        aMap.put("呕吐", featureValues);
//        aMap.put("右上腹痛", featureValues);
//        aMap.put("反复", featureValues);
        
//        aMap.put("红斑", featureValues);
//        aMap.put("淋巴结", featureValues);
//        aMap.put("神清", featureValues);
//
//        aMap.put("胀痛", featureValues);
//        aMap.put("精神可", featureValues);
//        aMap.put("胃纳可", featureValues);
//        aMap.put("颜面部", featureValues);
//
//        aMap.put("头皮", featureValues);
//        aMap.put("带状疱疹", featureValues);
//        aMap.put("二便无殊", featureValues);
//
//        aMap.put("耳后", featureValues);
//        aMap.put("持续性", featureValues);
//        aMap.put("面部疼痛", featureValues);
//        
        featureValues.put("partbody", "左肺上叶");
        featureValues.put("property", "压榨样");
        featureValues.put("duration", "0");
        featureValues.put("sex", "M");
        featureValues.put("age", "34");
        featureValues.put("negative", "有");
        featureValues.put("sn", "0");

        aMap.put("上臂远端疼痛", featureValues);
        aMap.put("上肢远端青紫", featureValues);
        aMap.put("肘部肿胀", featureValues);
        aMap.put("外伤", featureValues);
//        aMap.put("心悸", featureValues);
//        aMap.put("气急", featureValues);
//        aMap.put("头痛", featureValues);
//        aMap.put("头晕", featureValues);

        // 运行
        Map<String, Float> result = excutor.execute(aMap);

//        for (Entry<String, Float> entry : result.entrySet()) {
//            System.out.println(entry.getKey() + " : " + entry.getValue());
//        }
        System.out.println(result);
        Utils.top_k(10, result);

    }
    
   
}
