|
@@ -6492,6 +6492,7 @@ function visitingDetailModal(patientId, times, clnicId, clinicStatus) {
|
|
|
* @param type 0 已诊患者列表发起 1 历史轨迹发起
|
|
|
*/
|
|
|
function prescriptionDetailCommon(patientId, times, clnicId, payMark, type) {
|
|
|
+ $('#baseMzBlTimes').val(null);
|
|
|
var oriPayMark = payMark;
|
|
|
if (payMark == 1) {
|
|
|
//退费时,查看的明细还是处方开立的情况
|
|
@@ -6750,6 +6751,10 @@ function prescriptionDetailCommon(patientId, times, clnicId, payMark, type) {
|
|
|
$("#printBlRecordSetup").off("click").on("click", function (t) {
|
|
|
printBlRecord(patientId, times, 2);
|
|
|
});
|
|
|
+ $("#showMzBlRecordModal").removeClass("hide").addClass("in");
|
|
|
+ $("#showMzBlRecordModal").off("click").on("click", function (t) {
|
|
|
+ showMzBlRecordModal(patientId, times, 1);
|
|
|
+ });
|
|
|
if (jsonData.mzZyReq == null || jsonData.mzZyReq.reqDept == null || jsonData.mzZyReq.reqDept == "") {
|
|
|
$("#printZyReq").removeClass("in").addClass("hide");
|
|
|
$("#printZyReq").off("click");
|
|
@@ -6767,6 +6772,10 @@ function prescriptionDetailCommon(patientId, times, clnicId, payMark, type) {
|
|
|
}
|
|
|
} else {
|
|
|
$("#printPrescription").removeClass("in").addClass("hide");
|
|
|
+ $("#printZyReq").removeClass("in").addClass("hide");
|
|
|
+ $("#printBlRecord").removeClass("in").addClass("hide");
|
|
|
+ $("#printJcReq").removeClass("in").addClass("hide");
|
|
|
+ $("#printJyReq").removeClass("in").addClass("hide");
|
|
|
$("#callPrescription").removeClass("hide").addClass("in");
|
|
|
$("#callPrescription").off("click").on("click", function (t) {
|
|
|
getMzPrescriptionVoPaid(patientId, times, clnicId);
|
|
@@ -8183,3 +8192,419 @@ function initCertificateTypeSelect() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 加载病历信息编辑预览
|
|
|
+ * @param patientId
|
|
|
+ * @param times
|
|
|
+ * @param type 1 编辑 2 预览
|
|
|
+ */
|
|
|
+function showMzBlRecordModal(patientId, times,type) {
|
|
|
+ $.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) {
|
|
|
+ //$("#visitingDetailModal").modal("hide");
|
|
|
+ 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().parent().css("display", "block");
|
|
|
+ } else {
|
|
|
+ $("#editEmrChiefComplaint").parent().parent().parent().css("display", "none");
|
|
|
+ }
|
|
|
+ if (mzBlRecord.emrHpi != null && mzBlRecord.emrHpi != "") {
|
|
|
+ $("#editEmrHpi").val(mzBlRecord.emrHpi);
|
|
|
+ $("#editEmrHpi").parent().parent().parent().css("display", "block");
|
|
|
+ } else {
|
|
|
+ $("#editEmrHpi").parent().parent().parent().css("display", "none");
|
|
|
+ }
|
|
|
+ if (mzBlRecord.emrPs != null && mzBlRecord.emrPs != "") {
|
|
|
+ $("#editEmrPs").val(mzBlRecord.emrPs);
|
|
|
+ $("#editEmrPs").parent().parent().parent().css("display", "block");
|
|
|
+ } else {
|
|
|
+ $("#editEmrPs").parent().parent().parent().css("display", "none");
|
|
|
+ }
|
|
|
+ if (mzBlRecord.personalHistory != null && mzBlRecord.personalHistory != "") {
|
|
|
+ $("#editPersonalHistory").val(mzBlRecord.personalHistory);
|
|
|
+ $("#editPersonalHistory").parent().parent().parent().css("display", "block");
|
|
|
+ } else {
|
|
|
+ $("#editPersonalHistory").parent().parent().parent().css("display", "none");
|
|
|
+ }
|
|
|
+ if (mzBlRecord.familyHistory != null && mzBlRecord.familyHistory != "") {
|
|
|
+ $("#editFamilyHistory").val(mzBlRecord.familyHistory);
|
|
|
+ $("#editFamilyHistory").parent().parent().parent().css("display", "block");
|
|
|
+ } else {
|
|
|
+ $("#editFamilyHistory").parent().parent().parent().css("display", "none");
|
|
|
+ }
|
|
|
+ if (mzBlRecord.obstericalHistory != null && mzBlRecord.obstericalHistory != "") {
|
|
|
+ $("#editObstericalHistory").val(mzBlRecord.obstericalHistory);
|
|
|
+ $("#editObstericalHistory").parent().parent().parent().css("display", "block");
|
|
|
+ } else {
|
|
|
+ $("#editObstericalHistory").parent().parent().parent().css("display", "none");
|
|
|
+ }
|
|
|
+ var tz = getTz(mzBlRecord);
|
|
|
+ if (tz != null && tz != "") {
|
|
|
+ $("#editTgjc").val(tz);
|
|
|
+ $("#editTgjc").parent().parent().parent().css("display", "block");
|
|
|
+ } else {
|
|
|
+ $("#editTgjc").parent().parent().parent().css("display", "none");
|
|
|
+ }
|
|
|
+ if (mzBlRecord.emrPe != null && mzBlRecord.emrPe != "") {
|
|
|
+ $("#editQtjc").val(mzBlRecord.emrPe);
|
|
|
+ $("#editQtjc").parent().parent().parent().css("display", "block");
|
|
|
+ } else {
|
|
|
+ $("#editQtjc").parent().parent().parent().css("display", "none");
|
|
|
+ }
|
|
|
+ if (res.icdText != null && res.icdText != "") {
|
|
|
+ $("#editZd").val(res.icdText);
|
|
|
+ $("#editZd").parent().parent().parent().css("display", "block");
|
|
|
+ } else {
|
|
|
+ $("#editZd").parent().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().parent().css("display", "block");
|
|
|
+ } else {
|
|
|
+ $("#editEmrProcess").parent().parent().parent().css("display", "none");
|
|
|
+ }
|
|
|
+ if (mzBlRecord.emrJkjy != null && mzBlRecord.emrJkjy != "" && mzBlRecord.emrJkjy != "无") {
|
|
|
+ $("#editEmrJkjy").val(mzBlRecord.emrJkjy);
|
|
|
+ $("#editEmrJkjy").parent().parent().parent().css("display", "block");
|
|
|
+ } else {
|
|
|
+ $("#editEmrJkjy").parent().parent().parent().css("display", "none");
|
|
|
+ }
|
|
|
+ if(type==1){
|
|
|
+ $("#mzBlRecorTitle").html("门诊病历【编辑】");
|
|
|
+ $("#setOtherEmrProcess").removeClass("in").addClass("hide");
|
|
|
+ $("#openBlRecordModel").removeClass("hide").addClass("in");
|
|
|
+ $("#setEmrProcess").removeClass("hide").addClass("in");
|
|
|
+ $("#newEmrProcessDiv").removeClass("hide").addClass("in");
|
|
|
+ $("#visitingDetailModal").modal("hide");
|
|
|
+ }else if(type==2){
|
|
|
+ $("#mzBlRecorTitle").html("门诊病历【预览】");
|
|
|
+ $("#setOtherEmrProcess").removeClass("hide").addClass("in");
|
|
|
+ $("#openBlRecordModel").removeClass("in").addClass("hide");
|
|
|
+ $("#setEmrProcess").removeClass("in").addClass("hide");
|
|
|
+ $("#newEmrProcessDiv").removeClass("in").addClass("hide");
|
|
|
+ //因为预览的时候,关闭预览框没有清空数据,且 此时基础数据的病历次数被清空
|
|
|
+ if($("#mzBlTimes").val()!=null && $("#mzBlTimes").val()!="" && ($("#baseMzBlTimes").val()==null || $("#baseMzBlTimes").val()=="")){
|
|
|
+ $("#baseMzBlTimes").val($("#mzBlTimes").val());
|
|
|
+ }
|
|
|
+ $("#otherBlRecordModal").modal("hide");
|
|
|
+ }
|
|
|
+ $("#mzBlTimes").val(mzBlRecord.times);
|
|
|
+ $("#editMzBlRecordModal").modal();
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 清空区域
|
|
|
+ */
|
|
|
+function clearInput() {
|
|
|
+ //编辑病历的时候,没有基础病历的就诊次数,如果是预览病历的时候,有基础病历的次数
|
|
|
+ var baseMzBlTimes=$("#baseMzBlTimes").val();
|
|
|
+ $("#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);
|
|
|
+ if(baseMzBlTimes!=null && baseMzBlTimes!=""){
|
|
|
+ $("#otherBlRecordModal").modal();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 保存门诊病历
|
|
|
+ */
|
|
|
+function setEmrProcess() {
|
|
|
+ $("#editMzBlRecordModal").modal("hide");
|
|
|
+ $("#messageModal").modal();
|
|
|
+ $("#messageContent").html("是否保存并替换已有补充处理意见?");
|
|
|
+ $("#messageButton").off("click").on("click", function (t) {
|
|
|
+ if ($("#newEmrProcess").val() == null || $("#newEmrProcess").val() == "") {
|
|
|
+ $("#messageContent").html("当前录入的补充处理为空,是否保存并替换已有补充处理意见?");
|
|
|
+ $("#messageButton").off("click").on("click", function (t) {
|
|
|
+ $("#messageModal").modal("hide");
|
|
|
+ sendEmrProcess();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ $("#messageModal").modal("hide");
|
|
|
+ sendEmrProcess();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $("#cancelButton").off("click").on("click", function (t) {
|
|
|
+ $("#editMzBlRecordModal").modal();
|
|
|
+ });
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 提交保存门诊病历
|
|
|
+ */
|
|
|
+function sendEmrProcess() {
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: '/thmz/setEmrProcess',
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ dataType: "json",
|
|
|
+ data: JSON.stringify({
|
|
|
+ "patientId": $("#editPatientId").text(),
|
|
|
+ "times": $("#mzBlTimes").val(),
|
|
|
+ "emrChiefComplaint": $("#editEmrChiefComplaint").val(),
|
|
|
+ "emrHpi": $("#editEmrHpi").val(),
|
|
|
+ "emrPs": $("#editEmrPs").val(),
|
|
|
+ "personalHistory": $("#editPersonalHistory").val(),
|
|
|
+ "familyHistory": $("#editFamilyHistory").val(),
|
|
|
+ "obstericalHistory": $("#editObstericalHistory").val(),
|
|
|
+ "emrJkjy": $("#editEmrJkjy").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 openBlRecordModel() {
|
|
|
+ $("#editMzBlRecordModal").modal("hide");
|
|
|
+ $("#otherBlRecordModal").modal();
|
|
|
+ initOtherMzBlRecordList();
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 关闭待合并病历列表
|
|
|
+ */
|
|
|
+function closeBlRecordModel() {
|
|
|
+ $('#baseMzBlTimes').val(null);
|
|
|
+ $("#visitingDetailModal").modal();
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 病历列表
|
|
|
+ */
|
|
|
+function initOtherMzBlRecordList() {
|
|
|
+ $('#other_bl_record_table').bootstrapTable("destroy");
|
|
|
+ $('#other_bl_record_table').bootstrapTable({
|
|
|
+ url: '/thmz/getMzBlRecordList', //请求后台的URL(*)
|
|
|
+ method: 'post', //请求方式(*)
|
|
|
+ toolbar: '#toolbar', //工具按钮用哪个容器
|
|
|
+ striped: true, //是否显示行间隔色
|
|
|
+ cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
|
|
|
+ pagination: true, //是否显示分页(*)
|
|
|
+ sortable: true, //是否启用排序
|
|
|
+ sortOrder: "desc", //排序方式
|
|
|
+ queryParams: queryOtherParams, //传递参数(*)
|
|
|
+ sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*)
|
|
|
+ pageNumber: 1, //初始化加载第一页,默认第一页
|
|
|
+ pageSize: 5, //每页的记录行数(*)
|
|
|
+ pageList: [10, 15, 25, 50, 100], //可供选择的每页的行数(*)
|
|
|
+ search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大
|
|
|
+ strictSearch: true,
|
|
|
+ showColumns: false, //是否显示所有的列
|
|
|
+ showRefresh: false, //是否显示刷新按钮
|
|
|
+ minimumCountColumns: 2, //最少允许的列数
|
|
|
+ clickToSelect: true, //是否启用点击选中行
|
|
|
+ uniqueId: "ID", //每一行的唯一标识,一般为主键列
|
|
|
+ showToggle: false, //是否显示详细视图和列表视图的切换按钮
|
|
|
+ cardView: false, //是否显示详细视图
|
|
|
+ detailView: false,
|
|
|
+ //rowStyle:rowStyle,//通过自定义函数设置行样式
|
|
|
+ ajaxOptions: {
|
|
|
+ headers: {
|
|
|
+ 'Accept': 'application/json',
|
|
|
+ 'Authorization': 'Bearer ' + localStorage.getItem("token")
|
|
|
+ }
|
|
|
+ },
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ field: 'op',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ var str = '<button type="button" class="btn btn-primary btn-sm" onclick="showMzBlRecordModal(\'' + row.patientId + '\',' + row.times + ',2)">预览<i class="fa fa-edit" style="margin-left: 10px;"></i></button>';
|
|
|
+ return [str].join('');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'patientId',
|
|
|
+ title: '门诊ID',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle'
|
|
|
+ }, {
|
|
|
+ field: 'patientName',
|
|
|
+ title: '患者姓名',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle'
|
|
|
+ }, {
|
|
|
+ field: 'deptCode',
|
|
|
+ title: '就诊科室',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle'
|
|
|
+ }, {
|
|
|
+ field: 'doctorCode',
|
|
|
+ title: '接诊医师',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle'
|
|
|
+ }, {
|
|
|
+ field: 'firstOrNot',
|
|
|
+ title: '初/复诊',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ if (value == '1') {
|
|
|
+ return "复诊";
|
|
|
+ }
|
|
|
+ return "初诊";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ , {
|
|
|
+ field: 'visitDate',
|
|
|
+ title: '就诊时间',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ if (value == null || value == "") {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ return format(value, "yyyy-MM-dd HH:mm:ss");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ responseHandler: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var ress = eval(res);
|
|
|
+ if (ress.code == -1) {
|
|
|
+ if (ress.message != null && ress.message != '') {
|
|
|
+ errorMesage(ress);
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ "total": 0,//总页数
|
|
|
+ "rows": {} //数据
|
|
|
+ };
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ "total": ress.total,//总页数
|
|
|
+ "rows": ress.data //数据
|
|
|
+ };
|
|
|
+ },
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 构建列表查询参数
|
|
|
+ * @param params
|
|
|
+ * @returns {{mzChargeDetail: {patientId: string | number | string[] | undefined | jQuery, warnDept: string | number | string[] | undefined | jQuery, doctorCode: string | number | string[] | undefined | jQuery, name: string | number | string[] | undefined | jQuery, payMark: number}, beginTime: Date, endTime: Date, pageSize: *, pageIndex: number}}
|
|
|
+ */
|
|
|
+function queryOtherParams(params) {
|
|
|
+ var temp = { //这里的键的名字和控制器的变量名必须一直,这边改动,控制器也需要改成一样的
|
|
|
+ patientId: $("#editPatientId").text(),
|
|
|
+ exceptTimes: $("#mzBlTimes").val(),
|
|
|
+ pageSize: params.limit, //页面大小
|
|
|
+ pageIndex: params.offset / params.limit, //页码
|
|
|
+ };
|
|
|
+ return temp;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 提取处理意见保存
|
|
|
+ */
|
|
|
+function setOtherEmrProcess() {
|
|
|
+ $("#editMzBlRecordModal").modal("hide");
|
|
|
+ $("#messageModal").modal();
|
|
|
+ $("#messageContent").html("确定要执行此次提取处理意见操作吗?");
|
|
|
+ $("#messageButton").off("click").on("click", function (t) {
|
|
|
+ $("#messageModal").modal("hide");
|
|
|
+ $.ajax({
|
|
|
+ type: "GET",
|
|
|
+ url: '/thmz/extractEmrProcess?patientId=' + $("#editPatientId").html() + '&baseTimes=' + $("#baseMzBlTimes").val()+ '×=' + $("#mzBlTimes").val(),
|
|
|
+ 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) {
|
|
|
+ successMesage(res);
|
|
|
+ $("#editMzBlRecordModal").modal("hide");
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ $("#cancelButton").off("click").on("click", function (t) {
|
|
|
+ $("#editMzBlRecordModal").modal();
|
|
|
+ });
|
|
|
+}
|