xiaochan 2 gadi atpakaļ
vecāks
revīzija
e0cffd887a

+ 2 - 240
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyisheng/YiZhuLuRuDao.java

@@ -126,7 +126,7 @@ public interface YiZhuLuRuDao {
             "                           start_time,\n" +
             "                           drug_specification,\n" +
             "                           drug_quan,\n" +
-            "    drug_quan_name       = (select name\n" +
+            "    mini_unit_name       = (select name\n" +
             "                            from yp_zd_unit with (NOLOCK)\n" +
             "                            where code = mini_unit),\n" +
             "                           rtrim(supply_code)                               supply_code,\n" +
@@ -244,7 +244,7 @@ public interface YiZhuLuRuDao {
             "                           start_time,\n" +
             "                           drug_specification,\n" +
             "                           drug_quan,\n" +
-            "    drug_quan_name       = (select name\n" +
+            "    mini_unit_name      = (select name\n" +
             "                            from yp_zd_unit with (NOLOCK)\n" +
             "                            where code = mini_unit),\n" +
             "                           rtrim(supply_code)                               supply_code,\n" +
@@ -1486,90 +1486,6 @@ public interface YiZhuLuRuDao {
                        @Param("inputId") String inputId,
                        @Param("collectCode") String collectCode);
 
-    @Select("select * " +
-            "from yz_act_order with (NOLOCK) " +
-            "where act_order_no = #{actOrderNo} ")
-    YzActOrder chaXunYiZhuXinXin(BigDecimal actOrderNo);
-
-    @Update("update yz_act_order set emergency_flag = #{emergencyFlag} " +
-            "where act_order_no = #{actOrderNo} ")
-    void sheZhiJinJi(@Param("actOrderNo") BigDecimal actOrderNo,
-                     @Param("emergencyFlag") String emergencyFlag);
-
-    @Insert("insert into yz_erase_order_comm (act_order_no, inpatient_no, admiss_times, comment, order_code, sys_date) " +
-            "values (#{actOrderNo}, #{patNo}, #{times}, #{content}, #{orderCode}, getdate())")
-    void chaRuCheXiaoYuanYin(@Param("actOrderNo") BigDecimal actOrderNo,
-                             @Param("patNo") String patNo,
-                             @Param("times") Integer times,
-                             @Param("content") String content,
-                             @Param("orderCode") String orderCode);
-
-    @Delete("/*删除费用*/ " +
-            "delete yz_zy_patient_fee " +
-            "where act_order_no = #{actOrderNo}  " +
-            "  and charge_status = '3';" +
-            "/*删除药品的药单*/  " +
-            "delete yz_yp_zy_order " +
-            "where act_order_no = #{actOrderNo} " +
-            "  and status_flag = '1';" +
-            "/*删除医嘱表*/" +
-            "DELETE " +
-            "FROM yz_act_order " +
-            "WHERE act_order_no = #{actOrderNo};" +
-            "/*删除医技*/  " +
-            "delete ysh_yj_req " +
-            "where act_order_no = #{actOrderNo};")
-    void cheXiaoYiZhu(@Param("actOrderNo") BigDecimal actOrderNo);
-
-
-    @Insert("insert into yz_erase_order " +
-            "select * " +
-            "from yz_act_order " +
-            "where act_order_no = #{actOrderNo}")
-    void chaRuShanChuBiao(@Param("actOrderNo") BigDecimal actOrderNo);
-
-    @Update("update yz_erase_order " +
-            "set modifier           =#{userCode}, " +
-            "    status_time        =getdate(), " +
-            "    print_order_change =case when isnull(print_order_change, '') = '' then 'd' else '' end " +
-            "where act_order_no = #{actOrderNo};" +
-            "update op_record " +
-            "set status ='d' " +
-            "where act_order_no = #{actOrderNo};")
-    void genXingShanChuBiaoZhi(@Param("userCode") String userCode,
-                               @Param("actOrderNo") BigDecimal actOrderNo);
-
-
-    @Update("update yz_act_order " +
-            "set modifier = #{userCode}, " +
-            "    end_time = #{endTime} " +
-            "where act_order_no = #{actOrderNo} ")
-    void sheZhiTingZhiShiJian(@Param("userCode") String userCode,
-                              @Param("actOrderNo") BigDecimal actOrderNo,
-                              @Param("endTime") String endTime);
-
-    @Select("<script>" +
-            "select * from yz_act_order with (NOLOCK) where act_order_no in " +
-            "<foreach collection='list' item='item' index='index' open='(' close=')' separator=','>" +
-            " #{item} " +
-            "</foreach>" +
-            "</script>")
-    List<YzActOrder> yiZhuXinXiJiHe(@Param("list") List<BigDecimal> list);
-
-
-    @Update("<script>" +
-            "<foreach collection='list' item='item' separator=';'>" +
-            "update yz_act_order " +
-            "set modifier = #{userCode}, " +
-            "    end_time = #{endTime} " +
-            " where act_order_no = #{item} " +
-            "</foreach>" +
-            "</script>")
-    void piLiangSheZhiTingZhiShiJian(@Param("list") List<BigDecimal> actOrderNo,
-                                     @Param("userCode") String userCode,
-                                     @Param("endTime") String endTime);
-
-
     @Delete("delete yz_act_record_kss where act_order_no = #{orderNo}")
     void deleteAntimicrobialInformation(String orderNo);
 
@@ -1598,126 +1514,6 @@ public interface YiZhuLuRuDao {
     List<DoctorSOrderFee> expensesForGettingADoctorSOrder(@Param("patNo") String patNo,
                                                           @Param("times") Integer times);
 
-    @Select("select admiss_date " +
-            "from zy_actpatient " +
-            "where inpatient_no = #{patNo}")
-    Date patientAdmissionTime(String patNo);
-
-    @Select("<script>" +
-            "select act_order_no, " +
-            "       inpatient_no, " +
-            "       admiss_times, " +
-            "       order_code, " +
-            "       order_time, " +
-            "       frequ_code, " +
-            "       enter_time, " +
-            "       enter_oper, " +
-            "       start_time, " +
-            "       end_time, " +
-            "       infant_flag, " +
-            "       drug_flag, " +
-            "       supply_code, " +
-            "       performance_time, " +
-            "       physician, " +
-            "       confirm_time, " +
-            "       signer, " +
-            "       modifier, " +
-            "       status_flag, " +
-            "       status_time, " +
-            "       drug_quan, " +
-            "       instruction, " +
-            "       drug_specification, " +
-            "       mini_unit, " +
-            "       drug_weight, " +
-            "       drug_weight_unit, " +
-            "       print_order_change, " +
-            "       parent_no, " +
-            "       self_buy, " +
-            "       eat_card_flag, " +
-            "       drug_volume, " +
-            "       drug_vol_unit, " +
-            "       dose, " +
-            "       dose_unit, " +
-            "       drug_occ, " +
-            "       print_order, " +
-            "       print_order_once, " +
-            "       print_order_anew, " +
-            "       print_infusion, " +
-            "       exclu_back_time, " +
-            "       exclu_act_order_no, " +
-            "       order_name, " +
-            "       discription, " +
-            "       del_flag, " +
-            "       pay_self, " +
-            "       serial, " +
-            "       group_no, " +
-            "       ward_code, " +
-            "       yb_self_flag, " +
-            "       doctor_flag, " +
-            "       dept_code, " +
-            "       exec_unit, " +
-            "       cl_code, " +
-            "       zy_serial_no, " +
-            "       executer1, " +
-            "       executer2, " +
-            "       reg_flag, " +
-            "       msg_flag, " +
-            "       exec_time, " +
-            "       exec_id, " +
-            "       ps_status, " +
-            "       ps_oper, " +
-            "       ps_time, " +
-            "       exec_id2, " +
-            "       act_order_no2, " +
-            "       print_page, " +
-            "       print_page_once, " +
-            "       print_order_change_end, " +
-            "       emergency_flag, " +
-            "       req_receive_flag, " +
-            "       inspect_stuff, " +
-            "       charge_status, " +
-            "       ps_result_time, " +
-            "       kf_flag, " +
-            "       modifier_oper, " +
-            "       pass_flag, " +
-            "       pass_id, " +
-            "       pass_date, " +
-            "       pass_comment, " +
-            "       refer_physician, " +
-            "       consult_physician " +
-            "from yz_act_order " +
-            "where act_order_no in " +
-            "<foreach collection='list' item='item' index='index' open='(' close=')' separator=','>" +
-            "#{item} " +
-            "</foreach>" +
-            "</script>")
-    List<YzActOrder> getOriginalOrderData(List<String> list);
-
-
-    @Insert("<script>" +
-            "insert into yz_act_order (act_order_no, inpatient_no, admiss_times, order_code, order_time, frequ_code, enter_time, " +
-            "                          enter_oper, start_time, end_time, infant_flag, drug_flag, supply_code, performance_time, " +
-            "                          physician, confirm_time, signer, modifier, status_flag, status_time, drug_quan, instruction, " +
-            "                          drug_specification, mini_unit, drug_weight, drug_weight_unit, parent_no, " +
-            "                          self_buy, eat_card_flag, drug_volume, drug_vol_unit, dose, dose_unit, drug_occ, " +
-            "                          order_name, discription, del_flag, pay_self, serial, group_no, ward_code, yb_self_flag, " +
-            "                          doctor_flag, dept_code, exec_unit, zy_serial_no, kf_flag, refer_physician, consult_physician) " +
-            "values " +
-            "<foreach collection='list' item='item' separator=','>" +
-            "(#{item.actOrderNo, jdbcType = REAL}, #{item.inpatientNo}, #{item.admissTimes}, '06054', getdate(), 'ONCE', " +
-            "        getdate(), #{userCode}, GETDATE(), GETDATE(),#{item.infantFlag}, 'o', #{item.supplyCode}, getdate(), " +
-            "        #{item.physician}, getdate(), #{userCode}, " +
-            "        #{userCode}, 2, getdate(), " +
-            "        #{item.drugQuan ,jdbcType = REAL}, #{item.instruction}, #{item.drugSpecification}, #{item.miniUnit}, #{item.drugWeight ,jdbcType = REAL}, " +
-            "        #{item.drugWeightUnit}, #{item.parentNo ,jdbcType = REAL} , #{item.selfBuy}, #{item.eatCardFlag}, #{item.drugVolume ,jdbcType = REAL},#{item.drugVolUnit},#{item.dose ,jdbcType = REAL},#{item.doseUnit}, " +
-            "        #{item.drugOcc ,jdbcType = REAL},'退药: ${item.orderName}',#{item.discription},#{item.delFlag},#{item.paySelf},#{item.serial},#{item.groupNo},#{item.wardCode},#{item.ybSelfFlag}, " +
-            "        #{item.doctorFlag},#{item.deptCode},#{item.execUnit},#{item.zySerialNo},#{item.kfFlag},#{item.referPhysician},#{item.consultPhysician})" +
-            "</foreach>" +
-            "</script>")
-    void insertAReturnOrder(@Param("userCode") String userCode,
-                            @Param("list") List<YzActOrder> list);
-
-
     @Update("UPDATE zy_actpatient " +
             "SET refer_physician   = #{param.referPhysician}, " +
             "    consult_physician = #{param.consultPhysician}, " +
@@ -1727,40 +1523,6 @@ public interface YiZhuLuRuDao {
     void updateTheThirdLevelDoctor(@Param("param") Overview param);
 
 
-    /**
-     * 插入药品汇总单
-     *
-     * @param pageNo   药单好
-     * @param patInfo  患者信息
-     * @param userCode 插入数据
-     * @param groupNo  药房
-     */
-    @Insert("insert into yz_yp_page_no (page_no, dept_code, ward_code, submit_time, " +
-            "                           submit_name, submit_flag, " +
-            "                           page_class, page_name, " +
-            "                           start_date, end_date, group_no) " +
-            "values (#{pageNo}, #{patInfo.wardCode}, #{patInfo.deptCode}, getdate()," +
-            " #{userCode}, 1, 1, '出院带药', getdate(), getdate(), #{groupNo})")
-    void summarySheetOfDrugs(Integer pageNo, XinZhenYiZhu patInfo, String userCode, String groupNo);
-
-
-    @Insert("<script>" +
-            "insert into yz_yp_zy_order (inpatient_no, admiss_times, name, bed_no, dept_code, ward_code, charge_code, " +
-            "  amount, retprice/*药品的单价*/, charge_date, infant_flag, drawer, always_flag, status_flag/*1*/, drug_class, " +
-            " serail/*0*/, " +
-            " occ_time, act_order_no, page_no, pay_self/*0*/, serial/*serial*/, " +
-            " group_no, doctor_name, page_class) " +
-            "values " +
-            "<foreach collection='list' item='item' separator=','>" +
-            "(#{patInfo.inpatientNo},#{patInfo.admissTimes},#{patInfo.name},#{patInfo.bedNo},#{patInfo.wardCode},#{patInfo.deptCode},#{item.orderCode}," +
-            "#{item.drugQuan},(select pack_retprice from yp_zd_dict where code = '${item.orderCode}' and serial = '${item.serial}'),getdate()," +
-            "#{patInfo.infantFlag},#{userCode}," +
-            "'a','1',#{item.drugFlag},'0',getdate(),#{item.actOrderNo},#{pageNo},'0',#{item.serial},#{groupNo},#{userCode},'1')" +
-            "</foreach>" +
-            "</script>")
-    void insertDetailedMedicineList(Integer pageNo, XinZhenYiZhu patInfo, String userCode, String groupNo, List<XinZhenYzActOrder> list);
-
-
     @Update("update yz_act_order " +
             "    set " +
             "    parent_no =    ${order.actOrderNo}," +

+ 2 - 1
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/YiZhuLuRuServer.java

@@ -453,7 +453,8 @@ public class YiZhuLuRuServer {
         dao.deleteAntimicrobialInformation(param.getActOrderNo());
         // 先删除转科在插入
         dao.deleteTransferOrder(param.getActOrderNo());
-        if (errorMessageMap.isEmpty()) {
+
+        if (errorMessageMap.get("error") == null) {
             if (ZK_CODE.equals(data.getOrderCode())) {
                 ZyOrderZk transferData = new ZyOrderZk();
                 transferData