package cn.hnthyy.thmz.mapper.his.mz;

import cn.hnthyy.thmz.entity.his.mz.CodeNameEntity;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface MzZdCommonMapper {
    /**
     * 查询国家字典
     * @return
     */
    @Select("select rtrim(code) code, rtrim(name) name from zd_country_code order by code")
    List<CodeNameEntity> selectCountry();

    /**
     * 民族字典
     * @return
     */
    @Select("select rtrim(code) code, rtrim(name) name from zd_nation_code order by code")
    List<CodeNameEntity> selectNation();


    /**
     * 诊断字典
     * @return
     */
    @Select("select rtrim(code) code, rtrim(name) name, rtrim(py_code) py_code from zd_icd_code order by code")
    List<CodeNameEntity> selectDiagnose();

    /**
     * 查询省份列表
     * @param
     * @return
     */
    @Select("select  rtrim(code) code, rtrim(name) name, rtrim(py_code) py_code from zd_district_code where code % 10000 =0")
    List<CodeNameEntity> selectDistrict();


    /**
     * 查询关系列表
     * @param
     * @return
     */
    @Select("select  rtrim(code) code, rtrim(name) name, rtrim(py_code) py_code from zy_zd_relative_code ")
    List<CodeNameEntity> selectRelation();

    /**
     * 查询所有的职业
     * @return
     */
    @Select("select rtrim(code) code, rtrim(name) name, rtrim(py_code) py_code from zy_occupation_code")
    List<CodeNameEntity> selectOccupation();

    /**
     * 查询所有的入院状态
     * @return
     */
    @Select("select rtrim(code) code, rtrim(name) name, rtrim(py_code) py_code from zd_admiss_status")
    List<CodeNameEntity> selectAdmissStatus();
}
