ソースを参照

儿科门诊限制超过18岁以上的人挂号

hurugang 2 年 前
コミット
719819dd38

+ 4 - 0
src/main/java/cn/hnthyy/thmz/common/Constants.java

@@ -332,6 +332,10 @@ public class Constants {
      * 简易门诊编码
      */
     public static final String JY_EXEC_CODE = "3110000";
+    /**
+     * 儿科编码
+     */
+    public static final String EK_CODE = "1040000";
     /**
      * 四舍五入 收费编码
      */

+ 6 - 1
src/main/java/cn/hnthyy/thmz/controller/mz/MzyReqrecController.java

@@ -186,7 +186,8 @@ public class MzyReqrecController {
     @RequestMapping(value = "/exportListMzyReqrec", method = {RequestMethod.GET})
     public Map<String, Object> exportListMzyReqrec(@RequestParam("name") String name, @RequestParam("unitCode") String unitCode, @RequestParam("doctorCode") String doctorCode,
                                                    @RequestParam("phoneNo") String phoneNo, @RequestParam("serialNo") String serialNo, @RequestParam("beginTime") String beginTime,
-                                                   @RequestParam("endTime") String endTime, @RequestParam("visitedMark") String visitedMark, @RequestParam("cancelMark") String cancelMark, HttpServletRequest request, HttpServletResponse response) {
+                                                   @RequestParam("endTime") String endTime, @RequestParam("visitedMark") String visitedMark, @RequestParam("cancelMark") String cancelMark,
+                                                   @RequestParam("payMark") String payMark,HttpServletRequest request, HttpServletResponse response) {
         try {
             MzyReqrecPageDto mzyReqrecPageDto = new MzyReqrecPageDto();
             mzyReqrecPageDto.setMzyReqrec(new MzyReqrec());
@@ -200,6 +201,10 @@ public class MzyReqrecController {
             mzyReqrecPageDto.setPhoneNo(phoneNo);
             mzyReqrecPageDto.setBeginTime(DateUtil.pase(beginTime, "yyyy-MM-dd HH:mm:ss"));
             mzyReqrecPageDto.setEndTime(DateUtil.pase(endTime, "yyyy-MM-dd HH:mm:ss"));
+            if(StringUtils.isBlank(payMark)){
+                payMark=null;
+            }
+            mzyReqrecPageDto.setPayMark(payMark);
             if (StringUtils.isBlank(mzyReqrec.getName())) {
                 mzyReqrec.setName(null);
             } else {

+ 22 - 0
src/main/java/cn/hnthyy/thmz/entity/his/mz/MzPatientMi.java

@@ -169,6 +169,28 @@ public class MzPatientMi {
         return age;
     }
 
+
+
+    /**
+     * 获取年龄 多少岁
+     * @return
+     */
+    public Integer getAgeForYear() {
+        Date birthDay = this.birthDay;
+        if(birthDay==null && StringUtils.isNotBlank(this.socialNo)){
+            String str =DateUtil.getBirthday(this.socialNo);
+            if(StringUtils.isNotBlank(str)){
+                birthDay=DateUtil.pase(str+" 00:00:00","yyyy-MM-dd HH:mm:ss");
+            }
+        }
+        Integer age=DateUtil.getAge(birthDay);
+        if(age==null){
+            age=this.age;
+        }
+        return age;
+    }
+
+
     /**
      * 获取性别描述
      * @return

+ 2 - 0
src/main/java/cn/hnthyy/thmz/entity/thmz/Config.java

@@ -19,4 +19,6 @@ public class Config {
     private String createId;
     //创建时间
     private Date createDate;
+    //备注
+    private String remark;
 }

+ 3 - 3
src/main/java/cn/hnthyy/thmz/mapper/thmz/ConfigMapper.java

@@ -10,7 +10,7 @@ public interface ConfigMapper {
      * @param configKey 查询键
      * @return
      */
-    @Select("select id,config_key, config_value, create_id, create_date from t_config where config_key=#{configKey}")
+    @Select("select id,config_key, config_value, create_id, create_date,remark from t_config where config_key=#{configKey}")
     Config selectConfigByKey(@Param("configKey") String configKey);
     /**
      * 新增文件
@@ -18,8 +18,8 @@ public interface ConfigMapper {
      * @param config
      * @return
      */
-    @Insert("INSERT INTO t_config(config_key, config_value, create_id, create_date) VALUES " +
-            "(#{configKey,jdbcType=VARCHAR}, #{configValue,jdbcType=VARCHAR},#{createId,jdbcType=BIGINT}, #{createDate,jdbcType=TIMESTAMP})")
+    @Insert("INSERT INTO t_config(config_key, config_value, create_id, create_date,remark) VALUES " +
+            "(#{configKey,jdbcType=VARCHAR}, #{configValue,jdbcType=VARCHAR},#{createId,jdbcType=BIGINT}, #{createDate,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR})")
     @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
     int insertConfig(Config config);
 

+ 33 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzyReqrecServiceImpl.java

@@ -7,6 +7,7 @@ import cn.hnthyy.thmz.entity.MzException;
 import cn.hnthyy.thmz.entity.his.ResponceType;
 import cn.hnthyy.thmz.entity.his.mz.*;
 import cn.hnthyy.thmz.entity.his.zd.ZdChequeType;
+import cn.hnthyy.thmz.entity.his.zd.ZdUnitCode;
 import cn.hnthyy.thmz.entity.thmz.*;
 import cn.hnthyy.thmz.enums.ClinicStatusEnum;
 import cn.hnthyy.thmz.enums.OrderStatusEnum;
@@ -156,6 +157,10 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
             throw new MzException("当前号别不存在,请先设置!");
         }
         MzyRequest mzyRequest = mzyRequestMapper.selectMzyRequestById(mzyReqrecPageDto.getMzyRequestId());
+        if(mzyRequest==null){
+            throw new MzException("挂号对应的排班不存在!");
+        }
+        pediatricAgeLimit(mzPatientMi, mzyRequest);
         //covidManage(mzyReqrec, mzPatientMi, mzyRequest);
         if (PayMarkEnum.NO_CHARGE.code.equals(mzyReqrecPageDto.getPayMark())) {
             mzyReqrec.setRequestDay(mzyRequest.getRequestDay());
@@ -222,6 +227,34 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
         return 1;
     }
 
+    /**
+     * 儿科年龄校验
+     * @param mzPatientMi
+     * @param mzyRequest
+     * @throws MzException
+     */
+    private void pediatricAgeLimit(MzPatientMi mzPatientMi, MzyRequest mzyRequest) throws MzException {
+        ZdUnitCode zdUnitCode= zdUnitCodeService.queryByCode(mzyRequest.getUnitCode());
+        if(zdUnitCode!=null && StringUtils.isNotBlank(zdUnitCode.getParentCode()) && Constants.EK_CODE.equals(zdUnitCode.getParentCode())){
+            Config config= configMapper.selectConfigByKey("pediatric_age_limit");
+            if(config!=null && StringUtils.isNotBlank(config.getConfigValue())){
+                Integer age=mzPatientMi.getAgeForYear();
+                if(age==null){
+                    throw new MzException("患者年龄为空,请先完善患者基础信息!");
+                }
+                Integer configValue=99999;
+                try {
+                    configValue= Integer.valueOf(config.getConfigValue());
+                }catch (Exception e){
+                    e.printStackTrace();
+                }
+                if(age>configValue){
+                    throw new MzException("患者年龄超限,无法继续在儿科相关科室就诊!");
+                }
+            }
+        }
+    }
+
     /**
      * 获取新的缴费次数
      *

+ 1 - 1
src/main/resources/static/js/mz/hs_jc.js

@@ -657,7 +657,7 @@ function initHybirdTimeSelect() {
 
 
 /**
- * 打开核酸混检时间设置
+ * 打开核酸单人单采时间设置
  */
 function hybirdTimeModal() {
     $('#hybirdEndTimeMinute').selectpicker('refresh');

+ 10 - 3
src/main/resources/static/js/mz/registration_list.js

@@ -1804,19 +1804,26 @@ function exportExcel() {
     var regiListBtnGroup = getIndex("regi_List_btn_group");
     var visitedMark = "";
     var cancelMark = "";
+    var payMark="-1";
     if (regiListBtnGroup == 1) {
         visitedMark = 0;
         cancelMark = 0;
+        payMark="5";
     } else if (regiListBtnGroup == 2) {
-        visitedMark = 1;
+        visitedMark = 0;
         cancelMark = 0;
+        payMark="";
     } else if (regiListBtnGroup == 3) {
-
+        visitedMark = 1;
+        cancelMark = 0;
+        payMark="";
+    } else if (regiListBtnGroup == 4) {
         cancelMark = 1;
+        payMark="";
     }
     window.location.href = "/thmz/exportListMzyReqrec?beginTime=" + rePortRangeArr[0] + "&endTime=" + rePortRangeArr[1] + "&name=" + $("#userNameParam").val()
         + "&unitCode=" + $("#deptNoParam").val() + "&doctorCode=" + $("#doctorParam").val() + "&phoneNo=" + $("#phoneParam").val() + "&serialNo=" + $("#serialNoParams").val() + "&visitedMark="
-        + visitedMark + "&cancelMark=" + cancelMark;
+        + visitedMark + "&cancelMark=" + cancelMark+ "&payMark=" + payMark;
 }