package thyyxxk.webserver.dao.his.zhuyuanyisheng.emr;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.mapstruct.Mapper;
import thyyxxk.webserver.entity.dictionary.CodeName;
import thyyxxk.webserver.entity.zhuyuanyisheng.emr.LinkQualityControl;

import java.util.List;

@Mapper
public interface EmrSuggestionDao extends BaseMapper<LinkQualityControl> {

    @Select("select id, emr_code, scoring_criteria, name, link_name,sort,minus_points " +
            "from link_quality_control where emr_code = #{code} order by sort ")
    List<LinkQualityControl> selectedLink(String code);

    @Select("select emr_code as code, link_name as name " +
            "from link_quality_control " +
            "group by emr_code, link_name  ")
    List<CodeName> getLinkSelect();

}
