|
@@ -1,132 +0,0 @@
|
|
|
-package thyyxxk.webserver.dao.his.markmtfees;
|
|
|
-
|
|
|
-import org.apache.ibatis.annotations.*;
|
|
|
-import thyyxxk.webserver.entity.markmtfees.*;
|
|
|
-
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-/**
|
|
|
- * @author dj
|
|
|
- */
|
|
|
-@Mapper
|
|
|
-public interface MarkMtFeesDao {
|
|
|
- @Select("select rtrim(social_no) from mz_patient_mi where patient_id=#{patientId}")
|
|
|
- String selectSocialNoByPatientId(@Param("patientId") String patientId);
|
|
|
-
|
|
|
- @Select("select times from mz_patient_mi where patient_id=#{patientId} ")
|
|
|
- Integer selectMaxTimes(@Param("patientId") String patientId);
|
|
|
-
|
|
|
- @Select("select phone_no from mz_patient_mi where patient_id=#{patientId}")
|
|
|
- String selectPhoneNo(@Param("patientId") String patientId);
|
|
|
-
|
|
|
- @Update("update mz_patient_mi set phone_no=#{phoneNo} where patient_id=#{patientId}")
|
|
|
- void updatePhoneNo(@Param("patientId") String patientId, @Param("phoneNo") String phoneNo);
|
|
|
-
|
|
|
- @Update("update mz_patient_mi set social_no=#{socialNo} where patient_id=#{patientId}")
|
|
|
- void updateSocialNo(@Param("patientId") String patientId, @Param("socialNo") String socialNo);
|
|
|
-
|
|
|
-
|
|
|
- @Select("select count(1) from mt_part_info where patient_id=#{patientId} and times=#{times}")
|
|
|
- int selectCountMtPartInfo(@Param("patientId") String patientId,
|
|
|
- @Param("times") Integer times);
|
|
|
-
|
|
|
- @Insert("insert into mz_charge_detail_yb (patient_id, times, receipt_no, order_no, response_type, yb_type) "+
|
|
|
- "values (#{patientId}, #{times}, #{receiptNo}, #{orderNo}, #{responseType}, #{ybType})")
|
|
|
- void insertMzChargeYb(@Param("patientId") String patientId,
|
|
|
- @Param("times") Integer times,
|
|
|
- @Param("receiptNo") Integer receiptNo,
|
|
|
- @Param("orderNo") Integer orderNo,
|
|
|
- @Param("responseType") String responseType,
|
|
|
- @Param("ybType") String ybType);
|
|
|
-
|
|
|
- @Delete("delete from mt_part_info where patient_id=#{patientId} and times=#{times}")
|
|
|
- void clearMtPartInfo(@Param("patientId") String patientId,
|
|
|
- @Param("times") Integer times);
|
|
|
-
|
|
|
- @Insert("insert into mt_part_info (patient_id, times, icd, balance, serial_apply, responce_type, create_datetime) "+
|
|
|
- "values (#{patientId},#{times},#{icd},#{balance},#{apply},'02',getdate())")
|
|
|
- void insertHnsybMtPartInfo(@Param("patientId") String patientId,
|
|
|
- @Param("times") Integer times,
|
|
|
- @Param("icd") String icd,
|
|
|
- @Param("balance") String balance,
|
|
|
- @Param("apply") String apply);
|
|
|
-
|
|
|
- @Insert("insert into mt_part_info (patient_id, times, icd, balance, serial_apply, responce_type, " +
|
|
|
- "hic_no, icd_code, icd_name, second_icd_code, third_icd_code, mz_serial_no, create_datetime) values "+
|
|
|
- "(#{patientId},#{times},null,null,#{bizType},'03',#{hicNo},#{icdCode},#{icdName}," +
|
|
|
- "#{secondIcdCode},#{thirdIcdCode},#{mzSerialNo},getdate())")
|
|
|
- void insertCssybMtPartInfo(CssybApplyInfo info);
|
|
|
-
|
|
|
- @Select("select count(1) from t_mt_receipt where patient_id=#{patientId} and times=#{times} and " +
|
|
|
- "receipt_no=#{receiptNo} and order_no=#{orderNo}")
|
|
|
- int selectFeeCount(@Param("patientId") String patientId,
|
|
|
- @Param("times") Integer times,
|
|
|
- @Param("receiptNo") Integer receiptNo,
|
|
|
- @Param("orderNo") Integer orderNo);
|
|
|
-
|
|
|
- @Insert("insert into t_mt_receipt (patient_id, times, receipt_no, order_no, item_no, his_item_name, " +
|
|
|
- "his_item_code, fee_date, input_date, medi_item_type, charge_fee, price, quantity, drug_win, " +
|
|
|
- "input_staff, input_man, serial_no, yb_trans_flag, charge_type, bill_item_code) values (" +
|
|
|
- "#{patientId},#{times},#{receiptNo},#{orderNo},#{itemNo},#{drugName},#{chargeItemCode}," +
|
|
|
- "#{priceTime},getdate(),#{mediItemType},#{chargeFee},#{unitPrice},#{quantity},#{drugWin}," +
|
|
|
- "#{doctorCode},#{doctorName},#{serialNo},0, #{groupNo},#{billItemCode})")
|
|
|
- void insertBatchedMtFeeInfo(MzReceipt param);
|
|
|
-
|
|
|
- @Delete("delete from t_mt_receipt where patient_id=#{patientId} and times=#{times} and " +
|
|
|
- "receipt_no=#{receiptNo} and order_no=#{orderNo}")
|
|
|
- void deleteMtFees(OrderNo param);
|
|
|
-
|
|
|
- @Select("SELECT a.patient_id,a.social_no,a.name,a.lv_date,a.sex,a.response_type,a.charge_type,a.times,a.age," +
|
|
|
- "a.birth_day,responce_name=b.name,address=a.adress,phone_no=a.phone_no FROM " +
|
|
|
- "mz_patient_mi a,mz_zd_responce_type b,mz_visit_table c WHERE a.patient_id=#{patientId} and " +
|
|
|
- "a.patient_id=c.patient_id and c.responce_type=b.code " +
|
|
|
- "union " +
|
|
|
- "SELECT a.patient_id,a.social_no,a.name,a.lv_date,a.sex,a.response_type,a.charge_type,a.times,a.age," +
|
|
|
- "a.birth_day,responce_name=b.name,address=a.adress,phone_no=a.phone_no FROM " +
|
|
|
- "mz_patient_mi_b a,mz_zd_responce_type b,mz_visit_table_b c WHERE a.patient_id=#{patientId} and " +
|
|
|
- "a.patient_id=c.patient_id and c.responce_type=b.code order by lv_date desc")
|
|
|
- List<MzPatient> selectMzPatient(@Param("patientId") String patientId);
|
|
|
-
|
|
|
- @Select("SELECT patient_id,times,visit_dept_code, " +
|
|
|
- "visitDeptName=(select rtrim(name) from zd_unit_code where code=visit_dept_code), " +
|
|
|
- "doctor_code,visit_date,icd_code,receipt_no,order_no,op_id,op_day,windows_no," +
|
|
|
- "doctorName=(select rtrim(name) from a_employee_mi where code=doctor_code)," +
|
|
|
- "receive_flag,sick_date,icd_text,symptom,jz_flag,first_or_not,group_type,rz_flag," +
|
|
|
- "responce_type,bear_no,weight,hight,pressure,dept_no FROM mz_visit_table " +
|
|
|
- "WHERE patient_id = #{patientId} AND times = #{times}")
|
|
|
- MzVisit selectMzVisit(@Param("patientId") String patientId,
|
|
|
- @Param("times") Integer times);
|
|
|
-
|
|
|
- @Select("select top 1 * from mt_part_info where patient_id=#{patientId} and times=#{times}")
|
|
|
- MtPartInfo selectMtPartInfo(@Param("patientId") String patientId,
|
|
|
- @Param("times") Integer times);
|
|
|
-
|
|
|
- @Select("select rtrim(name) from a_employee_mi where code=#{code}")
|
|
|
- String selectDoctorName(@Param("code") String code);
|
|
|
-
|
|
|
- @Select("select rtrim(specification) from yp_zd_dict 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 where supply_code=#{code}")
|
|
|
- String selectSupplyName(@Param("code") String code);
|
|
|
-
|
|
|
- @Select("select rtrim(charge_unit) from zd_charge_item where code=#{code}")
|
|
|
- String selectXmChargeUnit(@Param("code") String code);
|
|
|
-
|
|
|
- @Select("select rtrim(name) from yp_zd_unit where code=#{code}")
|
|
|
- String selectDrugUnit(@Param("code") String code);
|
|
|
-
|
|
|
- @Select("select count(1) from mt_part_info where patient_id=#{patientId} and times=#{times} ")
|
|
|
- int selectMtPartInfoCount(@Param("patientId") String patientId,
|
|
|
- @Param("times") Integer times);
|
|
|
-
|
|
|
- @Select("select top 1 * from mt_part_info where patient_id=#{patientId} order by times desc")
|
|
|
- MtPartInfo selectLatestMtPartInfo(@Param("patientId") String patientId);
|
|
|
-
|
|
|
- @Insert("insert into mt_part_info (patient_id, times, icd, balance, serial_apply, responce_type, " +
|
|
|
- "hic_no, icd_code, icd_name, second_icd_code, third_icd_code, mz_serial_no, create_datetime) values "+
|
|
|
- "(#{patientId},#{times},#{icd},#{balance},#{serialApply},#{responceType},#{hicNo},#{icdCode},#{icdName}," +
|
|
|
- "#{secondIcdCode},#{thirdIcdCode},#{mzSerialNo},getdate())")
|
|
|
- void insertNewPartInfo(MtPartInfo info);
|
|
|
-
|
|
|
-}
|