|
@@ -33,6 +33,8 @@ public interface PatientDao {
|
|
|
"name=rtrim(a.name),sex=isnull(a.sex, b.sex),act_ipt_days=(datediff(day, admiss_date, getdate())), " +
|
|
|
"birthDate=(convert(varchar(10), birth_date, 21)),home_tel=rtrim(b.home_tel), " +
|
|
|
"admissPhysician=rtrim(a.admiss_physician), " +
|
|
|
+ "insutype=(select top 1 insutype from t_si_pat_info with(nolock) where pat_no=#{inpatientNo} and " +
|
|
|
+ "times=a.admiss_times order by ledger_sn desc), " +
|
|
|
"admissPhysicianName=rtrim((select name FROM a_employee_mi WHERE code = a.admiss_physician)), " +
|
|
|
"referPhysician=rtrim(a.refer_physician), " +
|
|
|
"referPhysicianName=rtrim((select name FROM a_employee_mi WHERE code = a.refer_physician)), " +
|
|
@@ -43,8 +45,7 @@ public interface PatientDao {
|
|
|
"admissDept=rtrim(a.admiss_dept), a.matn_type,smallDept=rtrim(a.small_dept), " +
|
|
|
"smallDeptName=rtrim((select name from zd_unit_code where code=small_dept)), " +
|
|
|
"admiss_date,ybRegisterDate=isnull(yb_register_date, admiss_date), " +
|
|
|
- "responceType=rtrim(isnull(a.responce_type, '01')), " +
|
|
|
- "responceTypeName=(select rtrim(name) from zy_zd_responce_type where code = isnull(a.responce_type, '01')), " +
|
|
|
+ "responceType=a.med_type, " +
|
|
|
"zkWard=rtrim(a.zk_ward),ward=(a.ward),a.latechb_flag,a.pret_flag,ledgerSn=a.times_billed, " +
|
|
|
"admissStatus=rtrim(a.admiss_status), " +
|
|
|
"dismissOrder=(select count(1) from yz_act_order y where y.inpatient_no=b.inpatient_no " +
|
|
@@ -166,7 +167,7 @@ public interface PatientDao {
|
|
|
"inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes}")
|
|
|
Integer getLedgerSn(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes);
|
|
|
|
|
|
- @Update("update zy_actpatient set yb_register_date=#{ybRegisterDate},med_type=#{medType}," +
|
|
|
+ @Update("update zy_actpatient set yb_register_date=#{ybRegisterDate},med_type=#{medType},responce_type=#{responceType}, " +
|
|
|
"admdvs=#{admdvs},refer_physician=#{referPhysician},matn_type=#{matnType},latechb_flag=#{latechbFlag}," +
|
|
|
"pret_flag=#{pretFlag} where inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes}")
|
|
|
void updateYbRegisterDate(Patient param);
|