|
|
@@ -771,6 +771,7 @@ function clearUser(flag) {
|
|
|
$("#patientId").text(null);
|
|
|
$("#editUser").css("display", "none");
|
|
|
$("#clearUser").css("display", "none");
|
|
|
+ $("#fetchSpcSlwinfo").css("display", "none");
|
|
|
$("#patientPhone").html("");
|
|
|
$("#patientPhoneLabel").hide();
|
|
|
$("#patientResponseType").html("");
|
|
|
@@ -1234,8 +1235,97 @@ function setMzPatientInfo(mzPatientMi) {
|
|
|
}
|
|
|
$("#patientHisData").text(mzPatientMi.name);
|
|
|
fitPatientHisData();
|
|
|
+ setTmResponseType(mzPatientMi.patientId);
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 判断是否是特门病人
|
|
|
+ * @param patientId
|
|
|
+ */
|
|
|
+function setTmResponseType(patientId) {
|
|
|
+ $.ajax({
|
|
|
+ type: "GET",
|
|
|
+ url: '/thmz/fetchSpcSlwinfo?patientId=' + patientId,
|
|
|
+ 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.length>0) {
|
|
|
+ $("#patientResponseType").html("特殊门诊");
|
|
|
+ $("#fetchSpcSlwinfo").css("display", "inline-block");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 特门详情
|
|
|
+ * @param patientId
|
|
|
+ */
|
|
|
+function fetchSpcSlwinfo() {
|
|
|
+ var patientId=$("#patientId").text();
|
|
|
+ $.ajax({
|
|
|
+ type: "GET",
|
|
|
+ url: '/thmz/fetchSpcSlwinfo?patientId=' + patientId,
|
|
|
+ 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.length > 0) {
|
|
|
+ $("#fetchSpcSlwinfoModal").modal();
|
|
|
+ $("#fetchSpcSlwinfoTable").html(null);
|
|
|
+ for (var i = 0; i < res.data.length; i++) {
|
|
|
+ var begndate = res.data[i].begndate;
|
|
|
+ if (begndate == null || begndate == "null") {
|
|
|
+ begndate = "";
|
|
|
+ }
|
|
|
+ var enddate = res.data[i].enddate;
|
|
|
+ if (enddate == null || enddate == "null") {
|
|
|
+ enddate = "";
|
|
|
+ }
|
|
|
+ var opspDiseName = res.data[i].opspDiseName;
|
|
|
+ if (opspDiseName == null || opspDiseName == "null") {
|
|
|
+ opspDiseName = "";
|
|
|
+ }
|
|
|
+ var opspDiseCode = res.data[i].opspDiseCode;
|
|
|
+ if (opspDiseCode == null || opspDiseCode == "null") {
|
|
|
+ opspDiseCode = "";
|
|
|
+ }
|
|
|
+ var ideFixmedinsName = res.data[i].ideFixmedinsName;
|
|
|
+ if (ideFixmedinsName == null || ideFixmedinsName == "null") {
|
|
|
+ ideFixmedinsName = "";
|
|
|
+ }
|
|
|
+ $("<tr><td>" + begndate + "</td><td>" + enddate + "</td><td>" + opspDiseCode + "</td><td>" + opspDiseName + "</td><td>" + ideFixmedinsName + "</td></tr>").appendTo("#fetchSpcSlwinfoTable");
|
|
|
+ // .bind('click', function () {
|
|
|
+ // $("#fetchSpcSlwinfoModal").modal("hide");
|
|
|
+ // clinicalReception(patientIdDb, $(this).attr("data-target"));
|
|
|
+ // });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 真实的接诊方法
|
|
|
* @param patientId
|