|
@@ -1044,6 +1044,14 @@ function realClinicalReception(patientId, serialNo) {
|
|
|
*/
|
|
|
function clearWorkSpace() {
|
|
|
clearUser();
|
|
|
+ clearWorkSpaceExcludeUser();
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 清空工作台除了用户信息
|
|
|
+ */
|
|
|
+function clearWorkSpaceExcludeUser() {
|
|
|
$("#symptom").val(null);
|
|
|
$("#emrHpi").val(null);
|
|
|
$("#emrPs").val(null);
|
|
@@ -1074,7 +1082,6 @@ function clearWorkSpace() {
|
|
|
$("#totalAmount").text(0);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 医疗范文详情预览
|
|
|
* @param id
|
|
@@ -1369,7 +1376,7 @@ function editPrescription(jsonData) {
|
|
|
* 调用医疗范文
|
|
|
*/
|
|
|
function callTemplate() {
|
|
|
- clearWorkSpace();
|
|
|
+ clearWorkSpaceExcludeUser();
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
url: '/thmz/increaseNumber?id=' + $("#idTemplate").val(),
|
|
@@ -4781,20 +4788,20 @@ function zTreeOnClick(event, treeId, treeNode) {
|
|
|
*/
|
|
|
function getParamsForpPrescription() {
|
|
|
var codes = $("#diagnoseValue").val();
|
|
|
- var icdCode=null;
|
|
|
- if(codes!=null && codes.length>0){
|
|
|
- var arr = codes.split(",");
|
|
|
- if(arr!=null){
|
|
|
- for (i=0;i<arr.length;i++){
|
|
|
- if(arr[i]!=""){
|
|
|
- if(icdCode==null){
|
|
|
- icdCode=arr[i];
|
|
|
- }else {
|
|
|
- icdCode+=","+arr[i];
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ var icdCode = null;
|
|
|
+ if (codes != null && codes.length > 0) {
|
|
|
+ var arr = codes.split(",");
|
|
|
+ if (arr != null) {
|
|
|
+ for (i = 0; i < arr.length; i++) {
|
|
|
+ if (arr[i] != "") {
|
|
|
+ if (icdCode == null) {
|
|
|
+ icdCode = arr[i];
|
|
|
+ } else {
|
|
|
+ icdCode += "," + arr[i];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
var jsonData = JSON.parse('{"patientId": "","firstOrNot":"","icdCode": "","icdText": null,"jzFlag": "0","serialNo":"","mzBlRecord": {"firstOrNot": "","emrChiefComplaint": "","emrHpi": "","emrPs": "","emrPe": "","emrFzjc": null,"emrProcess": null,"emrXyy": "无","emrYypg": "无","emrGnpg": "无","emrJkjy": "","personalHistory": "","familyHistory": "","obstericalHistory": "","weight": "","temperature": "","sphygmus": "","breathe": "","pressureHigh": "","pressureFloor": "","pressureHighLeft": "","pressureFloorLeft": "","tentativeDiagnosis":"","prescriptionDetail":""},"mzChargeDetailList": [],"mzYjReqList": []}');
|
|
|
jsonData.patientId = $("#patientId").val();
|
|
@@ -4840,7 +4847,7 @@ function getParamsForpPrescription() {
|
|
|
// } else if (i != xyTabContents.length - 1) {
|
|
|
// emrProcess += "_";
|
|
|
// }
|
|
|
- // var detailPrescription = JSON.parse('{"amount":"","detail":[]}');
|
|
|
+ // var detailPrescription = JSON.parse('{"amount":"","detail":[]}');
|
|
|
for (var j = 0; j < formGroups.length; j++) {
|
|
|
// var cfAmount = $(xyTabContents[i]).find("span.cf_amount").parent().text();
|
|
|
// emrProcess += $(formGroups[j]).text().replace(cfAmount, "") + "-";
|
|
@@ -4904,7 +4911,7 @@ function getParamsForpPrescription() {
|
|
|
emrProcess += "付数" + zyfs + "_";
|
|
|
//中药的类型
|
|
|
var currentZyClassType = $("#current_zyClassType").val();
|
|
|
- // var detailPrescription = JSON.parse('{"amount":"","zyfs":"","frequency":"","cyJssm":"","cyDj":"","cyFysm":"","detail":[]}');
|
|
|
+ // var detailPrescription = JSON.parse('{"amount":"","zyfs":"","frequency":"","cyJssm":"","cyDj":"","cyFysm":"","detail":[]}');
|
|
|
for (var i = 0; i < zyTabContents.length; i++) {
|
|
|
// var cfAmount = $(zyTabContents[i]).find("span.cf_amount").parent().text();
|
|
|
// emrProcess += $(zyTabContents[i]).text().replace(cfAmount, "") + "-";
|
|
@@ -4928,7 +4935,7 @@ function getParamsForpPrescription() {
|
|
|
tempJson.orderNo = orderNo;
|
|
|
tempJson.groupNo = currentZyClassType;
|
|
|
jsonData.mzChargeDetailList[jsonData.mzChargeDetailList.length] = tempJson;
|
|
|
- // detailPrescription.detail[detailPrescription.detail.length] = $(zyTabContents[i]).text();
|
|
|
+ // detailPrescription.detail[detailPrescription.detail.length] = $(zyTabContents[i]).text();
|
|
|
}
|
|
|
// detailPrescription.zyfs = zyfs;
|
|
|
// detailPrescription.frequency = $('#zy_orderFrequency_1 option:selected').text();
|
|
@@ -4982,7 +4989,7 @@ function getParamsForpPrescription() {
|
|
|
tempJson.orderNo = orderNo;
|
|
|
jsonData.mzYjReqList[jsonData.mzYjReqList.length] = tempJson;
|
|
|
}
|
|
|
- // detailPrescription.detail[detailPrescription.detail.length] = $(zlTabContents[i]).text();
|
|
|
+ // detailPrescription.detail[detailPrescription.detail.length] = $(zlTabContents[i]).text();
|
|
|
}
|
|
|
// detailPrescription.amount = $(arrs[orderNo - 1]).text();
|
|
|
// jsonDataPrescription.zlPrescription[jsonDataPrescription.zlPrescription.length] = detailPrescription;
|
|
@@ -5537,28 +5544,28 @@ function prescriptionDetailCommon(patientId, times, clnicId, payMark, type) {
|
|
|
if (zyArr != null && zyArr.length > 0) {
|
|
|
var zyhtml = "";
|
|
|
for (var i = 1; i < zyArr.length; i++) {
|
|
|
- if(i%4==1){
|
|
|
- zyhtml +='<div class="item form-group" style="margin-bottom: -5px;">';
|
|
|
+ if (i % 4 == 1) {
|
|
|
+ zyhtml += '<div class="item form-group" style="margin-bottom: -5px;">';
|
|
|
}
|
|
|
- zyhtml +='<div class="col-md-3 col-sm-3 col-xs-12">';
|
|
|
+ zyhtml += '<div class="col-md-3 col-sm-3 col-xs-12">';
|
|
|
zyhtml += zyArr[i];
|
|
|
zyhtml += "</div>";
|
|
|
- if(i%4==0){
|
|
|
- zyhtml +='</div>';
|
|
|
+ if (i % 4 == 0) {
|
|
|
+ zyhtml += '</div>';
|
|
|
}
|
|
|
}
|
|
|
var zyfs = zyArr[0].substring(zyArr[0].indexOf("付数:") + 3);
|
|
|
if (zyfs != null && zyfs != "") {
|
|
|
- if(zyArr.length%4==1){
|
|
|
- zyhtml +='<div class="item form-group" style="margin-bottom: -5px;">';
|
|
|
+ if (zyArr.length % 4 == 1) {
|
|
|
+ zyhtml += '<div class="item form-group" style="margin-bottom: -5px;">';
|
|
|
}
|
|
|
- zyhtml +='<div class="col-md-3 col-sm-3 col-xs-12">';
|
|
|
+ zyhtml += '<div class="col-md-3 col-sm-3 col-xs-12">';
|
|
|
zyhtml += ' <div style="text-indent: 2em;">';
|
|
|
zyhtml += ' <div>';
|
|
|
zyhtml += 'X<span>';
|
|
|
zyhtml += zyfs;
|
|
|
zyhtml += '</span> 付</div></div>';
|
|
|
- zyhtml +='</div>';
|
|
|
+ zyhtml += '</div>';
|
|
|
}
|
|
|
$("#prescriptionDetail_zyzlContent").html(zyhtml);
|
|
|
$("#prescriptionDetail_zyzlTitle").removeClass("hide").addClass("in");
|
|
@@ -5593,6 +5600,15 @@ function prescriptionDetailCommon(patientId, times, clnicId, payMark, type) {
|
|
|
$("#printPrescription").off("click").on("click", function (t) {
|
|
|
printPrescription(patientId, times, clnicId, payMark);
|
|
|
});
|
|
|
+ if(jsonData.mzYjReqList==null || jsonData.mzYjReqList.length==0){
|
|
|
+ $("#printYjReq").removeClass("in").addClass("hide");
|
|
|
+ $("#printYjReq").off("click");
|
|
|
+ }else {
|
|
|
+ $("#printYjReq").removeClass("hide").addClass("in");
|
|
|
+ $("#printYjReq").off("click").on("click", function (t) {
|
|
|
+ printYjReq(patientId, times);
|
|
|
+ });
|
|
|
+ }
|
|
|
} else {
|
|
|
$("#printPrescription").removeClass("in").addClass("hide");
|
|
|
$("#callPrescription").removeClass("hide").addClass("in");
|
|
@@ -5604,6 +5620,9 @@ function prescriptionDetailCommon(patientId, times, clnicId, payMark, type) {
|
|
|
$("#printPrescription").removeClass("in").addClass("hide");
|
|
|
} else {
|
|
|
$("#printPrescription").removeClass("hide").addClass("in");
|
|
|
+ $("#printPrescription").off("click").on("click", function (t) {
|
|
|
+ printPrescription(patientId, times, clnicId, payMark);
|
|
|
+ });
|
|
|
}
|
|
|
} else {
|
|
|
errorMesage(res);
|
|
@@ -5702,7 +5721,7 @@ function printPrescription(patientId, times, clnicId, payMark) {
|
|
|
//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_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;
|
|
@@ -5962,9 +5981,9 @@ function printPrescription(patientId, times, clnicId, payMark) {
|
|
|
LODOP.ADD_PRINT_HTM("0mm", "5mm", "140mm", "200mm", strStyle + document.getElementById("guide_card_table").innerHTML);
|
|
|
//LODOP.PRINT();
|
|
|
LODOP.PREVIEW();
|
|
|
- } else if(res.code ==-2){
|
|
|
+ } else if (res.code == -2) {
|
|
|
LODOP.PREVIEW();
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
errorMesage(res);
|
|
|
}
|
|
|
}
|
|
@@ -5977,3 +5996,164 @@ function printPrescription(patientId, times, clnicId, payMark) {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 构建体征描述
|
|
|
+ * @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
|
|
|
+ * @param clnicId
|
|
|
+ * @param payMark
|
|
|
+ */
|
|
|
+function printYjReq(patientId, times) {
|
|
|
+ $.ajax({
|
|
|
+ type: "GET",
|
|
|
+ url: '/thmz/printYjReq?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) {
|
|
|
+ if (res.data == null || res.data.mzYjReqList == null || res.data.mzYjReqList.length == 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ 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.data.mzPatientMi;
|
|
|
+ $("#patientIdJcReq").text(mzPatientMi.patientId);
|
|
|
+ $("#patientNameJcReq").text(mzPatientMi.name);
|
|
|
+ $("#patientGenderJcReq").text(mzPatientMi.gender);
|
|
|
+ $("#patientAgeJcReq").text(mzPatientMi.age + "岁");
|
|
|
+ $("#responseTypeJcReq").text(mzPatientMi.responseTypeName);
|
|
|
+ $("#patientCardNoJcReq").text(mzPatientMi.icCardNo);
|
|
|
+ $("#icdTextJcReq").text(res.data.mzVisitTable.icdText);
|
|
|
+
|
|
|
+ $("#patientIdJyReq").text(mzPatientMi.patientId);
|
|
|
+ $("#patientNameJyReq").text(mzPatientMi.name);
|
|
|
+ $("#patientGenderJyReq").text(mzPatientMi.gender);
|
|
|
+ $("#patientAgeJyReq").text(mzPatientMi.age + "岁");
|
|
|
+ $("#responseTypeJyReq").text(mzPatientMi.responseTypeName);
|
|
|
+ $("#patientCardNoJyReq").text(mzPatientMi.icCardNo);
|
|
|
+ $("#icdTextJyReq").text(res.data.mzVisitTable.icdText);
|
|
|
+ var mzBlRecord = res.data.mzBlRecord;
|
|
|
+ $("#jcReqEmrChiefComplaint").text(mzBlRecord.emrChiefComplaint);
|
|
|
+ $("#jcReqHis").text(mzBlRecord.emrHpi);
|
|
|
+
|
|
|
+ $("#jyReqEmrChiefComplaint").text(mzBlRecord.emrChiefComplaint);
|
|
|
+ $("#jyReqHis").text(mzBlRecord.emrHpi);
|
|
|
+ var tz = getTz(mzBlRecord);
|
|
|
+ $("#jcReqTz").text(tz);
|
|
|
+ $("#jcReqReqDept").text(res.data.deptName);
|
|
|
+ $("#jcReqReqDoctor").text(res.data.doctorName);
|
|
|
+
|
|
|
+ $("#jyReqTz").text(tz);
|
|
|
+ $("#jyReqReqDept").text(res.data.deptName);
|
|
|
+ $("#jyReqReqDoctor").text(res.data.doctorName);
|
|
|
+ for (var i = 0; i < res.data.mzYjReqList.length; i++) {
|
|
|
+ var obj = res.data.mzYjReqList[i];
|
|
|
+ if (i == 0) {
|
|
|
+ var dateStr =format(obj.reqDate, "yyyy-MM-dd");
|
|
|
+ $("#jcReqReqDate").text(dateStr);
|
|
|
+ $("#jyReqReqDate").text(dateStr);
|
|
|
+ }
|
|
|
+ if (i > 0) {
|
|
|
+ LODOP.NewPageA();
|
|
|
+ }
|
|
|
+ if (obj.reqType == "3") {
|
|
|
+ $("#reqNoJcReq").text(obj.reqNo);
|
|
|
+ $("#jcReqItem").text(obj.groupName);
|
|
|
+ $("#jcReqRemark").text(obj.jyRemark);
|
|
|
+ LODOP.ADD_PRINT_HTM("0mm", "5mm", "140mm", "200mm", strStyle + document.getElementById("jc_card_table").innerHTML);
|
|
|
+ } else if (obj.reqType == "2") {
|
|
|
+ $("#reqNoJyReq").text(obj.reqNo);
|
|
|
+ $("#jyReqItem").text(obj.groupName);
|
|
|
+ $("#jyReqInspectStuff").text(obj.inspectStuff);
|
|
|
+ //检验
|
|
|
+ LODOP.ADD_PRINT_HTM("0mm", "5mm", "140mm", "200mm", strStyle + document.getElementById("jy_card_table").innerHTML);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ LODOP.PREVIEW();
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|