Переглянути джерело

优化患者列表查询,

hurugang 3 роки тому
батько
коміт
87c37bdba8

+ 8 - 0
src/main/java/cn/hnthyy/thmz/controller/mz/ClinicController.java

@@ -343,6 +343,8 @@ public class ClinicController {
                 return resultMap;
             }
             String patientId = null;
+            //如果当前输入的id是可以查询到患者信息的话,就直接查询患者的所有记录,不需要加时间范围
+            String commonParams=clinic.getCommonParams();
             if (StringUtils.isBlank(clinic.getPatientName())) {
                 clinic.setPatientName(null);
             } else {
@@ -394,6 +396,12 @@ public class ClinicController {
                 //前端传的-1需要清空 //如果医生字段是-1,说明是查询就诊轨迹,就诊轨迹不限制科室和医生
                 clinic.setDoctorCode(null);
             }
+            //如果当前输入的id是可以查询到患者信息的话,就直接查询患者的所有记录,不需要加时间范围
+            MzPatientMi dbMzPatientMi=mzPatientMiService.queryByPatientId(commonParams);
+            if(dbMzPatientMi!=null){
+                clinic.setBeginDate(null);
+                clinic.setEndDate(null);
+            }
             resultMap.put("code", 0);
             resultMap.put("message", "查询就诊记录成功");
             Integer total = clinicService.queryCountClinic(clinic);

+ 11 - 10
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzChargeDetailServiceImpl.java

@@ -1348,16 +1348,17 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                     if (Constants.TC.equals(mzChargeDetail.getBillItemCode()) || Constants.SSWRF.equals(mzChargeDetail.getBillItemCode())) {
                         continue;
                     }
-                    if (supplyChargeItemCodeSet == null) {
-                        List<MzZdSupplyCharge> mzZdSupplyChargeList = mzZdSupplyChargeService.queryMzZdSupplyChargeByCodeList(mzZdSupplyTypeMapper.selectMzZdSupplyTypeCodeInUsed());
-                        if (mzZdSupplyChargeList != null && mzZdSupplyChargeList.size() > 0) {
-                            supplyChargeItemCodeSet = mzZdSupplyChargeList.stream().map(s -> s.getChargeCode()).collect(Collectors.toSet());
-                        }
-                    }
-                    //是给药方式产生的诊疗项目,不添加进构造的处方
-                    if (supplyChargeItemCodeSet != null && supplyChargeItemCodeSet.contains(mzChargeDetail.getChargeItemCode())) {
-                        continue;
-                    }
+                    //暂时不做限制,太多的给药方式是诊疗
+//                    if (supplyChargeItemCodeSet == null) {
+//                        List<MzZdSupplyCharge> mzZdSupplyChargeList = mzZdSupplyChargeService.queryMzZdSupplyChargeByCodeList(mzZdSupplyTypeMapper.selectMzZdSupplyTypeCodeInUsed());
+//                        if (mzZdSupplyChargeList != null && mzZdSupplyChargeList.size() > 0) {
+//                            supplyChargeItemCodeSet = mzZdSupplyChargeList.stream().map(s -> s.getChargeCode()).collect(Collectors.toSet());
+//                        }
+//                    }
+//                    //是给药方式产生的诊疗项目,不添加进构造的处方
+//                    if (supplyChargeItemCodeSet != null && supplyChargeItemCodeSet.contains(mzChargeDetail.getChargeItemCode())) {
+//                        continue;
+//                    }
                     if (zlPrescription.size() == 0) {
                         Map<String, Object> zlMap = new HashMap<>();
                         zlMap.put("amount", BigDecimal.ZERO);

+ 2 - 1
src/main/resources/static/js/mz/clinic.js

@@ -6427,7 +6427,8 @@ function refreshNavTabs(index, groupNo) {
     if (index == 0) {
         tabHtml += ' onclick=xyTableOnClick("' + paneId + '")';
     }
-    tabHtml += '>' + cfTitle + '</a></li>';
+    tabHtml += '>' + cfTitle + '</a';
+    tabHtml+='</li>';
     $("#" + tabId).append(tabHtml);
     var html = '<div class="tab-pane fade in active" id="' + paneId + '" style="height: 100%;min-height: 285px;position: relative;">' +
         '<img src="/thmz/images/prescription.png" style="margin-top: 5px;"/>' +

+ 23 - 1
src/main/resources/templates/mz/clinic.html

@@ -650,7 +650,29 @@
                                             style="cursor: pointer;font-size: 14px;color: #2e69eb!important;"><i
                                             class="fa fa-trash">&nbsp;&nbsp;清空</i></a></div>
 
-                                    <div style="float: right;display: inline-block;"><a
+                                    <div class="btn-group" style="margin-left: 120px;margin-top: -6px;">
+                                        <button data-toggle="dropdown" class="btn btn-default dropdown-toggle" type="button" aria-expanded="false">新增处方<span class="caret"></span>
+                                        </button>
+                                        <ul role="menu" class="dropdown-menu">
+                                            <li><a onclick="refreshNavTabs(0, 71)">新增处方(普药)</a>
+                                            </li>
+                                            <li><a onclick="refreshNavTabs(0, 91)">新增处方(医材)</a>
+                                            </li>
+                                            <!-- 横线-->
+                                           <li class="divider"></li>
+                                            <li><a onclick="refreshNavTabs(0, 111)">新增处方(麻、精一)</a>
+                                            </li>
+                                            <li><a onclick="refreshNavTabs(0, 131)">新增处方(精二)</a>
+                                            </li>
+                                        </ul>
+                                    </div>
+
+                                    <div style="float: right;display: inline-block;">
+                                        <!--<a-->
+                                                <!--onclick="refreshNavTabs(0, 71)"-->
+                                                <!--style="cursor: pointer;font-size: 14px;color: #333333;"><i-->
+                                                <!--class="fa fa-plus">&nbsp;&nbsp;新增处方</i></a>-->
+                                        <a
                                             style="cursor: pointer;font-size: 14px;color: #333333;"
                                             onclick="saveMedicine(0)">&nbsp;&nbsp;保存到右侧<i
                                             class="fa fa-long-arrow-right"