|
|
@@ -24,10 +24,17 @@ public interface PatientDao {
|
|
|
"medType=a.med_type, " +
|
|
|
"dismissOrder=(select count(1) from yz_act_order b where b.inpatient_no=a.inpatient_no " +
|
|
|
"and b.admiss_times=a.admiss_times and status_flag > '1' and isnull(group_no,'00')='00' " +
|
|
|
- "and order_code in ('06026','06053','05973')) " +
|
|
|
+ "and order_code in ('06026','06053','05973'))," +
|
|
|
+ "orderNoCount = (select count(1) " +
|
|
|
+ " from yz_act_order c " +
|
|
|
+ " where a.inpatient_no = c.inpatient_no " +
|
|
|
+ " and c.admiss_times = a.admiss_times " +
|
|
|
+ " and c.status_flag = '1' " +
|
|
|
+ " and c.enter_oper = #{userCode}) " +
|
|
|
"from zy_actpatient a where a.ward like #{ward} and charindex('$',a.inpatient_no)=0 " +
|
|
|
"ORDER BY cast(a.bed_no AS int)")
|
|
|
- List<Overview> getOverView(@Param("ward") String ward);
|
|
|
+ List<Overview> getOverView(@Param("ward") String ward,
|
|
|
+ @Param("userCode") String userCode);
|
|
|
|
|
|
@Select("select inpatientNo=rtrim(a.inpatient_no),a.admiss_times,a.med_type,b.social_no, " +
|
|
|
"name=rtrim(a.name),sex=isnull(a.sex, b.sex),act_ipt_days=(datediff(day, admiss_date, getdate())), " +
|
|
|
@@ -281,8 +288,8 @@ public interface PatientDao {
|
|
|
@Update("update zy_detail_charge set charge_date=#{admdate} where inpatient_no=#{zyh} " +
|
|
|
"and admiss_times=#{times} and charge_date<#{admdate}")
|
|
|
void correctFeeChargeTimeBeforeAdmiss(@Param("zyh") String zyh,
|
|
|
- @Param("times") int times,
|
|
|
- @Param("admdate") Date admdate);
|
|
|
+ @Param("times") int times,
|
|
|
+ @Param("admdate") Date admdate);
|
|
|
|
|
|
@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')")
|
|
|
@@ -291,8 +298,8 @@ public interface PatientDao {
|
|
|
@Update("update zy_detail_charge set charge_date=#{disdate} where inpatient_no=#{zyh} " +
|
|
|
"and admiss_times=#{times} and charge_date>#{disdate}")
|
|
|
void correctFeeChargeTimeAfterDismiss(@Param("zyh") String zyh,
|
|
|
- @Param("times") int times,
|
|
|
- @Param("disdate") Date disdate);
|
|
|
+ @Param("times") int times,
|
|
|
+ @Param("disdate") Date disdate);
|
|
|
|
|
|
@Update("update zy_ledger_file set deposit=(select isnull(sum(depo_amount),0) from zy_deposit_file f with(nolock) " +
|
|
|
"where f.inpatient_no=#{zyh} and f.admiss_times=#{times} and f.ledger_sn=#{ledger} and f.status in ('1','2') ) " +
|