package org.diagbot.service;

import org.diagbot.entity.node.LIS;
import org.diagbot.entity.node.Symptom;
import org.diagbot.vo.*;
import org.diagbot.entity.node.Disease;
import org.diagbot.entity.node.base.BaseNode;
import org.diagbot.vo.domain.*;

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();

    // 获取高危疾病列表
    Map<String, Object> getHighRiskDisease(SearchData searchData);
    // 获取LIS,PACS
    Map<String,List<FeatureRate>> getLisPacs(SearchData searchData);
    //获取诊断
    ResponseData getDis(SearchData searchData);

    Map<String, List<Map<String, Object>>> getScale(QueryVo queryVo);

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

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

    //更新图谱
    RespDTO updateNeoDisease(NeoParamVO singleDisease);
    //删除图谱
    RespDTO deleteNeoDisease(NeoParamVO singleDisease);
    //批量插入
    RespDTO<Boolean> batchInsertDis();
    //图谱bi统计
    List<BiDetail> neoBi();

}
