| 
					
				 | 
			
			
				@@ -1,4 +1,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //@ sourceURL=mz_bl_record.js 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+var LODOP; //声明为全局变量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//默认打印机下标 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+var printIndex = -1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 $(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     daterangepicker(initMzBlRecordList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     initSelect(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -128,8 +131,8 @@ function initMzBlRecordList() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 align: "center", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 valign: 'middle', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 formatter: function (value, row, index) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    var str = '<button type="button" class="btn btn-primary  btn-sm" onclick="updateZdChargeItem(\'' + row.code + '\')">编辑<i class="fa fa-edit" style="margin-left: 10px;"></i></button>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    str += '<button type="button" class="btn btn-primary  btn-sm" onclick="updateZdChargeItem(\'' + row.code + '\')">打印<i class="fa fa-print" style="margin-left: 10px;"></i></button>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    var str = '<button type="button" class="btn btn-primary  btn-sm" onclick="showMzBlRecordModal(\'' + row.patientId + '\','+row.times+')">编辑<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+')">打印<i class="fa fa-print" style="margin-left: 10px;"></i></button>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     return [str].join(''); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -239,3 +242,387 @@ function initSelect() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     initDeptSelect(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 查询默认打印机 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function setPrint() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (printIndex >= 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        type: "GET", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        url: '/thmz/getLastWindowsByCurrentUser', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        contentType: "application/json;charset=UTF-8", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        dataType: "json", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        async: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        success: function (res) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (res == '401' || res == 401) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                window.location.href = '/thmz/login/view' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (res.code == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                printIndex = res.data.cgPrintIndex; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                printIndex = -1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 打印门诊病历 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * @param patientId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * @param times 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * @param clnicId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * @param payMark 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function printBlRecord(patientId, times) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        type: "GET", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        url: '/thmz/getMzBlrecord?patientId=' + patientId + '×=' + times, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        contentType: "application/json;charset=UTF-8", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        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) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                setPrint(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LODOP = getLodop(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LODOP.PRINT_INITA(6, 0, "148mm", "210mm", "湖南泰和医院门诊病历"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LODOP.SET_PRINT_STYLE("FontSize", 9); //字体大小 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //设置默认打印机 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LODOP.SET_PRINTER_INDEX(printIndex); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "148mm"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "210mm"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LODOP.SET_PRINT_PAGESIZE(1, "148mm", "210mm", "CreateCustomPage"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME", "门诊病历");//对新建的纸张重命名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //intDispMode:预览比例,数字型,0-适高  1-正常大小  2-适宽 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //intToolMode:工具条和按钮,数字型  0-显示(上方)工具栏   1-显示(下方)按钮栏    2-两个都显示   3-两个都不显示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //blDirectPrint: 打印按钮是否“直接打印” 1-是  0-否(弹出界面“选机打印”) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //intWidth,intHeight 窗口的宽和高,整数型,单位是px 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //strTitleButtonCaptoin 预览窗口和打印按钮的名称组合,字符型,用“点”分隔 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //LODOP.SET_PREVIEW_WINDOW(intDispMode,intToolMode,blDirectPrint,intWidth,intHeight,strTitleButtonCaptoin) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LODOP.SET_PREVIEW_WINDOW(0, 2, 0, 700, 900, ""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //LODOP.SET_PRINT_STYLE("FontSize", 8); //字体大小 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var strStyle = "<style>table{width: 96%;} table,td,th {}</style>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var mzPatientMi = res.mzPatientMi; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $("#patientIdBlrecord").text(mzPatientMi.patientId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $("#patientNameBlrecord").text(mzPatientMi.name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $("#patientGenderBlrecord").text(mzPatientMi.gender); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $("#patientAgeBlrecord").text(mzPatientMi.age + "岁"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var mzBlRecord = res.mzBlRecord; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.firstOrNot == "1") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#firstOrNotTitle").text("复诊"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#firstOrNotTitle").text("初诊"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.emrChiefComplaint != null && mzBlRecord.emrChiefComplaint != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#emrChiefComplaintBlrecord").text(mzBlRecord.emrChiefComplaint); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#emrChiefComplaintBlrecord").parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#emrChiefComplaintBlrecord").parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.emrHpi != null && mzBlRecord.emrHpi != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#emrHpiBlrecord").text(mzBlRecord.emrHpi); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#emrHpiBlrecord").parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#emrHpiBlrecord").parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.emrPs != null && mzBlRecord.emrPs != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#emrPsBlrecord").text(mzBlRecord.emrPs); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#emrPsBlrecord").parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#emrPsBlrecord").parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.personalHistory != null && mzBlRecord.personalHistory != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#personalHistoryBlrecord").text(mzBlRecord.personalHistory); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#personalHistoryBlrecord").parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#personalHistoryBlrecord").parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.familyHistory != null && mzBlRecord.familyHistory != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#familyHistoryBlrecord").text(mzBlRecord.familyHistory); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#familyHistoryBlrecord").parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#familyHistoryBlrecord").parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.obstericalHistory != null && mzBlRecord.obstericalHistory != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#obstericalHistoryBlrecord").text(mzBlRecord.obstericalHistory); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#obstericalHistoryBlrecord").parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#obstericalHistoryBlrecord").parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var tz = getTz(mzBlRecord); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (tz != null && tz != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#tzjcBlrecord").text(tz); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#tzjcBlrecord").parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#tzjcBlrecord").parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.emrPe != null && mzBlRecord.emrPe != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#emrPeBlrecord").text(mzBlRecord.emrPe); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#emrPeBlrecord").parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#emrPeBlrecord").parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (res.icdText != null && res.icdText != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#icdTextBlrecord").text(res.icdText); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#icdTextBlrecord").parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#icdTextBlrecord").parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.emrProcess != null && mzBlRecord.emrProcess != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#emrProcessBlrecord").html(mzBlRecord.emrProcess); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#emrProcessBlrecord").parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#emrProcessBlrecord").parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.emrJkjy != null && mzBlRecord.emrJkjy != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#emrJkjyBlrecord").text(mzBlRecord.emrJkjy); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#emrJkjyBlrecord").parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#emrJkjyBlrecord").parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $("#visitDeptBlrecord").text(res.deptName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $("#visitDoctorBlrecord").text(res.doctorName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $("#visitDateBlrecord").text(res.visitDate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LODOP.ADD_PRINT_HTM("0mm", "5mm", "140mm", "200mm", strStyle + document.getElementById("mz_blrecord_card_table").innerHTML); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LODOP.PREVIEW(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                errorMesage(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 构建体征描述 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * @param mzBlRecord 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * @returns {*} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function getTz(mzBlRecord) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var tz = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (mzBlRecord.weight != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        var temp = "体重:" + mzBlRecord.weight + "kg "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (tz == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tz = temp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tz += " " + temp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (mzBlRecord.temperature != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        var temp = "体温:" + mzBlRecord.temperature + "℃ "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (tz == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tz = temp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tz += " " + temp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (mzBlRecord.sphygmus != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        var temp = "脉搏:" + mzBlRecord.sphygmus + "次/分 "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (tz == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tz = temp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tz += " " + temp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (mzBlRecord.breathe != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        var temp = "呼吸:" + mzBlRecord.breathe + "次/分 "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (tz == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tz = temp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tz += " " + temp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (mzBlRecord.pressureHigh != null && mzBlRecord.pressureFloor != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        var temp = "血压:" + mzBlRecord.pressureHigh + "/" + mzBlRecord.pressureFloor; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (tz == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tz = temp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tz += " " + temp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (mzBlRecord.pressureHighLeft != null && mzBlRecord.pressureFloorLeft != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        var temp = "左血压:" + mzBlRecord.pressureHighLeft + "/" + mzBlRecord.pressureFloorLeft; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (tz == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tz = temp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tz += " " + temp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return tz; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 加载病历信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * @param patientId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * @param times 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function showMzBlRecordModal(patientId, times) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        type: "GET", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        url: '/thmz/getMzBlrecord?patientId=' + patientId + '×=' + times, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        contentType: "application/json;charset=UTF-8", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        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) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var mzPatientMi = res.mzPatientMi; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $("#editPatientId").text(mzPatientMi.patientId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $("#editPatientName").text(mzPatientMi.name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $("#editPatientGender").text(mzPatientMi.gender); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $("#editPatientAge").text(mzPatientMi.age + "岁"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var mzBlRecord = res.mzBlRecord; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // if (mzBlRecord.firstOrNot == "1") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //     $("#firstOrNotTitle").text("复诊"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //     $("#firstOrNotTitle").text("初诊"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.emrChiefComplaint != null && mzBlRecord.emrChiefComplaint != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editEmrChiefComplaint").val(mzBlRecord.emrChiefComplaint); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editEmrChiefComplaint").parent().parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editEmrChiefComplaint").parent().parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.emrHpi != null && mzBlRecord.emrHpi != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editEmrHpi").val(mzBlRecord.emrHpi); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editEmrHpi").parent().parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editEmrHpi").parent().parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.emrPs != null && mzBlRecord.emrPs != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editEmrPs").val(mzBlRecord.emrPs); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editEmrPs").parent().parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editEmrPs").parent().parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.personalHistory != null && mzBlRecord.personalHistory != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editPersonalHistory").val(mzBlRecord.personalHistory); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editPersonalHistory").parent().parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editPersonalHistory").parent().parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.familyHistory != null && mzBlRecord.familyHistory != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editFamilyHistory").val(mzBlRecord.familyHistory); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editFamilyHistory").parent().parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editFamilyHistory").parent().parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.obstericalHistory != null && mzBlRecord.obstericalHistory != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editObstericalHistory").val(mzBlRecord.obstericalHistory); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editObstericalHistory").parent().parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editObstericalHistory").parent().parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var tz = getTz(mzBlRecord); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (tz != null && tz != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editTgjc").val(tz); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editTgjc").parent().parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editTgjc").parent().parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.emrPe != null && mzBlRecord.emrPe != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editQtjc").val(mzBlRecord.emrPe); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editQtjc").parent().parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editQtjc").parent().parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (res.icdText != null && res.icdText != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editZd").val(res.icdText); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editZd").parent().parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editZd").parent().parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.emrProcess != null && mzBlRecord.emrProcess != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    var reg = new RegExp("</br>","g");//g,表示全部替换。 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editEmrProcess").val(mzBlRecord.emrProcess.replace(reg,"\n")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editEmrProcess").parent().parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editEmrProcess").parent().parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (mzBlRecord.emrJkjy != null && mzBlRecord.emrJkjy != "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editEmrJkjy").text(mzBlRecord.emrJkjy); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editEmrJkjy").parent().parent().css("display", "block"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("#editEmrJkjy").parent().parent().css("display", "none"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $("#mzBlTimes").val(mzBlRecord.times); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $("#editMzBlRecordModal").modal(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                errorMesage(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 保存门诊病历 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function setEmrProcess() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        type: "POST", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        url: '/thmz/setEmrProcess', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        contentType: "application/json;charset=UTF-8", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        dataType: "json", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        data: JSON.stringify({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "patientId": $("#editPatientId").text(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "times": $("#mzBlTimes").val(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "emrProcess": $("#newEmrProcess").val() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        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) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                clearInput(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                successMesage(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $("#editMzBlRecordModal").modal("hide"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                errorMesage(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 情况区域 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function clearInput() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $("#editPatientId").text(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $("#editPatientName").text(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $("#editPatientGender").text(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $("#editPatientAge").text(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $("#editEmrChiefComplaint").val(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $("#editEmrHpi").val(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $("#editEmrPs").val(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $("#editPersonalHistory").val(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $("#editFamilyHistory").val(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $("#editObstericalHistory").val(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $("#editTgjc").val(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $("#editQtjc").val(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $("#editZd").val(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $("#editEmrProcess").val(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $("#editEmrJkjy").val(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $("#newEmrProcess").val(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $("#mzBlTimes").val(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 |