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

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

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

public interface YzEraseOrderMapper {
    /**
     * 查询撤销嘱表中的住院大类
     *
     * @param inpatientNo 住院号
     * @param admissTimes 住院次数
     * @return
     */
    @Select({"<script>",
            "select  act_order_no actOrderNo ," +
                    "inpatient_no inpatientNo," +
                    "admiss_times admissTimes," +
                    "        order_code   orderCode     ," +
                    "order_time   orderTime     ," +
                    "frequ_code    frequCode    ," +
                    "enter_time    enterTime    ," +
                    "enter_oper     enterOper   ," +
                    "start_time    startTime     ," +
                    "end_time      endTime    ," +
                    "infant_flag  infantFlag     ," +
                    "drug_flag  drugFlag  ," +
                    "supply_code supplyCode  ," +
                    "performance_time performanceTime ," +
                    "physician   ," +
                    "status_flag   statusFlag," +
                    "drug_quan  drugQuan ," +
                    "instruction   ," +
                    "drug_specification drugSpecification," +
                    "dose   ," +
                    "dose_unit  doseUnit," +
                    "exclu_act_order_no excluActOrderNo," +
                    "order_name  orderName ," +
                    "group_no groupNo ," +
                    "serial  ," +
                    "pay_self  paySelf," +
                    "        self_buy selfBuy," +
                    "        cxFlag=1,suppplyClass=''" +
                    "from    yz_erase_order (nolock)" +
                    "where   inpatient_no=#{inpatientNo}    and" +
                    "        admiss_times=#{admissTimes} "
            , "</script>"})
    List<Map<String, Object>> selectZyActOrdersFromYzEraseOrder(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes);
}
