|
@@ -2,6 +2,7 @@ package thyyxxk.webserver.dao.his.zhuyuanyisheng;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import org.apache.ibatis.annotations.Insert;
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
@@ -114,5 +115,68 @@ public interface ShouShuShenQingDao extends BaseMapper<OpRecord> {
|
|
|
@Select("select code,name from op_zd_part where (name like #{code} or py_code like #{code} or d_code like #{code})")
|
|
|
List<GetDropdownBox> huoQuShouShuBuWei(String code);
|
|
|
|
|
|
+ @Select("Select isnull(Max(op_times),0) " +
|
|
|
+ "From op_record " +
|
|
|
+ "Where inpatient_no = #{patNo} " +
|
|
|
+ " And admiss_times = #{times} ")
|
|
|
+ Integer shouShuShenQingCiShu(@Param("patNo") String patNo,
|
|
|
+ @Param("times") Integer times);
|
|
|
+
|
|
|
+
|
|
|
+ @Insert("<script>" +
|
|
|
+ "Insert Into op_record_join (record_id, zy_serial_no, op_times, doctor_zd, doctor_wp, doctor_1, doctor_2, doctor_3,nurse_qx, nurse_xh) " +
|
|
|
+ "Values " +
|
|
|
+ "<foreach collection='list' item='item' separator=','>" +
|
|
|
+ "(#{item.recordId}, '', #{item.opTimes}, #{item.doctorZd}, null, #{item.doctor1}, #{item.doctor2}, #{item.doctor3}, #{item.nurseQx}, #{item.nurseXh})" +
|
|
|
+ "</foreach>" +
|
|
|
+ "</script>")
|
|
|
+ void chaRuShouShuYiSheng(@Param("list") List<OpRecord> list);
|
|
|
+
|
|
|
+ @Insert("<script>" +
|
|
|
+ "INSERT INTO op_record (record_id, inpatient_no, patient_name, admiss_times, op_times, dept_code, ward_code, op_code, " +
|
|
|
+ " op_datetime, infection_flag, urgent_clinic_flag, isolation_indicator, op_scale, input_id, status, " +
|
|
|
+ " input_date, apply_date, apply_doc, op_name, act_order_no, patient_type, req_date, req_id, bed_no, " +
|
|
|
+ " ssbc, ssyz_flag, ward_dept,remark,hocus_code,diag_before_op,diag_before_code," +
|
|
|
+ " part_code) " +
|
|
|
+ " VALUES " +
|
|
|
+ "<foreach collection='list' item='item' separator=','>" +
|
|
|
+ " (#{item.recordId}, #{patNo}, #{name}, #{times}, #{item.opTimes}, #{dept}, #{ward}, #{item.opCode}, " +
|
|
|
+ " #{item.opDatetime}, '0', #{item.urgentClinicFlag}, '0', #{item.opScale}, " +
|
|
|
+ " #{userCode}, '1', getdate(), #{item.applyDate}, #{userCode}, #{item.opName}, #{item.actOrderNo}, '2', " +
|
|
|
+ " getdate(), #{userCode}, #{bedNo}, #{item.ssbc}, #{item.ssyzFlag}, #{admissWard},#{item.remark},#{item.hocusCode},#{item.diagBeforeOp},#{item.diagBeforeCode}," +
|
|
|
+ " #{item.partCode})" +
|
|
|
+ "</foreach>" +
|
|
|
+ "</script>")
|
|
|
+ void chaRuShouShu(@Param("list") List<OpRecord> list,
|
|
|
+ @Param("patNo") String patNo,
|
|
|
+ @Param("name") String name,
|
|
|
+ @Param("times") Integer times,
|
|
|
+ @Param("dept") String dept,
|
|
|
+ @Param("ward") String ward,
|
|
|
+ @Param("userCode") String userCode,
|
|
|
+ @Param("bedNo") String bedNo,
|
|
|
+ @Param("admissWard") String admissWard);
|
|
|
+
|
|
|
+ @Insert("<script>" +
|
|
|
+ "INSERT INTO yz_act_order (order_code, order_name, frequ_code, infant_flag, order_time, physician, start_time, " +
|
|
|
+ " act_order_no, inpatient_no, admiss_times, drug_flag, enter_oper, enter_time, status_flag, " +
|
|
|
+ " signer, confirm_time, " +
|
|
|
+ " self_buy, pay_self, serial, group_no, doctor_flag, dept_code, ward_code, reg_flag,yb_self_flag,emergency_flag,exec_unit) " +
|
|
|
+ " VALUES " +
|
|
|
+ "<foreach collection='list' item='item' separator=','>" +
|
|
|
+ " (#{item.opCode}, '(手术)' + '${item.opName}', 'ONCE', #{infantFlag}, getdate(), #{userCode}, getdate(), " +
|
|
|
+ " #{item.actOrderNo}, #{patNo}, " +
|
|
|
+ " #{times}, 'p', #{userCode}, getdate(), '2', #{userCode}, getdate(), '0', '0', '00', '00', '1', #{dept}, #{ward},'1',#{item.ybSelfFlag},#{item.urgentClinicFlag},#{execUnit})" +
|
|
|
+ "</foreach>" +
|
|
|
+ "</script>")
|
|
|
+ void chaRuYiZhu(@Param("list") List<OpRecord> list,
|
|
|
+ @Param("infantFlag") Integer infantFlag,
|
|
|
+ @Param("userCode") String userCode,
|
|
|
+ @Param("patNo") String patNo,
|
|
|
+ @Param("times") Integer times,
|
|
|
+ @Param("dept") String dept,
|
|
|
+ @Param("ward") String ward,
|
|
|
+ @Param("execUnit") String execUnit);
|
|
|
+
|
|
|
|
|
|
}
|