|
@@ -90,7 +90,7 @@ public interface SiZyDao {
|
|
|
"medType=(select med_type from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
|
|
|
"medListCodg=isnull((select max(national_code) from yp_zd_dict where code=charge_code_mx),(select max(national_code) from zd_charge_item where code=charge_code_mx)), " +
|
|
|
"bilgDeptName=(select name from zd_unit_code where code=ward_code), " +
|
|
|
- "bilgDrCodg=(select rtrim(isnull(yb_code,code)) from a_employee_mi where code=isnull(isnull(doctor_code,refer_physician), op_id_code)) , " +
|
|
|
+ "bilgDrCodg=(select rtrim(isnull(yb_code,code)) from a_employee_mi where code=isnull(isnull(nullif(doctor_code,''),refer_physician),op_id_code)) , " +
|
|
|
"bilgDrName=isnull(isnull((select rtrim(name) from a_employee_mi where code=doctor_code), " +
|
|
|
"(select rtrim(name) from a_employee_mi where code=refer_physician)),(select rtrim(name) from a_employee_mi where code=op_id_code)) " +
|
|
|
"from zy_detail_charge a where inpatient_no=#{patNo} and admiss_times=#{times} and " +
|
|
@@ -126,7 +126,7 @@ public interface SiZyDao {
|
|
|
"medType=(select med_type from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
|
|
|
"medListCodg=isnull((select max(national_code) from yp_zd_dict where code=charge_code_mx),(select max(national_code) from zd_charge_item where code=charge_code_mx)), " +
|
|
|
"bilgDeptName=(select name from zd_unit_code where code=ward_code), " +
|
|
|
- "bilgDrCodg=(select rtrim(isnull(yb_code,code)) from a_employee_mi where code=isnull(isnull(doctor_code,refer_physician), op_id_code)) , " +
|
|
|
+ "bilgDrCodg=(select rtrim(isnull(yb_code,code)) from a_employee_mi where code=isnull(isnull(nullif(doctor_code,''),refer_physician), op_id_code)) , " +
|
|
|
"bilgDrName=isnull(isnull((select rtrim(name) from a_employee_mi where code=doctor_code), " +
|
|
|
"(select rtrim(name) from a_employee_mi where code=refer_physician)),(select rtrim(name) from a_employee_mi where code=op_id_code)) " +
|
|
|
"from zy_detail_charge a where inpatient_no=#{patNo} and admiss_times=#{times} and " +
|
|
@@ -274,7 +274,7 @@ public interface SiZyDao {
|
|
|
"medType=(select med_type from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
|
|
|
"medListCodg=isnull((select max(national_code) from yp_zd_dict where code=charge_code_mx),(select max(national_code) from zd_charge_item where code=charge_code_mx)), " +
|
|
|
"bilgDeptName=(select name from zd_unit_code where code=ward_code), " +
|
|
|
- "bilgDrCodg=(select rtrim(isnull(yb_code,code)) from a_employee_mi where code=isnull(isnull(doctor_code,refer_physician), op_id_code)) , " +
|
|
|
+ "bilgDrCodg=(select rtrim(isnull(yb_code,code)) from a_employee_mi where code=isnull(isnull(nullif(doctor_code,''),refer_physician), op_id_code)) , " +
|
|
|
"bilgDrName=isnull(isnull((select rtrim(name) from a_employee_mi where code=doctor_code), " +
|
|
|
"(select rtrim(name) from a_employee_mi where code=refer_physician)),(select rtrim(name) from a_employee_mi where code=op_id_code)) " +
|
|
|
"from zy_detail_charge a where inpatient_no=#{patNo} and admiss_times=#{times} and " +
|
|
@@ -310,7 +310,7 @@ public interface SiZyDao {
|
|
|
"medType=(select med_type from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
|
|
|
"medListCodg=isnull((select max(national_code) from yp_zd_dict where code=charge_code_mx),(select max(national_code) from zd_charge_item where code=charge_code_mx)), " +
|
|
|
"bilgDeptName=(select name from zd_unit_code where code=ward_code), " +
|
|
|
- "bilgDrCodg=(select rtrim(isnull(yb_code,code)) from a_employee_mi where code=isnull(isnull(doctor_code,refer_physician), op_id_code)) , " +
|
|
|
+ "bilgDrCodg=(select rtrim(isnull(yb_code,code)) from a_employee_mi where code=isnull(isnull(nullif(doctor_code,''),refer_physician), op_id_code)) , " +
|
|
|
"bilgDrName=isnull(isnull((select rtrim(name) from a_employee_mi where code=doctor_code), " +
|
|
|
"(select rtrim(name) from a_employee_mi where code=refer_physician)),(select rtrim(name) from a_employee_mi where code=op_id_code)) " +
|
|
|
"from zy_detail_charge a where inpatient_no=#{patNo} and admiss_times=#{times} and " +
|