Ver Fonte

同一个模板或者历史处方中,相同药品调用重复,增加处方号

hurugang há 3 anos atrás
pai
commit
90253d18d0

+ 4 - 1
src/main/java/cn/hnthyy/thmz/entity/thmz/WhiteList.java

@@ -28,5 +28,8 @@ public class WhiteList implements Serializable {
 	 * 白名单对应的操作人id
 	 */
 	private String opId;
-
+	/**
+	 * 备注
+	 */
+	private String remark;
 }

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

@@ -1444,11 +1444,11 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                     Map<String, Object> xyDetail = new HashMap<>();
                     detail.add(xyDetail);
                     xyDetail.put("name", mzChargeDetail.getTcName());
-                    xyDetail.put("orderCode", mzChargeDetail.getChargeItemCode() + "_" + mzChargeDetail.getSerial());
                     //String name = mzChargeDetail.getTcName();
                     if (mzChargeDetail.getGroupOrder() == null) {
                         mzChargeDetail.setGroupOrder(1);
                     }
+                    xyDetail.put("orderCode", mzChargeDetail.getChargeItemCode() + "_" + mzChargeDetail.getSerial()+"_"+mzChargeDetail.getGroupOrder());
                     xyDetail.put("groupOrder", mzChargeDetail.getGroupOrder());
                     if (StringUtils.isNotBlank(ypZdDict.getManuCode())) {
                         String manufactoryName = ypZdManufactoryService.queryYpZdManufactoryByCode(ypZdDict.getManuCode());

+ 34 - 30
src/main/resources/static/js/mz/clinic.js

@@ -2480,20 +2480,20 @@ function editPrescription(jsonData, type) {
                 }
                 callBackZlDetail(code, mzChargeDetail);
             } else if (groupNo == "71" || groupNo == "91" || groupNo == "111" || groupNo == "131") {
-                if (type != 0 && !isInArray(code + "_" + serial, xyArrays)) {
-                    continue;
-                }
                 // 71 西成药 91 医材 111 精一 131 精二
                 var groupOrder = mzChargeDetail.groupOrder;
                 if (groupOrder == null || groupOrder == 'null' || groupOrder == "") {
                     groupOrder = 1;
                 }
+                if (type != 0 && !isInArray(code + "_" + serial + "_" + groupOrder, xyArrays)) {
+                    continue;
+                }
                 var lastGroupOrder = parseInt($("#groupId > option:last").val());
                 while (lastGroupOrder < groupOrder) {
                     appendGroupOrder();
                     lastGroupOrder = parseInt($("#groupId > option:last").val());
                 }
-                appendGroupOrder()
+                //appendGroupOrder()
                 $("#groupId").selectpicker('val', groupOrder);
                 $('#groupId').selectpicker('refresh');
 
@@ -8128,31 +8128,31 @@ function setPrint() {
 
 function setTableHtml(prescriptionDetail) {
     //设置成组处方符号
-    if(prescriptionDetail.length>1){
+    if (prescriptionDetail.length > 1) {
         var map = new Map();
-        var groupOrderlist =[];
+        var groupOrderlist = [];
         for (var j = 0; j < prescriptionDetail.length; j++) {
             var detail = prescriptionDetail[j];
             var list = map.get(detail.groupOrder);
-            if(list==null){
+            if (list == null) {
                 list = [];
-                map.put(detail.groupOrder,list);
-                groupOrderlist[groupOrderlist.length]=detail.groupOrder;
+                map.put(detail.groupOrder, list);
+                groupOrderlist[groupOrderlist.length] = detail.groupOrder;
             }
-            list[list.length]=detail;
+            list[list.length] = detail;
         }
-        for(var j=0;j<groupOrderlist.length;j++){
+        for (var j = 0; j < groupOrderlist.length; j++) {
             var list = map.get(groupOrderlist[j]);
-            if(list.length==1){
+            if (list.length == 1) {
                 continue;
             }
-            list[0].groupFlag="┒";
-            list[list.length-1].groupFlag="┛";
-           if(list.length>2){
-               for(var t=1;t<list.length-1;t++){
-                   list[t].groupFlag="┃";
-               }
-           }
+            list[0].groupFlag = "┒";
+            list[list.length - 1].groupFlag = "┛";
+            if (list.length > 2) {
+                for (var t = 1; t < list.length - 1; t++) {
+                    list[t].groupFlag = "┃";
+                }
+            }
         }
     }
     var html = "";
@@ -8164,19 +8164,19 @@ function setTableHtml(prescriptionDetail) {
         html += "</td>";
         html += "<td colspan='2'></td>";
         html += "<td>X</td>";
-        html +="<td rowspan='2' style='height: 100%;line-height: 100%;font-size: 40px;'>";
-        if(detail.groupFlag!=undefined && detail.groupFlag!=null){
-            html +=detail.groupFlag;
+        html += "<td rowspan='2' style='height: 100%;line-height: 100%;font-size: 40px;'>";
+        if (detail.groupFlag != undefined && detail.groupFlag != null) {
+            html += detail.groupFlag;
         }
         html += "</td><td>" + detail.quantity + detail.packUnit + "</td>";
         html += "</tr>";
         html += "<tr><td></td>";
         if (detail.tryResult != undefined && detail.tryResult != null && detail.tryResult != "null" && detail.tryResult != "") {
-            html += "<td>" + detail.tryResult+"</td>";
-        }else if (detail.tryFlag != undefined && detail.tryFlag != null && detail.tryFlag != "null" && detail.tryFlag != "") {
-            html += "<td>"  + detail.tryFlag+"</td>";
-        }else {
-            html+="<td></td>";
+            html += "<td>" + detail.tryResult + "</td>";
+        } else if (detail.tryFlag != undefined && detail.tryFlag != null && detail.tryFlag != "null" && detail.tryFlag != "") {
+            html += "<td>" + detail.tryFlag + "</td>";
+        } else {
+            html += "<td></td>";
         }
         html += "<td style='font-weight: bold;text-align: right;'>用法:</td>";
         html += "<td>" + detail.drugQuan + detail.unitDesc + "/次</td>";
@@ -10069,9 +10069,13 @@ function siReadCard() {
  */
 function xyTableOnClick(paneId) {
     setTimeout(function () {
-        $("#xyTabContent div").each(function (index, obj) {
-            // $("#xyTab").find("a[href='#"+$(obj).attr("id")+"']").off("click").tab('show');
-            if ($(obj).attr("id") == paneId) {
+        $("#xyTabContent div.tab-pane").each(function (index, obj) {
+            var targetId=$(obj).attr("id");
+            //如果处方内容是空的,就删除没有处方
+            if($(obj).find("div.cf_content").children().length==0){
+                $(obj).remove();
+                $("[href='#"+targetId+"']").parent().remove();
+            }else  if (targetId == paneId) {
                 $(obj).addClass("active").addClass("in");
             } else {
                 $(obj).removeClass("active").removeClass("in");