|
@@ -1,11 +1,13 @@
|
|
|
package thyyxxk.webserver.dao.his.inpatient;
|
|
|
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
import thyyxxk.webserver.entity.inpatient.chargelist.BriefPatInfo;
|
|
|
import thyyxxk.webserver.entity.inpatient.chargelist.ChargeItem;
|
|
|
import thyyxxk.webserver.entity.inpatient.chargelist.PatOverview;
|
|
|
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
@Mapper
|
|
@@ -24,7 +26,7 @@ public interface ChargeListDao {
|
|
|
"rtrim(a.bed_no) as bedNo,datediff(day,admiss_date,isnull(dis_date,getdate())) as days, " +
|
|
|
"gender=(case when sex='1' then '男' when sex='2' then '女' else '未知' end), " +
|
|
|
"rtrim(admiss_dept) as dept,admiss_date as admdate,med_type as medtype, " +
|
|
|
- "admiss_date as begndate,isnull(dis_date,getdate()) as enddate, " +
|
|
|
+ "admiss_date as begndate,dis_date as enddate, " +
|
|
|
"balance=(select ((select isnull(sum(t.depo_amount),0) from zy_deposit_file t " +
|
|
|
"where t.inpatient_no=a.inpatient_no and t.admiss_times=a.admiss_times and t.status in (1,2)) + " +
|
|
|
"(select sum(e.fund_pay_sumamt) from zy_ledger_file e where e.inpatient_no=#{patNo} and e.admiss_times=#{times}) - " +
|
|
@@ -46,4 +48,8 @@ public interface ChargeListDao {
|
|
|
|
|
|
@Select("select ledger_sn from zy_ledger_file where inpatient_no=#{patNo} and admiss_times=#{times} and ledger_sn>0")
|
|
|
List<Integer> selectAllLedgers(String patNo, int times);
|
|
|
+
|
|
|
+ @Select("select start_time from yz_act_order where inpatient_no=#{patNo} and admiss_times=#{times} " +
|
|
|
+ "and status_flag > '1' and isnull(group_no, '00')='00' and order_code in ('06026','06053','05973')")
|
|
|
+ Date selectActOrderDisDate(@Param("patNo") String patNo, @Param("times") Integer times);
|
|
|
}
|