|
@@ -356,11 +356,13 @@ function fitPatientHisData() {
|
|
|
dataType: "json",
|
|
|
data: JSON.stringify({
|
|
|
"patientId": $("#patientId").val(),
|
|
|
- "clinicStatuses": [5, 6],
|
|
|
+ //"clinicStatuses": [5, 6],
|
|
|
+ "clinicStatuses": [6],
|
|
|
"pageSize": 10000,
|
|
|
"offset": 0,
|
|
|
"beginDate": "2012-02-01 00:00:00",
|
|
|
- "endDate": format(new Date(), "yyyy-MM-dd HH:mm:ss")
|
|
|
+ "endDate": format(new Date(), "yyyy-MM-dd HH:mm:ss"),
|
|
|
+ "doctorCode":"-1"
|
|
|
}),
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
success: function (res) {
|
|
@@ -389,7 +391,7 @@ function fitPatientHisData() {
|
|
|
html += ' </div>';
|
|
|
html += ' <div style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 172px);"';
|
|
|
html += ' title="' + icdText + '">诊断:<a style="cursor: pointer; color: #2e69eb;"';
|
|
|
- html += ' onclick="visitingDetailModal(\'' + data[i].patientId + '\',' + data[i].times + ',' + data[i].id + ',0)">' + icdText + '</a>';
|
|
|
+ html += ' onclick="visitingDetailModal(\'' + data[i].patientId + '\',' + data[i].times + ',' + data[i].id + ','+data[i].clinicStatus+')">' + icdText + '</a>';
|
|
|
html += ' </div>';
|
|
|
html += ' </div>';
|
|
|
}
|
|
@@ -590,6 +592,7 @@ function clearUser() {
|
|
|
$("#patientResponseType").html("");
|
|
|
$("#first").parent().addClass("checked");
|
|
|
$("#not").parent().removeClass("checked");
|
|
|
+ $("#not").click();
|
|
|
$("#patientHisData").text("");
|
|
|
$("#mzfzSerialNoInClick").val(null);
|
|
|
}
|
|
@@ -942,11 +945,43 @@ function clinicalReception(patientId, serialNo) {
|
|
|
$("#messageContent").html("当前有病人正在接诊,是否切换?");
|
|
|
$("#messageButton").off("click").on("click", function (t) {
|
|
|
$("#messageModal").modal("hide");
|
|
|
- clearWorkSpace();
|
|
|
- realClinicalReception(patientId, serialNo)
|
|
|
+ //当前有人在接诊,提示是否需要切换和保存
|
|
|
+ $("#messagePrescriptionModal").modal();
|
|
|
+ $("#confirmPrescriptionButton").off("click").on("click", function (t) {
|
|
|
+ $("#messagePrescriptionModal").modal("hide");
|
|
|
+ //先保存目前接诊信息,再切换就诊人
|
|
|
+ var jsonData = getParamsForOrescription();
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: '/thmz/savePrescription',
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ dataType: "json",
|
|
|
+ data: JSON.stringify(jsonData),
|
|
|
+ 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) {
|
|
|
+ clearWorkSpace();
|
|
|
+ realClinicalReception(patientId, serialNo);
|
|
|
+ //加载已接诊患者列表
|
|
|
+ loadClinicTableList();
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ $("#cancelPrescriptionButton").off("click").on("click", function (t) {
|
|
|
+ $("#messagePrescriptionModal").modal("hide");
|
|
|
+ clearWorkSpace();
|
|
|
+ realClinicalReception(patientId, serialNo);
|
|
|
+ });
|
|
|
});
|
|
|
} else {
|
|
|
- realClinicalReception(patientId, serialNo)
|
|
|
+ realClinicalReception(patientId, serialNo);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -969,9 +1004,11 @@ function setMzPatientInfo(mzPatientMi) {
|
|
|
if (mzPatientMi.times == 1) {
|
|
|
$("#first").parent().addClass("checked");
|
|
|
$("#not").parent().removeClass("checked");
|
|
|
+ $("#first").click();
|
|
|
} else {
|
|
|
$("#not").parent().addClass("checked");
|
|
|
$("#first").parent().removeClass("checked");
|
|
|
+ $("#not").click();
|
|
|
}
|
|
|
$("#patientHisData").text(mzPatientMi.name);
|
|
|
fitPatientHisData();
|
|
@@ -1225,9 +1262,11 @@ function editPrescription(jsonData) {
|
|
|
if (firstOrNot == 0) {
|
|
|
$("#first").parent().addClass("checked");
|
|
|
$("#not").parent().removeClass("checked");
|
|
|
+ $("#first").click();
|
|
|
} else if (firstOrNot == 1) {
|
|
|
$("#first").parent().removeClass("checked");
|
|
|
$("#not").parent().addClass("checked");
|
|
|
+ $("#not").click();
|
|
|
}
|
|
|
$("#symptom").val(jsonData.mzBlRecord.emrChiefComplaint);
|
|
|
$("#emrHpi").val(jsonData.mzBlRecord.emrHpi);
|
|
@@ -5013,13 +5052,7 @@ function modifyPatient() {
|
|
|
$('#editUserModal').modal('hide');
|
|
|
realClinicalReception($("#patientId").val(), $("#mzfzSerialNoInClick").val());
|
|
|
} else {
|
|
|
- new PNotify({
|
|
|
- title: '错误提示',
|
|
|
- text: res.message,
|
|
|
- type: 'error',
|
|
|
- hide: true,
|
|
|
- styling: 'bootstrap3'
|
|
|
- });
|
|
|
+ errorMesage(res);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -5811,6 +5844,96 @@ function getMzPrescriptionVoUnPaidCommon(patientId, times, clnicId) {
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 查询病人已缴费处方信息 调用处方
|
|
|
+ * @param patientId
|
|
|
+ * @param times
|
|
|
+ * @param clnicId 就诊记录id
|
|
|
+ */
|
|
|
+function getMzPrescriptionVoPaid(patientId, times, clnicId) {
|
|
|
+ $("#visitingDetailModal").modal("hide");
|
|
|
+ $("#messageModal").modal();
|
|
|
+ $("#messageContent").html("确认调用选中处方吗?将会覆盖当前处方。");
|
|
|
+ $("#messageButton").off("click").on("click", function (t) {
|
|
|
+ $("#messageModal").modal("hide");
|
|
|
+ $.ajax({
|
|
|
+ type: "GET",
|
|
|
+ url: '/thmz/getMzPrescriptionVo?patientId=' + patientId + "×=" + times + "&MzBlRecordFlag=false&payMark=0&clnicId=null",
|
|
|
+ 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 mzfzSerialNoInClick=$("#mzfzSerialNoInClick").val();
|
|
|
+ clearWorkSpace();
|
|
|
+ setMzPatientInfo(res.mzPatientMi);
|
|
|
+ editPrescription(res.data)
|
|
|
+ $("#mzfzSerialNoInClick").val(mzfzSerialNoInClick);
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ var currentPatientId = $("#patientId").val();
|
|
|
+ //当前接诊的用户和操作接诊的是同一个人,不做任何操作
|
|
|
+ if (currentPatientId == patientId) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (currentPatientId == null || currentPatientId == "") {
|
|
|
+ //当前没有人接诊,直接接诊
|
|
|
+ getMzPrescriptionVoPaidCommon(patientId, times, clnicId);
|
|
|
+ } else {
|
|
|
+ //当前有人在接诊,提示是否需要切换和保存
|
|
|
+ $("#messagePrescriptionModal").modal();
|
|
|
+ $("#confirmPrescriptionButton").off("click").on("click", function (t) {
|
|
|
+ $("#messagePrescriptionModal").modal("hide");
|
|
|
+ //先保存目前接诊信息,再切换就诊人
|
|
|
+ var jsonData = getParamsForOrescription();
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: '/thmz/savePrescription',
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ dataType: "json",
|
|
|
+ data: JSON.stringify(jsonData),
|
|
|
+ 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) {
|
|
|
+ loadInClinicTableList();
|
|
|
+ loadClinicTableList();
|
|
|
+ getMzPrescriptionVoPaidCommon(patientId, times, clnicId);
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 重复接诊
|
|
|
* @param patientId
|
|
@@ -5898,7 +6021,6 @@ function repeatAcceptsConfirm(patientId, times, clnicId) {
|
|
|
repeatAcceptsCommon(patientId, times, clnicId);
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -5951,9 +6073,15 @@ function prescriptionDetail(patientId, times, clnicId, payMark) {
|
|
|
* @param patientId
|
|
|
* @param times
|
|
|
* @param clnicId
|
|
|
- * @param payMark
|
|
|
- */
|
|
|
-function visitingDetailModal(patientId, times, clnicId, payMark) {
|
|
|
+ * @param clinicStatus
|
|
|
+ */
|
|
|
+function visitingDetailModal(patientId, times, clnicId, clinicStatus) {
|
|
|
+ var payMark =null;
|
|
|
+ if(clinicStatus==5){
|
|
|
+ payMark=5;
|
|
|
+ }else {
|
|
|
+ payMark=0;
|
|
|
+ }
|
|
|
prescriptionDetailCommon(patientId, times, clnicId, payMark, 1);
|
|
|
}
|
|
|
|
|
@@ -6000,8 +6128,10 @@ function prescriptionDetailCommon(patientId, times, clnicId, payMark, type) {
|
|
|
var firstOrNot = jsonData.mzBlRecord.firstOrNot;
|
|
|
if (firstOrNot == 0) {
|
|
|
$("#visitFlag").html("初诊");
|
|
|
+ $("#first").click();
|
|
|
} else if (firstOrNot == 1) {
|
|
|
$("#visitFlag").html("复诊");
|
|
|
+ $("#not").click();
|
|
|
}
|
|
|
if (payMark == 0) {
|
|
|
$("#chargeImage").attr("src", "/thmz/images/charge.png");
|
|
@@ -6110,8 +6240,8 @@ function prescriptionDetailCommon(patientId, times, clnicId, payMark, type) {
|
|
|
} else {
|
|
|
$("#printPrescription").removeClass("in").addClass("hide");
|
|
|
$("#callPrescription").removeClass("hide").addClass("in");
|
|
|
- $("#printPrescription").off("click").on("click", function (t) {
|
|
|
- alert("调用处方");
|
|
|
+ $("#callPrescription").off("click").on("click", function (t) {
|
|
|
+ getMzPrescriptionVoPaid(patientId, times, clnicId);
|
|
|
});
|
|
|
}
|
|
|
} else {
|