|
@@ -254,10 +254,12 @@ $(function () {
|
|
|
|
|
|
|
|
|
//键盘监听回车键
|
|
|
- $(document).keyup(function (event) {
|
|
|
+ $(document).unbind("keyup").keyup(function (event) {
|
|
|
if (event.keyCode == 13) { //是否是回车
|
|
|
var el = event.srcElement || event.target;
|
|
|
var id = el.getAttribute("id");
|
|
|
+ var current_code = $("#current_code").val();
|
|
|
+ var index = getIndex("bill_item_group");
|
|
|
if (id == null || id == "") {
|
|
|
id = el.getAttribute("data-id");
|
|
|
}
|
|
@@ -267,30 +269,69 @@ $(function () {
|
|
|
id = $(el).parent().parent().prev().attr("data-id");
|
|
|
}
|
|
|
}
|
|
|
- console.log(id);
|
|
|
- //回车时,光标不在任何区域
|
|
|
+ //回车时,光标不在任何区域判断是不是在药品和诊疗开立区域
|
|
|
if (id == null || id == "") {
|
|
|
var index = getIndex("bill_item_group");
|
|
|
- if (index==0) {
|
|
|
- //当前页面是西药保存页面,且有药品选中
|
|
|
- $("#supplyType").next().click();
|
|
|
- }else if(index==1){
|
|
|
+ if (index == 0) {
|
|
|
+ if (current_code != null && current_code != "") {
|
|
|
+ //当前页面是西药保存页面,且有药品选中
|
|
|
+ $("#supplyType").next().click();
|
|
|
+ }
|
|
|
+ } else if (index == 1) {
|
|
|
//当前页面是中草药保存页面,且有药品选中
|
|
|
- }else if(index==2){
|
|
|
- //当前页面是医技保存页面,且有选中
|
|
|
- if($("#jyZdSampleDiv").hasClass('hide')){
|
|
|
- //检验物是隐藏,说明现在是检查
|
|
|
- $("#yshPart").next().click();
|
|
|
- }else {
|
|
|
- //此时是检验
|
|
|
- $("#jyZdSample").next().click();
|
|
|
+ } else if (index == 2) {
|
|
|
+ if (current_code != null && current_code != "") {
|
|
|
+ //当前页面是医技保存页面,且有选中
|
|
|
+ if ($("#jyZdSampleDiv").hasClass('hide')) {
|
|
|
+ //检验物是隐藏,说明现在是检查
|
|
|
+ $("#yshPart").next().click();
|
|
|
+ } else {
|
|
|
+ //此时是检验
|
|
|
+ $("#jyZdSample").next().click();
|
|
|
+ }
|
|
|
}
|
|
|
- }else if(index==3){
|
|
|
+ } else if (index == 3) {
|
|
|
//当前页面是住院保存页面
|
|
|
$("#inpatientWardBeHospitalized").next().click();
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
- if (id == 'zy_drugWin') {
|
|
|
+ console.log("id=" + id);
|
|
|
+ var customization = $("div.customization").not(".hide");
|
|
|
+ //回车时,光标不在任何区域,默认点击主诉
|
|
|
+ if (id == null || id == "") {
|
|
|
+ var eleId = $(customization[0]).attr("target-id");
|
|
|
+ $("#" + eleId).focus();
|
|
|
+ if (eleId == 'symptom') {
|
|
|
+ $("#" + eleId).click();
|
|
|
+ }
|
|
|
+ console.log("eleId=" + eleId);
|
|
|
+ } else if (id == 'symptom' || id == 'emrHpi' || id == 'emrPs' || id == 'personalHistory' || id == 'familyHistory' || id == 'obstericalHistory' || id == 'otherCheck' || id == 'diagnose' || id == 'tentativeDiagnosis') {
|
|
|
+ console.log("1id=" + id);
|
|
|
+ if (id != $(customization[customization.length - 1]).attr("target-id")) {
|
|
|
+ var next = $("#" + id + "Flag").next();
|
|
|
+ while($(next).hasClass("foreclose") || $(next).hasClass("hide")){
|
|
|
+ next=$(next).next();
|
|
|
+ }
|
|
|
+ var eleId = $(next).attr("target-id");
|
|
|
+ $("#" + eleId).focus();
|
|
|
+ if (eleId == 'diagnose' || id == 'diagnose' || id == 'symptom') {
|
|
|
+ $("#" + eleId).click();
|
|
|
+ }
|
|
|
+ console.log("1eleId=" + eleId);
|
|
|
+ } else {
|
|
|
+ if (index == 0) {
|
|
|
+ $("#western_medicine_name").focus();
|
|
|
+ } else if (index == 1) {
|
|
|
+ $("#chinese_medicine_name").focus();
|
|
|
+ } else if (index == 2) {
|
|
|
+ $("#jcJyItem").focus();
|
|
|
+ } else if (index == 3) {
|
|
|
+ console.log("初步诊断")
|
|
|
+ $("#inpatientWardBeHospitalized").next().click();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (id == 'zy_drugWin') {
|
|
|
$("#zyInstruction").next().click();
|
|
|
} else if (id == 'zyInstruction') {
|
|
|
var ariaExpanded = $("#zyInstruction").next().attr("aria-expanded");
|
|
@@ -355,8 +396,6 @@ $(function () {
|
|
|
} else if (id == 'saveJyJcItem') {
|
|
|
$("#jcJyItem").focus();
|
|
|
$("#jcJyItem").click();
|
|
|
- } else if (id == 'freeBedNum') {
|
|
|
- $("#inpatientWardBeHospitalized").next().click();
|
|
|
} else if (id == 'inpatientWardBeHospitalized') {
|
|
|
$("#smallWardBeHospitalized").next().click();
|
|
|
} else if (id == 'smallWardBeHospitalized') {
|
|
@@ -364,13 +403,29 @@ $(function () {
|
|
|
} else if (id == 'admissStatus') {
|
|
|
saveZyReq(true);
|
|
|
} else if (id == 'western_medicine_name') {
|
|
|
- $("#western_medicine_name").click();
|
|
|
+ if (current_code != null && current_code != "") {
|
|
|
+ //已经选中药品,跳到用法
|
|
|
+ $("#supplyType").next().click();
|
|
|
+ } else {
|
|
|
+ //药品查询框是空白的,打开查询框
|
|
|
+ $("#western_medicine_name").click();
|
|
|
+ }
|
|
|
} else if (id == 'chinese_medicine_name') {
|
|
|
- $("#chinese_medicine_name").click();
|
|
|
+ if (current_code != null && current_code != "") {
|
|
|
+ $("#supplyType").next().click();
|
|
|
+ }else {
|
|
|
+ $("#chinese_medicine_name").click();
|
|
|
+ }
|
|
|
+
|
|
|
} else if (id == 'jcJyItem') {
|
|
|
- $("#jcJyItem").click();
|
|
|
- }else if(id=='zy_req_button'){
|
|
|
+ if (current_code != null && current_code != "") {
|
|
|
+ $("#supplyType").next().click();
|
|
|
+ }else {
|
|
|
+ $("#jcJyItem").click();
|
|
|
+ }
|
|
|
+ } else if (id == 'zy_req_button') {
|
|
|
//当前页面是住院保存页面,此时光标在入院按钮上
|
|
|
+ console.log("入院按钮")
|
|
|
$("#inpatientWardBeHospitalized").next().click();
|
|
|
}
|
|
|
}
|
|
@@ -4253,7 +4308,7 @@ function fitDiagnoseValue(value, code) {
|
|
|
}
|
|
|
html += ' title="' + value + '(' + code + ')" id="' + code + '"><span class="el-select__tags-text">' + value + '</span><i class="fa fa-remove .el-icon-close" style="margin-left: 10px;height: 16px;width: 16px;cursor: pointer;" onclick="removeDiagnoseValue(\'' + code + '\')"></i><span style="clear: both"></span></span>';
|
|
|
$("#diagnoseTags").append(html);
|
|
|
- $("#diagnoseTags").parent().parent().css("height",$("#diagnoseTags").height());
|
|
|
+ $("#diagnoseTags").parent().parent().css("height", $("#diagnoseTags").height());
|
|
|
|
|
|
|
|
|
}
|
|
@@ -4278,7 +4333,7 @@ function removeDiagnoseValue(code) {
|
|
|
}
|
|
|
var diagnoseValue = $("#diagnoseValue").val();
|
|
|
$("#diagnoseValue").val(diagnoseValue.replace(code, ""));
|
|
|
- $("#diagnoseTags").parent().parent().css("height",$("#diagnoseTags").height());
|
|
|
+ $("#diagnoseTags").parent().parent().css("height", $("#diagnoseTags").height());
|
|
|
}
|
|
|
|
|
|
|
|
@@ -5348,7 +5403,7 @@ function fitWesternMedicine(res, groupNo) {
|
|
|
// $("#gross").attr("readonly", "readonly");
|
|
|
// }
|
|
|
calculate();
|
|
|
-
|
|
|
+ $("#western_medicine_name").focus();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -8198,7 +8253,7 @@ function initCertificateTypeSelect() {
|
|
|
* @param times
|
|
|
* @param type 1 编辑 2 预览
|
|
|
*/
|
|
|
-function showMzBlRecordModal(patientId, times,type) {
|
|
|
+function showMzBlRecordModal(patientId, times, type) {
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
url: '/thmz/getMzBlrecord?patientId=' + patientId + '×=' + times,
|
|
@@ -8291,21 +8346,21 @@ function showMzBlRecordModal(patientId, times,type) {
|
|
|
} else {
|
|
|
$("#editEmrJkjy").parent().parent().parent().css("display", "none");
|
|
|
}
|
|
|
- if(type==1){
|
|
|
+ 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){
|
|
|
+ } 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()=="")){
|
|
|
+ if ($("#mzBlTimes").val() != null && $("#mzBlTimes").val() != "" && ($("#baseMzBlTimes").val() == null || $("#baseMzBlTimes").val() == "")) {
|
|
|
$("#baseMzBlTimes").val($("#mzBlTimes").val());
|
|
|
}
|
|
|
$("#otherBlRecordModal").modal("hide");
|
|
@@ -8320,13 +8375,12 @@ function showMzBlRecordModal(patientId, times,type) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 清空区域
|
|
|
*/
|
|
|
function clearInput() {
|
|
|
//编辑病历的时候,没有基础病历的就诊次数,如果是预览病历的时候,有基础病历的次数
|
|
|
- var baseMzBlTimes=$("#baseMzBlTimes").val();
|
|
|
+ var baseMzBlTimes = $("#baseMzBlTimes").val();
|
|
|
$("#editPatientId").text(null);
|
|
|
$("#editPatientName").text(null);
|
|
|
$("#editPatientGender").text(null);
|
|
@@ -8344,7 +8398,7 @@ function clearInput() {
|
|
|
$("#editEmrJkjy").val(null);
|
|
|
$("#newEmrProcess").val(null);
|
|
|
$("#mzBlTimes").val(null);
|
|
|
- if(baseMzBlTimes!=null && baseMzBlTimes!=""){
|
|
|
+ if (baseMzBlTimes != null && baseMzBlTimes != "") {
|
|
|
$("#otherBlRecordModal").modal();
|
|
|
}
|
|
|
|
|
@@ -8352,9 +8406,6 @@ function clearInput() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 保存门诊病历
|
|
|
*/
|
|
@@ -8381,7 +8432,6 @@ function setEmrProcess() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 提交保存门诊病历
|
|
|
*/
|
|
@@ -8421,8 +8471,6 @@ function sendEmrProcess() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 打开待合并病历列表弹框
|
|
|
*/
|
|
@@ -8574,7 +8622,6 @@ function queryOtherParams(params) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 提取处理意见保存
|
|
|
*/
|
|
@@ -8586,7 +8633,7 @@ function setOtherEmrProcess() {
|
|
|
$("#messageModal").modal("hide");
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
- url: '/thmz/extractEmrProcess?patientId=' + $("#editPatientId").html() + '&baseTimes=' + $("#baseMzBlTimes").val()+ '×=' + $("#mzBlTimes").val(),
|
|
|
+ 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")},
|