Browse Source

优化住院证没有诊断

hurugang 3 years ago
parent
commit
7c7856b510

+ 16 - 2
src/main/java/cn/hnthyy/thmz/controller/api/MedicalViewApiController.java

@@ -1654,6 +1654,11 @@ public class MedicalViewApiController {
                 }
             }
             Date requestDayD = DateUtil.pase(requestDay, "yyyy-MM-dd");
+            if(requestDayD==null){
+                results.put("resultCode", -1);
+                results.put("resultMessage", "预约挂号时间错误,无法挂号!");
+                return results;
+            }
             Date toDay = DateUtil.pase(new Date(), "yyyy-MM-dd");
             if (requestDayD.before(toDay)) {
                 results.put("resultCode", -1);
@@ -1706,8 +1711,17 @@ public class MedicalViewApiController {
                         }
                     }
                 }
-                WorkTimeEnum workTimeEnum = WorkTimeEnum.geteBedStatusByCode(ampm);
-                map.put("ampm", workTimeEnum == null ? "" : workTimeEnum.name);
+                MzZdWorkTime mzZdWorkTime=mzZdWorkTimeService.queryMzZdWorkTimeByCode(ampm);
+                if(mzZdWorkTime==null){
+                    results.put("resultCode", -1);
+                    results.put("resultMessage", "号源时间段错误!");
+                    return results;
+                }
+//                WorkTimeEnum workTimeEnum = WorkTimeEnum.geteBedStatusByCode(ampm);
+//                map.put("ampm", workTimeEnum == null ? "" : workTimeEnum.name);
+                map.put("ampm", mzZdWorkTime.getName());
+                map.put("startTime", mzZdWorkTime.getStartTime());
+                map.put("endTime", mzZdWorkTime.getEndTime());
             }
             results.put("resultCode", 0);
             results.put("resultMessage", "查询可以挂号的医生号源信息成功");

+ 1 - 1
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzyRequestMapper.java

@@ -233,7 +233,7 @@ public interface MzyRequestMapper {
      * @return
      */
     @Select({"<script>",
-            "select id mzyRequestId,ampm,doctor_code doctorCode,charge_type chargeType,check_fee checkFee,left_num leftNum from mzy_request_new WITH(NOLOCK) where unit_code=#{unitCode} and request_day=#{requestDay,jdbcType=TIMESTAMP} and doctor_code  =#{doctorCode} and del_flag=0  and charge_type not in (16,24)" ,
+            "select id mzyRequestId,ampm,doctor_code doctorCode,charge_type chargeType,check_fee checkFee,left_num leftNum,total_num totalNum from mzy_request_new WITH(NOLOCK) where unit_code=#{unitCode} and request_day=#{requestDay,jdbcType=TIMESTAMP} and doctor_code  =#{doctorCode} and del_flag=0  and charge_type not in (16,24)" ,
             "<when test='ampms!=null'>",
             " and ampm  not in " ,
             "<foreach item='item' index='index' collection='ampms' open='(' separator=',' close=')'>",

+ 8 - 6
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzChargeDetailServiceImpl.java

@@ -2063,9 +2063,13 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
             mzZyReq.setIcdTextNew(mzPrescriptionVo.getIcdText());
             if (mzZyReq.getIcdCodeNew() != null && mzZyReq.getIcdCodeNew().length() > 10) {
                 mzZyReq.setIcdCode(mzZyReq.getIcdCodeNew().substring(0, 9));
+            }else {
+                mzZyReq.setIcdCode(mzZyReq.getIcdCodeNew());
             }
             if (mzZyReq.getIcdTextNew() != null && mzZyReq.getIcdTextNew().length() > 25) {
                 mzZyReq.setIcdText(mzZyReq.getIcdTextNew().substring(0, 20));
+            }else {
+                mzZyReq.setIcdText(mzZyReq.getIcdTextNew());
             }
             if (StringUtils.isBlank(mzZyReq.getIcdText())) {
                 if(StringUtils.isNotBlank(mzPrescriptionVo.getMzBlRecord().getTentativeDiagnosis())){
@@ -2074,9 +2078,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                     if(mzPrescriptionVo.getMzBlRecord().getTentativeDiagnosis().length()>25){
                         mzZyReq.setIcdText(mzZyReq.getIcdTextNew().substring(0, 20));
                     }
-
                 }
-
             }
             if (mzZyReq.getIcdCode() == null) {
                 mzZyReq.setIcdCode("");
@@ -2470,16 +2472,16 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         }
         mzPrescriptionVo.setIcdText(icdText);
         mzPrescriptionVo.setMzBlRecord(mzBlRecord);
+        if (MzBlRecordFlag) {
+            //只需要构造病历信息,不需要设置用药和诊疗信息
+            return mzPrescriptionVo;
+        }
         if (mzBlRecord.getEmrProcess() != null && mzBlRecord.getEmrProcess().indexOf("收住院") >= 0) {
             List<MzZyReq> mzZyReqs = mzZyReqMapper.selectMzZyReqByPatientId(patientId);
             if (mzZyReqs != null && mzZyReqs.size() > 0) {
                 mzPrescriptionVo.setMzZyReq(mzZyReqs.get(0));
             }
         }
-        if (MzBlRecordFlag) {
-            //只需要构造病历信息,不需要设置用药和诊疗信息
-            return mzPrescriptionVo;
-        }
         List<MzChargeDetail> mzChargeDetailList = mzChargeDetailMapper.selectMzChargeDetailByPatientId("mz_charge_detail", patientId, times, null, payMark);
         //给药方式的收费项目
         List<MzChargeDetail> supplyList = new ArrayList<>();

+ 2 - 2
src/main/resources/templates/mz/hybrid_test_list.html

@@ -122,11 +122,11 @@
             </div>
             <div class="modal-body">
                 <div class="panel-body" style="padding: 0px;">
-                    <div class="form-group col-md-12 col-sm-12 col-xs-12" style="text-align: right;">
+                    <div class="form-group col-md-12 col-sm-12 col-xs-12 hide" style="text-align: right;">
                         <button type="button" style="margin-left:3px" id="btn_print" class="btn btn-primary"
                                 title="打印报告"><i class="fa fa-print"></i>
                         </button>
-                        <button type="button" style="margin-left:3px" id="btn_print_setup" class="btn btn-primary"
+                        <button type="button" style="margin-left:3px" id="btn_print_setup" class="btn btn-primary hide"
                                 title="打印设置"><i class="fa fa-cog"></i>
                         </button>
                     </div>