Explorar o código

优化患者信息查询

hurugang %!s(int64=2) %!d(string=hai) anos
pai
achega
66279ffa62

+ 59 - 43
src/main/resources/static/js/mz/clinic.js

@@ -805,7 +805,7 @@ $(function () {
      * 快速接诊页面 -未挂号患者信息查询处编辑患者信息
      */
     $("#rapidAcceptsEditUser").on("click", function (t) {
-        editUserModal($("#rapidAcceptsUserCode").val());
+        editUserModal($("#rapidAcceptsUserCode").val(),2);
     });
 });
 
@@ -2293,11 +2293,11 @@ function fitJcjyContent(jcjyPrescription, contentId, titleId, checkBox) {
         }
         var drugQuan = jcjy.drugQuan;
         if (drugQuan != undefined && drugQuan != null && drugQuan != "") {
-            jcjyHtml += " 单量:" + drugQuan+drugUnit;
+            jcjyHtml += " 单量:" + drugQuan + drugUnit;
         }
         var orderDays = jcjy.orderDays;
         if (orderDays != undefined && orderDays != null && orderDays != "") {
-            jcjyHtml += " 天数:" + orderDays+"天";
+            jcjyHtml += " 天数:" + orderDays + "天";
         }
         var frequency = jcjy.frequency;
         if (frequency != undefined && frequency != null && frequency != "") {
@@ -2305,7 +2305,7 @@ function fitJcjyContent(jcjyPrescription, contentId, titleId, checkBox) {
         }
         var quantity = jcjy.quantity;
         if (quantity != undefined && quantity != null && quantity != "") {
-            jcjyHtml += " 总量:" + quantity+drugUnit;
+            jcjyHtml += " 总量:" + quantity + drugUnit;
         }
         if (checkBox) {
             jcjyHtml += "</span>";
@@ -4484,7 +4484,7 @@ function saveZlItemReal(calculateTotalAmountFlag) {
         html += chargeUnit;
     }
     if (dayZlNum != null && dayZlNum != "") {
-        html += " 天数:" + dayZlNum+"天";
+        html += " 天数:" + dayZlNum + "天";
     }
     if (orderFrequencyZl != null && orderFrequencyZl != "") {
         html += " 频次:" + orderFrequencyZl;
@@ -5004,20 +5004,31 @@ function calculateTotalAmount() {
 /**
  * 打开编辑用户信息窗口
  * @param data
+ * @param type 1 患者详情处编辑 2 快速接诊处编辑  3 就诊详情预览
  */
-function editUserModal(patientId) {
+function editUserModal(patientId,type) {
+    if(type==3){
+        $("#editUserModalTitle").html("患者档案【预览】");
+        $("#saveEditUser").removeClass("in").addClass("hide");
+    }else {
+        $("#editUserModalTitle").html("患者档案【修改】");
+        $("#saveEditUser").removeClass("hide").addClass("in");
+    }
+    $("#openSource").val(type);
     if (patientId == null) {
         //医生工作台发起
         patientId = $("#patientId").text();
-    } else {
-        //快速接诊界面发起
-        clearRapidAccepts();
     }
+    // else {
+    //     //快速接诊界面发起
+    //     clearRapidAccepts();
+    // }
     if (patientId == null || patientId == "null" || patientId == "") {
         errorMesageSimaple("请输入需要编辑的患者信息");
         return;
     }
     $("#rapidAcceptsModal").modal("hide");
+    $("#visitingDetailModal").modal("hide");
     $("#editUserModal").modal();
     $.ajax({
         type: "GET",
@@ -6174,15 +6185,16 @@ function checkYpInfo(code, serial, groupNo, needNotice, orderNo) {
  * @param res
  * @param projectDesc
  */
-function hintProjectSelfPayInfo(selfpayProp,projectDesc) {
-    if (selfpayProp != null) {
+function hintProjectSelfPayInfo(selfpayProp, projectDesc) {
+    var zgmztczf = $("#zgmztczf").val();
+    if ((zgmztczf == 1 || zgmztczf == "1") && selfpayProp != null) {
         selfpayProp = Number(selfpayProp);
         if (selfpayProp > 0) {
-            var titile = "当前项目含自费"+projectDesc+",请与患者提前确认是否继续使用,并签署自费承诺书!";
+            var titile = "当前项目含自费" + projectDesc + ",请与患者提前确认是否继续使用,并签署自费承诺书!";
             if (selfpayProp < 1) {
-                titile = "当前项目含部分自费"+projectDesc+",请与患者提前确认是否继续使用,并签署自费承诺书!";
+                titile = "当前项目含部分自费" + projectDesc + ",请与患者提前确认是否继续使用,并签署自费承诺书!";
             }
-           warningMesageSimaple(titile);
+            warningMesageSimaple(titile);
         }
     }
 }
@@ -6212,7 +6224,7 @@ function checkZyInfo(code, serial, async) {
             }
             if (res.code == 0) {
                 if (res.data != null) {
-                    hintProjectSelfPayInfo(res.data.selfpayProp,"药品");
+                    hintProjectSelfPayInfo(res.data.selfpayProp, "药品");
                     //如果
                     if ($("#zyTab").find("li") == null || $("#zyTab").find("li").length == 0) {
                         initNavTabs(1);
@@ -6488,7 +6500,7 @@ function loadZlItemList(event) {
             };
         },
         onClickRow: function (row, $element) {
-            hintProjectSelfPayInfo(row.selfpayProp,"诊疗");
+            hintProjectSelfPayInfo(row.selfpayProp, "诊疗");
             $('#zlItem').webuiPopover('hide');
             $("#zlExecUnit").selectpicker('val', row.execUnit);//默认不选中
             $("#zlExecUnit").selectpicker('refresh');
@@ -6545,7 +6557,7 @@ function checkJcJyItemInfo(code, name, type, async) {
             }
             if (res.code == 0) {
                 if (res.data != null) {
-                    hintProjectSelfPayInfo(res.selfpayProp,type==1?"检验":"辅助检查");
+                    hintProjectSelfPayInfo(res.selfpayProp, type == 1 ? "检验" : "辅助检查");
                     //如果
                     if ($("#jcjyTab").find("li") == null || $("#jcjyTab").find("li").length == 0) {
                         initNavTabs(2);
@@ -7055,7 +7067,7 @@ function autoAddGroupId(res) {
  * @param groupNo
  */
 function fitWesternMedicine(res, groupNo) {
-    hintProjectSelfPayInfo(res.data.selfpayProp,"药品");
+    hintProjectSelfPayInfo(res.data.selfpayProp, "药品");
     autoAddGroupId(res);
     $("#categoriesFlag").val(res.data.categoriesFlag);
     //prevCategoriesFlag = res.data.categoriesFlag;
@@ -7343,6 +7355,13 @@ function clearPlusPatinet() {
     $("#editUserAddress").val(null);
     $("#editUserContact").val(null);
     $("#editUserContactPhone").val(null);
+    var openSource=$("#openSource").val();
+    if(openSource==2 || openSource=='2'){
+        $("#rapidAcceptsModal").modal();
+    }else  if(openSource==3 || openSource=='3'){
+        $("#visitingDetailModal").modal();
+    }
+    $("#openSource").val(null);
 }
 
 
@@ -7941,7 +7960,7 @@ function getParamsForpPrescription(type) {
  * 保存处方
  */
 function savePrescription() {
-    if(!verifyInsuranceInfo()){
+    if (!verifyInsuranceInfo()) {
         return;
     }
     //关闭帮助框
@@ -8463,7 +8482,7 @@ function prescriptionDetailCommon(patientId, times, clnicId, payMark, type) {
                 $("#visitingDetailModal").modal();
                 var jsonData = res.data;
                 var mzPatientMi = res.mzPatientMi;
-                $("#visitingDetailPatientName").text(mzPatientMi.name);
+                $("#visitingDetailPatientName").html('<a onclick="editUserModal(\'' + mzPatientMi.patientId + '\',3)" style=\'cursor: pointer;\'>' + mzPatientMi.name + '</a>');
                 $("#visitingDetailPatientAge").text(mzPatientMi.ageString);
                 $("#visitingDetailPatientGender").val(mzPatientMi.gender);
                 $("#prescriptionDetail_zd").html("");
@@ -8933,7 +8952,7 @@ function printPrescription(patientId, times, clnicId, payMark, printType) {
                     //LODOP.SET_PRINT_STYLE("FontSize", 8); //字体大小
                     var strStyle = "<style>table{width: 96%;} table,td,th {}</style>";
                     var mzPatientMi = res.mzPatientMi;
-                    var deptName=res.deptName;
+                    var deptName = res.deptName;
                     $("#patientNamePrescription").text(mzPatientMi.name);
                     $("#patientGenderPrescription").text(mzPatientMi.gender);
                     $("#patientAgePrescription").text(mzPatientMi.ageString);
@@ -9242,34 +9261,34 @@ function printPrescription(patientId, times, clnicId, payMark, printType) {
                                 return;
                             }
                             if (res.code == 0) {
-                                var selfPayList=res.selfPayList;
-                                if(selfPayList!=null && selfPayList.length>0){
+                                var selfPayList = res.selfPayList;
+                                if (selfPayList != null && selfPayList.length > 0) {
                                     $("#patientNameSelfPay").text(mzPatientMi.name);
                                     $("#patientGenderSelfPay").text(mzPatientMi.gender);
                                     $("#patientAgeSelfPay").text(mzPatientMi.ageString);
                                     $("#patientIdSelfPay").text(mzPatientMi.patientId);
                                     $("#deptSelfPay").text(deptName);
                                     $("#zdSelfPay").text(res.icdText);
-                                    var selfPayListHtml="";
-                                    for(var i=1;i<=selfPayList.length;i++){
-                                        selfPayListHtml+="<tr><td>";
-                                        selfPayListHtml+=i+"."+selfPayList[i-1];
-                                        selfPayListHtml+="</td></tr>";
+                                    var selfPayListHtml = "";
+                                    for (var i = 1; i <= selfPayList.length; i++) {
+                                        selfPayListHtml += "<tr><td>";
+                                        selfPayListHtml += i + "." + selfPayList[i - 1];
+                                        selfPayListHtml += "</td></tr>";
                                     }
                                     $("#selfPayDetail").html(selfPayListHtml);
                                     if (index > 0) {
                                         LODOP.NewPageA();
                                     }
                                     //view-source:http://www.c-lodop.com/demolist/PrintSample43.html  分页看这里
-                                    LODOP.ADD_PRINT_TABLE(158,"5%","90%",400,strStyle+document.getElementById("self_pay_table_body").innerHTML);
-                                    LODOP.SET_PRINT_STYLEA(0,"Vorient",3);
-                                    LODOP.ADD_PRINT_HTM(26,"5%","90%",119,document.getElementById("self_pay_table_header").innerHTML);
-                                    LODOP.SET_PRINT_STYLEA(0,"ItemType",1);
-                                    LODOP.SET_PRINT_STYLEA(0,"LinkedItem",-1);
-                                    LODOP.ADD_PRINT_HTM(560,"5%","90%",200,document.getElementById("self_pay_table_foot").innerHTML);
-                                    LODOP.SET_PRINT_STYLEA(0,"ItemType",1);
-                                    LODOP.SET_PRINT_STYLEA(0,"LinkedItem",-1);
-                                   // LODOP.ADD_PRINT_HTM("0mm", "5mm", "140mm", "200mm", strStyle + document.getElementById("self_pay_table").innerHTML);
+                                    LODOP.ADD_PRINT_TABLE(158, "5%", "90%", 400, strStyle + document.getElementById("self_pay_table_body").innerHTML);
+                                    LODOP.SET_PRINT_STYLEA(0, "Vorient", 3);
+                                    LODOP.ADD_PRINT_HTM(26, "5%", "90%", 119, document.getElementById("self_pay_table_header").innerHTML);
+                                    LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
+                                    LODOP.SET_PRINT_STYLEA(0, "LinkedItem", -1);
+                                    LODOP.ADD_PRINT_HTM(560, "5%", "90%", 200, document.getElementById("self_pay_table_foot").innerHTML);
+                                    LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
+                                    LODOP.SET_PRINT_STYLEA(0, "LinkedItem", -1);
+                                    // LODOP.ADD_PRINT_HTM("0mm", "5mm", "140mm", "200mm", strStyle + document.getElementById("self_pay_table").innerHTML);
                                     index++;
                                 }
                                 if (res.data != null && res.data.length > 0) {
@@ -11150,7 +11169,6 @@ function printNoThirdParty() {
 }
 
 
-
 /**
  * 打印外伤无第三方责任承诺书
  * @param printType 打印模式 1 预览打印  2 打印设置
@@ -11170,8 +11188,8 @@ function printNoThirdPartyCommon(printType) {
     LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME", title);//对新建的纸张重命名
     LODOP.SET_PREVIEW_WINDOW(0, 2, 0, 700, 900, "");
     //LODOP.SET_PRINT_STYLE("FontSize", 8); //字体大小
-   // var strStyle = "<style>table{width: 96%;}</style>";
-    var strStyle="<style>table{width: 96%;margin-top: 20px;margin-bottom: 10px;} table,th {border-width: 1px;border-style: solid;border-collapse: collapse}</style>";
+    // var strStyle = "<style>table{width: 96%;}</style>";
+    var strStyle = "<style>table{width: 96%;margin-top: 20px;margin-bottom: 10px;} table,th {border-width: 1px;border-style: solid;border-collapse: collapse}</style>";
     LODOP.ADD_PRINT_HTM("0mm", "5mm", "140mm", "200mm", strStyle + document.getElementById("print_no_third_party_table").innerHTML);
     if (printType == 1) {
         LODOP.PREVIEW();
@@ -11189,8 +11207,6 @@ function printSelfPay() {
 }
 
 
-
-
 /**
  * 打印自费承诺书
  * @param printType 打印模式 1 预览打印  2 打印设置
@@ -11211,7 +11227,7 @@ function printSelfPayCommon(printType) {
     //LODOP.SET_PRINT_STYLE("FontSize", 8); //字体大小
     // var strStyle = "<style>table{width: 96%;}</style>";
     //table,th {border-width: 1px;border-style: solid;border-collapse: collapse}
-    var strStyle="<style>table{width: 96%;margin-top: 20px;margin-bottom: 10px;} </style>";
+    var strStyle = "<style>table{width: 96%;margin-top: 20px;margin-bottom: 10px;} </style>";
     LODOP.ADD_PRINT_HTM("0mm", "5mm", "140mm", "200mm", strStyle + document.getElementById("self_pay_table").innerHTML);
     if (printType == 1) {
         LODOP.PREVIEW();

+ 3 - 2
src/main/resources/templates/mz/clinic.html

@@ -379,7 +379,7 @@
                            onclick="fetchSpcSlwinfo()" id="fetchSpcSlwinfo"><i
                                 class="fa fa-eye">&nbsp;&nbsp;特门详情</i></a>
                         <a style="cursor: pointer;font-size: 14px;color: #2e69eb!important;margin-right: 10px;display: none"
-                           onclick="editUserModal(null)" id="editUser"><i
+                           onclick="editUserModal(null,1)" id="editUser"><i
                                 class="fa fa-edit">&nbsp;&nbsp;编辑</i></a>
                         <a onclick="clearUser(true)"
                            style="cursor: pointer;font-size: 14px;color: #2e69eb!important;display: none"
@@ -1349,7 +1349,7 @@
                 <button type="button" class="close" data-dismiss="modal" onclick="clearPlusPatinet()"><span
                         aria-hidden="true">×</span>
                 </button>
-                <h4 class="modal-title modal-title-thmz">患者档案【修改】</h4>
+                <h4 class="modal-title modal-title-thmz" id="editUserModalTitle">患者档案【修改】</h4>
             </div>
             <div class="modal-body">
                 <form class="form-horizontal form-label-left" novalidate id="editUserForm" autocomplete="off">
@@ -1533,6 +1533,7 @@
                 </form>
             </div>
             <div class="modal-footer">
+                <input id="openSource" type="hidden"/>
                 <button type="button" class="btn btn-primary" id="saveEditUser">保存</button>
                 <button type="button" class="btn btn-default" data-dismiss="modal" onclick="clearPlusPatinet()">取消
                 </button>