lihong 11 місяців тому
батько
коміт
2b86e4c039
1 змінених файлів з 27 додано та 0 видалено
  1. 27 0
      src/main/resources/static/js/mz/mz_bl_record.js

+ 27 - 0
src/main/resources/static/js/mz/mz_bl_record.js

@@ -135,9 +135,11 @@ function initMzBlRecordList() {
                 valign: 'middle',
                 formatter: function (value, row, index) {
                     var str = '<button type="button" class="btn btn-primary  btn-sm" onclick="showMzBlRecordModal(\'' + row.patientId + '\',' + row.times + ',3)">预览<i class="fa fa-eye" style="margin-left: 10px;"></i></button>';
+                    str += '<button type="button" class="btn btn-primary  btn-sm" onclick="openMzEmr(\'' + row.patientId + '\',' + row.times + ',2)">门诊电子病历<i class="fa fa-eye" style="margin-left: 10px;"></i></button>';
                     str += '<button type="button" class="btn btn-primary  btn-sm" onclick="showMzBlRecordModal(\'' + row.patientId + '\',' + row.times + ',1)">编辑<i class="fa fa-edit" style="margin-left: 10px;"></i></button>';
                     str += '<button type="button" class="btn btn-primary  btn-sm" onclick="printBlRecord(\'' + row.patientId + '\',' + row.times + ',1)">打印<i class="fa fa-print" style="margin-left: 10px;"></i></button>';
                     str += '<button type="button" class="btn btn-primary  btn-sm" onclick="printBlRecord(\'' + row.patientId + '\',' + row.times + ',2)">打印设置<i class="fa fa-cog" style="margin-left: 10px;"></i></button>';
+
                     return [str].join('');
                 }
             },
@@ -517,6 +519,31 @@ function getTz(mzBlRecord) {
 }
 
 
+function openMzEmr(patientId, times, type) {
+    $.ajax({
+        type: "GET",
+        url: '/thmz/getMzjsdHost',
+        dataType: "json",
+        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
+        success: function (res) {
+            if (res == '401' || res == 401) {
+                window.location.href = '/thmz/login/view'
+                return;
+            }
+            if (res.code == 0) {
+                let  userIdCode = localStorage.getItem("userIdCode");
+                let patNo = window.btoa(JSON.stringify({
+                        patientId:patientId,
+                        times: Number(times),
+                        userIdCode:userIdCode
+                    })
+                )
+                window.open(`${res.data}/mzEmr/${patNo}`, '_blank');
+            }
+        }
+    });
+}
+
 /**
  * 加载病历信息编辑预览
  * @param patientId