Kaynağa Gözat

门诊医生优化

hurugang 3 yıl önce
ebeveyn
işleme
87102b9cc9

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

@@ -1771,6 +1771,12 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                         mzYjReq.setExecDept(jyZdItem.getExecUnit());
                     }
                 }
+                if(mzYjReq.getReqComment().length()>62){
+                    mzYjReq.setReqComment(mzYjReq.getReqComment().substring(0,61));
+                }
+                if(mzYjReq.getReqComment().length()>37){
+                    mzYjReq.setReqComment(mzYjReq.getReqComment().substring(0,36));
+                }
                 if (setEmrProcess) {
                     zlIndex++;
                     String value = zlIndex + "." + mzYjReq.getOrderName() + " " + (mzYjReq.getJyRemark() == null ? "" : mzYjReq.getJyRemark()) + " ";

+ 100 - 93
src/main/resources/static/js/mz/clinic.js

@@ -255,7 +255,7 @@ $(function () {
             //回车时,光标不在任何区域
             if (id == null || id == "") {
                 //当前页面是西药保存页面,且有药品选中
-                if(currentCode!=null && currentCode!=""){
+                if (currentCode != null && currentCode != "") {
                     $("#supplyType").next().click();
                 }
             }
@@ -272,13 +272,13 @@ $(function () {
             if (id == 'zy_drugWin') {
                 $("#zyInstruction").next().click();
             } else if (id == 'zyInstruction') {
-                var ariaExpanded=$("#zyInstruction").next().attr("aria-expanded");
-                if(ariaExpanded==true || ariaExpanded=="true"){
+                var ariaExpanded = $("#zyInstruction").next().attr("aria-expanded");
+                if (ariaExpanded == true || ariaExpanded == "true") {
                     $("#zyInstruction").next().click();
                 }
                 $("#saveChineseMedicine").click();
                 $("#zyfs").focus();
-               // saveMedicine(1);
+                // saveMedicine(1);
             }
             // else if (id == 'saveChineseMedicine') {
             //     $("input.zyfs").focus();
@@ -309,8 +309,8 @@ $(function () {
             } else if (id == 'packUnit') {
                 $("#medicalAdvice").next().click();
             } else if (id == 'medicalAdvice') {
-                var ariaExpanded=$("#medicalAdvice").next().attr("aria-expanded");
-                if(ariaExpanded==true || ariaExpanded=="true"){
+                var ariaExpanded = $("#medicalAdvice").next().attr("aria-expanded");
+                if (ariaExpanded == true || ariaExpanded == "true") {
                     $("#medicalAdvice").next().click();
                 }
                 saveMedicine(0);
@@ -330,7 +330,7 @@ $(function () {
             } else if (id == 'saveJyJcItem') {
                 $("#jcJyItem").focus();
                 $("#jcJyItem").click();
-            }else if (id == 'freeBedNum') {
+            } else if (id == 'freeBedNum') {
                 $("#inpatientWardBeHospitalized").next().click();
             } else if (id == 'inpatientWardBeHospitalized') {
                 $("#smallWardBeHospitalized").next().click();
@@ -338,11 +338,11 @@ $(function () {
                 $("#admissStatus").next().click();
             } else if (id == 'admissStatus') {
                 saveZyReq(true);
-            }else if (id == 'western_medicine_name') {
+            } else if (id == 'western_medicine_name') {
                 $("#western_medicine_name").click();
-            }else if (id == 'chinese_medicine_name') {
+            } else if (id == 'chinese_medicine_name') {
                 $("#chinese_medicine_name").click();
-            }else if (id == 'jcJyItem') {
+            } else if (id == 'jcJyItem') {
                 $("#jcJyItem").click();
             }
         }
@@ -350,7 +350,6 @@ $(function () {
 });
 
 
-
 /**
  * 打开配置页面
  */
@@ -1266,7 +1265,7 @@ function setTmResponseType(patientId) {
                 return;
             }
             if (res.code == 0) {
-                if (res.data != null && res.data.length>0) {
+                if (res.data != null && res.data.length > 0) {
                     $("#patientResponseType").html("特殊门诊");
                     $("#fetchSpcSlwinfo").css("display", "inline-block");
                 }
@@ -1276,13 +1275,12 @@ function setTmResponseType(patientId) {
 }
 
 
-
 /**
  * 特门详情
  * @param patientId
  */
 function fetchSpcSlwinfo() {
-    var patientId=$("#patientId").text();
+    var patientId = $("#patientId").text();
     $.ajax({
         type: "GET",
         url: '/thmz/fetchSpcSlwinfo?patientId=' + patientId,
@@ -1614,44 +1612,44 @@ function editPrescription(jsonData, type) {
         $("#personalHistory").val(jsonData.mzBlRecord.personalHistory);
         $("#familyHistory").val(jsonData.mzBlRecord.familyHistory);
         $("#obstericalHistory").val(jsonData.mzBlRecord.obstericalHistory);
-        if(jsonData.mzBlRecord.weight!=null && jsonData.mzBlRecord.weight!=0){
+        if (jsonData.mzBlRecord.weight != null && jsonData.mzBlRecord.weight != 0) {
             $("#weight").val(jsonData.mzBlRecord.weight);
-        }else {
+        } else {
             $("#weight").val("");
         }
-        if(jsonData.mzBlRecord.temperature!=null && jsonData.mzBlRecord.temperature!=0){
+        if (jsonData.mzBlRecord.temperature != null && jsonData.mzBlRecord.temperature != 0) {
             $("#temperature").val(jsonData.mzBlRecord.temperature);
-        }else {
+        } else {
             $("#temperature").val("");
         }
-        if(jsonData.mzBlRecord.sphygmus!=null && jsonData.mzBlRecord.sphygmus!=0){
+        if (jsonData.mzBlRecord.sphygmus != null && jsonData.mzBlRecord.sphygmus != 0) {
             $("#sphygmus").val(jsonData.mzBlRecord.sphygmus);
-        }else {
+        } else {
             $("#sphygmus").val("");
         }
-        if(jsonData.mzBlRecord.breathe!=null && jsonData.mzBlRecord.breathe!=0){
+        if (jsonData.mzBlRecord.breathe != null && jsonData.mzBlRecord.breathe != 0) {
             $("#breathe").val(jsonData.mzBlRecord.breathe);
-        }else {
+        } else {
             $("#breathe").val("");
         }
-        if(jsonData.mzBlRecord.pressureHigh!=null && jsonData.mzBlRecord.pressureHigh!=0){
+        if (jsonData.mzBlRecord.pressureHigh != null && jsonData.mzBlRecord.pressureHigh != 0) {
             $("#pressure_high").val(jsonData.mzBlRecord.pressureHigh);
-        }else {
+        } else {
             $("#pressure_high").val("");
         }
-        if(jsonData.mzBlRecord.pressureFloor!=null && jsonData.mzBlRecord.pressureFloor!=0){
+        if (jsonData.mzBlRecord.pressureFloor != null && jsonData.mzBlRecord.pressureFloor != 0) {
             $("#pressure_floor").val(jsonData.mzBlRecord.pressureFloor);
-        }else {
+        } else {
             $("#pressure_floor").val("");
         }
-        if(jsonData.mzBlRecord.pressureHighLeft!=null && jsonData.mzBlRecord.pressureHighLeft!=0){
+        if (jsonData.mzBlRecord.pressureHighLeft != null && jsonData.mzBlRecord.pressureHighLeft != 0) {
             $("#pressure_high_left").val(jsonData.mzBlRecord.pressureHighLeft);
-        }else {
+        } else {
             $("#pressure_high_left").val("");
         }
-        if(jsonData.mzBlRecord.pressureFloorLeft!=null && jsonData.mzBlRecord.pressureFloorLeft!=0){
+        if (jsonData.mzBlRecord.pressureFloorLeft != null && jsonData.mzBlRecord.pressureFloorLeft != 0) {
             $("#pressure_floor_left").val(jsonData.mzBlRecord.pressureFloorLeft);
-        }else {
+        } else {
             $("#pressure_floor_left").val("");
         }
         $("#tentativeDiagnosis").val(jsonData.mzBlRecord.tentativeDiagnosis);
@@ -1683,9 +1681,9 @@ function editPrescription(jsonData, type) {
                     callBackZlDetail(code, mzChargeDetail);
                 } else if (groupNo == "71" || groupNo == "91" || groupNo == "111" || groupNo == "131") {
                     // 71 西成药 91 医材 111 精一 131 精二
-                    var groupOrder=mzChargeDetail.groupOrder;
-                    if(groupOrder==null || groupOrder=='null' || groupOrder==""){
-                        groupOrder=1;
+                    var groupOrder = mzChargeDetail.groupOrder;
+                    if (groupOrder == null || groupOrder == 'null' || groupOrder == "") {
+                        groupOrder = 1;
                     }
                     $("#groupId").selectpicker('val', groupOrder);
                     $('#groupId').selectpicker('refresh');
@@ -2494,7 +2492,7 @@ function saveWesternMedicine(calculateTotalAmountFlag) {
     //html += drugWin + drugWinUnit + ' 共';
     html += gross + packUnit + " " + '<br/><span style="margin-left: 15px"></span>';
     html += '用法:' + supplyTypeText + ' ';
-    html += drugWin + drugWinUnit+ ' ';
+    html += drugWin + drugWinUnit + ' ';
     html += '频次:' + orderFrequencyText + ' ';
     html += dayNum + '天 ';
     if (tryFlag == "true" || tryFlag == true) {
@@ -3498,15 +3496,15 @@ function billItemButtonChange(object, objectIndex) {
     $("#jcJyItem").webuiPopover('hide');
     if (objectIndex == 0) {
         $("#western_medicine_name").focus();
-       // $("#western_medicine_name").click();
+        // $("#western_medicine_name").click();
         // currentEleId = 'western_medicine_name';
     } else if (objectIndex == 1) {
         $("#chinese_medicine_name").focus();
-       // $("#chinese_medicine_name").click();
+        // $("#chinese_medicine_name").click();
         //  currentEleId = 'chinese_medicine_name';
     } else if (objectIndex == 2) {
         $("#jcJyItem").focus();
-     //   $("#jcJyItem").click();
+        //   $("#jcJyItem").click();
         //   currentEleId = 'jcJyItem';
     } else if (objectIndex == 3) {
         //   currentEleId = 'freeBedNum';
@@ -5912,6 +5910,7 @@ function getParamsForpPrescription() {
             var itemsType = $(zlTabContents[i]).find("input.temporary_items_type").val();
             //执行科室
             var execUnit = $(zlTabContents[i]).find("input.temporary_items_execUnit").val();
+            res.deptName
             if (itemsType == "3" || itemsType == 3) {
                 //诊疗,放入药品类型中入库,因为诊疗是与药品一样直接入明细库,但是是与医技在同一处方开立页面开立
                 tempJson = JSON.parse('{"chargeItemCode": "","serial": "","quantity": "1","drugQuan": "1","drugUnit": "","frequency": "","orderDays": "1","paySelf": "0","drugWin": "1","instructionCode":"","instructionText":"","orderNo":"","groupOrder":"","supplyCode":"","cyJssm":"","cyDj":"","cyFysm":"","tryFlag":"0","groupNo":"00","execDept":""}');
@@ -6828,15 +6827,17 @@ function printPrescription(patientId, times, clnicId, payMark, printType) {
                             var __ret = setTableHtml(prescriptionDetail);
                             var html = __ret.html;
                             var j = __ret.j;
-                            if (res.deptName.indexOf("儿") > 0) {
-                                $("#typePrescription").text("儿科");
-                                $("#cfTitle").text("儿科");
-                            } else if (res.deptName.indexOf("急诊科") > 0) {
-                                $("#typePrescription").text("急诊");
-                                $("#cfTitle").text("急诊");
-                            } else {
-                                $("#typePrescription").text("普通处方");
-                                $("#cfTitle").text("普通");
+                            if (res.deptName != undefined && res.deptName != null) {
+                                if (res.deptName.indexOf("儿") > 0) {
+                                    $("#typePrescription").text("儿科");
+                                    $("#cfTitle").text("儿科");
+                                } else if (res.deptName.indexOf("急诊科") > 0) {
+                                    $("#typePrescription").text("急诊");
+                                    $("#cfTitle").text("急诊");
+                                } else {
+                                    $("#typePrescription").text("普通处方");
+                                    $("#cfTitle").text("普通");
+                                }
                             }
                             $("#prescriptionDetail").html(html);
                             $("#cfAmountPrint").text(pyPrescription[i].amount + "元 (不含注射费)");
@@ -6856,15 +6857,17 @@ function printPrescription(patientId, times, clnicId, payMark, printType) {
                             var __ret = setTableHtml(prescriptionDetail);
                             var html = __ret.html;
                             var j = __ret.j;
-                            if (res.deptName.indexOf("儿") > 0) {
-                                $("#typePrescription").text("儿科");
-                                $("#cfTitle").text("儿科");
-                            } else if (res.deptName.indexOf("急诊科") > 0) {
-                                $("#typePrescription").text("急诊");
-                                $("#cfTitle").text("急诊");
-                            } else {
-                                $("#typePrescription").text("医材处方");
-                                $("#cfTitle").text("普通");
+                            if (res.deptName != undefined && res.deptName != null) {
+                                if (res.deptName.indexOf("儿") > 0) {
+                                    $("#typePrescription").text("儿科");
+                                    $("#cfTitle").text("儿科");
+                                } else if (res.deptName.indexOf("急诊科") > 0) {
+                                    $("#typePrescription").text("急诊");
+                                    $("#cfTitle").text("急诊");
+                                } else {
+                                    $("#typePrescription").text("医材处方");
+                                    $("#cfTitle").text("普通");
+                                }
                             }
                             $("#prescriptionDetail").html(html);
                             $("#cfAmountPrint").text(ycPrescription[i].amount + "元 ");
@@ -6970,15 +6973,17 @@ function printPrescription(patientId, times, clnicId, payMark, printType) {
                             if (index > 0) {
                                 LODOP.NewPageA();
                             }
-                            if (res.deptName.indexOf("儿") > 0) {
-                                $("#typePrescription").text("儿科");
-                                $("#cfTitle").text("儿科");
-                            } else if (res.deptName.indexOf("急诊科") > 0) {
-                                $("#typePrescription").text("急诊");
-                                $("#cfTitle").text("急诊");
-                            } else {
-                                $("#typePrescription").text("中药处方");
-                                $("#cfTitle").text("普通");
+                            if (res.deptName != undefined && res.deptName != null) {
+                                if (res.deptName.indexOf("儿") > 0) {
+                                    $("#typePrescription").text("儿科");
+                                    $("#cfTitle").text("儿科");
+                                } else if (res.deptName.indexOf("急诊科") > 0) {
+                                    $("#typePrescription").text("急诊");
+                                    $("#cfTitle").text("急诊");
+                                } else {
+                                    $("#typePrescription").text("中药处方");
+                                    $("#cfTitle").text("普通");
+                                }
                             }
                             $("#prescriptionDetail").html(html);
                             $("#cfAmountPrint").text(prescriptionDetailJson.zyPrescription[0].amount + "元 (不含代煎费)");
@@ -6999,15 +7004,17 @@ function printPrescription(patientId, times, clnicId, payMark, printType) {
                             if (index > 0) {
                                 LODOP.NewPageA();
                             }
-                            if (res.deptName.indexOf("儿") > 0) {
-                                $("#typePrescription").text("儿科");
-                                $("#cfTitle").text("儿科");
-                            } else if (res.deptName.indexOf("急诊科") > 0) {
-                                $("#typePrescription").text("急诊");
-                                $("#cfTitle").text("急诊");
-                            } else {
-                                $("#typePrescription").text("诊疗处方");
-                                $("#cfTitle").text("普通");
+                            if (res.deptName != undefined && res.deptName != null) {
+                                if (res.deptName.indexOf("儿") > 0) {
+                                    $("#typePrescription").text("儿科");
+                                    $("#cfTitle").text("儿科");
+                                } else if (res.deptName.indexOf("急诊科") > 0) {
+                                    $("#typePrescription").text("急诊");
+                                    $("#cfTitle").text("急诊");
+                                } else {
+                                    $("#typePrescription").text("诊疗处方");
+                                    $("#cfTitle").text("普通");
+                                }
                             }
                             $("#prescriptionDetail").html(html);
                             $("#cfAmountPrint").text(prescriptionDetailJson.zlPrescription[0].amount + "元 ");
@@ -7392,7 +7399,7 @@ function printBlRecord(patientId, times, printType) {
  * @param maxLength 最大长度
  * @returns {*}
  */
-function formatUnderline(params,maxLength) {
+function formatUnderline(params, maxLength) {
     var length = 0;
     if (params == null || params.length == 0) {
         length = maxLength;
@@ -7447,43 +7454,43 @@ function printZyReq(patientId, printType) {
                 var strStyle = "<style>table{width: 96%;} table,td,th {}</style>";
                 var mzPatientMi = res.mzPatientMi;
                 var mzZyReq = res.mzZyReq;
-                var mzPatientId = formatUnderline(mzPatientMi.patientId,15 );
+                var mzPatientId = formatUnderline(mzPatientMi.patientId, 15);
                 $("#patientIdZyReq").text(mzPatientId);
-                var mzPatientMiName = formatUnderline(mzPatientMi.name,22);
+                var mzPatientMiName = formatUnderline(mzPatientMi.name, 22);
                 $("#patientNameZyReq").text(mzPatientMiName);
-                var mzPatientGender = formatUnderline(mzPatientMi.gender,10);
+                var mzPatientGender = formatUnderline(mzPatientMi.gender, 10);
                 $("#patientGenderZyReq").text(mzPatientGender);
-                var mzPatientAge = formatUnderline(mzPatientMi.age+ "岁",6);
+                var mzPatientAge = formatUnderline(mzPatientMi.age + "岁", 6);
                 $("#patientAgeZyReq").text(mzPatientAge);
-                var mzPatientSocialNo = formatUnderline(mzPatientMi.socialNo,48);
+                var mzPatientSocialNo = formatUnderline(mzPatientMi.socialNo, 48);
                 $("#sfzZyReq").text(mzPatientSocialNo);
                 $("#birthDateZyReq").text(format(mzPatientMi.birthDay, "yyyy-MM-dd"));
-                var mzPatientPhoneNo = formatUnderline(mzPatientMi.phoneNo,55);
+                var mzPatientPhoneNo = formatUnderline(mzPatientMi.phoneNo, 55);
                 $("#phoneZyReq").text(mzPatientPhoneNo);
                 $("#responseTypeZyReq").text(mzPatientMi.responseTypeName);
-                var mzPatientMiAddress = formatUnderline(mzPatientMi.address,31);
+                var mzPatientMiAddress = formatUnderline(mzPatientMi.address, 31);
                 $("#addressZyReq").text(mzPatientMiAddress);
-                if(mzZyReq.icdCode==null || mzZyReq.icdCode=="" || mzZyReq.icdCode.length==0){
+                if (mzZyReq.icdCode == null || mzZyReq.icdCode == "" || mzZyReq.icdCode.length == 0) {
                     $("#icsCodeZyReq").html("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
-                    var mzPatientMiIcdText = formatUnderline(mzZyReq.icdText,29);
-                    $("#icsTextZyReq").text(" "+mzPatientMiIcdText);
-                }else {
-                    var mzPatientMiIcdCode = formatUnderline(mzZyReq.icdCode,12);
+                    var mzPatientMiIcdText = formatUnderline(mzZyReq.icdText, 29);
+                    $("#icsTextZyReq").text(" " + mzPatientMiIcdText);
+                } else {
+                    var mzPatientMiIcdCode = formatUnderline(mzZyReq.icdCode, 12);
                     $("#icsCodeZyReq").text(mzPatientMiIcdCode);
-                    var mzPatientMiIcdText = formatUnderline(mzZyReq.icdText,29);
+                    var mzPatientMiIcdText = formatUnderline(mzZyReq.icdText, 29);
                     $("#icsTextZyReq").text(mzPatientMiIcdText);
                 }
-                var mzZyReqReqWard = formatUnderline(mzZyReq.reqWard,6);
+                var mzZyReqReqWard = formatUnderline(mzZyReq.reqWard, 6);
                 $("#reqDeptZyReq").text(mzZyReqReqWard);
-                var mzZyReqSmallDept = formatUnderline(mzZyReq.smallDept,27);
+                var mzZyReqSmallDept = formatUnderline(mzZyReq.smallDept, 27);
                 $("#smallDeptZyReq").text(mzZyReqSmallDept);
                 //$("#admissStatusZyReq").text(mzZyReq.admissStatus);
-                $("input:checkbox[value='"+mzZyReq.admissStatus+"']").attr('checked','true');
-                var mzZyReqVisitDate = formatUnderline(format(mzZyReq.visitDate, "yyyy-MM-dd HH:mm:ss"),37);
+                $("input:checkbox[value='" + mzZyReq.admissStatus + "']").attr('checked', 'true');
+                var mzZyReqVisitDate = formatUnderline(format(mzZyReq.visitDate, "yyyy-MM-dd HH:mm:ss"), 37);
                 $("#visitDateZyReq").text(mzZyReqVisitDate);
-                var mzZyReqDeptCode = formatUnderline(mzZyReq.deptCode,15);
+                var mzZyReqDeptCode = formatUnderline(mzZyReq.deptCode, 15);
                 $("#deptCodeZyReq").text(mzZyReqDeptCode);
-                var mzZyReqDoctorCode = formatUnderline(mzZyReq.doctorCode,16);
+                var mzZyReqDoctorCode = formatUnderline(mzZyReq.doctorCode, 16);
                 $("#doctorCodeZyReq").text(mzZyReqDoctorCode);
                 LODOP.ADD_PRINT_HTM("0mm", "5mm", "140mm", "200mm", strStyle + document.getElementById("mz_zy_req_table").innerHTML);
                 if (printType == 1) {