Ver Fonte

住院医生优化

DESKTOP-0GD05B0\Administrator há 3 anos atrás
pai
commit
90951f41c7

+ 13 - 6
src/main/java/thyyxxk/webserver/dao/his/inpatient/PatientDao.java

@@ -24,10 +24,17 @@ public interface PatientDao {
             "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')) " +
+            "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}) " +
             "from zy_actpatient a where a.ward like #{ward} and charindex('$',a.inpatient_no)=0 " +
             "ORDER BY cast(a.bed_no AS int)")
-    List<Overview> getOverView(@Param("ward") String ward);
+    List<Overview> getOverView(@Param("ward") String ward,
+                               @Param("userCode") String userCode);
 
     @Select("select inpatientNo=rtrim(a.inpatient_no),a.admiss_times,a.med_type,b.social_no, " +
             "name=rtrim(a.name),sex=isnull(a.sex, b.sex),act_ipt_days=(datediff(day, admiss_date, getdate())), " +
@@ -281,8 +288,8 @@ public interface PatientDao {
     @Update("update zy_detail_charge set charge_date=#{admdate} where inpatient_no=#{zyh} " +
             "and admiss_times=#{times} and charge_date<#{admdate}")
     void correctFeeChargeTimeBeforeAdmiss(@Param("zyh") String zyh,
-                              @Param("times") int times,
-                              @Param("admdate") Date admdate);
+                                          @Param("times") int times,
+                                          @Param("admdate") Date admdate);
 
     @Select("select start_time from yz_act_order where inpatient_no=#{patNo} and admiss_times=#{times} " +
             "and status_flag > '1' and isnull(group_no, '00')='00' and order_code in ('06026','06053','05973')")
@@ -291,8 +298,8 @@ public interface PatientDao {
     @Update("update zy_detail_charge set charge_date=#{disdate} where inpatient_no=#{zyh} " +
             "and admiss_times=#{times} and charge_date>#{disdate}")
     void correctFeeChargeTimeAfterDismiss(@Param("zyh") String zyh,
-                              @Param("times") int times,
-                              @Param("disdate") Date disdate);
+                                          @Param("times") int times,
+                                          @Param("disdate") Date disdate);
 
     @Update("update zy_ledger_file set deposit=(select isnull(sum(depo_amount),0) from zy_deposit_file f with(nolock) " +
             "where f.inpatient_no=#{zyh} and f.admiss_times=#{times} and f.ledger_sn=#{ledger} and f.status in ('1','2') ) " +

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

@@ -31,7 +31,7 @@ public interface YiZhuLuRuDao {
     @Select("SELECT inpatient_no, admiss_times, sex, name, bed_no " +
             "FROM zy_actpatient " +
             "where refer_physician = #{code} " +
-            "ORDER BY cast(a.bed_no AS int) ")
+            "ORDER BY cast(bed_no AS int) ")
     List<Patient> getMyPatient(String code);
 
 

+ 1 - 0
src/main/java/thyyxxk/webserver/entity/inpatient/patient/Overview.java

@@ -28,6 +28,7 @@ public class Overview {
     private Date endtime;
 
     private Integer status;
+    private Integer orderNoCount;
 
     public Integer getStatus() {
         if (StringUtil.notBlank(mdtrtId) || StringUtil.notBlank(injurySerialNo)) {

+ 1 - 1
src/main/java/thyyxxk/webserver/service/inpatient/PatientService.java

@@ -50,7 +50,7 @@ public class PatientService {
 
     public ResultVo<List<Overview>> getOverView(String ward) {
         ward = "%" + ward + "%";
-        return ResultVoUtil.success(dao.getOverView(ward));
+        return ResultVoUtil.success(dao.getOverView(ward, TokenUtil.getTokenUserId()));
     }
 
     public ResultVo<Patient> getPatientInfo(String inpatientNo) {

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

@@ -267,7 +267,7 @@ public class YiZhuLuRuServer {
             if (!"1".equals(oldOrderNo.getStatusFlag().trim())) {
                 return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "该医嘱不是录入状态无法保存.");
             }
-            if (!oldOrderNo.getInpatientNo().equals(param.getInpatientNo())) {
+            if (!oldOrderNo.getInpatientNo().trim().equals(param.getInpatientNo())) {
                 return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "两次医嘱的.");
             }
         }
@@ -305,12 +305,12 @@ public class YiZhuLuRuServer {
         if (errorMessageMap.isEmpty()) {
             if (ZK_CODE.equals(data.getOrderCode())) {
                 ZyOrderZk transferData = new ZyOrderZk();
-                transferData.
-                        setActOrderNo(param.getActOrderNo()).
-                        setNewDept(data.getZkDeptCode()).
-                        setNewWard(data.getZkWardCode()).
-                        setOldWard(huanZheXinXi.getDeptCode()).
-                        setOldDept(huanZheXinXi.getSmallDept());
+                transferData
+                        .setActOrderNo(param.getActOrderNo())
+                        .setNewDept(data.getZkDeptCode())
+                        .setNewWard(data.getZkWardCode())
+                        .setOldWard(huanZheXinXi.getDeptCode())
+                        .setOldDept(huanZheXinXi.getSmallDept());
                 dao.insertDoctorSOrder(transferData);
             }
             // 判断是不是抗菌药物