|
@@ -3,9 +3,13 @@ package thyyxxk.webserver.dao.his.medicalinsurance;
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
import thyyxxk.webserver.entity.dictionary.CodeName;
|
|
|
+import thyyxxk.webserver.entity.medicalinsurance.digitalreceipt.RxDiseInfo;
|
|
|
+import thyyxxk.webserver.entity.medicalinsurance.digitalreceipt.RxDrugDetail;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.digitalreceipt.RxMdtrtInfo;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.digitalreceipt.RxPreCheck;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
@Mapper
|
|
|
public interface DigitalReceiptDao {
|
|
|
|
|
@@ -34,4 +38,32 @@ public interface DigitalReceiptDao {
|
|
|
@Select("select diag_code as code,diag_name as name from t_si_mz_diag " +
|
|
|
"where pat_no=#{patientId} and times=#{times} and diag_srt_no=1")
|
|
|
CodeName selectMaindiag(String patientId, int times);
|
|
|
+
|
|
|
+ @Select("select " +
|
|
|
+ "medListCodg=case when medi_item_type=0 then " +
|
|
|
+ " (select d.national_code from zd_charge_item d where d.code=a.his_item_code) " +
|
|
|
+ "else (select max(d.national_code) from yp_zd_dict d where d.code=a.his_item_code) end, " +
|
|
|
+ "fixmedinsHilistId=a.his_item_code,rxItemTypeCode=med_chrgitm_type,drugGenname=a.his_item_name, " +
|
|
|
+ "drugDosform=case when medi_item_type=0 then '' else " +
|
|
|
+ "(select d.name from yp_zd_dosage d where d.code= " +
|
|
|
+ "(select max(e.dosage) from yp_zd_dict e where e.code=a.his_item_code)) end, " +
|
|
|
+ "drugSpec=case when medi_item_type=0 then '' else " +
|
|
|
+ "(select max(d.specification) from yp_zd_dict d where d.code=a.his_item_code) end, " +
|
|
|
+ "drugDosunt=case when medi_item_type=0 then '' else " +
|
|
|
+ "(select d.name from yp_zd_unit d where d.code= " +
|
|
|
+ "(select max(e.dosage_unit) from yp_zd_dict e where e.code=a.his_item_code)) end, " +
|
|
|
+ "medcWayCodg=case when medi_item_type=0 then '' else 1 end, " +
|
|
|
+ "medcWayDscr=case when medi_item_type=0 then '' else N'口服' end, " +
|
|
|
+ "drugCnt=quantity,medcBegntime=a.fee_date,medcEndtime=a.fee_date+3,medcDays=3, " +
|
|
|
+ "sinDoscnt=1,usedFrquCodg=12,usedFrquName='BID',hospApprFlag='1' " +
|
|
|
+ "from t_mt_receipt a where a.patient_id=#{patientId} and a.times=#{times}")
|
|
|
+ List<RxDrugDetail> selectRxDrugDetailList(String patientId, int times);
|
|
|
+
|
|
|
+ @Select("select " +
|
|
|
+ "diag_type,diag_srt_no,diag_code,diag_name,diag_dept, " +
|
|
|
+ "maindiagFlag=case when diag_srt_no=1 then '1' else '0' end, " +
|
|
|
+ "diagDrNo=(select d.yb_code from a_employee_mi d where d.code=a.dise_dor_no), " +
|
|
|
+ "diagDrName=dise_dor_name,diag_time from t_si_mz_diag a " +
|
|
|
+ "where pat_no=#{patientId} and a.times=#{times} order by diag_srt_no")
|
|
|
+ List<RxDiseInfo> selectRxDiseInfo(String patientId, int times);
|
|
|
}
|