package org.diagbot.service;

import org.diagbot.entity.node.LIS;
import org.diagbot.entity.node.Symptom;
import org.diagbot.vo.AmendRelationVo;
import org.diagbot.vo.PageVo;
import org.diagbot.vo.QueryVo;
import org.diagbot.vo.RelationVo;
import org.diagbot.entity.node.Disease;
import org.diagbot.entity.node.base.BaseNode;

import java.util.List;
import java.util.Map;

public interface KnowledgeService {
    Disease addDisease(Disease disease);
    List<Disease> findDisease(String name);
    Disease findOneDisease(long id);
    void deleteOneDisease(long id);

    Symptom addSymptom(Symptom symptom);
    List<Symptom> findSymptoms(String name);
    Symptom findOneSymptom(long id);
    void deleteOneSymptom(long id);

    LIS addLIS(LIS lis);
    List<LIS> findLIS(String name);
    LIS findOneLIS(long id);
    void deleteOneLIS(long id);

    Iterable<Map<String, Object>> getNodeByRelation(RelationVo relationVo);
    List<Map<String, Object>> getRelationByNodes(RelationVo relationVo);
    List<Map<String, Object>> getOneLevelRelationByEndNode(RelationVo relationVo);

    BaseNode updateNodeByName(AmendRelationVo amendRelationVo);
    List<Map<String, Object>> updateRelation(AmendRelationVo amendRelationVo);

    // 获取所有节点
    List<Map<String, Object>> getAllNode();

    // 获取高危疾病列表
    List<Map<String, Object>> findHighRiskDisease(QueryVo queryVo);

    // 获取推荐项目
    List<Map<String, Object>> getRecommendItem(QueryVo queryVo);

    List<Disease> selectAllDisease(PageVo pageVo);
    List<Symptom> selectAllSymptom(PageVo pageVo);
    List<LIS> selectAllLIS(PageVo pageVo);

}
