|
@@ -346,7 +346,7 @@ function fitPatientHisData() {
|
|
|
"offset": 0,
|
|
|
"beginDate": "2012-02-01 00:00:00",
|
|
|
"endDate": format(new Date(), "yyyy-MM-dd HH:mm:ss"),
|
|
|
- "doctorCode":"-1"
|
|
|
+ "doctorCode": "-1"
|
|
|
}),
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
success: function (res) {
|
|
@@ -375,7 +375,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 + ','+data[i].clinicStatus+')">' + icdText + '</a>';
|
|
|
+ html += ' onclick="visitingDetailModal(\'' + data[i].patientId + '\',' + data[i].times + ',' + data[i].id + ',' + data[i].clinicStatus + ')">' + icdText + '</a>';
|
|
|
html += ' </div>';
|
|
|
html += ' </div>';
|
|
|
}
|
|
@@ -934,7 +934,7 @@ function clinicalReception(patientId, serialNo) {
|
|
|
$("#confirmPrescriptionButton").off("click").on("click", function (t) {
|
|
|
$("#messagePrescriptionModal").modal("hide");
|
|
|
//先保存目前接诊信息,再切换就诊人
|
|
|
- var jsonData = getParamsForOrescription();
|
|
|
+ var jsonData = getParamsForpPrescription();
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: '/thmz/savePrescription',
|
|
@@ -1600,8 +1600,6 @@ function initTemplateTypeSelect() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 初始频次下拉选
|
|
|
* @param id
|
|
@@ -1742,7 +1740,6 @@ function initJyZdSample() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 保存当前药品到右边处方区域
|
|
|
* @param index 0 西药 1中药 2 诊疗和社备
|
|
@@ -2535,12 +2532,11 @@ function clearJyJcItem() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 计算总金额
|
|
|
*/
|
|
|
function calculateTotalAmount() {
|
|
|
- var jsonData = getParamsForOrescription();
|
|
|
+ var jsonData = getParamsForpPrescription();
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: '/thmz/getAmountForTempPrescription',
|
|
@@ -2631,7 +2627,6 @@ function billItemButtonChange(object, objectIndex) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 打开快速接诊窗口
|
|
|
* @param data
|
|
@@ -2745,8 +2740,6 @@ function clearRapidAccepts() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 根据病人姓名输入框内容动态加载病人列表
|
|
|
*/
|
|
@@ -4422,7 +4415,6 @@ function calculateZyAmount() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 将病人信息填入患者信息修改form
|
|
|
* @param patinet
|
|
@@ -4459,10 +4451,6 @@ function fillPlusPatinet(patinet) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 修改病人信息
|
|
|
*/
|
|
@@ -4503,7 +4491,6 @@ function modifyPatient() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 获取按钮组选择的下标
|
|
|
* @param id
|
|
@@ -4534,7 +4521,6 @@ function getRePortRangeArr() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 初始医生工作太配置
|
|
|
*/
|
|
@@ -4763,8 +4749,8 @@ function zTreeOnClick(event, treeId, treeNode) {
|
|
|
* 构建处方参数
|
|
|
* @returns {any}
|
|
|
*/
|
|
|
-function getParamsForOrescription() {
|
|
|
- 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":""},"mzChargeDetailList": [],"mzYjReqList": []}');
|
|
|
+function getParamsForpPrescription() {
|
|
|
+ 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();
|
|
|
jsonData.firstOrNot = $("input[name='firstOrNot']:checked").val();
|
|
|
jsonData.icdCode = $("#diagnoseValue").val();
|
|
@@ -4794,6 +4780,7 @@ function getParamsForOrescription() {
|
|
|
var xyTabContents = $("#xyTabContent").find("div.tab-pane");
|
|
|
//处方号
|
|
|
var orderNo = 0;
|
|
|
+ var jsonDataPrescription = JSON.parse('{"zyPrescription": [],"zlPrescription":[],"xyPrescription": {"pyPrescription":[],"ycPrescription":[],"mjPrescription":[],"jePrescription":[]}}');
|
|
|
//西药设置
|
|
|
if (xyTabContents != null && xyTabContents.length > 0) {
|
|
|
for (var i = 0; i < xyTabContents.length; i++) {
|
|
@@ -4806,6 +4793,7 @@ function getParamsForOrescription() {
|
|
|
} else if (i != xyTabContents.length - 1) {
|
|
|
emrProcess += "_";
|
|
|
}
|
|
|
+ var detailPrescription = JSON.parse('[]');
|
|
|
for (var j = 0; j < formGroups.length; j++) {
|
|
|
// var cfAmount = $(xyTabContents[i]).find("span.cf_amount").parent().text();
|
|
|
// emrProcess += $(formGroups[j]).text().replace(cfAmount, "") + "-";
|
|
@@ -4814,6 +4802,7 @@ function getParamsForOrescription() {
|
|
|
} else {
|
|
|
emrProcess += $(formGroups[j]).text() + "_";
|
|
|
}
|
|
|
+ detailPrescription[detailPrescription.length] = $(formGroups[j]).text();
|
|
|
var tempJson = JSON.parse('{"chargeItemCode": "","serial": "","quantity": "","drugQuan": "","drugUnit": "","frequency": "","orderDays": "","paySelf": "0","drugWin": "1","instructionCode":"","instructionText":"","orderNo":"","groupOrder":"","supplyCode":"","cyJssm":"","cyDj":"","cyFysm":"","tryFlag":"0","groupNo":""}');
|
|
|
tempJson.chargeItemCode = $(formGroups[j]).find("input.temporary_items_code").val();
|
|
|
tempJson.serial = $(formGroups[j]).find("input.temporary_items_serial").val();
|
|
@@ -4835,6 +4824,26 @@ function getParamsForOrescription() {
|
|
|
}
|
|
|
jsonData.mzChargeDetailList[jsonData.mzChargeDetailList.length] = tempJson;
|
|
|
}
|
|
|
+ if (currentGroupNo == "71") {
|
|
|
+ //普药
|
|
|
+ var pyPrescription = jsonDataPrescription.xyPrescription.pyPrescription;
|
|
|
+ pyPrescription[pyPrescription.length] = detailPrescription;
|
|
|
+ }
|
|
|
+ if (currentGroupNo == "91") {
|
|
|
+ //医材
|
|
|
+ var ycPrescription = jsonDataPrescription.xyPrescription.ycPrescription;
|
|
|
+ ycPrescription[ycPrescription.length] = detailPrescription;
|
|
|
+ }
|
|
|
+ if (currentGroupNo == "111") {
|
|
|
+ //麻精一
|
|
|
+ var mjPrescription = jsonDataPrescription.xyPrescription.mjPrescription;
|
|
|
+ mjPrescription[mjPrescription.length] = detailPrescription;
|
|
|
+ }
|
|
|
+ if (currentGroupNo == "131") {
|
|
|
+ //精二
|
|
|
+ var jePrescription = jsonDataPrescription.xyPrescription.jePrescription;
|
|
|
+ jePrescription[jePrescription.length] = detailPrescription;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -4870,6 +4879,7 @@ function getParamsForOrescription() {
|
|
|
tempJson.orderNo = orderNo;
|
|
|
tempJson.groupNo = currentZyClassType;
|
|
|
jsonData.mzChargeDetailList[jsonData.mzChargeDetailList.length] = tempJson;
|
|
|
+ jsonDataPrescription.zyPrescription[jsonDataPrescription.zyPrescription.length] = $(zyTabContents[i]).text();
|
|
|
}
|
|
|
}
|
|
|
//设置诊疗与医技
|
|
@@ -4914,6 +4924,7 @@ function getParamsForOrescription() {
|
|
|
tempJson.orderNo = orderNo;
|
|
|
jsonData.mzYjReqList[jsonData.mzYjReqList.length] = tempJson;
|
|
|
}
|
|
|
+ jsonDataPrescription.zlPrescription[jsonDataPrescription.zlPrescription.length] = $(zlTabContents[i]).text();
|
|
|
}
|
|
|
}
|
|
|
//设置诊断名称
|
|
@@ -4931,6 +4942,7 @@ function getParamsForOrescription() {
|
|
|
jsonData.icdText = icdText;
|
|
|
jsonData.mzBlRecord.emrFzjc = emrFzjc;
|
|
|
jsonData.mzBlRecord.emrProcess = emrProcess;
|
|
|
+ jsonData.mzBlRecord.prescriptionDetail = JSON.stringify(jsonDataPrescription);
|
|
|
return jsonData;
|
|
|
}
|
|
|
|
|
@@ -4942,7 +4954,7 @@ function savePrescription() {
|
|
|
$("#messageContent").html("确认保存处方吗?");
|
|
|
$("#messageButton").off("click").on("click", function (t) {
|
|
|
$("#messageModal").modal("hide");
|
|
|
- var jsonData = getParamsForOrescription();
|
|
|
+ var jsonData = getParamsForpPrescription();
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: '/thmz/savePrescription',
|
|
@@ -4993,7 +5005,7 @@ function saveapidAccepts() {
|
|
|
$("#messageContent").html("确认保存医疗范文吗?");
|
|
|
$("#messageButton").off("click").on("click", function (t) {
|
|
|
$("#messageModal").modal("hide");
|
|
|
- var jsonData = getParamsForOrescription();
|
|
|
+ var jsonData = getParamsForpPrescription();
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: '/thmz/saveTemplate',
|
|
@@ -5094,7 +5106,7 @@ function getMzPrescriptionVoUnPaid(patientId, times, clnicId) {
|
|
|
$("#confirmPrescriptionButton").off("click").on("click", function (t) {
|
|
|
$("#messagePrescriptionModal").modal("hide");
|
|
|
//先保存目前接诊信息,再切换就诊人
|
|
|
- var jsonData = getParamsForOrescription();
|
|
|
+ var jsonData = getParamsForpPrescription();
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: '/thmz/savePrescription',
|
|
@@ -5157,9 +5169,6 @@ function getMzPrescriptionVoUnPaidCommon(patientId, times, clnicId) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 查询病人已缴费处方信息 调用处方
|
|
|
* @param patientId
|
|
@@ -5184,7 +5193,7 @@ function getMzPrescriptionVoPaid(patientId, times, clnicId) {
|
|
|
return;
|
|
|
}
|
|
|
if (res.code == 0) {
|
|
|
- var mzfzSerialNoInClick=$("#mzfzSerialNoInClick").val();
|
|
|
+ var mzfzSerialNoInClick = $("#mzfzSerialNoInClick").val();
|
|
|
clearWorkSpace();
|
|
|
setMzPatientInfo(res.mzPatientMi);
|
|
|
editPrescription(res.data)
|
|
@@ -5198,8 +5207,6 @@ function getMzPrescriptionVoPaid(patientId, times, clnicId) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 重复接诊
|
|
|
* @param patientId
|
|
@@ -5259,7 +5266,7 @@ function repeatAcceptsConfirm(patientId, times, clnicId) {
|
|
|
$("#confirmPrescriptionButton").off("click").on("click", function (t) {
|
|
|
$("#messagePrescriptionModal").modal("hide");
|
|
|
//先保存目前接诊信息,再切换就诊人
|
|
|
- var jsonData = getParamsForOrescription();
|
|
|
+ var jsonData = getParamsForpPrescription();
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: '/thmz/savePrescription',
|
|
@@ -5342,11 +5349,11 @@ function prescriptionDetail(patientId, times, clnicId, payMark) {
|
|
|
* @param clinicStatus
|
|
|
*/
|
|
|
function visitingDetailModal(patientId, times, clnicId, clinicStatus) {
|
|
|
- var payMark =null;
|
|
|
- if(clinicStatus==5){
|
|
|
- payMark=5;
|
|
|
- }else {
|
|
|
- payMark=0;
|
|
|
+ var payMark = null;
|
|
|
+ if (clinicStatus == 5) {
|
|
|
+ payMark = 5;
|
|
|
+ } else {
|
|
|
+ payMark = 0;
|
|
|
}
|
|
|
prescriptionDetailCommon(patientId, times, clnicId, payMark, 1);
|
|
|
}
|
|
@@ -5549,19 +5556,51 @@ function setPrint() {
|
|
|
/**
|
|
|
* 打印门诊处方
|
|
|
*/
|
|
|
-function printPrescription() {
|
|
|
+function printPrescription(patientId, times, clnicId) {
|
|
|
+ $.ajax({
|
|
|
+ type: "GET",
|
|
|
+ url: '/thmz/getMzPrescriptionVo?patientId=' + patientId + '×=' + times + '&MzBlRecordFlag=false&payMark=0&clnicId=' + clnicId,
|
|
|
+ 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 prescriptionDetail = res.data.mzBlRecord.prescriptionDetail;
|
|
|
+ if (prescriptionDetail != null && prescriptionDetail != "") {
|
|
|
+ var prescriptionDetailJson = JSON.parse(prescriptionDetail);
|
|
|
+ var pyPrescription =prescriptionDetailJson.xyPrescription.pyPrescription;
|
|
|
+ if(pyPrescription!=null && pyPrescription.length>0){
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
// $("#dcountDate").html(format(res.dcountDate, "yyyy-MM-dd HH:mm:ss"));
|
|
|
// $("#dcountDate_gh").html(format(res.dcountDate, "yyyy-MM-dd HH:mm:ss"));
|
|
|
setPrint();
|
|
|
LODOP = getLodop();
|
|
|
- LODOP.PRINT_INITA(6, 0, "210mm", "297mm", "湖南泰和医院处方笺");
|
|
|
+ LODOP.PRINT_INITA(6, 0, "148mm", "210mm", "湖南泰和医院处方笺");
|
|
|
LODOP.SET_PRINT_STYLE("FontSize", 9); //字体大小
|
|
|
//设置默认打印机
|
|
|
LODOP.SET_PRINTER_INDEX(printIndex);
|
|
|
- LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "210mm");
|
|
|
- LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "297mm");
|
|
|
- var strStyle="<style>table{width: 96%;margin-top: 20px;margin-bottom: 10px;} table,td,th {border-width: 1px;border-style: solid;border-collapse: collapse}</style>";
|
|
|
- LODOP.ADD_PRINT_HTM("0mm", "5mm", "200mm", "280mm",strStyle+ document.getElementById("prescription_table").innerHTML);
|
|
|
+ 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", "门诊处方笺");//对新建的纸张重命名
|
|
|
+ LODOP.SET_PRINT_STYLE("FontSize", 11); //字体大小
|
|
|
+
|
|
|
+ var strStyle = "<style>table{width: 96%;margin-top: 20px;margin-bottom: 10px;} table,td,th {}</style>";
|
|
|
+ LODOP.ADD_PRINT_HTM("0mm", "5mm", "140mm", "200mm", strStyle + document.getElementById("prescription_table").innerHTML);
|
|
|
//LODOP.PRINT();
|
|
|
LODOP.PREVIEW();
|
|
|
//刷新数据
|