Browse Source

电子病历,审核修改,诊断手术显示问题

lihong 2 years ago
parent
commit
099c322fb2

+ 25 - 9
src/main/java/thyyxxk/webserver/controller/PublicController.java

@@ -1,27 +1,34 @@
 package thyyxxk.webserver.controller;
 
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 import thyyxxk.webserver.config.auth.PassToken;
-import thyyxxk.webserver.config.exception.ExceptionEnum;
 import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
 import thyyxxk.webserver.entity.login.UserInfo;
 import thyyxxk.webserver.entity.publicapi.ZkList;
 import thyyxxk.webserver.entity.zhuyuanyisheng.PatientAllergenInfo;
-import thyyxxk.webserver.service.LoginService;
 import thyyxxk.webserver.service.PublicServer;
 import thyyxxk.webserver.utils.ListUtil;
 import thyyxxk.webserver.utils.ResultVoUtil;
 import thyyxxk.webserver.utils.SnowFlakeId;
 
-import javax.naming.Context;
 import javax.servlet.http.HttpServletResponse;
-import java.io.*;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.OutputStream;
 import java.lang.reflect.InvocationTargetException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -63,7 +70,16 @@ public class PublicController {
     public ResultVo<List<GetDropdownBox>> getDept() {
         return service.getDept();
     }
-
+    /**
+     * @description:查询有住院的科室
+     * @author: lihong
+     * @date: 2022/12/26 16:57
+     * @return: thyyxxk.webserver.entity.ResultVo<java.util.List<thyyxxk.webserver.entity.datamodify.GetDropdownBox>>
+     **/
+    @GetMapping("/getZhuYuanDept")
+    public ResultVo<List<GetDropdownBox>> getZhuYuanDept() {
+        return service.getZhuYuanDept();
+    }
 
     @GetMapping("/queryDept")
     public ResultVo<List<GetDropdownBox>> queryDept(@RequestParam("code") String code) {

+ 14 - 0
src/main/java/thyyxxk/webserver/controller/medicalinsurance/SetlListUpldController.java

@@ -88,6 +88,20 @@ public class SetlListUpldController {
     public ResultVo<IPage<SiSetlinfoTemp>> huoQuJieSuanRenYuan(@RequestBody JieSuanDanChaXun param) {
         return service.huoQuJieSuanRenYuan(param);
     }
+    /**
+     * @description:查询是否为在院病人
+     * @author: lihong
+     * @date: 2022/12/26 16:24
+     * @param: patNo
+     * @param: times
+     * @return: thyyxxk.webserver.entity.ResultVo<java.lang.Boolean>
+     **/
+    @GetMapping("/isInHospital")
+    public ResultVo<Boolean> isInHospital(@RequestParam("patNo") String patNo,
+                                                  @RequestParam("times") Integer times
+                                                ) {
+        return service.isInHospital(patNo, times);
+    }
 
     @GetMapping("/getUploadInfo")
     @PassToken

+ 2 - 0
src/main/java/thyyxxk/webserver/dao/his/PublicDao.java

@@ -524,4 +524,6 @@ public interface PublicDao {
             "where isnull(del_flag, 0) = 0\n" +
             "  and (select role_id from dj_user_role where dj_user_role.user_code = a_employee_mi.code and role_id = 11) = 11")
     List<Map<String, String>> emrAdd();
+    @Select("SELECT rtrim(dept_code)  code ,rtrim(dept_name) name  FROM zy_adtward WHERE PATINDEX('8%',ward_code)=0 ")
+    List<GetDropdownBox> getZhuYuanDept();
 }

+ 2 - 0
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/UpIdCollectionDao.java

@@ -931,4 +931,6 @@ public interface UpIdCollectionDao extends BaseMapper<SetlinfoUpld> {
      **/
     @Select("select audit_flag from t_yb_setl_modify_req where pat_no=#{patNo} and times=#{times} ")
     Integer qualityPass(@Param("patNo") String patNo, @Param("times") Integer times);
+    @Select(" select count(*) from  zy_inactpatient where inpatient_no=#{patNo} and  admiss_times=#{times} ")
+    Integer isInHospital(@Param("patNo")String patNo, @Param("times") Integer times);
 }

+ 8 - 0
src/main/java/thyyxxk/webserver/entity/querydata/SiSetlinfoTemp.java

@@ -372,6 +372,14 @@ public class SiSetlinfoTemp implements Serializable {
 
     private String wardCode;
     private String wardCodeName;
+    /**
+     * 上传截止日期
+     */
+    private String uploadCutoffDate;
+    /**
+     * 上传状态
+     */
+    private String uploadStatus;
 
     private List<PayinfoUpld> payinfo;
     private List<OpspdiseinfoUpld> opspdiseinfo;

+ 16 - 7
src/main/java/thyyxxk/webserver/service/PublicServer.java

@@ -24,11 +24,11 @@ import thyyxxk.webserver.entity.casefrontsheet.YshHzRecord;
 import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
 import thyyxxk.webserver.entity.datamodify.ZyDetailCharge;
 import thyyxxk.webserver.entity.dictionary.CodeName;
+import thyyxxk.webserver.entity.inpatient.ZyActpatient;
 import thyyxxk.webserver.entity.login.UserInfo;
 import thyyxxk.webserver.entity.publicapi.ZkList;
 import thyyxxk.webserver.entity.settings.notification.SendMessageParam;
 import thyyxxk.webserver.entity.socketmessage.SocketMessage;
-import thyyxxk.webserver.entity.inpatient.ZyActpatient;
 import thyyxxk.webserver.entity.zhuyuanyisheng.PatientAllergenInfo;
 import thyyxxk.webserver.entity.zhuyuanyisheng.caoyaoyizhu.YzActOrderCy;
 import thyyxxk.webserver.entity.zhuyuanyisheng.jianyanjiancha.YshYjReq;
@@ -39,10 +39,14 @@ import thyyxxk.webserver.service.redislike.RedisLikeService;
 import thyyxxk.webserver.utils.*;
 import thyyxxk.webserver.websocket.WebSocketServer;
 
-import java.io.File;
 import java.lang.reflect.InvocationTargetException;
 import java.math.BigDecimal;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
@@ -741,9 +745,14 @@ public class PublicServer {
         WebSocketServer.sendMessageToAll(SocketMsg.socketVo(Message.SYSTEM_ANNOUNCEMENT, obj));
     }
 
-
-
-
-
+    /**
+     * @description: 查询有住院的科室
+     * @author: lihong
+     * @date: 2022/12/26 16:58
+     * @return: thyyxxk.webserver.entity.ResultVo<java.util.List<thyyxxk.webserver.entity.datamodify.GetDropdownBox>>
+     **/
+    public ResultVo<List<GetDropdownBox>> getZhuYuanDept() {
+      return ResultVoUtil.success(dao.getZhuYuanDept());
+    }
 }
 

+ 41 - 1
src/main/java/thyyxxk/webserver/service/medicalinsurance/SetlListUpldService.java

@@ -754,7 +754,7 @@ public class SetlListUpldService {
             return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
         }
         //获取截上传截止天数,结算时间后截止几天到期
-        //String dictValue = dao.getDictValueByDictName("1.1", "1");
+        String dictValue = dao.getDictValueByDictName("1.1", "1");
         Set<String> inpatientNos = new HashSet<>();
         for (SiSetlinfoTemp item : page.getRecords()) {
             inpatientNos.add(item.getPatNo());
@@ -778,6 +778,8 @@ public class SetlListUpldService {
             if (null != medType) {
                 item.setMedTypeName(medType.getName());
             }
+            item.setUploadStatus(StringUtil.isBlank(item.getSetlListId())?"未上传":"已上传");
+            item.setUploadCutoffDate(getUploadCutoffDate(dictValue,item.getSetlTime(),item.getSetlListId()));
             item.setInsuplcAdmdvsName(redisLikeService.getRegionName(item.getInsuplcAdmdvs()));
         }
         Map<String, ZyDisDiagYb> zhuZhenDuanOld = dao.zhuZhenDuan(inpatientNos, "zy_dis_diag_yb").stream().collect(Collectors.toMap(item -> item.getInpatientNo() + item.getAdmissTimes(), a -> a, (k1, k2) -> k1));
@@ -825,6 +827,28 @@ public class SetlListUpldService {
         }
         return ResultVoUtil.success(page);
     }
+    /**
+     * @description:获取上传截止时间
+     * @author: lihong
+     * @date: 2022/12/26 11:27
+     * @param: dictValue
+     * @param: setlTime
+     **/
+    private String getUploadCutoffDate(String dictValue, Date setlTime,String setlListId) {
+        String result = "";
+        Date now = new Date();
+        int days = Integer.parseInt(dictValue);
+        int diffDay = DateUtil.daysBetween(now, setlTime);
+        if(StringUtil.isBlank(setlListId)){
+            //未上传
+            if(diffDay < days){
+                result = "距离上传截止时间还剩"+(days-diffDay)+"天";
+            }else {
+                result = "上传截止时间超期"+(diffDay-days)+"天";
+            }
+        }
+        return result;
+    }
 
     /**
      * 结算单上传条件查询
@@ -1812,4 +1836,20 @@ public class SetlListUpldService {
         map.put("qualityPassFlag",flag);
         return ResultVoUtil.success(map);
     }
+    /**
+     * @description:是否是在院病人
+     * @author: lihong
+     * @date: 2022/12/26 16:16
+     * @param: patNo
+     * @param: times
+     * @return: thyyxxk.webserver.entity.ResultVo<java.lang.Boolean>
+     **/
+    public ResultVo<Boolean> isInHospital(String patNo, Integer times) {
+        Integer count = dao.isInHospital(patNo, times);
+        boolean flag = false;
+        if(count <= 0){
+            flag = true;
+        }
+        return ResultVoUtil.success(flag);
+    }
 }