|
@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.*;
|
|
|
import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
|
|
|
import thyyxxk.webserver.entity.datamodify.YzActOrder;
|
|
|
import thyyxxk.webserver.entity.datamodify.ZyDetailCharge;
|
|
|
+import thyyxxk.webserver.entity.inpatient.patient.Overview;
|
|
|
import thyyxxk.webserver.entity.inpatient.patient.Patient;
|
|
|
import thyyxxk.webserver.entity.zhuyuanyisheng.DoctorSOrderFee;
|
|
|
import thyyxxk.webserver.entity.zhuyuanyisheng.ZyOrderZk;
|
|
@@ -29,8 +30,33 @@ import java.util.stream.Stream;
|
|
|
public interface YiZhuLuRuDao {
|
|
|
|
|
|
|
|
|
- @Select("SELECT inpatient_no, admiss_times, sex, name, bed_no " +
|
|
|
- "FROM zy_actpatient " +
|
|
|
+ @Select("SELECT " +
|
|
|
+ "RTRIM(a.bed_no) bedNo, " +
|
|
|
+ "RTRIM(a.inpatient_no) inpatientNo, " +
|
|
|
+ "a.admiss_times, " +
|
|
|
+ "RTRIM(a.name) as name, " +
|
|
|
+ "sex=isnull(a.sex, 9), " +
|
|
|
+ "mdtrtId=(select b.mdtrt_id from t_si_pat_info b where b.pat_no=a.inpatient_no " +
|
|
|
+ "and b.times=a.admiss_times and b.ledger_sn=a.times_billed), " +
|
|
|
+ "injurySerialNo=(select serial_no from t_injury_si_pat_info where pat_no=a.inpatient_no " +
|
|
|
+ "and times=a.admiss_times and ledger_sn=a.times_billed), " +
|
|
|
+ "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'))," +
|
|
|
+ "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}), " +
|
|
|
+ " refer_physician, " +
|
|
|
+ " (select name from a_employee_mi where code = refer_physician) as refer_physician_name, " +
|
|
|
+ " consult_physician, " +
|
|
|
+ " (select name from a_employee_mi where code = refer_physician) as consult_physician_name, " +
|
|
|
+ " dept_director, " +
|
|
|
+ " (select name from a_employee_mi where code = refer_physician) as dept_director_name " +
|
|
|
+ "FROM zy_actpatient a " +
|
|
|
"where refer_physician = #{code} " +
|
|
|
"ORDER BY cast(bed_no AS int) ")
|
|
|
List<Patient> getMyPatient(String code);
|
|
@@ -1461,4 +1487,13 @@ public interface YiZhuLuRuDao {
|
|
|
@Param("list") List<YzActOrder> list);
|
|
|
|
|
|
|
|
|
+ @Update("UPDATE zy_actpatient " +
|
|
|
+ "SET refer_physician = #{param.referPhysician}, " +
|
|
|
+ " consult_physician = #{param.consultPhysician}, " +
|
|
|
+ " dept_director = #{param.deptDirector} " +
|
|
|
+ "WHERE inpatient_no = #{param.inpatientNo} " +
|
|
|
+ " AND admiss_times = #{param.admissTimes} ")
|
|
|
+ void updateTheThirdLevelDoctor(@Param("param") Overview param);
|
|
|
+
|
|
|
+
|
|
|
}
|