package com.hs.api.mapper;

import com.hs.api.model.SerDisease;
import com.hs.api.model.respmodel.DiseaseLevel;
import com.hs.api.model.respmodel.DiseaseName;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SerDiseaseMapper {
    int insert(SerDisease record);

    List<SerDisease> selectAll();

    SerDisease selectByCode(@Param("code") String code, @Param("date") String date, @Param("docCode") String docCode,
                            @Param("deptCode") String deptCode);

    List<DiseaseName> selectByMdcName(@Param("date") String date, @Param("mdcNameList") String[] mdcNameList,
                                      @Param("hosCode") String hosCode, @Param("deptCode") String deptCode);

    List<DiseaseLevel> selectByLevel(@Param("date") String date, @Param("level") Integer level,
                                     @Param("docCode") String docCode, @Param("deptCode") String deptCode,
                                     @Param("orgId") Long orgId, @Param("userId") Long userId);

    List<DiseaseLevel> selectByLevelNoZBZ(@Param("date") String date, @Param("level") Integer level,
                                          @Param("docCode") String docCode, @Param("deptCode") String deptCode,
                                          @Param("orgId") Long orgId, @Param("userId") Long userId);

    List<DiseaseLevel> selectByParentId(@Param("date") String date, @Param("parentId") Integer parentId,
                                        @Param("docCode") String docCode, @Param("deptCode") String deptCode,
                                        @Param("userId") Long userId);

    List<DiseaseLevel> selectByParentIdNoZbz(@Param("date") String date, @Param("parentId") Integer parentId,
                                             @Param("docCode") String docCode, @Param("deptCode") String deptCode,
                                             @Param("userId") Long userId);

    DiseaseLevel selectParentById(@Param("date") String date, @Param("diseaseId") Integer diseaseId);

    DiseaseLevel selectParentByIdNoZbz(@Param("date") String date, @Param("diseaseId") Integer diseaseId);

    List<DiseaseLevel> selectSonById(@Param("date") String date, @Param("diseaseId") Integer diseaseId,
                                     @Param("docCode") String docCode, @Param("deptCode") String deptCode);
}
