|
|
@@ -134,9 +134,9 @@ function initMzBlRecordList() {
|
|
|
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+')">编辑<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+',1)">打印<i class="fa fa-print" style="margin-left: 10px;"></i></button>';
|
|
|
- str += '<button type="button" class="btn btn-primary btn-sm" onclick="printBlRecord(\'' + row.patientId + '\','+row.times+',2)">打印设置<i class="fa fa-cog" style="margin-left: 10px;"></i></button>';
|
|
|
+ var str = '<button type="button" class="btn btn-primary btn-sm" onclick="showMzBlRecordModal(\'' + row.patientId + '\',' + row.times + ',1)">编辑<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 + ',1)">打印<i class="fa fa-print" style="margin-left: 10px;"></i></button>';
|
|
|
+ str += '<button type="button" class="btn btn-primary btn-sm" onclick="printBlRecord(\'' + row.patientId + '\',' + row.times + ',2)">打印设置<i class="fa fa-cog" style="margin-left: 10px;"></i></button>';
|
|
|
return [str].join('');
|
|
|
}
|
|
|
},
|
|
|
@@ -193,13 +193,7 @@ function initMzBlRecordList() {
|
|
|
var ress = eval(res);
|
|
|
if (ress.code == -1) {
|
|
|
if (ress.message != null && ress.message != '') {
|
|
|
- new PNotify({
|
|
|
- title: '错误提示',
|
|
|
- text: ress.message,
|
|
|
- type: 'error',
|
|
|
- hide: true,
|
|
|
- styling: 'bootstrap3'
|
|
|
- });
|
|
|
+ errorMesage(ress);
|
|
|
}
|
|
|
return {
|
|
|
"total": 0,//总页数
|
|
|
@@ -247,7 +241,6 @@ function initSelect() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 查询默认打印机
|
|
|
*/
|
|
|
@@ -411,7 +404,6 @@ function printBlRecord(patientId, times, printType) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 构建体征描述
|
|
|
* @param mzBlRecord
|
|
|
@@ -472,11 +464,12 @@ function getTz(mzBlRecord) {
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 加载病历信息
|
|
|
+ * 加载病历信息编辑
|
|
|
* @param patientId
|
|
|
* @param times
|
|
|
+ * @param type 1 编辑 2 预览
|
|
|
*/
|
|
|
-function showMzBlRecordModal(patientId, times) {
|
|
|
+function showMzBlRecordModal(patientId, times,type) {
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
url: '/thmz/getMzBlrecord?patientId=' + patientId + '×=' + times,
|
|
|
@@ -556,8 +549,8 @@ function showMzBlRecordModal(patientId, times) {
|
|
|
$("#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"));
|
|
|
+ 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");
|
|
|
@@ -568,6 +561,21 @@ function showMzBlRecordModal(patientId, times) {
|
|
|
} 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");
|
|
|
+ }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");
|
|
|
+ $("#baseMzBlTimes").val($("#mzBlTimes").val());
|
|
|
+ $("#otherBlRecordModal").modal("hide");
|
|
|
+ }
|
|
|
$("#mzBlTimes").val(mzBlRecord.times);
|
|
|
$("#editMzBlRecordModal").modal();
|
|
|
} else {
|
|
|
@@ -586,13 +594,13 @@ function setEmrProcess() {
|
|
|
$("#messageModal").modal();
|
|
|
$("#messageContent").html("是否保存并替换已有补充处理意见?");
|
|
|
$("#messageButton").off("click").on("click", function (t) {
|
|
|
- if($("#newEmrProcess").val()==null || $("#newEmrProcess").val()==""){
|
|
|
+ if ($("#newEmrProcess").val() == null || $("#newEmrProcess").val() == "") {
|
|
|
$("#messageContent").html("当前录入的补充处理为空,是否保存并替换已有补充处理意见?");
|
|
|
$("#messageButton").off("click").on("click", function (t) {
|
|
|
$("#messageModal").modal("hide");
|
|
|
sendEmrProcess();
|
|
|
});
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
$("#messageModal").modal("hide");
|
|
|
sendEmrProcess();
|
|
|
}
|
|
|
@@ -601,6 +609,181 @@ function setEmrProcess() {
|
|
|
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 打开待合并病历列表弹框
|
|
|
+ */
|
|
|
+function openBlRecordModel() {
|
|
|
+ $("#editMzBlRecordModal").modal("hide");
|
|
|
+ $("#otherBlRecordModal").modal();
|
|
|
+ initOtherMzBlRecordList();
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 病历列表
|
|
|
+ */
|
|
|
+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() {
|
|
|
+ $("#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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 提交保存门诊病历
|
|
|
*/
|
|
|
@@ -640,7 +823,7 @@ function sendEmrProcess() {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 情况区域
|
|
|
+ * 清空区域
|
|
|
*/
|
|
|
function clearInput() {
|
|
|
$("#editPatientId").text(null);
|
|
|
@@ -648,7 +831,6 @@ function clearInput() {
|
|
|
$("#editPatientGender").text(null);
|
|
|
$("#editPatientAge").text(null);
|
|
|
$("#editEmrChiefComplaint").val(null);
|
|
|
-
|
|
|
$("#editEmrHpi").val(null);
|
|
|
$("#editEmrPs").val(null);
|
|
|
$("#editPersonalHistory").val(null);
|
|
|
@@ -661,4 +843,6 @@ function clearInput() {
|
|
|
$("#editEmrJkjy").val(null);
|
|
|
$("#newEmrProcess").val(null);
|
|
|
$("#mzBlTimes").val(null);
|
|
|
-}
|
|
|
+ $("#baseMzBlTimes").val(null);
|
|
|
+}
|
|
|
+
|