package thyyxxk.webserver.dao.his.makedbzfees; import org.apache.ibatis.annotations.*; import thyyxxk.webserver.entity.makedbzfees.InpatientInfo; import thyyxxk.webserver.entity.makedbzfees.ZyDetailCharge; import java.util.List; /** * @author dj */ @Mapper public interface MakeDbzFeesDao { @Select("select rtrim(mz_no) from a_patient_mi with(nolock) where inpatient_no=#{inpatientNo}") String getPatientId(@Param("inpatientNo") String inpatientNo); @Select("select rtrim(inpatient_no) from a_patient_mi with(nolock) where mz_no=#{patientId}") String getInpatientNo(@Param("patientId") String patientId); @Select("select rtrim(inpatient_no) inpatientNo, " + "admiss_times," + "rtrim(admiss_ward) wardCode, " + "rtrim(small_dept) deptCode, " + "rtrim(isnull(operation, '')) as operation, " + "rtrim(refer_physician) referPhysician, " + "rtrim(consult_physician) consultPhysician, " + "ledgerSn=(select max(ledger_sn) from zy_ledger_file with(nolock) " + "where inpatient_no=a.inpatient_no and admiss_times=a.admiss_times), " + "maxDetailSn=(select max(detail_sn) from zy_detail_charge with(nolock) " + "where inpatient_no=a.inpatient_no and admiss_times=a.admiss_times) " + "from zy_actpatient a with(nolock) where inpatient_no=#{inpatientNo}") InpatientInfo getInpatientInfo(@Param("inpatientNo") String inpatientNo); @Insert("") void insertZyDetailChargeForSingleDisease(@Param("info") InpatientInfo info, @Param("list")List zyFees); @Select("select rtrim(specification) from yp_zd_dict with(nolock) where code=#{code} and serial=#{serial}") String selectSpecification(@Param("code") String code, @Param("serial") String serial); @Select("select rtrim(supply_name) from mz_zd_supply_type with(nolock) where supply_code=#{code}") String selectSupplyName(@Param("code") String code); @Select("select rtrim(charge_unit) from zd_charge_item with(nolock) where code=#{code}") String selectXmChargeUnit(@Param("code") String code); @Select("select rtrim(name) from yp_zd_unit with(nolock) where code=#{code}") String selectDrugUnit(@Param("code") String code); }