浏览代码

医嘱作废拦截发药和血糖查询

xiaochan 2 年之前
父节点
当前提交
0259334843

+ 3 - 19
src/main/java/thyyxxk/webserver/dao/his/examinations/BloodSugarQueryDao.java

@@ -17,7 +17,9 @@ public interface BloodSugarQueryDao {
             "       rtrim(a.name) name, " +
             "       birth_date, " +
             "       a.inpatient_no, " +
-            "       admiss_date " +
+            "       admiss_date," +
+            "      b.sex," +
+            "     zk_ward_name = (select rtrim(name) from zd_unit_code where code = zk_ward) " +
             "from ${tableName} a, " +
             "     a_patient_mi b " +
             "where a.inpatient_no = b.inpatient_no " +
@@ -28,24 +30,6 @@ public interface BloodSugarQueryDao {
                            @Param("times") Integer times);
 
 
-    @Select("select id,\n" +
-            "       inpatient_no,\n" +
-            "       admiss_times,\n" +
-            "       nurse_id,\n" +
-            "       nurse_id_name = (select rtrim(name) from a_employee_mi where code = nurse_id)," +
-            "       test_time,\n" +
-            "       bed_no,\n" +
-            "       timecode_id,\n" +
-            "       timecode_name,\n" +
-            "       test_result,\n" +
-            "       result_unit\n" +
-            "from bg_nursing_test_sync\n" +
-            "where inpatient_no = #{patNo}" +
-            " and admiss_times = #{times}" +
-            " and timecode_name = N'随机血糖'")
-    List<BgNursingTestSync> getPatientLoodSugarRandom(@Param("patNo") String patNo,
-                                                      @Param("times") Integer times);
-
     @Select("select id,\n" +
             "       inpatient_no,\n" +
             "       admiss_times,\n" +

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/inpatient/XiangMuLuRuDao.java

@@ -250,7 +250,7 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
             "<foreach collection='list' item='item' index='index' separator=','>" +
             "(#{patNo}, #{times}, #{name}, #{bedNo}, #{wardCode},  #{wardCode}, #{item.chargeCodeMx}, #{item.chargeAmount,jdbcType=REAL}, " +
             "       (select pack_retprice from yp_zd_dict where code = #{item.chargeCodeMx} and serial = #{item.serial}), getdate(), #{infantFlag}, #{userCode}, 'a', '1', " +
-            "       #{item.drugClass},  getdate(), ${index}, #{item.serial}, #{groupNo}, " +
+            "       #{item.drugClass},  getdate(), #{item.orderNo}, #{item.serial}, #{groupNo}, " +
             "       #{item.doctorCode}, #{pageNo},#{ledgerSn},#{item.detailSn},0,'HT')" +
             "</foreach>" +
             "</script>")

+ 3 - 0
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyisheng/YiZhuLuRuDao.java

@@ -518,6 +518,9 @@ public interface YiZhuLuRuDao {
                             String userCode,
                             String reasonForCancellation);
 
+    @Update("update yz_yp_zy_order set status_flag = 2 where act_order_no = #{order} and status_flag = 1")
+    void refusalToDispenseMedication(String order);
+
     @Update("update yz_act_order " +
             "set status_flag = '-1', " +
             "    end_time    = getdate(), " +

+ 2 - 1
src/main/java/thyyxxk/webserver/service/examinations/BloodSugarQueryServer.java

@@ -45,7 +45,7 @@ public class BloodSugarQueryServer {
         returnValue.put("patientInfo", patient);
 
         List<BgNursingTestSync> list = dao.getPatientLoodSugar(panNo, times);
-        log.info("数据:{}", JSON.toJSONStringWithDateFormat(list, DateUtil.DEFAULT_PATTERN));
+
         if (ListUtil.isBlank(list)) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没有查询到该患者的血糖信息。");
         }
@@ -101,6 +101,7 @@ public class BloodSugarQueryServer {
             data.addAll(row);
         }
 
+        returnValue.put("size", list.size());
         returnValue.put("bloodSugarData", data);
 
         return ResultVoUtil.success(returnValue);

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

@@ -722,6 +722,7 @@ public class YiZhuLuRuServer {
                 fenGe.forEach(xiangMuLuRuDao::xiangMuTuiFei);
                 dao.updateItemFlag(yz.getInpatientNo(), yz.getAdmissTimes(), parentNoList);
             }
+            dao.refusalToDispenseMedication(orderNo);
         }
         dao.updateVoidedOrders(orderNo, userInfo.getCode(), reasonForCancellation);
         dao.updateChildOrders(orderNo, userInfo.getCode(), reasonForCancellation);