|
@@ -12,6 +12,7 @@ import thyyxxk.webserver.entity.medicalinsurance.inpatient.ZyDisDiagYb;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.inpatient.ZyInactpatient;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.setllistupld.*;
|
|
|
import thyyxxk.webserver.entity.querydata.SiSetlinfoTemp;
|
|
|
+import thyyxxk.webserver.entity.querydata.TAutoUploadBill;
|
|
|
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
@@ -176,10 +177,10 @@ public interface UpIdCollectionDao {
|
|
|
|
|
|
@Select("select (select si_code from zd_country_code where code = country) as ntly, " +
|
|
|
" dis_date as setl_end_date, " +
|
|
|
- " begntime as setl_begn_date, " +
|
|
|
- " begntime as adm_time," +
|
|
|
- " case " + " when datediff(day, begntime, dis_date) <= 0 then 1 " +
|
|
|
- " else datediff(day, begntime, dis_date) end as act_ipt_days,/*实际住院天数*/ " +
|
|
|
+ " admiss_date as setl_begn_date, " +
|
|
|
+ " admiss_date as adm_time," +
|
|
|
+ " case " + " when datediff(day, admiss_date, dis_date) <= 0 then 1 " +
|
|
|
+ " else datediff(day, admiss_date, dis_date) end as act_ipt_days,/*实际住院天数*/ " +
|
|
|
" dis_date as dscg_time, " +
|
|
|
" isnull(nullif(occupation_code, ''), 90) as prfs," +
|
|
|
" adm_way = '2' " +
|
|
@@ -513,7 +514,7 @@ public interface UpIdCollectionDao {
|
|
|
List<OpspdiseinfoUpld> outpatientDiagnosis(@Param("patNo") String patNo,
|
|
|
@Param("times") Integer times);
|
|
|
|
|
|
- @Select("select rtrim(a.name) as psnName, " +
|
|
|
+ @Select("select top 1 rtrim(a.name) as psnName, " +
|
|
|
" isnull(nullif(rtrim(b.occupation_code), " +
|
|
|
" ''), " +
|
|
|
" 90) as prfs, " +
|
|
@@ -583,4 +584,32 @@ public interface UpIdCollectionDao {
|
|
|
@Param("times") Integer times,
|
|
|
@Param("ledgerSn") Integer ledgerSn);
|
|
|
|
|
|
+ @Select("select pat_no, times, ledger_sn " +
|
|
|
+ "from t_si_setlinfo " +
|
|
|
+ "where datediff(day, setl_time, getdate()) = 1 ")
|
|
|
+ List<SiSetlinfoTemp> getBillingPatientsToday();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 自动上传的信息
|
|
|
+ *
|
|
|
+ * @param patNo 住院号
|
|
|
+ * @param times 住院次数
|
|
|
+ * @param ledgerSn 账页号
|
|
|
+ * @param logText 日志
|
|
|
+ */
|
|
|
+ @Select("insert into t_auto_upload_bill (pat_no, times, ledger_sn, log_text,upload_date) " +
|
|
|
+ "values (#{patNo},#{times},#{ledgerSn},#{logText},'${uploadDate}')")
|
|
|
+ void insertAutoLongPassError(@Param("patNo") String patNo,
|
|
|
+ @Param("times") Integer times,
|
|
|
+ @Param("ledgerSn") Integer ledgerSn,
|
|
|
+ @Param("logText") String logText,
|
|
|
+ @Param("uploadDate") String uploadDate);
|
|
|
+
|
|
|
+ @Select("select * " +
|
|
|
+ "from t_auto_upload_bill " +
|
|
|
+ "where upload_date <= '${startTime}' " +
|
|
|
+ " and upload_date >= '${endTime}'")
|
|
|
+ List<TAutoUploadBill> exportAutoUploadInfo(@Param("startTime") String startTime,
|
|
|
+ @Param("endTime") String endTime);
|
|
|
+
|
|
|
}
|