|
@@ -366,14 +366,43 @@ public interface UpIdCollectionDao {
|
|
|
long huoQuJieSuanRenYuanTotal(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("setlType") String setlTyle, @Param("patNo") String patNo, @Param("insutypes") List<String> insutypes, @Param("outDepts") List<String> outDepts, @Param("medTypes") List<String> medTypes, @Param("psnTypes") List<String> psnTypes, @Param("clrOptins") List<String> clrOptins, @Param("decTypes") List<Integer> decTypes, @Param("flag") Integer flag, @Param("referPhysician") String referPhysician, @Param("auditFlag") Integer auditFlag, @Param("hiPaymtd") Integer hiPaymtd);
|
|
|
|
|
|
|
|
|
- @Select("select opName = (select top(1) rtrim(name) from a_employee_mi where code = op_id_code)," + "rtrim(inpatient_no) inpatient_no, admiss_times, dis_diag_no, dis_diag_type," + "case when yb_code is null then rtrim(dis_diag) else rtrim(yb_code) end dis_diag," + "case when yb_name is null then rtrim(dis_diag_comment) else rtrim(yb_name) end dis_diag_comment," + "op_id_code, op_diag_date, dis_diag_bzfx, dis_diag_status, operation, si_diag_type,admiss_cond " + "from ${tableName} left join zd_icd_code_new on (dis_diag = code) " + "where inpatient_no = #{patNo} and admiss_times = #{times} " + "order by dis_diag_no ")
|
|
|
+ @Select("select opName = (select top(1) rtrim(name) from a_employee_mi where code = op_id_code)," +
|
|
|
+ "rtrim(inpatient_no) inpatient_no, admiss_times, dis_diag_no, dis_diag_type," +
|
|
|
+ "case when yb_code is null then rtrim(dis_diag) else rtrim(yb_code) end dis_diag," +
|
|
|
+ "case when yb_name is null then rtrim(dis_diag_comment) else rtrim(yb_name) end dis_diag_comment," +
|
|
|
+ "op_id_code, op_diag_date, dis_diag_bzfx, dis_diag_status, operation, si_diag_type,admiss_cond," +
|
|
|
+ "dept_code," +
|
|
|
+ "(select name from zd_unit_code where code = dept_code) as dept_code_name " +
|
|
|
+ "from ${tableName} left join zd_icd_code_new on (dis_diag = code) " +
|
|
|
+ "where inpatient_no = #{patNo} and admiss_times = #{times} " +
|
|
|
+ "order by dis_diag_no ")
|
|
|
List<YbZyDisDiag> zhenDuanXinXi(@Param("patNo") String patNo, @Param("times") Integer times, @Param("tableName") String tableName);
|
|
|
|
|
|
@Select("select *,bldCatName = (select name from bld_cat_code where bld_cat_code.code = bld_cat) " + "from patient_bld_info " + "where pat_no = #{patNo} " + " and times = #{times}")
|
|
|
List<PatientBldInfo> shuXueXinXi(@Param("patNo") String patNo, @Param("times") Integer times);
|
|
|
|
|
|
|
|
|
- @Select("select ssys_name = (select top(1) rtrim(name) from a_employee_mi where code = ssys), " + " sszsName1 = (select top(1) rtrim(name) from a_employee_mi where code = sszs1), " + " sszsName2 = (select top(1) rtrim(name) from a_employee_mi where code = sszs2), " + " mzys_name = (select top(1) rtrim(name) from a_employee_mi where code = mzys)," + " bah, zyh, zycs, ssxh, ssrq, sstj, " + " ssys , sszs1, sszs2, mzys ,op_start_date, op_end_date, anst_start_date, anst_end_date," + " op_start_date as oprn_oprt_begntime," + " op_end_date as oprn_oprt_endtime," + " anst_start_date as anst_begntime," + " anst_end_date as anst_endtime, " + " case when yb_code is null then rtrim(ssbm) else rtrim(yb_code) end ssbm ," + " case when yb_name is null then rtrim(ssmc) else rtrim(yb_name) end ssmc," + " rtrim(mzff) mzff, rtrim(qkjb) qkjb," + "rtrim(yhqk) yhqk, ssbfz, fhqk, ssjb, cut_heal," + "(select top(1) yb_code from a_employee_mi where code = ssys) as oper_dr_code, " + "(select top(1) yb_code from a_employee_mi where code = mzys) as anst_dr_code " + "from ${tableName} left join zd_icd9_cm3 on (ssbm = zd_icd9_cm3.code) " + "where zyh = #{patNo} and zycs = #{times} " + "order by ssxh")
|
|
|
+ @Select("select ssys_name = (select top(1) rtrim(name) from a_employee_mi where code = ssys), " +
|
|
|
+ " sszsName1 = (select top(1) rtrim(name) from a_employee_mi where code = sszs1), " +
|
|
|
+ " sszsName2 = (select top(1) rtrim(name) from a_employee_mi where code = sszs2), " +
|
|
|
+ " mzys_name = (select top(1) rtrim(name) from a_employee_mi where code = mzys)," +
|
|
|
+ " bah, zyh, zycs, ssxh, ssrq, sstj, " +
|
|
|
+ " ssys , sszs1, sszs2, mzys ,op_start_date, op_end_date, anst_start_date, anst_end_date," +
|
|
|
+ " op_start_date as oprn_oprt_begntime," +
|
|
|
+ " op_end_date as oprn_oprt_endtime," +
|
|
|
+ " anst_start_date as anst_begntime," +
|
|
|
+ " anst_end_date as anst_endtime, " +
|
|
|
+ " case when yb_code is null then rtrim(ssbm) else rtrim(yb_code) end ssbm ," +
|
|
|
+ " case when yb_name is null then rtrim(ssmc) else rtrim(yb_name) end ssmc," +
|
|
|
+ " rtrim(mzff) mzff, rtrim(qkjb) qkjb," +
|
|
|
+ "rtrim(yhqk) yhqk, ssbfz, fhqk, ssjb, cut_heal," +
|
|
|
+ "(select top(1) yb_code from a_employee_mi where code = ssys) as oper_dr_code, " +
|
|
|
+ "(select top(1) yb_code from a_employee_mi where code = mzys) as anst_dr_code," +
|
|
|
+ "dept_code," +
|
|
|
+ "(select name from zd_unit_code where code = dept_code) as dept_code_name " +
|
|
|
+ "from ${tableName} left join zd_icd9_cm3 on (ssbm = zd_icd9_cm3.code) " +
|
|
|
+ "where zyh = #{patNo} and zycs = #{times} " +
|
|
|
+ "order by ssxh")
|
|
|
List<BatjBa4> shouShuXinXi(@Param("patNo") String patNo, @Param("times") Integer times, @Param("tableName") String tableName);
|
|
|
|
|
|
|
|
@@ -424,20 +453,30 @@ public interface UpIdCollectionDao {
|
|
|
@Insert("insert into t_yb_setl_modify_req (pat_no, times, req_op_id, req_op_name, req_remark) " + "values (#{patNo},#{times},#{opIdCode},#{opIdName},#{reqRemark})")
|
|
|
void setlModifyReq(@Param("patNo") String patNo, @Param("times") Integer times, @Param("opIdCode") String opIdCode, @Param("opIdName") String opIdName, @Param("reqRemark") String reqRemark);
|
|
|
|
|
|
- @Insert("<script>" + "insert into ${tableName} (inpatient_no, admiss_times, dis_diag_no, dis_diag_type, dis_diag, dis_diag_comment, " + "op_id_code, op_diag_date, dis_diag_bzfx, dis_diag_status, operation, si_diag_type,admiss_cond) " + "values " + "<foreach collection='list' item='param' separator=','>" + "(#{param.inpatientNo},#{param.admissTimes},#{param.disDiagNo},'13',#{param.disDiag},#{param.disDiagComment}, " + " #{param.opIdCode},#{param.opDiagDate},'001',#{param.disDiagStatus},null,#{param.siDiagType},#{param.admissCond})" + "</foreach>" + "</script>")
|
|
|
+ @Insert("<script>" +
|
|
|
+ "insert into ${tableName} (inpatient_no, admiss_times, dis_diag_no, dis_diag_type, dis_diag, dis_diag_comment, " +
|
|
|
+ "op_id_code, op_diag_date, dis_diag_bzfx, dis_diag_status, operation, si_diag_type,admiss_cond,dept_code) " +
|
|
|
+ "values " + "<foreach collection='list' item='param' separator=','>" +
|
|
|
+ "(#{param.inpatientNo},#{param.admissTimes},#{param.disDiagNo},'13',#{param.disDiag},#{param.disDiagComment}, " +
|
|
|
+ "#{param.opIdCode},#{param.opDiagDate},'001',#{param.disDiagStatus},null,#{param.siDiagType}," +
|
|
|
+ "#{param.admissCond},#{param.deptCode})" +
|
|
|
+ "</foreach>" +
|
|
|
+ "</script>")
|
|
|
void setlModDis(@Param("list") List<YbZyDisDiag> param, @Param("tableName") String tableName);
|
|
|
|
|
|
@Insert("<script>" +
|
|
|
"insert into ${tableName} (bah, zyh, zycs, ssxh, ssrq, sstj, ssys, sszs1, sszs2, " +
|
|
|
"mzys, ssbm, ssmc, mzff, qkjb, yhqk, ssbfz, fhqk, ssjb, cut_heal," +
|
|
|
- "op_start_date,op_end_date,anst_start_date,anst_end_date) " +
|
|
|
+ "op_start_date,op_end_date,anst_start_date,anst_end_date,dept_code) " +
|
|
|
"values " +
|
|
|
"<foreach collection='list' item='param' separator=','>" +
|
|
|
"(#{param.zyh},#{param.zyh},#{param.zycs},#{param.ssxh},#{param.ssrq},null,#{param.ssys},#{param.sszs1}," +
|
|
|
"#{param.sszs2},#{param.mzys},#{param.ssbm},#{param.ssmc},#{param.mzff},#{param.qkjb},#{param.yhqk},null,null," +
|
|
|
"#{param.ssjb},null,#{param.opStartDate, jdbcType = TIMESTAMP},#{param.opEndDate, jdbcType = TIMESTAMP}," +
|
|
|
- "#{param.anstStartDate, jdbcType = TIMESTAMP},#{param.anstEndDate, jdbcType = TIMESTAMP})" +
|
|
|
- "</foreach>" + "</script>")
|
|
|
+ "#{param.anstStartDate, jdbcType = TIMESTAMP},#{param.anstEndDate, jdbcType = TIMESTAMP}," +
|
|
|
+ "#{param.deptCode,jdbcType = VARCHAR})" +
|
|
|
+ "</foreach>" +
|
|
|
+ "</script>")
|
|
|
void setlModBat(@Param("list") List<BatjBa4> batjBa4s, @Param("tableName") String tableName);
|
|
|
|
|
|
|
|
@@ -587,7 +626,7 @@ public interface UpIdCollectionDao {
|
|
|
|
|
|
@Select("select pat_no, times, ledger_sn " +
|
|
|
"from t_si_setlinfo " +
|
|
|
- "where datediff(day, setl_time, getdate()) = 1 ")
|
|
|
+ "where datediff(day, setl_time, getdate()) = 1 and revoked=0")
|
|
|
List<SiSetlinfoTemp> getBillingPatientsToday();
|
|
|
|
|
|
/**
|
|
@@ -608,8 +647,8 @@ public interface UpIdCollectionDao {
|
|
|
|
|
|
@Select("select * " +
|
|
|
"from t_auto_upload_bill " +
|
|
|
- "where upload_date <= '${startTime}' " +
|
|
|
- " and upload_date >= '${endTime}'")
|
|
|
+ "where upload_date >= '${startTime}' " +
|
|
|
+ " and upload_date <= '${endTime}'")
|
|
|
List<TAutoUploadBill> exportAutoUploadInfo(@Param("startTime") String startTime,
|
|
|
@Param("endTime") String endTime);
|
|
|
|